diff --git a/src/search.cpp b/src/search.cpp index 6a17e1624..40e8ef7cf 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1813,9 +1813,8 @@ void update_all_stats(const Position& pos, Piece movedPiece = pos.moved_piece(bestMove); PieceType capturedPiece; - int bonus = std::min(151 * depth - 91, 1730) + 302 * (bestMove == ttMove); - int quietMalus = std::min(798 * depth - 175, 2268) - 33 * quietsSearched.size(); - int captureMalus = std::min(757 * depth - 134, 2129) - 28 * capturesSearched.size(); + int bonus = std::min(151 * depth - 91, 1730) + 302 * (bestMove == ttMove); + int malus = std::min(951 * depth - 156, 2468) - 30 * quietsSearched.size(); if (!pos.capture_stage(bestMove)) { @@ -1823,7 +1822,7 @@ void update_all_stats(const Position& pos, // Decrease stats for all non-best quiet moves for (Move move : quietsSearched) - update_quiet_histories(pos, ss, workerThread, move, -quietMalus * 1208 / 1024); + update_quiet_histories(pos, ss, workerThread, move, -malus); } else { @@ -1835,15 +1834,14 @@ void update_all_stats(const Position& pos, // Extra penalty for a quiet early move that was not a TT move in // previous ply when it gets refuted. if (prevSq != SQ_NONE && ((ss - 1)->moveCount == 1 + (ss - 1)->ttHit) && !pos.captured_piece()) - update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, - -captureMalus * 594 / 1024); + update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq, -malus * 503 / 1024); // Decrease stats for all non-best capture moves for (Move move : capturesSearched) { movedPiece = pos.moved_piece(move); capturedPiece = type_of(pos.piece_on(move.to_sq())); - captureHistory[movedPiece][move.to_sq()][capturedPiece] << -captureMalus * 1366 / 1024; + captureHistory[movedPiece][move.to_sq()][capturedPiece] << -malus * 1157 / 1024; } }