]> git.sesse.net Git - stockfish/commitdiff
Late countermove bonus: remove "extraBonus &&"
authorDubslow <bunslow@gmail.com>
Sat, 24 Dec 2022 15:43:22 +0000 (09:43 -0600)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 9 Jan 2023 19:12:01 +0000 (20:12 +0100)
passed stc: https://tests.stockfishchess.org/tests/view/63a71e409c0589b83751dc25
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 432480 W: 113846 L: 114055 D: 204579
Ptnml(0-2): 1164, 48205, 117701, 48016, 1154

passed ltc: https://tests.stockfishchess.org/tests/view/63aba66639af998100ce1aa9
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 245344 W: 65309 L: 65317 D: 114718
Ptnml(0-2): 117, 24257, 73903, 24307, 88

closes https://github.com/official-stockfish/Stockfish/pull/4322

bench 4379218

src/search.cpp

index d27b21d2cb8b53e3e77a84e4d147bc1415c2cea8..55af6abab1c13bd4acba83b18d2744210cf967b8 100644 (file)
@@ -1359,14 +1359,9 @@ moves_loop: // When in check, search starts here
     else if (   (depth >= 5 || PvNode || bestValue < alpha - 65 * depth)
              && !priorCapture)
     {
-        //Assign extra bonus if current node is PvNode or cutNode
-        //or fail low was really bad
-        bool extraBonus =    PvNode
-                          || cutNode;
-
-        bool doubleExtraBonus = extraBonus && bestValue < alpha - 88 * depth;
-
-        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus + doubleExtraBonus));
+        // Extra bonuses for PV/Cut nodes or bad fail lows
+        int bonus = 1 + (PvNode || cutNode) + (bestValue < alpha - 88 * depth);
+        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * bonus);
     }
 
     if (PvNode)