diff options
| author | Scott Gasch <[email protected]> | 2026-10-07 08:17:51 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-07 08:17:51 -0700 |
| commit | d14dbe2a50c220b2adac758c3d4f1a1fa67ece0b (patch) | |
| tree | cbf6d9928bcc41ef833b62b70479113f7d419925 /src/searchsup.c | |
| parent | 447130db3df87b40d080dc26429d45e9213c19f7 (diff) | |
Speed up eval/move-gen/SEE; remove EvalLookForDanger, overhaul _EvalKing
SPRT-confirmed improvement (1814 games, st 4.0): candidate nps=1498118
vs head=1378448, avg depth 14.30 vs 13.87, ELO=+24.2+/-16.0,
LOWER95=0.5118, LLR=+3.126 crossing the H1 bound.
Most of the diff is non-semantic speed work across eval.c, generate.c,
movesup.c, see.c, probe.c and friends. Two real semantic changes:
removed EvalLookForDanger and overhauled _EvalKing's king-safety scoring.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'src/searchsup.c')
| -rw-r--r-- | src/searchsup.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/src/searchsup.c b/src/searchsup.c index ca75c92..726bc9f 100644 --- a/src/searchsup.c +++ b/src/searchsup.c @@ -51,7 +51,7 @@ Return value: this->PV[u] = mv; u++; - // HASHMOVE/RECOGNMOVE/DRAWMOVE/MATEMOVE are sentinels, not real + // HASHMOVE/RECOGNMOVE/DRAWMOVE/MATEMOVE/EGTBMOVE are sentinels, not real // moves -- WalkPV (util.c) treats any of them as a hard PV // truncation point and asserts the slot right after one is // always a zero terminator. Copying the child ply's PV tail @@ -67,7 +67,8 @@ Return value: if ((mv.uMove == HASHMOVE.uMove) || (mv.uMove == RECOGNMOVE.uMove) || (mv.uMove == DRAWMOVE.uMove) || - (mv.uMove == MATEMOVE.uMove)) + (mv.uMove == MATEMOVE.uMove) || + (mv.uMove == EGTBMOVE.uMove)) { if (u < MAX_PLY_PER_SEARCH) { @@ -805,7 +806,7 @@ Return value: return TRUE; } -INT +INT FORCEINLINE GetLMRReduction(IN SEARCHER_THREAD_CONTEXT *ctx, IN ULONG uRemainingDepth, IN ULONG uLegalMoves, @@ -1282,15 +1283,16 @@ Return value: } -void ComputeMoveExtension(IN SEARCHER_THREAD_CONTEXT *ctx, - IN SCORE iAlpha, - IN SCORE iBeta, - IN ULONG uMoveNum, - IN SCORE iRoughEval, - IN ULONG uDepth, - IN SCORE iMoveSee, - IN FLAG fIsLeftoverMove, - IN OUT INT *piExtend) +void FORCEINLINE +ComputeMoveExtension(IN SEARCHER_THREAD_CONTEXT *ctx, + IN SCORE iAlpha, + IN SCORE iBeta, + IN ULONG uMoveNum, + IN SCORE iRoughEval, + IN ULONG uDepth, + IN SCORE iMoveSee, + IN FLAG fIsLeftoverMove, + IN OUT INT *piExtend) /** Routine description: @@ -1629,6 +1631,7 @@ Return value: SelectBestNoHistory(ctx, x); mv = ctx->sMoveStack.mvf[x].mv; mv.bvFlags |= WouldGiveCheck(ctx, mv); + ctx->sMoveStack.mvf[x].mv = mv; // <-- update the move's flags, WouldGiveCheck is slow if (TRUE == MakeMove(ctx, mv)) { if (-INFINITY_SCORE == iBestScore) @@ -1886,7 +1889,7 @@ Return value: } -FLAG +FLAG FORCEINLINE CommonSearchInit(IN SEARCHER_THREAD_CONTEXT *ctx, IN OUT SCORE *piAlpha, IN OUT SCORE *piBeta, |
