]> git.sesse.net Git - stockfish/commitdiff
Add double bonus for prior countermove fail low
authorMuzhen Gaming <61100393+XInTheDark@users.noreply.github.com>
Sat, 24 Dec 2022 05:05:24 +0000 (13:05 +0800)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 24 Dec 2022 15:01:50 +0000 (16:01 +0100)
Add a double extra bonus for particularly bad fail low cases. Original idea by Yoshie2000.

STC: https://tests.stockfishchess.org/tests/view/63a2f0d86b5bf07ac7fad543
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 146488 W: 38992 L: 38532 D: 68964
Ptnml(0-2): 385, 16036, 39965, 16450, 408

LTC: https://tests.stockfishchess.org/tests/view/63a3eaeb6b5bf07ac7fafdec
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 103992 W: 27853 L: 27423 D: 48716
Ptnml(0-2): 41, 10029, 31435, 10441, 50

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

Bench: 3801857

AUTHORS
src/search.cpp

diff --git a/AUTHORS b/AUTHORS
index 0c1c552930fcacaf10105931230071fccbdf2d06..70b500ea79edc2168e2d04d50004516cceaa9627 100644 (file)
--- a/AUTHORS
+++ b/AUTHORS
@@ -145,6 +145,7 @@ Mira
 Miroslav Fontán (Hexik)
 Moez Jellouli (MJZ1977)
 Mohammed Li (tthsqe12)
+Muzhen J (XInTheDark)
 Nathan Rugg (nmrugg)
 Nick Pelling (nickpelling)
 Nicklas Persson (NicklasPersson)
index 77d23ac2f4157a5d3b57ef65d7e9e3a08763b00e..0c8377d01ed6712630efaa665adf4aeb645906c4 100644 (file)
@@ -1353,16 +1353,17 @@ moves_loop: // When in check, search starts here
                          quietsSearched, quietCount, capturesSearched, captureCount, depth);
 
     // Bonus for prior countermove that caused the fail low
-    else if (   (depth >= 5 || PvNode)
+    else if (   (depth >= 5 || PvNode || bestValue < alpha - 62 * depth)
              && !priorCapture)
     {
         //Assign extra bonus if current node is PvNode or cutNode
         //or fail low was really bad
         bool extraBonus =    PvNode
-                          || cutNode
-                          || bestValue < alpha - 62 * depth;
+                          || cutNode;
 
-        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus));
+        bool doubleExtraBonus = extraBonus && bestValue < alpha - 85 * depth;
+
+        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus + doubleExtraBonus));
     }
 
     if (PvNode)