]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Reduce big time spikes by reducing PV re-searches.
[stockfish] / src / evaluate.cpp
index c68577a3e0e9f492a6243302404f72f55247c2ae..425ba6f8faead8b61e22d6713d815c5d3624b962 100644 (file)
@@ -905,7 +905,9 @@ namespace {
             sf = 37 + 3 * (pos.count<QUEEN>(WHITE) == 1 ? pos.count<BISHOP>(BLACK) + pos.count<KNIGHT>(BLACK)
                                                         : pos.count<BISHOP>(WHITE) + pos.count<KNIGHT>(WHITE));
         else
-            sf = std::min(sf, 36 + 7 * pos.count<PAWN>(strongSide));
+            sf = std::min(sf, 36 + 7 * pos.count<PAWN>(strongSide)) - 4 * !pawnsOnBothFlanks;
+      
+        sf -= 4 * !pawnsOnBothFlanks;
     }
 
     // Interpolate between the middlegame and (scaled by 'sf') endgame score