X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=5ff23ad0fd894791c7b5e8ac625246c40343e1e5;hp=6dcd9f1db794f56f1ab5214e21fcab7587d2b3b0;hb=36c82b751ce227c05bfb;hpb=09f1fdf52fe67b500f1a0159da9e53e9e3456679 diff --git a/src/search.cpp b/src/search.cpp index 6dcd9f1d..5ff23ad0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -745,7 +745,7 @@ namespace { && ttMove == MOVE_NONE && (PvNode || (!inCheck && ss->staticEval + Value(256) >= beta))) { - Depth d = (PvNode ? depth - 2 * ONE_PLY : depth / 2); + Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4); ss->skipNullMove = true; search(pos, ss, alpha, beta, d); @@ -875,13 +875,18 @@ split_point_start: // At split points actual search starts from here // but fixing this made program slightly weaker. Depth predictedDepth = newDepth - reduction(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) { + bestValue = std::max(bestValue, futilityValue); + if (SpNode) + { splitPoint->mutex.lock(); - + if (bestValue > splitPoint->bestValue) + splitPoint->bestValue = bestValue; + } continue; }