diff options
| author | Scott Gasch <[email protected]> | 2026-10-20 18:37:45 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-20 18:37:45 -0700 |
| commit | 4e6e78fc767985b9a06ce0fc5dda392027bcc25a (patch) | |
| tree | 864c3458d8998dd3797726953540123c8bde9b91 /src | |
| parent | 9cf14e14e6999420f234cda951894337e034f57c (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')
| -rw-r--r-- | src/GNUmakefile | 23 | ||||
| -rw-r--r-- | src/searchsup.c | 13 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/GNUmakefile b/src/GNUmakefile index 7dbb143..08cbf15 100644 --- a/src/GNUmakefile +++ b/src/GNUmakefile @@ -168,6 +168,29 @@ endif ifdef PERF_COUNTERS PROFILE += -DPERF_COUNTERS endif +# 2026-10-10: this flag was referenced (search.c's joint-table/marginal +# collection block, #ifdef FH_TABLE_COLLECTION) but never actually wired +# to a compiler define anywhere in this makefile -- every prior +# collection run must have been built some other way (or this gap +# predates the comment claiming it's "a live, in-progress collection +# run"). Requires PERF_COUNTERS=1 too (the block this gates is nested +# inside an outer #ifdef PERF_COUNTERS). +# +# Re-added 2026-10-20: this wiring was itself silently dropped at some +# point after landing (collateral damage from the 2026-10-14 PRUNE_VERIFY/ +# PRUNE_LIVE dead-flag cleanup, going by GNUmakefile.orig's surviving copy) +# -- every FH_TABLE_COLLECTION=1 build in between compiled clean but +# never actually included the instrumentation. Caught before launching +# the NNUE dual-table re-collection run; a smoke-test build+run with +# this restored confirmed -DFH_TABLE_COLLECTION actually reaches the +# compiler and the (currently 4D-alpha-only, no beta side -- see +# docs/NNUE.md) FOURAXISRAW dump fires. The original run's richer +# ALPHARAW/BETARAW/ESTRAW dump format no longer exists in this tree at +# all (not just unwired) -- that's the separate, larger restoration +# this collection run is waiting on, tracked alongside this fix. +ifdef FH_TABLE_COLLECTION +PROFILE += -DFH_TABLE_COLLECTION +endif ifdef MOVE_ORDERING_EVIDENCE_COLLECTION PROFILE += -DMOVE_ORDERING_EVIDENCE_COLLECTION endif 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 |
