X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=f58baf39661190053d1dc64d01090fbacff1ad56;hp=5ff23ad0fd894791c7b5e8ac625246c40343e1e5;hb=a95cbca568ec393ea6b4b17ed86f89c75d7cbe57;hpb=36c82b751ce227c05bfb0dc74c311a469f7f8ec4 diff --git a/src/search.cpp b/src/search.cpp index 5ff23ad0..f58baf39 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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)) { @@ -678,7 +679,7 @@ namespace { if (nullValue >= VALUE_MATE_IN_MAX_PLY) nullValue = beta; - if (depth < 6 * ONE_PLY) + if (depth < 12 * ONE_PLY) return nullValue; // Do verification search at high depths @@ -875,7 +876,7 @@ 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) - + 2 * Gain[pos.piece_moved(move)][to_sq(move)]; + + Gain[pos.piece_moved(move)][to_sq(move)]; if (futilityValue < beta) { @@ -1224,10 +1225,11 @@ split_point_start: // At split points actual search starts from here continue; } - // Prune moves with negative or equal SEE + // Prune moves with negative or equal SEE and also moves with positive + // SEE where capturing piece loses a tempo and SEE < beta - futilityBase. if ( futilityBase < beta && depth < DEPTH_ZERO - && pos.see(move) <= 0) + && pos.see(move, beta - futilityBase) <= 0) { bestValue = std::max(bestValue, futilityBase); continue;