Expand description
Exact game-theoretic references for benchmark positions.
Port of benchmarks/reference.py: a position’s reference is the game
value for the side to move plus the complete set of optimal moves,
produced by full-depth minimax and stored only when every child was
solved with no cutoff.
Functions§
- augment_
with_ references - Fill reference fields in place; the
openingphase is skipped (its positions are too expensive to solve and never contribute to exact move-agreement figures). - augment_
with_ references_ with_ book - Like
augment_with_references, but reads through (and writes back into)bookwhen given — seesolve_position_with_book. - move_
key - Stable string identifier for a move:
player:shape:position. - parse_
move_ key - Parse a move key into
(player, shape, position). - solve_
position - Return an exact reference for
bb, orNoneon budget cutoff. - solve_
position_ with_ book - Like
solve_position, but first probesbook(when given) for a stored solved reference atbb’s canonical key, short-circuiting the minimax solve on a hit. On a fresh solve, the result is written back throughbook(best-effort — a write failure is silently ignored, the solve itself already succeeded and is returned regardless).