From 0d6f69c63e89c06200078d58d762f00041995135 Mon Sep 17 00:00:00 2001 From: Alex Kunich Date: Sat, 3 Oct 2026 21:50:20 +0300 Subject: [PATCH] queens: count complete boards from --json writ's text report now lists only the first 20 dead ends (writ#21), so counting 8-move routes in it found 0 of 92. --json still lists every dead end. Passes against released 0.4.0 and the writ#21 branch. Co-Authored-By: Claude Opus 5.5 --- run-tests.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/run-tests.sh b/run-tests.sh index 31c0223..415f17e 100755 --- a/run-tests.sh +++ b/run-tests.sh @@ -93,9 +93,12 @@ queens() { # A complete board is a dead end reached in EIGHT moves — one per column, # since the cursor advances exactly once per placement. The other dead ends # are stuck prefixes, whose routes are shorter, which is why this counts - # route length rather than dead ends. - n=$(printf '%s\n' "$out" | grep 'reached by:' \ - | awk -F'reached by:' '{ if (split($2, a, ",") == 8) c++ } END { print c+0 }') + # route length rather than dead ends. Counted from --json: the prose report + # lists only the first 20 dead ends. + n=$("$WRIT" check "$here/queens/queens.writ" --claims "$here/queens/queens.claims" \ + --json --no-certificate 2>/dev/null \ + | grep -o '"state":[0-9]*,"route":\[[^]]*\]' \ + | awk -F'"move"' 'NF - 1 == 8 { c++ } END { print c+0 }') if [ "$n" -eq 92 ]; then ok "queens: B. all 92 complete boards are found (each a dead end)" else