Merge commit 'd47aa639bd614b37a59f87e6ab68496580f0cf3e' into cluster

This is the last commit before there are more conflicts.
This commit is contained in:
Steinar H. Gunderson
2025-12-24 15:02:03 +01:00
6 changed files with 132 additions and 33 deletions
+5 -5
View File
@@ -1012,11 +1012,11 @@ moves_loop: // When in check, search starts here
if (!givesCheck && lmrDepth < 7 && !ss->inCheck)
{
Piece capturedPiece = pos.piece_on(move.to_sq());
int futilityEval =
ss->staticEval + 287 + 277 * lmrDepth + PieceValue[capturedPiece]
Value futilityValue =
ss->staticEval + 288 + 277 * lmrDepth + PieceValue[capturedPiece]
+ thisThread->captureHistory[movedPiece][move.to_sq()][type_of(capturedPiece)]
/ 7;
if (futilityEval < alpha)
if (futilityValue <= alpha)
continue;
}
@@ -1439,7 +1439,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
Key posKey;
Move ttMove, move, bestMove;
Depth ttDepth;
Value bestValue, value, ttValue, futilityValue, futilityBase;
Value bestValue, value, ttValue, futilityBase;
bool pvHit, givesCheck, capture;
int moveCount;
Color us = pos.side_to_move();
@@ -1569,7 +1569,7 @@ Value Search::Worker::qsearch(Position& pos, Stack* ss, Value alpha, Value beta,
if (moveCount > 2)
continue;
futilityValue = futilityBase + PieceValue[pos.piece_on(move.to_sq())];
Value futilityValue = futilityBase + PieceValue[pos.piece_on(move.to_sq())];
// If static eval + value of piece we are going to capture is much lower
// than alpha we can prune this move. (~2 Elo)