From 4e9fded5a63a2a72964f6d3518e2f66186662d05 Mon Sep 17 00:00:00 2001 From: Linmiao Xu Date: Sat, 6 Jul 2024 16:04:07 -0400 Subject: [PATCH] Larger bonus when updating quiet stats Also removes unused arguments to update_all_stats to fix compiler warnings about unused parameters. Passed non-regression STC: https://tests.stockfishchess.org/tests/view/6689a79a0fdd852d63cf52e9 LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 26496 W: 6901 L: 6669 D: 12926 Ptnml(0-2): 62, 3094, 6715, 3304, 73 Passed non-regression LTC: https://tests.stockfishchess.org/tests/view/6689a9960fdd852d63cf532d LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 41214 W: 10373 L: 10173 D: 20668 Ptnml(0-2): 11, 4491, 11412, 4673, 20 closes https://github.com/official-stockfish/Stockfish/pull/5456 bench 1169958 --- src/search.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index 9b0ea9df..3f160047 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -131,8 +131,6 @@ void update_all_stats(const Position& pos, Stack* ss, Search::Worker& workerThread, Move bestMove, - Value bestValue, - Value beta, Square prevSq, Move* quietsSearched, int quietCount, @@ -1362,8 +1360,8 @@ moves_loop: // When in check, search starts here // If there is a move that produces search value greater than alpha we update the stats of searched moves else if (bestMove) - update_all_stats(pos, ss, *this, bestMove, bestValue, beta, prevSq, quietsSearched, - quietCount, capturesSearched, captureCount, depth); + update_all_stats(pos, ss, *this, bestMove, prevSq, quietsSearched, quietCount, + capturesSearched, captureCount, depth); // Bonus for prior countermove that caused the fail low else if (!priorCapture && prevSq != SQ_NONE) @@ -1772,8 +1770,6 @@ void update_all_stats(const Position& pos, Stack* ss, Search::Worker& workerThread, Move bestMove, - Value bestValue, - Value beta, Square prevSq, Move* quietsSearched, int quietCount, @@ -1790,10 +1786,7 @@ void update_all_stats(const Position& pos, if (!pos.capture_stage(bestMove)) { - int bestMoveBonus = bestValue > beta + 172 ? quietMoveBonus // larger bonus - : stat_bonus(depth); // smaller bonus - - update_quiet_stats(pos, ss, workerThread, bestMove, bestMoveBonus); + update_quiet_stats(pos, ss, workerThread, bestMove, quietMoveBonus); // Decrease stats for all non-best quiet moves for (int i = 0; i < quietCount; ++i)