From: Michael Chaly Date: Sun, 13 Aug 2023 08:03:28 +0000 (+0300) Subject: Give extra bonus to main history for moves that caused a fail low. #4744 X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=d97a02ea2b9328e666aff7a906820c9ec65ab381 Give extra bonus to main history for moves that caused a fail low. #4744 Current master gives this type of bonuses to continuation history, this patch also gives them to main history. Passed STC: https://tests.stockfishchess.org/tests/view/64d4802a5b17f7c21c0e27b3 LLR: 2.94 (-2.94,2.94) <0.00,2.00> Total: 480768 W: 122767 L: 121798 D: 236203 Ptnml(0-2): 1563, 56190, 123834, 57309, 1488 Passed LTC: https://tests.stockfishchess.org/tests/view/64d7e4c05b17f7c21c0e7456 LLR: 2.95 (-2.94,2.94) <0.50,2.50> Total: 32052 W: 8329 L: 8022 D: 15701 Ptnml(0-2): 19, 3335, 9015, 3634, 23 closes https://github.com/official-stockfish/Stockfish/pull/4744 Bench: 1711793 --- diff --git a/src/search.cpp b/src/search.cpp index 24f54c32..ce9ed950 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1373,6 +1373,7 @@ moves_loop: // When in check, search starts here { int bonus = (depth > 5) + (PvNode || cutNode) + (bestValue < alpha - 113 * depth) + ((ss-1)->moveCount > 12); update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * bonus); + thisThread->mainHistory[~us][from_to((ss-1)->currentMove)] << stat_bonus(depth) * bonus / 2; } if (PvNode)