Skip to content

Phase 6 cp sat - #8

Merged
kuvychko merged 2 commits into
mainfrom
phase-6-cp-sat
Nov 11, 2026
Merged

kuvychko merged 2 commits into
mainfrom
phase-6-cp-sat

Conversation

@kuvychko

Copy link
Copy Markdown
Member

Merge was done into parent branch, not into main - fixing

kuvychko and others added 2 commits November 11, 2026 06:47
cp_sat.placements hands OR-Tools CP-SAT a finite list of placements and
what they exclude among themselves, and chooses an assembly from it. The
list is the placements the corner search of rust.contact_dfs puts down
anywhere in its tree, built in one Rust call (tiling-search::enumerate)
together with their conflicts (tiling-geometry::conflict).

The model: one Boolean per placement; each class of congruent pieces
takes as many placements as it has members; overlaps stated as "at most
one" over a grid of probe points and the rest as pairs; coverage stated
as "at least one" per probe point of the target. One worker, no
objective. Tray rotations are removed from the choices using the images
Rust reports, so the solver still crosses into Rust once.

Switches: the listing search's anchor, cavity_pruning, closure_pruning
and tray_rotations; coverage; targeted_probes (off: fewer pairs, slower).

The exit test, tests/corpus/test_cp_sat.py, runs both solvers to the end
on all 20 fixtures and compares the assemblies as placed polygons. The
model's exclusions are also checked pair by pair against Shapely.

Findings are in docs/algorithms.md: once the placements are listed the
choice takes none to a few hundred conflicts where the search takes up
to a million nodes, and the coverage constraints are what make it so.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Jfg9fgTR9LYn4D2rTtfifs
@kuvychko
kuvychko merged commit 81be4ac into main Nov 11, 2026
4 checks passed
@kuvychko
kuvychko deleted the phase-6-cp-sat branch November 11, 2026 19:59
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.

1 participant