From: Marco Costalba Date: Sat, 9 Mar 2019 12:24:26 +0000 (+0100) Subject: Revert "Allowing singular extension in mate positions" X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=4d0981fef37c85edfd7a0e713d68a4542d7a6784 Revert "Allowing singular extension in mate positions" It was causing an assert: value > -VALUE_INFINITE under some conditions. See https://github.com/official-stockfish/Stockfish/issues/2036 Bench: 3318033 --- diff --git a/src/search.cpp b/src/search.cpp index 31ae5377..9165468a 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -914,12 +914,13 @@ moves_loop: // When in check, search starts from here && move == ttMove && !rootNode && !excludedMove // Avoid recursive singular search - && ttValue != VALUE_NONE + /* && ttValue != VALUE_NONE Already implicit in the next condition */ + && abs(ttValue) < VALUE_KNOWN_WIN && (tte->bound() & BOUND_LOWER) && tte->depth() >= depth - 3 * ONE_PLY && pos.legal(move)) { - Value singularBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE); + Value singularBeta = ttValue - 2 * depth / ONE_PLY; ss->excludedMove = move; value = search(pos, ss, singularBeta - 1, singularBeta, depth / 2, cutNode); ss->excludedMove = MOVE_NONE;