]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Check Extension with Static Evaluation
[stockfish] / src / search.cpp
index c69b240836e68e129c7bfc8f4542214eaa8d4af5..2b4e4f1e8434652e8ff54f0c30ec612d96795fcd 100644 (file)
@@ -1097,6 +1097,10 @@ moves_loop: // When in check, search starts from here
                   return beta;
           }
       }
+      else if (   givesCheck
+               && depth > 6
+               && abs(ss->staticEval) > Value(100))
+          extension = 1;
 
       // Add extension to new depth
       newDepth += extension;
@@ -1121,7 +1125,7 @@ moves_loop: // When in check, search starts from here
       if (    depth >= 3
           &&  moveCount > 1 + 2 * rootNode
           && (  !captureOrPromotion
-              || cutNode
+              || (cutNode && (ss-1)->moveCount > 1)
               || (!PvNode && !formerPv))
           && (!PvNode || ss->ply > 1 || thisThread->id() % 4 != 3))
       {
@@ -1273,7 +1277,6 @@ moves_loop: // When in check, search starts from here
               else
               {
                   assert(value >= beta); // Fail high
-                  ss->statScore = 0;
                   break;
               }
           }