Skip to content

Add open variable lists - #248

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

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

Conversation

@zayenz

@zayenz zayenz commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Add variable lists whose length is decided during propagation and search. Variables are constructed as positions are needed, so a sequence can grow without a padded suffix.

  • OpenIntVarList, OpenBoolVarList, and generic OpenVarList<Var> with factory and transition callbacks.
  • Constraints that follow list growth, including regular languages, and branching with standard variable and value selectors.
  • Route, frequent subsequence mining, and 15-puzzle examples, with scripts for comparing open and fixed representations.

Depends on #257. Factories and transitions use Space::NoGPI by default. Callbacks can use Space::UseGPI for selected postings that need ordinary AFC.

Focused tests and examples passed on macOS, including ASan/UBSan checks and independent pattern-mining comparisons. A broader sanitizer run failed during FlatZinc brancher construction. Linux and Windows validation is pending.

@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 added 12 commits October 15, 2026 15:47
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