diff options
| author | Scott Gasch <[email protected]> | 2026-08-28 21:13:48 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-08-28 21:13:48 -0700 |
| commit | bb07fbd8612dbf2cfb6f257e8cba47b95c83c867 (patch) | |
| tree | 98c24ef6275a394691d6d772c36fb9d3e66b8cb8 /src/mersenne.c | |
| parent | 1509b3e593258690cbe3eee761a54f105111fc72 (diff) | |
Replace EFP (what this file erroneously called EFP for years) with
Heinz's actual two-tier schedule, a hardened per-move checklist, and a
TT-soundness fix. Proto-LMR (live, unrelated) untouched.
The old condition used a single flat VALUE_ROOK margin across
uDepth <= TWO_PLY -- that's neither of the two numbers Heinz's book
actually specifies for that range. Split into his real two tiers,
each gated on the same common conditions (PV-node guard added; HEAD's
version had none, unlike GetLMRReduction which has always required
non-PV) but different depth bands and margins:
- frontier ("selective futility"): VALUE_KNIGHT, one ply above the
QSearch jump (bands are relative to THREE_QUARTERS_PLY, the actual
cutoff, not ONE_PLY, since the check-extension rework lowered it).
- pre-frontier ("extended futility pruning" proper): VALUE_ROOK, the
next ply out.
Heinz's third tier ("limited razoring", pre-pre-frontier, VALUE_QUEEN)
is a per-node depth reduction, not a per-move prune -- a different
technique, deliberately not implemented here (spiritual predecessor to
LMR, revisit then). Also drops the old ValueOfMaterialInTroubleDespite-
Move requirement (an en-prise/trapped-piece safety net) -- intent is
to fire on ordinary quiet positions too, not just ones with an already-
flagged piece in danger.
Per-move checklist, replacing an ASSERT that captures/checks couldn't
reach here (untrue in a non-DEBUG build, so no actual protection) with
real exemptions: explicit !IS_CAPTURE_OR_PROMOTION / !IS_CHECKING_MOVE,
a killer-adjacency exemption (ply-1/ply-3, borrowed from
GetLMRReduction), a well-evidenced fail-high-history exemption
(GetMoveFailHighPercentage, >=5 samples before trusting it), an
en-prise-escape exemption, and suppression at any node where this
node's own null-move probe raised fThreat.
TT-soundness fix (Heinz's own book, quoted directly): a node whose
result depends on alpha/beta via forward pruning can't be stored as an
exact score or a sound upper bound -- a skipped move might have been
the best one, so the true value could be higher than computed in
either case. Tracks fAnyMoveEFPPruned; downgrades an alpha-raise to
StoreLowerBound instead of StoreExactScore when set, and skips hash
storage entirely on a fail-low with pruning (no sound bound available
in either direction).
Verified against head_reference (HEAD, commit 7e762b2) at sd10:
ecm_ringers: 10/11 -> 9/11 (-1 solve), -8.96% nodes
ecm_confident_quick: 87/90 -> 88/90 (+1 solve), -16.49% nodes
ecm_hard_quick: 17/90 -> 15/90 (-2 solve), -15.94% nodes
Net -2 solves across 269 positions for 9-16% fewer nodes per suite --
similar shape to Heinz's own reported trade-off in the book (8 lost
solutions for -16.70% fewer nodes). Old flat-margin candidates built
earlier today (kept in git stash, not this commit) only achieved
0.3-1% node reduction vs. a no-EFP baseline; dropping the stale
material-in-trouble gate is what actually recovered real pruning
power, not the checklist alone.
Diffstat (limited to 'src/mersenne.c')
0 files changed, 0 insertions, 0 deletions
