Skip to content

Commit

Permalink
bench 1759189
Browse files Browse the repository at this point in the history
  • Loading branch information
Vizvezdenec committed Mar 31, 2024
1 parent c964942 commit ebc4b80
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,11 +967,11 @@ Value Search::Worker::search(
if (!givesCheck && lmrDepth < 7 && !ss->inCheck)
{
Piece capturedPiece = pos.piece_on(move.to_sq());
int futilityEval =
ss->staticEval + 297 + 284 * lmrDepth + PieceValue[capturedPiece]
Value futilityValue =
ss->staticEval + 298 + 284 * lmrDepth + PieceValue[capturedPiece]
+ thisThread->captureHistory[movedPiece][move.to_sq()][type_of(capturedPiece)]
/ 7;
if (futilityEval < alpha)
if (futilityValue <= alpha)
continue;
}

Expand Down Expand Up @@ -1393,7 +1393,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();
Expand Down Expand Up @@ -1522,7 +1522,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)
Expand Down

0 comments on commit ebc4b80

Please sign in to comment.