Repository navigation
Build attack, geometry, PSQT and Zobrist tables at compile time - #73
Merged
Merged
Conversation
Add forward square iteration and enforce template-only node contracts with constexpr call-site guards. Capture exhaustive reference-table comparisons before replacing startup generators.
Generate immutable leaper, pawn, geometry and mirrored PSQT tables and remove startup initialization calls. Preserve every original Zobrist key with constexpr MT19937-64 and independently verify the original output order against the standard generator.
Preserve the original magic records and shared table layout in immutable static storage. Build and validate every entry during constant evaluation, with evaluator budgets scoped to the attack-table source file.
Integrate deploy-elo b1f1487 while preserving compile-time attack, geometry, PSQT and Zobrist tables. Adapt the new incremental-state checks to the immutable Zobrist keys. The bench line records the CI hardware reference; both local default bench comparisons searched 1068467 nodes. Bench: 696698
Bench: 696698 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Bench: 696698 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use 32-byte magic descriptors and 64-byte boundaries for the immutable attack tables. Enforce the descriptor size at compile time while preserving the generated values and lookup arithmetic. Validate search identity and baseline-equivalent CPU throughput with eight alternating pairs in each order. The bench line records the requested CI reference. Bench: 696698
Bench: 696698 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Step 1 of the core code-quality audit: constant tables are built at compile time instead of through mutable globals and
Init*calls. Search is unchanged: depthbench depth 12 × 30 positions gives 4,405,976 nodes and move hashe874be3afor base and branch; perft, all tests and the clang 23 build pass.Bitboardis fullyconstexprand iterable as a range of squares; template contracts userequiresinstead of runtime asserts.constexprMT19937-64 and are tested bit-identical tostd::mt19937_64. TheInit*calls inmain, tests and tools are gone.Build cost: CPU time +1.7%, peak compiler memory 0.5 → 1.1 GiB (constexpr budgets are scoped to
Attacks.cpp).🤖 Generated with Claude Code