summaryrefslogtreecommitdiff
path: root/src/searchsup.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-20 18:37:45 -0700
committerScott Gasch <[email protected]>2026-10-20 18:37:45 -0700
commit4e6e78fc767985b9a06ce0fc5dda392027bcc25a (patch)
tree864c3458d8998dd3797726953540123c8bde9b91 /src/searchsup.c
parent9cf14e14e6999420f234cda951894337e034f57c (diff)
Fix FH_TABLE_COLLECTION makefile wiring; disable LMP censoring during collection builds
FH_TABLE_COLLECTION was referenced in search.c/searchsup.c/chess.h but had no GNUmakefile wiring to a compiler define -- collateral damage from the 2026-10-14 PRUNE_VERIFY/PRUNE_LIVE dead-flag cleanup, going by GNUmakefile.orig's surviving pre-cleanup copy, which still had it. Every "collection" build in between compiled clean but silently never included the instrumentation. Restored. Also: under FH_TABLE_COLLECTION, force fThisMoveLMPPruned = FALSE instead of calling ShouldLatePrune. ShouldLatePrune is itself partly driven by uPredictedFH -- a lookup into the CURRENTLY LOADED data.c table -- so leaving LMP live during a collection run meant the old (soon-to-be-replaced) table decided which moves were "safe enough" to go unobserved by the new collection, silently censoring the very population the new table is supposed to measure. Collection builds now always try every eligible leftover move. Found while preparing the NNUE-eval dual-table (alpha+beta FH%) re-collection run (docs/NNUE.md's eval-swap calibration checklist, section 3) -- the current tree's collection instrumentation also turns out to be missing the 5D alpha table's `improve` axis and the entire beta-side table relative to the original dual_table_run collection; that restoration is tracked as separate, larger follow-up work. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/searchsup.c')
-rw-r--r--src/searchsup.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/searchsup.c b/src/searchsup.c
index 7c69d0a..f3d1370 100644
--- a/src/searchsup.c
+++ b/src/searchsup.c
@@ -1839,6 +1839,18 @@ Return value:
uRawImproveB);
// Late move pruning; skip searching under this move?
+#ifdef FH_TABLE_COLLECTION
+ // Collection builds must not let LMP skip a move before it
+ // ever reaches the INC() calls below -- ShouldLatePrune is
+ // itself partly driven by uPredictedFH, i.e. the CURRENTLY
+ // LOADED data.c table, so leaving it live here would mean the
+ // old (soon-to-be-replaced) table decides which moves are
+ // "safe enough" to go unobserved by the new collection,
+ // silently censoring the population the new table is trying
+ // to measure. Force every eligible leftover move to actually
+ // be tried instead.
+ fThisMoveLMPPruned = FALSE;
+#else
fThisMoveLMPPruned = ShouldLatePrune(
ctx,
uDepth,
@@ -1846,6 +1858,7 @@ Return value:
uFHAttempts,
uFHPctThousandths,
uPredictedFH);
+#endif
// If LMP didn't fire, we are going to search below this
// move. But if the move is very late, we might reduce