summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-14 12:41:05 -0700
committerScott Gasch <[email protected]>2026-10-14 12:41:05 -0700
commitdc77f67396cd99aea4ac1567f55ca3d8c6825fb7 (patch)
treee24c44a1c668de86c78e285d0bd8b4592e055d39 /src/search.c
parentbb2d7a9cce6275fcfb038c8a3ab248ba3cf2c827 (diff)
Plumb fThreat and attack snapshots into SPLIT_INFO (prep for step 4)
UNIFY_SEARCH.md step 3: add fThreat and the two attack-snapshot bitboards (bbMinorAttacksSnapshot/bbRookAttacksSnapshot) to SPLIT_INFO (chess.h), populated by StartParallelSearch (split.c) from values the originating thread already has at split-launch time, passed through from search.c's call site. Plumbing only -- nothing reads these fields yet (HelpSearch() still runs its own inline copy, untouched). That's step 4: unify HelpSearch() onto SearchOneMove, at which point it can pass these real values instead of the zeroed snapshots and missing fThreat its current hand-rolled gate has. Sequenced before step 4 deliberately (not combined or left for after): landing the plumbing first means there's no window where HelpSearch() calls the real CanWeReduceOrPruneMove()/ShouldLatePrune() gate with stale/zeroed snapshots -- see UNIFY_SEARCH.md's note on why that matters for FH_TABLE_COLLECTION's sampling. Verified: precommit_check.sh passes. Bit-identical node counts at sd10/--cpus 1 across all three curated suites, zero change (expected -- single-threaded path never reads these new fields). cpus 4 smoke run across all three suites: clean exits, no crashes. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/search.c')
-rw-r--r--src/search.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/search.c b/src/search.c
index 78c473c..6e9c4da 100644
--- a/src/search.c
+++ b/src/search.c
@@ -977,7 +977,10 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
&mvBest,
(x - 1),
iPositionalExtend,
- uDepth);
+ uDepth,
+ fThreat,
+ bbMinorAttacksSnapshot,
+ bbRookAttacksSnapshot);
ASSERT(iAlpha < iBeta);
ASSERT((IS_SAME_MOVE(pi->PV[ctx->uPly], mvBest)) ||
(iScore <= iAlpha) || (iScore >= iBeta));