summaryrefslogtreecommitdiff
path: root/src/movesup.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-10-14 10:49:20 -0700
committerScott Gasch <[email protected]>2026-10-14 10:49:20 -0700
commit3d54c2cc82366040f00d5901f80dbe4e9d7bfe10 (patch)
treee143c4db3a541feb9aa88fac1ef78a9ff77117e0 /src/movesup.c
parentdad4620a92f51a1d0825fc99fa98fd2b16c0f280 (diff)
Loosen LMP pruning thresholds; trim stale comments/dead code in search.c
Raise uLMPStaticMaxPctThousandths across the board (200/200/150/75/50/ 25/12/6/3/1/0 -> 325/300/250/200/150/100/80/25/6/1/0) and LMP_DYNAMIC_MAX_PCT_THOUSANDTHS (1 -> 10000), letting the search go deeper/faster by pruning more leftover moves per the dynamic FH% evidence tables rather than the old hand-picked caps. Partial self-play testing (two ~1k-game SPRT runs, LLR trending up both times, stopped early) supports this but hasn't yet crossed +5 Elo. Also: drop movesup.c's already-commented-out FLEE_BONUS selection-time nudge (superseded by the evidence-gated countermove work), remove search.c's now-stale dated commentary and two unused EFP flags (fTryEFPHere/fThisMoveEFPPruned), and fix searchsup.c's beta-table sentinel to use the named JOINT_TABLE_SENTINEL instead of a bare 0xFFFF. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/movesup.c')
-rw-r--r--src/movesup.c40
1 files changed, 7 insertions, 33 deletions
diff --git a/src/movesup.c b/src/movesup.c
index 4b86947..7266177 100644
--- a/src/movesup.c
+++ b/src/movesup.c
@@ -1456,20 +1456,6 @@ Return value:
return;
}
- // Flee-to-safety: a small, same-tier selection-time nudge (not a
- // GOOD_MOVE promotion -- that class was retired, see generate.c's
- // RETIRED comment) for a quiet move whose origin square is
- // currently en prise. NOT loop-invariant across repeated calls at
- // the same node the way TotalNonPawnCount was in search.c/eval.c's
- // recent hoists -- RecordEnprisePiece (dynamic.c) only populates
- // this ply's cache from inside Eval(), which doesn't necessarily
- // run before every single SelectBestWithHistory call at this node,
- // so a later call in the same node can legitimately see a fresher
- // answer than an earlier one. Recomputed every call (2026-09-16:
- // briefly hoisted to the caller, reverted after a DEBUG-build
- // ASSERT here caught the mismatch -- see git log).
- // cEnprise = FindEnprisePiece(ctx, ctx->sPosition.uToMove);
-
// Continuation history: "did a move like this tend to fail high
// right after a move like that?", keyed by (previous move, this
// move) at the same [piece][to] coarseness g_HistoryCounters
@@ -1498,29 +1484,19 @@ Return value:
fHaveContinuation *
CONTINUATION_SCALE *
g_ContinuationHistory[(uPrevContKey * CONT_KEY_RANGE) + MOVE_TO_CONT_KEY(mv)]);
- //if (mv.cFrom == cEnprise)
- //{
- // iBestVal += FLEE_BONUS;
- //}
}
uLoc = u;
for (v = u + 1; v < uEnd; v++)
{
- iVal = ctx->sMoveStack.mvf[v].iValue;
mv = ctx->sMoveStack.mvf[v].mv;
- if (!IS_CAPTURE_OR_PROMOTION(mv))
- {
- iVal += g_HistoryCounters[mv.pMoved][mv.cTo];
- iVal += (
- fHaveContinuation *
- CONTINUATION_SCALE *
- g_ContinuationHistory[(uPrevContKey * CONT_KEY_RANGE) + MOVE_TO_CONT_KEY(mv)]);
-// if (mv.cFrom == cEnprise)
-// {
-// iVal += FLEE_BONUS;
-// }
- }
+ iVal = ctx->sMoveStack.mvf[v].iValue;
+ iVal += !IS_CAPTURE_OR_PROMOTION(mv) * (
+ g_HistoryCounters[mv.pMoved][mv.cTo] +
+ fHaveContinuation *
+ CONTINUATION_SCALE *
+ g_ContinuationHistory[(uPrevContKey * CONT_KEY_RANGE) + MOVE_TO_CONT_KEY(mv)]
+ );
if (iVal > iBestVal)
{
iBestVal = iVal;
@@ -1528,9 +1504,7 @@ Return value:
}
}
- //
// Note: the if here slows down the code, just swap em.
- //
mvfTemp = ctx->sMoveStack.mvf[u];
ctx->sMoveStack.mvf[u] = ctx->sMoveStack.mvf[uLoc];
ctx->sMoveStack.mvf[uLoc] = mvfTemp;