]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
History stat bonus: Move condition to bonus calculation
[stockfish] / src / search.cpp
index cb16798dc427fcc30162a9f346c0402aac680a95..88af08404d7cdae7c44d381f499763fd9877c119 100644 (file)
@@ -82,7 +82,7 @@ namespace {
   // History and stats update bonus, based on depth
   Value stat_bonus(Depth depth) {
     int d = depth / ONE_PLY ;
-    return Value(d * d + 2 * d - 2);
+    return d > 17 ? VALUE_ZERO : Value(d * d + 2 * d - 2);
   }
 
   // Skill structure is used to implement strength limit