summaryrefslogtreecommitdiff
path: root/src/bitboard.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-05 22:20:10 -0700
committerScott Gasch <[email protected]>2026-10-05 22:20:10 -0700
commit5fbd9353fa9b1a80f37bcf0339f5546ac88091b8 (patch)
tree5ac60b40603fd8c6fd051a44a24fd0e5e21425a6 /src/bitboard.c
parentbb7cdcda4c8c30ad0ed71d0f60427daf05977b24 (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/bitboard.c')
-rw-r--r--src/bitboard.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bitboard.c b/src/bitboard.c
index 2832fdb..24e6ceb 100644
--- a/src/bitboard.c
+++ b/src/bitboard.c
@@ -164,6 +164,10 @@ BITBOARD BBFILE[8] = {
BBFILEH
};
+// Left / Right half of board.
+BITBOARD BBLEFT = BBFILEA | BBFILEB | BBFILEC | BBFILED;
+BITBOARD BBRIGHT = BBFILEE | BBFILEF | BBFILEG | BBFILEH;
+
//
// A way to select one rank
//