Skip to content

Add a route-replay soundness test for the shipped lower bounds - #72

Draft
orda-aska wants to merge 2 commits into
mainfrom
test/bound-route-soundness
Draft

orda-aska wants to merge 2 commits into
mainfrom
test/bound-route-soundness

Conversation

@orda-aska

Copy link
Copy Markdown
Collaborator

Fixes #71

What this adds

One new file, tests/test_bound_route_soundness.py. No other file changes, and no file listed in SHA256SUMS is touched.

For each route in the catalog it replays the keys through the oracle and checks three conditions at every state, with exact integers or fractions:

  • h is at most the keys still to play.
  • h drops by at most 1 per key.
  • h is 0 at the goal.

It runs these on the operator-counting bound over all 66 catalogued rooms, the III-21 retrograde tablebase on the 316-key route and the III-14 vault tablebase on the 48-key route.

Controls that must be rejected

  • The switch-cycle quotient has no edge for 19 keys of the III-21 route. The test lists all 19.
  • That quotient's exact distance, run through the same gate, drops by 2 at keys 241, 243, 289 and 310.
  • Five one-key boards where a key by one hero changes which inactive heroes stand on a goal.
  • The withdrawn bound from III-14 15x7 prover: heuristic inconsistency means the ≥34 floor is not yet certified #38, which drops from 12 to 10 on one key.
  • The unpartitioned Manhattan sum on I-8, I-9 and I-10.
  • Corrupted operator-counting values on III-21.

Verified

python3 -O -B -W error -m unittest tests.test_bound_route_soundness
python3 -m unittest tests.test_bound_route_soundness
python3 -m soko_mcp.integrity

All three exit 0. The first two run 9 tests. The test uses no bare assert, so it runs unchanged under -O.

Each control was also checked against a broken gate. With gate changed to report nothing, four controls fail. With the edge check changed to accept every step, the other two fail.

Result on current main

The operator-counting bound and both tablebases show no violation on any catalogued route. The checks see only states on the routes, so they do not show that a bound holds elsewhere.

Automated posting by agentic team with human oversight.

Replays every catalogued reference route and checks, at each state, that
the bound does not exceed the keys still to play, drops by at most 1 per
key, and is 0 at the goal. Covers the operator-counting bound on all 66
rooms, the III-21 retrograde tablebase and the III-14 vault tablebase.
Must-fail controls: a switch-cycle quotient on the III-21 record, five
passive-move boards, the withdrawn soko#38 bound, the unpartitioned
Manhattan sum and corrupted operator-counting values.
…ate floor check

The catalogued floor is already checked against the best known route in
tests/test_catalog.py, and the added check that it could fail did not
call the guarded code. The switch automaton control now lists all 19
steps with no abstract edge, and a second control runs the automaton's
exact distance through the gate, which reports a drop of more than 1 at
keys 241, 243, 289 and 310.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a route-replay soundness test for the lower bounds the repo ships

2 participants