X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=b5d21b9d5585c2cfbeed24a6470f9df69c8aa907;hb=3597f1942ec6f2cfbd50b905683739b0900ff5dd;hp=80c3e4c245fe5e5be672fb5587d6275e0ddbdcba;hpb=29ed22de8cd347cacb0ba826ee43fa587985a98d;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 80c3e4c2..b5d21b9d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1025,6 +1025,14 @@ moves_loop: // When in check, search starts from here movedPiece = pos.moved_piece(move); givesCheck = pos.gives_check(move); + // Indicate PvNodes that will probably fail low if node was searched with non-PV search + // at depth equal or greater to current depth and result of this search was far below alpha + bool likelyFailLow = PvNode + && ttMove + && (tte->bound() & BOUND_UPPER) + && ttValue < alpha + 200 + 100 * depth + && tte->depth() >= depth; + // Calculate new depth for this move newDepth = depth - 1; @@ -1172,8 +1180,9 @@ moves_loop: // When in check, search starts from here if (th.marked()) r++; - // Decrease reduction if position is or has been on the PV (~10 Elo) - if (ss->ttPv) + // Decrease reduction if position is or has been on the PV + // and node is not likely to fail low. (~10 Elo) + if (ss->ttPv && !likelyFailLow) r -= 2; // Increase reduction at root and non-PV nodes when the best move does not change frequently