]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Double Impact of Gain tables
[stockfish] / src / search.cpp
index 9ab8c800d8fbde01527d266b6a8fc1d0a9c314b8..5ff23ad0fd894791c7b5e8ac625246c40343e1e5 100644 (file)
@@ -745,7 +745,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);
@@ -875,7 +875,7 @@ split_point_start: // At split points actual search starts from here
           // but fixing this made program slightly weaker.
           Depth predictedDepth = newDepth - reduction<PvNode>(depth, moveCount);
           futilityValue =  ss->staticEval + ss->evalMargin + futility_margin(predictedDepth, moveCount)
-                         + Gain[pos.piece_moved(move)][to_sq(move)];
+                         + 2 * Gain[pos.piece_moved(move)][to_sq(move)];
 
           if (futilityValue < beta)
           {