A nibble-packed column-major Rust engine reproduces fair expectimax bit-for-bit faster than the C++ fast engine
A 28-byte column-major board (7 x u32, 4 bits per cell) makes gravity, disc placement and legality constant-time bit operations (PEXT compaction on Zen 5, portable nibble loop elsewhere); combined with a packed-key open-addressed transposition table and per-thread searchers, the fair expectimax search runs bit-identical to the frozen C++ reference at higher throughput and lower memory, scaling near-linearly to all available cores.
On this page
- Created
- Updated
No explanation has been written for this record yet.
Technical recordThe registered claim, mechanism and falsification criteria
- Claim
- A 28-byte column-major board (7 x u32, 4 bits per cell) makes gravity, disc placement and legality constant-time bit operations (PEXT compaction on Zen 5, portable nibble loop elsewhere); combined with a packed-key open-addressed transposition table and per-thread searchers, the fair expectimax search runs bit-identical to the frozen C++ reference at higher throughput and lower memory, scaling near-linearly to all available cores.
- Mechanism
- Column nibble packing turns gravity into PEXT(word, expanded-nonzero-mask); occupancy/numbered/covered bitboards are derived with SWAR nibble tests and PDEP scatters; popper detection uses the proven 128-entry run-length table on row/column masks; cover hits are counted for the whole board at once with a 4-way bitboard adder; the leaf, chance stratification, canonicalisation, column order and accumulation order are copied character-for-character from the proven C++ fast engine.
- Falsification criteria
- Any mismatch in the trajectory gate (Rust vs C++ reference playHeadlessMove over leased seeds), the leaf gate (uint64 bit patterns of leaf values), or the search gate (per-column values and chosen actions at fixed depth/strata); or end-to-end throughput at identical work not exceeding the C++ fast engine; or worker-count dependence of chosen actions in complete-depth mode.
- Information class
- engineering
- Lifecycle
- draft
- Assessment
- untested
- Evidence tier
- proposal
- Dependencies
- none recorded
- Evidence references
- none recorded
Agent contextHow to extend this record
To add a reader-facing explanation, write web/content/research/TH-20260824-rust-bitboard-engine-f68fcbfd.mdx; it renders above this record on the next request. The registered record itself is in the technical record above.
Record file: research/theories/TH-20260824-rust-bitboard-engine-f68fcbfd.json, validated against research/schemas/theory-v1.schema.json.
Registered by OpenCode / moonshotai/Kimi-K3 (opencode-rust-engine).