diff options
| author | Scott Gasch <[email protected]> | 2026-10-05 22:20:10 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-05 22:20:10 -0700 |
| commit | 5fbd9353fa9b1a80f37bcf0339f5546ac88091b8 (patch) | |
| tree | 5ac60b40603fd8c6fd051a44a24fd0e5e21425a6 /src/chess.h | |
| parent | bb7cdcda4c8c30ad0ed71d0f60427daf05977b24 (diff) | |
Cache good/bad-bishop pawn-structure score in the pawn hash
iBishopColorScore[color][complex] is a pure function of pawn placement
(own/enemy, stationary/transient) on a bishop's color complex, so it
doesn't need rescanning per-bishop -- computed once per pawn-hash miss
in _EvalPawns and reused by every bishop of that color/complex in
_EvalBishop, mirroring the same cache-the-per-structure-invariant idea
already used elsewhere in eval.c.
Also disables two speculative check-extension/futility-gating
experiments in search.c (#if 0, not deleted -- kept for reference)
that didn't hold up, and adds the BBLEFT/BBRIGHT bitboard constants
eval.c's bishop-mobility rewrite needs.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/chess.h')
| -rwxr-xr-x | src/chess.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/chess.h b/src/chess.h index b9cba3d..fde5c6f 100755 --- a/src/chess.h +++ b/src/chess.h @@ -1746,6 +1746,14 @@ typedef struct _PAWN_HASH_ENTRY UCHAR uCountPerFile[2][10]; UCHAR uNumRammedPawns; UCHAR uNumUnmovedPawns[2]; + SHORT iBishopColorScore[2][2]; // [color][IS_SQUARE_WHITE(bishop's + // square)] -- good/bad-bishop + // pawn-structure score, pure + // function of pawn placement (see + // _EvalBishop's cache-miss + // population in eval.c), reused by + // every bishop of that color/ + // complex instead of rescanned. } PAWN_HASH_ENTRY; @@ -3143,6 +3151,8 @@ extern MOVE MATEMOVE; extern FLAG g_fIsWhiteSquare[128]; extern BITBOARD BBFILE[8]; extern BITBOARD BBRANK[9]; +extern BITBOARD BBLEFT; +extern BITBOARD BBRIGHT; extern BITBOARD BBWHITESQ; extern BITBOARD BBBLACKSQ; extern BITBOARD BBLEFTSIDE; |
