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/chess.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/chess.h') diff --git a/src/chess.h b/src/chess.h index 245a3b0..abf802e 100755 --- a/src/chess.h +++ b/src/chess.h @@ -819,6 +819,10 @@ typedef struct _COUNTERS UINT64 u64LazyEvals; UINT64 u64FullEvals; UINT64 u64CyclesInEval; + UINT64 u64HistoryPrunes; + UINT64 u64HistoryPruneReSearches; + UINT64 u64FutilityCandidates; + UINT64 u64FutilityPrunes; } tree; @@ -928,6 +932,7 @@ typedef struct _PLY_INFO #endif SCORE iEval; INT iExtensionAmount; + FLAG fIsPVNode; // (iBeta != iAlpha+1) at this ply FLAG fInCheck; FLAG fInQsearch; MOVE mv; @@ -2315,6 +2320,14 @@ ComputeMoveScore(IN SEARCHER_THREAD_CONTEXT *ctx, FLAG ThreadUnderTerminatingSplit(SEARCHER_THREAD_CONTEXT *); +void +InitializeLMRTable(void); + +INT +ExtraReduction(IN ULONG uRemainingDepth, + IN ULONG uMoveNum, + IN ULONG uFailHighPct); + FLAG WeShouldDoHistoryPruning(IN SCORE iRoughEval, IN SCORE iAlpha, -- cgit v1.3