summaryrefslogtreecommitdiff
path: root/src/searchsup.c
diff options
context:
space:
mode:
authorScott Gasch <[email protected]>2026-09-20 10:20:16 -0700
committerScott Gasch <[email protected]>2026-09-20 10:20:16 -0700
commit48a958fb6e14607a68067a09b4a4cb576bf6b742 (patch)
tree8951c83088995df8c3e5efe328634478c27ba5b4 /src/searchsup.c
parent8c0d66f13f08cb5e760d787a878260ad67d17c13 (diff)
INFINITY -> INFINITY_SCORE to not collide with math.h.
Diffstat (limited to 'src/searchsup.c')
-rw-r--r--src/searchsup.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/searchsup.c b/src/searchsup.c
index 49027db..781c702 100644
--- a/src/searchsup.c
+++ b/src/searchsup.c
@@ -804,7 +804,7 @@ Return value:
ULONG x, uBegin, uEnd;
MOVE mv;
SCORE iScore;
- SCORE iBestScore = -INFINITY;
+ SCORE iBestScore = -INFINITY_SCORE;
ULONG uBest;
FLAG fFailHigh = FALSE;
SCORE rgScores[MAX_MOVES_PER_PLY];
@@ -840,7 +840,7 @@ Return value:
// honest score for every move at this ply (a fail-high partway
// through means we stop early, deliberately, without searching the
// rest). Committing partial data into iValue and then patching the
- // gaps with a sentinel (this function used to write -INFINITY into
+ // gaps with a sentinel (this function used to write -INFINITY_SCORE into
// every unsearched move) makes the whole ply look "rescored" to
// downstream code when it isn't really -- see the fail-high handling
// below for why that matters.
@@ -855,7 +855,7 @@ Return value:
mv.bvFlags |= WouldGiveCheck(ctx, mv);
if (TRUE == MakeMove(ctx, mv))
{
- if (-INFINITY == iBestScore)
+ if (-INFINITY_SCORE == iBestScore)
{
iScore = -Search(ctx, -iBeta, -iAlpha, uDepth);
}
@@ -885,7 +885,7 @@ Return value:
// Genuinely illegal (pseudo-legal but leaves king in check)
// -- this isn't "unknown," we know for a fact it's worthless
// and the caller will skip it too when MakeMove fails again.
- rgScores[x - uBegin] = -INFINITY;
+ rgScores[x - uBegin] = -INFINITY_SCORE;
}
}
@@ -908,7 +908,7 @@ Return value:
// for the rest (deliberately -- searching them would burn nodes
// solely to confirm what we've already decided to do, which is
// play uBest). Rather than inventing eval-axis values for moves
- // we never examined (the old code wrote -INFINITY into all of
+ // we never examined (the old code wrote -INFINITY_SCORE into all of
// them, including -- until fixed -- overwriting uBest's own
// just-computed score), leave every move's original generate.c
// ordering value completely untouched and just bump uBest into
@@ -1088,7 +1088,7 @@ Return value:
Trace(" \t");
}
- iEval = Eval(&temp, -INFINITY, +INFINITY, NULL);
+ iEval = Eval(&temp, -INFINITY_SCORE, +INFINITY_SCORE, NULL);
Trace("%5s (%+2d) | ", ScoreToString(iEval),
temp.sPosition.iMaterialBalance[temp.sPosition.uToMove] / 100);
Trace("%5s (%2u) | ",
@@ -1335,7 +1335,7 @@ Return value:
piAlpha,
piBeta))
{
- ASSERT(*piScore != -INFINITY);
+ ASSERT(*piScore != -INFINITY_SCORE);
ASSERT((*piScore <= *piAlpha) || (*piScore >= *piBeta));
goto end;
}
@@ -1420,7 +1420,7 @@ FLAG WeShouldTryNullmovePruning(SEARCHER_THREAD_CONTEXT *ctx,
if ((FALSE == pf->fAvoidNullmove) &&
(TotalNonPawnCount(pos, pos->uToMove) > 2) &&
(FALSE == pi->fInCheck) &&
- (iBeta != +INFINITY) &&
+ (iBeta != +INFINITY_SCORE) &&
(NODE_PV != pi->eNodeType))
{
if (uNullDepth <= 6 * ONE_PLY)