From dddcaa09ad12f1972a3128748b5d90d22f9a9326 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Thu, 3 Sep 2026 17:40:17 -0700 Subject: Cherry-pick non-LMR fixes and tooling from the "LMR" stash Pulled the parts of the stashed LMR work that are genuinely independent of the reduction logic itself, leaving the actual LMR redesign for separate review: - Fix extension-taper table overflow: remove the flat MAX_EXTEND_PER_LINE cap and instead clamp the depth used to build g_uExtensionReduction[] so a deep `sd` request can't leave the whole taper table stuck at "0 penalty" (every index unreachable). - Remove a spuriously-firing ASSERT(fMovesRescoredByIID) in Search(): RescoreMovesViaSearch's own fail-high branch deliberately leaves that flag FALSE by contract, so the assert could fire on any DEBUG build given an unlucky rescore, making the DEBUG/TEST harness unreliable. - Misc correctness/portability fixes: unix.c pointer-truncation casts, chess.h's CONTAINING_STRUCT/IS_ENPASSANT/ABS_DIFF macro hardening (plus gating the branchless bit-tricks on _X64_ too, not just _X86_), removal of dead Slide*WithoutSigs prototypes, main.c's hash default bumped to 256m and its CPP self-test's arch gate widened to _X64_. - eval_tune/match_play.py: cosmetic SPRT progress-bar/output rework. - Delete eval_tune/run_ecm.sh (superseded, unreferenced elsewhere). - run_tests.sh: parameterize suites/SD/SN via args/env vars instead of hardcoding the three curated suites and sd10/sn5M (defaults kept pointing at the existing curated suites, since the stash's own lmr_sensitive_30/lmr_control_30 default suites aren't present in the repo). Deliberately left out of this commit: the stash's actual LMR reduction logic, the M-SIGNAL-SHADOW diagnostic subsystem, the large PERF_COUNTERS instrumentation buildout, the history-table gravity rework, and the FindEnprisePiece pre-move staleness fix (skipped per request pending a decision on whether to also change EFP's pruning behavior). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01MjdDfHry3i2jfJzyDXaG8A --- src/split.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'src/split.c') diff --git a/src/split.c b/src/split.c index 28d5ce0..a1f9d32 100755 --- a/src/split.c +++ b/src/split.c @@ -1128,15 +1128,12 @@ Return value: &iExtend); // - // Cap total extension plies spent on this line, same as the - // non-split move loop in search.c does. + // Note: MAX_EXTEND_PER_LINE (a flat, non-depth-relative cap on + // total extension spent per line) used to be applied here. + // Removed -- g_uExtensionReduction[] is the sole extension- + // runaway guard now, same as the non-split move loop in + // search.c. // - if (iExtend > 0) - { - iExtend = MIN(iExtend, - MAX(MAX_EXTEND_PER_LINE - - ctx->sSearchFlags.iCumulativeExtend, 0)); - } // // Decide how much (if any) to reduce this move's depth. -- cgit v1.3