]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Update default net to nn-63376713ba63.nnue.
[stockfish] / src / search.cpp
index 99c4743174dfbb9befae87b2fecca958b2450107..edeed9c030446a9e015cf99218ce2a5ca402315b 100644 (file)
@@ -1380,7 +1380,15 @@ moves_loop: // When in check, search starts here
     // Bonus for prior countermove that caused the fail low
     else if (   (depth >= 3 || PvNode)
              && !priorCapture)
-        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + (PvNode || cutNode)));
+    {
+        //Assign extra bonus if current node is PvNode or cutNode
+        //or fail low was really bad
+        bool extraBonus =    PvNode
+                          || cutNode
+                          || bestValue < alpha - 94 * depth;
+
+        update_continuation_histories(ss-1, pos.piece_on(prevSq), prevSq, stat_bonus(depth) * (1 + extraBonus));
+    }
 
     if (PvNode)
         bestValue = std::min(bestValue, maxValue);