← Knot viewer

Brute force, with markings learned during search.

Scope: this is the diagram-seam control. The research target remains an exact lattice-knot classifier; see the lattice classifier subgoals and reference corpus through 12 crossings. The viewer presents results and does not define the classifier's state or limits.

The default experiment is now a generic point-value search. Its input contains only tile identifiers, exact capacity contributions, and opaque seam values. It has no diagram parser, crossing count, Reidemeister move names, coloring invariants, braid identities, pretrained policy, or known solution. Knot-specific code constructs the inventory of legal move tiles and independently checks the resulting movie.

What the search does

The complete finite inventory includes insertions, deletions, type-III moves, and stationary holds. Every time slot is an active root obligation of generation zero. The engine rebuilds the full frontier/candidate incidence graph, checks all dead points, propagates all forced candidates, then branches. Minimum candidate count breaks generation ties; a content-free seeded permutation of tile identifiers determines candidate order, so the inventory's grouping by move type does not become an implicit simplification heuristic. Marking-only points participate in every legality check. Immutable selected lists and branch-local exclusions provide exact rollback.

What is learned online

Each run begins with no learned marking values. After an exhausted child branch, a separate brute-force, unmarked probe fixes only that candidate and searches the entire finite problem. This checks whether the failed candidate is impossible independently of the observed prefix. A witnessed completion means the failure was contextual and stays branch-local. A node-budget stop is unresolved and adds no marking.

An exhausted complete probe justifies an additional marking-only point: the fixed boundary assigns 0 and that candidate assigns 1. Ordinary marking disagreement removes the candidate from the shared graph. The version increments and the entire live prefix and graph are reconstructed before the next dead/forced/branch decision. There is no precomputed backward reachability pass or runtime failure-clause scanner.

Guards are proved redundant only for this exact finite inventory and endpoint boundary. No assignments persist between runs or transfer to larger move limits, crossing caps, or different targets. Default learning limits are 64 probes and 10,000 nodes per probe; unresolved learning does not restrict the base search. The main search has its separate node budget, and all proof costs are reported.

Evidence and limits

The six-crossing trefoil reaches the standard trefoil in three moves with both methods. The exact branch and marking counts are reported by the live run; a path found without backtracking learns zero failure markings. Generic point fixtures exercise actual online activation, subsequent marking eliminations, contextual failures, unresolved probes, cold restart, and immutable rollback. Small knot cases agree with independent exhaustive path recursion. Certificate replay verifies the move sequence.

This remains a whole-diagram seam adaptation. It does not yet learn transferable markings on local hexagonal Reidemeister tiles. The next step is a local point-value inventory with explicit unchanged boundary collars, followed by local unmarked extension tests and marking synthesis. The expensive unmarked probes are deliberately transparent; no speedup is claimed.

Catalog construction exhaustively enumerates bounded legal diagram transitions before the point search, without solving backward from the target. An incomplete catalog returns unknown. Complete exhaustion within finite limits also leaves general knot equivalence unknown. The search no longer declares the trefoil different from the unknot using a coloring shortcut.

The previous coloring, precomputed seam, and knot-feature RL experiment remains available as solveSpecialized for historical controls. It is not used by the viewer. The earlier research plan and trefoil benchmark preserve that experiment's original semantics.

node tests/test_knot_online.mjs
node tests/test_knot_movie.mjs
node tests/test_knot_drawing.mjs