Repository navigation
Phase 6 cp sat - #8
Merged
Merged
Conversation
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
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jfg9fgTR9LYn4D2rTtfifs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Merge was done into parent branch, not into main - fixing