X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=97ad9912b6b38e21c890e462f30cca55efbacba5;hp=3f89c0400c24d2f54e9aee6fc52eac7a5f5cd56c;hb=3279655f12ff64603b62a99fe9d7e2c9ea6fb4ef;hpb=e7cfa5d020efb5a0ad2521afc7b886f3b2d3e6b3 diff --git a/src/search.cpp b/src/search.cpp index 3f89c040..97ad9912 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1155,8 +1155,8 @@ moves_loop: // When in check, search starts from here if (!pos.capture_or_promotion(bestMove)) update_quiet_stats(pos, ss, bestMove, quietsSearched, quietCount, stat_bonus(depth + (bestValue > beta + PawnValueMg ? ONE_PLY : DEPTH_ZERO))); - else - update_capture_stats(pos, bestMove, capturesSearched, captureCount, stat_bonus(depth + ONE_PLY)); + + update_capture_stats(pos, bestMove, capturesSearched, captureCount, stat_bonus(depth + ONE_PLY)); // Extra penalty for a quiet TT move in previous ply when it gets refuted if ((ss-1)->moveCount == 1 && !pos.captured_piece()) @@ -1448,7 +1448,9 @@ moves_loop: // When in check, search starts from here CapturePieceToHistory& captureHistory = pos.this_thread()->captureHistory; Piece moved_piece = pos.moved_piece(move); PieceType captured = type_of(pos.piece_on(to_sq(move))); - captureHistory[moved_piece][to_sq(move)][captured] << bonus; + + if (pos.capture_or_promotion(move)) + captureHistory[moved_piece][to_sq(move)][captured] << bonus; // Decrease all the other played capture moves for (int i = 0; i < captureCnt; ++i)