From ba803fe406ee2470aa461578f530d292380ec241 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Tue, 25 Aug 2026 14:03:46 -0700 Subject: Add LMR with PV-adjacency guard (v7), verified against saved binary Late Move Reductions using a depth x movecount table (Ethereal-style formula), gated off PV nodes and the ply directly below a PV node (PLY_INFO.fIsPVNode), with magnitude-aware re-search on fail-high. Verified node-for-node identical to the previously tested-good v7 binary on a canary position (sd 10) after reconstructing from a ZFS snapshot of search.c/root.c/split.c taken just before that binary was built. Co-Authored-By: Claude Sonnet 5 --- src/root.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/root.c') diff --git a/src/root.c b/src/root.c index aa678b1..7c50a65 100755 --- a/src/root.c +++ b/src/root.c @@ -456,6 +456,17 @@ Return value: ASSERT(d); Trace("Null move cutoff rate: %5.3f percent.\n", ((n / d) * 100.0)); + n = (double)(ctx->sCounters.tree.u64HistoryPruneReSearches); + d = (double)(ctx->sCounters.tree.u64HistoryPrunes) + 1; + Trace("History/LMR pruning: %"COMPILER_LONGLONG_UNSIGNED_FORMAT + " reduced, %5.3f percent needed a full-depth re-search.\n", + ctx->sCounters.tree.u64HistoryPrunes, ((n / d) * 100.0)); + n = (double)(ctx->sCounters.tree.u64FutilityPrunes); + d = (double)(ctx->sCounters.tree.u64FutilityCandidates) + 1; + Trace("Futility pruning: %"COMPILER_LONGLONG_UNSIGNED_FORMAT + " candidates, %5.3f percent actually pruned " + "(rest saved by fail-high%% / SEE gates).\n", + ctx->sCounters.tree.u64FutilityCandidates, ((n / d) * 100.0)); if (ctx->sCounters.egtb.uProbes > 0) { n = (double)(ctx->sCounters.egtb.uHits); -- cgit v1.3