Commit a252d4c
chesstb: support frozen opposing-pawn-pair ('p') tables in the prober
Mirror the generator/probe additions for the lowercase-'p' material: an
opposing pawn pair (white below black on one file) indexed jointly so a
large table shrinks to a partial 'p' variant.
- PairGroup: the 120-placement same-file opposing enumeration, with
index_of / find_canonical matching src/egtb/pair_group.h exactly (the
on-disk pawn-slice ids depend on the enumeration order).
- PawnSliceManager: 3-way pair x free_white x free_black product.
- PositionIndexConfig: force file-mirror symmetry when a pair is present,
collect the pair pawns even with no free-pawn class, and split the
canonical opposing pair out of the all-pawns placement at index time.
- PieceConfig: has_pair flag; min_key stays pair-stripped (on-disk header),
cache_key adds the pair bit so a 'p'-material and its free-pieces twin
(e.g. KQpKp vs KQK) don't collide in the in-memory caches; name() emits
'p' on both sides (KQpKp).
- probe(): prefer the 'p' table for an opposing-pair board when it is on
disk, else fall back to the full material.
Cross-checked 500 random KQpKp/KpKp positions against the C++ probe_fen
(WDL + DTC) with zero mismatches.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 88b35fa commit a252d4c
2 files changed
Lines changed: 255 additions & 79 deletions
0 commit comments