summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-08-30 19:08:01 -0700
committerScott Gasch <[email protected]>2026-08-30 19:08:01 -0700
commite8021f3938179e38c24b995777213fd6d629192a (patch)
treefdd6ec670e5a576d25de7b526965c7ae603bc399 /src/search.c
parentdbf71219abeb51d386b0f7294f1664f2906d2b82 (diff)
Oops, a couple of issues with that last one.
Diffstat (limited to 'src/search.c')
-rwxr-xr-xsrc/search.c24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/search.c b/src/search.c
index 4a153aa..6352f97 100755
--- a/src/search.c
+++ b/src/search.c
@@ -526,18 +526,20 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
(ctx->sPlyInfo[ctx->uPly - 2].iExtensionAmount <= 0))
{
ASSERT(uDepth >= THREE_QUARTERS_PLY);
- if ((uDepth <= ONE_PLY + THREE_QUARTERS_PLY) &&
- (iEval + VALUE_KNIGHT + iImprovement <= iAlpha))
- {
- uFutilityMargin = (iAlpha - iEval) / 2;
- ASSERT(uFutilityMargin);
- }
- else if ((uDepth > ONE_PLY + THREE_QUARTERS_PLY) &&
- (uDepth <= TWO_PLY + THREE_QUARTERS_PLY) &&
- (iEval + VALUE_ROOK + iImprovement <= iAlpha))
+
+ if (iEval < iAlpha)
{
- uFutilityMargin = (iAlpha - iEval) / 2;
- ASSERT(uFutilityMargin);
+ if ((uDepth <= ONE_PLY + THREE_QUARTERS_PLY) &&
+ (iEval + VALUE_KNIGHT + iImprovement <= iAlpha))
+ {
+ uFutilityMargin = (iAlpha - iEval) / 2;
+ }
+ else if ((uDepth > ONE_PLY + THREE_QUARTERS_PLY) &&
+ (uDepth <= TWO_PLY + THREE_QUARTERS_PLY) &&
+ (iEval + VALUE_ROOK + iImprovement <= iAlpha))
+ {
+ uFutilityMargin = (iAlpha - iEval) / 2;
+ }
}
}
uStage++;