]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Make use of asymmetric SEE
[stockfish] / src / search.cpp
index 9ab8c800d8fbde01527d266b6a8fc1d0a9c314b8..ab34673463c57286d7ec4047a46755d6fc24701e 100644 (file)
@@ -440,6 +440,7 @@ namespace {
             if (    depth >= 12
                 && !stop
                 &&  PVSize == 1
+                &&  bestValue > VALUE_MATED_IN_MAX_PLY
                 && (   RootMoves.size() == 1
                     || Time::now() - SearchTime > (TimeMgr.available_time() * 20) / 100))
             {
@@ -745,7 +746,7 @@ namespace {
         && ttMove == MOVE_NONE
         && (PvNode || (!inCheck && ss->staticEval + Value(256) >= beta)))
     {
-        Depth d = (PvNode ? depth - 2 * ONE_PLY : depth - 4 * ONE_PLY);
+        Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4);
 
         ss->skipNullMove = true;
         search<PvNode ? PV : NonPV>(pos, ss, alpha, beta, d);
@@ -1227,7 +1228,7 @@ split_point_start: // At split points actual search starts from here
           // Prune moves with negative or equal SEE
           if (   futilityBase < beta
               && depth < DEPTH_ZERO
-              && pos.see(move) <= 0)
+              && pos.see_asymm(move, beta - futilityBase) <= 0)
           {
               bestValue = std::max(bestValue, futilityBase);
               continue;