diff --git a/src/search.cpp b/src/search.cpp index 7c08bb0fa..377b96343 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1831,9 +1831,16 @@ void update_all_stats(const Position& pos, { update_quiet_histories(pos, ss, workerThread, bestMove, bonus * 910 / 1024); + int i = 0; // Decrease stats for all non-best quiet moves for (Move move : quietsSearched) - update_quiet_histories(pos, ss, workerThread, move, -malus * 1085 / 1024); + { + i++; + int actualMalus = malus * 1085 / 1024; + if (i > 5) + actualMalus -= actualMalus * (i - 5) / i; + update_quiet_histories(pos, ss, workerThread, move, -actualMalus); + } } else {