Skip to content

Provisional: extensible random generators and splitting for Gecode 7 (breaking changes) - #241

Draft
zayenz wants to merge 14 commits into
mainfrom
feature/random
Draft

zayenz wants to merge 14 commits into
mainfrom
feature/random

Conversation

@zayenz

@zayenz zayenz commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Provisional design for Gecode 7 or another release permitting breaking changes. Not ready to merge or suitable for Gecode 6.x: APIs, binary compatibility, seeded sequences, and randomized choice archives change.

Add extensible random generators with complete-state replay and reproducible indexed splitting. SplitMix is the default; xorshift64* is an alternative. Generators are stored by value, and randomized choices record the selector states needed for recomputation. Cloning does not split streams; model and custom-brancher transitions remain explicit.

Local Apple Clang 21 ARM64 measurements put SplitMix near the old cloning time, with about 16% overhead in the controlled recomputation workload. Xorshift64* was slower. Engine selection and performance tradeoffs remain under review. Recorded-state replay does not guarantee parallel solution order.

Contracts and migration guidance are in Doxygen and the changelog; the custom-engine example and benchmark tool provide usage instructions.

@zayenz zayenz changed the title Provisional: splittable random streams for Gecode 7 (breaking changes) Provisional: extensible random generators and splitting for Gecode 7 (breaking changes) Sep 10, 2026

@zayenz zayenz left a comment •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • RandomOption now stores validated state as Rnd and returns a copy, avoiding serialization and parsing in the accessor.
  • Documented selector hook buffer sizes, pointer advancement, capture timing, and restore/split behavior.
  • Completed override annotations in the two affected selector classes. This removes the missing-override warnings.

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