Skip to content

Add open variable lists - #248

Open
zayenz wants to merge 37 commits into
mainfrom
feature/open-cp
Open

zayenz wants to merge 37 commits into
mainfrom
feature/open-cp

Conversation

@zayenz

@zayenz zayenz commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Add variable lists whose positions are constructed during propagation and search. Models can express sequences of unknown length without allocating a fixed array and encoding an unused suffix.

OpenIntVarList, OpenBoolVarList, and generic OpenVarList<Var> provide an eventual-length variable, factory and transition callbacks, constraints that follow list growth, and standard branching selectors. Regular-language filtering excludes prefixes that cannot reach an accepting state within the maximum list length. Callbacks run with global propagator information disabled by default (Space::NoGPI); models can opt into ordinary accumulated failure counts with Space::UseGPI.

The open-route example introduces list construction, constraints, branching, and solutions. Common-pattern uses prefix projection to mine frequent subsequences, and fifteen-puzzle builds a sequence of moves.

Validation: focused open-list, regular-constraint, and pattern-mining tests passed under ASan/UBSan and with static mimalloc 3.5.3. Common-pattern returned its expected two solutions in both builds. Leak detection was disabled for existing test-registration and thread-pool lifetimes. Repository formatting checks passed.

@zayenz
zayenz changed the base branch from main to feature/improved-regular-construction October 4, 2026 18:18
@zayenz zayenz changed the title Add open integer variable sequences and constraints Add open variable sequences Oct 5, 2026
@zayenz
zayenz added this pull request to stack #250 October 5, 2026 13:21
@zayenz zayenz changed the title Add open variable sequences Add open variable lists Oct 6, 2026
Base automatically changed from feature/improved-regular-construction to main October 8, 2026 17:43
@zayenz
zayenz force-pushed the feature/open-cp branch 2 times, most recently from e7e8370 to 5e20c4f Compare October 12, 2026 19:30
@zayenz
zayenz force-pushed the feature/open-cp branch 2 times, most recently from e2a0fe9 to 8207ea7 Compare October 15, 2026 13:47
@zayenz
zayenz marked this pull request as ready for review October 20, 2026 06:49
@zayenz
zayenz force-pushed the feature/open-cp branch 2 times, most recently from 9d34bd4 to 0e679a7 Compare October 20, 2026 20:33
zayenz added 16 commits October 21, 2026 09:59
Construct boards through an OpenIntVarList path transition and compare
with a bounded array model using the same slide and goal rules. Minimize
moves with BAB, and expose independent scramble, seed, and move-limit
options. Keep the default move limit at twelve for a short demonstration.

Register the example in CMake and Autoconf, including its generated
include dependencies, and document state-versus-move length accounting.

Validated both models in Debug and ASan/UBSan builds with the defaults,
an explicit scramble/limit/seed case, a solved start, and an insufficient
move bound. Replayed every printed path to verify legal slides and the
goal board. Independent Astra review passed.
Wait for the current board to become assigned before closing or extending
the path. Keep callback captures limited to the state index and retrieve
the model from the supplied space. Remove the initial Manhattan lower
bound on length to avoid constructing future boards at the root.

Both models pass small explicit, solved-start, and insufficient-limit
cases in Debug and ASan/UBSan builds. Printed paths were replayed, and a
root diagnostic confirms two constructed boards for scramble20/limit32,
seed3. Independent focused review passes.

The open default now exceeds a 30-second Debug cutoff because delayed
goal detection removes early backward goal propagation. Its usability
needs a separate coordinated follow-up; no extra pruning rule is included
in this model correction.
Reject assigned boards whose Manhattan distance cannot fit the current
path upper bound. Recheck this condition after incumbent cuts, taking
care not to read a board before propagation assigns it. Force the goal
when a constructed board reaches the final permitted state.

Keep path growth lazy: these checks do not increase its minimum length
or construct future boards. The fixed model and shared slide rules stay
unchanged.

Focused Debug and ASan/UBSan runs pass for defaults, explicit options,
a solved start and an insufficient move limit. Printed paths were
replayed. The default open model completes in 39 nodes, and the root
probe still constructs two boards for scramble20/limit32/seed3.
Independent Astra recheck passes.

This branch has not been deployed

No deployments
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