diff options
| author | Scott Gasch <[email protected]> | 2026-08-30 17:17:44 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-08-30 17:17:44 -0700 |
| commit | fd1460b2c135f6cef502fd167d1df0edf223e312 (patch) | |
| tree | ee20bae148e436a88abfb9e709fcf96634f04d45 /src/searchsup.c | |
| parent | 3eac7f469add78edb9dd7dced36bde5427346321 (diff) | |
Improving for nullmove, eval speedup, remove old cruft, bugfix in split / MP.
Diffstat (limited to 'src/searchsup.c')
| -rw-r--r-- | src/searchsup.c | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/searchsup.c b/src/searchsup.c index 72667c8..d2cbbbd 100644 --- a/src/searchsup.c +++ b/src/searchsup.c @@ -1089,14 +1089,14 @@ SelectNullmoveRFactor(SEARCHER_THREAD_CONTEXT *ctx, } -FLAG -WeShouldTryNullmovePruning(SEARCHER_THREAD_CONTEXT *ctx, - SCORE iAlpha, - SCORE iBeta, - SCORE iRoughEval, - ULONG uNullDepth) +FLAG WeShouldTryNullmovePruning(SEARCHER_THREAD_CONTEXT *ctx, + SCORE iAlpha, + SCORE iBeta, + SCORE iRoughEval, + SCORE iImprovement, + ULONG uNullDepth) { - static SCORE _iDistAlphaSkipNull[] = { + static SCORE iSkipNullMargins[] = { 700, 950, 1110, 1150, 1190, 1230, 1270, 0 }; POSITION *pos = &ctx->sPosition; @@ -1119,8 +1119,14 @@ WeShouldTryNullmovePruning(SEARCHER_THREAD_CONTEXT *ctx, { u = uNullDepth / ONE_PLY; ASSERT(u <= 6); - if ((iRoughEval + _iDistAlphaSkipNull[u] <= iAlpha) || - ((iRoughEval + _iDistAlphaSkipNull[u] / 2 <= iAlpha) && + SCORE iMargin = iSkipNullMargins[u]; + if (iImprovement > 0) + { + iMargin -= iImprovement; + iMargin = MAX(0, iMargin); + } + if ((iRoughEval + iMargin <= iAlpha) || + ((iRoughEval + iMargin / 2 <= iAlpha) && (ValueOfMaterialInTroubleAfterNull(ctx, pos->uToMove)))) { return FALSE; |
