Skip to content

Phase 8: the edge-to-edge assumption, and cor1 in the corpus - #10

Merged
madeline-v-brandt merged 2 commits into
mainfrom
phase-8-edge-to-edge
Nov 12, 2026
Merged

madeline-v-brandt merged 2 commits into
mainfrom
phase-8-edge-to-edge

Conversation

@kuvychko

Copy link
Copy Markdown
Member

Tropical puzzles are cut from a polyhedral complex, so by the balancing condition their pieces meet edge to edge: no T inside the tray. rust.contact_dfs can now be told to assume this. It is an assumption, separate from the regime, not a pruning rule: it narrows what a whole search finds, so a result records it, names its own candidate set (corner-contact[-relief]-edge-to-edge/1), and is compared only with results under the same assumption.

What it adds

  • tiling-geometry: Meeting; Assembly refuses a placement that makes a T (rejected_junction). Two rules follow from the assumption, each a switch tested not to change what the assumed search finds: equal_edges (edge-graph arcs need equal lengths and end heights) and wall_edges (an edge with no partner stays on the tray, rejected_wall).
  • Assumption.EDGE_TO_EDGE in the models; solvers declare what they can assume (python.contact_dfs and cp_sat.placements refuse it); maxplus-solve --assume, assume in manifests, an assumes column, proxies.static(..., edge_to_edge=True).
  • benchmarks/manifests/edge_to_edge.toml and the committed benchmarks/results/edge_to_edge.md.
  • Docs: algorithms.md (argument, ablation, findings), solver-contract.md, architecture.md, experiments.md, roadmap, CLAUDE.md invariant "an assumption is not a rule".

Exit test: tests/corpus/test_edge_to_edge.py::test_the_assumption_finds_exactly_the_edge_to_edge_assemblies: on every corpus fixture, the assumed search finds exactly the plain search's assemblies that an independent twin-edge check (support.geometry.is_edge_to_edge) calls edge to edge, both rules on and off, the answer key among them. Rust proptests on chord-cut tilings (which have T's) and line-arrangement tilings (which don't).

Findings

  • The eight original footprints take 14 to 80 nodes instead of 45 to 1 064 878: fewer than their relief twins assuming nothing. new1-flat: 1 064 878 → 49.
  • Mean edge degree: 23–84 → 0.8–2.4 on footprints.
  • Of rat1-flat's 101 assemblies and rat2-flat's 2, only the answer has no T.
  • wall_edges saves nodes (up to 1.7×); equal_edges only saves candidate work.
  • cor1 stays hard: 1 529 → 967 nodes with roofs; without roofs, 48 edge-to-edge assemblies in 44 539 nodes.

cor1 joins the corpus

Re-imported from tropical-puzzle-lab main (b1a1792); the other 16 fixtures change only in source commit and hashes (completion rules upstream only had a refactor plus the glue assist). cor1-flat is the first corpus puzzle whose plain search does not end, so:

  • the corpus and edge-to-edge manifests stop searches that assume nothing at 1 500 000 nodes (above new1-flat's 1 064 878), so the tables are machine-independent; corpus.md gains the cor1 rows and a node_limit column, no existing count moves;
  • tests that need the end of the plain search leave it out by name (support.corpus.UNFINISHED) and test it apart: stopped, it returns nothing; assuming edge to edge, all 48 assemblies are valid and edge to edge, the key among them.

Found along the way: CP-SAT's listing search takes candidates in generated order, so where it is stopped at a limit its counts differ from rust.contact_dfs's (they agree wherever both finish). experiments.md now says so.

Checks

Locally on Windows: HYPOTHESIS_PROFILE=ci uv run pytest 1618 passed (slow and source included); cargo tests 137 passed; ruff, pyright, cargo fmt and clippy clean. Phase 8 is ticked only after CI passes on Linux and Windows.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Jfg9fgTR9LYn4D2rTtfifs

Tropical puzzles are cut from a polyhedral complex, so by the balancing
condition their pieces meet edge to edge: no T inside the tray. The search
did not use this. It is added as an assumption, separate from the regime:
it narrows what a whole search finds, so a result records it, names its
own candidate set (corner-contact[-relief]-edge-to-edge/1) and is compared
only with results under the same assumption.

- tiling-geometry: Meeting; Assembly refuses a placement that makes a T
  (rejected_junction). Two rules follow, each a switch: equal_edges (arcs of
  the edge graph need equal lengths and end heights) and wall_edges (an edge
  with no partner stays on the tray, rejected_wall).
- rust.contact_dfs declares the assumption; the prototype and
  cp_sat.placements refuse it. maxplus-solve --assume, `assume` in
  manifests, an `assumes` column, proxies.static(..., edge_to_edge=True).
- Exit test: on every corpus fixture, the assumed search finds exactly the
  plain search's assemblies that an independent twin-edge check calls edge
  to edge, rules on and off, the key among them. Proptests on chord-cut and
  line-arrangement tilings.
- benchmarks/manifests/edge_to_edge.toml and results/edge_to_edge.md.

Findings: the footprints take 14 to 80 nodes instead of 45 to 1 064 878,
fewer than the relief searches assuming nothing; of rat1-flat's 101
assemblies and rat2-flat's 2, only the answer has no T.

cor1 is re-imported from tropical-puzzle-lab main (b1a1792); the other 16
fixtures change only in source commit and hashes. Its plain footprint
search does not end, so the corpus and edge-to-edge manifests stop searches
that assume nothing at 1 500 000 nodes (new1-flat needs 1 064 878), and
tests that need the end of that search leave cor1-flat out by name
(support.corpus.UNFINISHED) and test it apart. corpus.md moves because of
the two cor1 rows each for rust.contact_dfs and cp_sat.placements and the
node_limit column, regenerated with the command; no existing count changed.
With roofs cor1 takes 1 529 nodes, 967 assuming edge to edge; without, 48
edge-to-edge assemblies in 44 539 nodes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jfg9fgTR9LYn4D2rTtfifs
@kuvychko

Copy link
Copy Markdown
Member Author

I added a new section to the artifact as well - interesting findings! :-)

@madeline-v-brandt
madeline-v-brandt merged commit 709c2ac into main Nov 12, 2026
2 checks passed
@kuvychko
kuvychko deleted the phase-8-edge-to-edge branch November 12, 2026 22:55
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.

2 participants