summaryrefslogtreecommitdiff
path: root/src/lmr_testing/search_c_snippets.txt
blob: 72d4ae5af30c2f5de6fb0682bebf9b5867b3ccec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
search.c changes to restore (both trivial one-liners):

1. Near `iInitialAlpha = iAlpha;` (right after it), add:

    pi->fPvNode = (iBeta != iAlpha + 1);

2. OPTIONAL -- only if resuming "isolate LMR's effect alone" testing
   methodology (i.e. you want LMR-only numbers uncontaminated by
   futility pruning again). If instead you want to test LMR *combined*
   with futility (recommended next step per yesterday's session), skip
   this and leave futility on as it is in the clean baseline.

   Find the futility-pruning block:

       ASSERT(!uFutilityMargin);
       if ((iRoughEval + VALUE_ROOK <= iAlpha) &&
           (uDepth <= TWO_PLY) &&
           ...

   and disable it for isolation testing:

       ASSERT(!uFutilityMargin);
       if (FALSE && // temporarily disabled to isolate graded-LMR's
                    // effect in isolation during testing
           (iRoughEval + VALUE_ROOK <= iAlpha) &&
           (uDepth <= TWO_PLY) &&
           ...

Everything else in search.c (the GetLMRReduction call site, the
re-search-add-back using `uNextDepth -= iExtend`) is already generic
and needs NO changes -- it was written to work with any reduction
magnitude GetLMRReduction returns, so it already works correctly with
both the baseline's fixed -ONE_PLY and the graded version.