From: Fabian Fichter Date: Fri, 29 May 2020 16:56:31 +0000 (+0200) Subject: Simplify losing chess SEE X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=6324089d6264eae5d203c170c3c8470829ef132d;p=fairystockfish.git Simplify losing chess SEE giveaway STC LLR: 2.98 (-2.94,2.94) [-10.00,5.00] Total: 1406 W: 589 L: 541 D: 276 http://www.variantfishtest.org:6543/tests/view/5ec83bb16e23db36d55f2be9 giveaway LTC LLR: 2.99 (-2.94,2.94) [-10.00,5.00] Total: 1502 W: 600 L: 554 D: 348 http://www.variantfishtest.org:6543/tests/view/5ec8cded6e23db36d55f2bf3 losers STC LLR: -2.96 (-2.94,2.94) [-10.00,5.00] Total: 939 W: 395 L: 465 D: 79 http://www.variantfishtest.org:6543/tests/view/5ec840336e23db36d55f2bec losers LTC LLR: 2.99 (-2.94,2.94) [-10.00,5.00] Total: 2696 W: 1217 L: 1174 D: 305 http://www.variantfishtest.org:6543/tests/view/5ec8cdf66e23db36d55f2bf5 --- diff --git a/src/position.cpp b/src/position.cpp index 7d25a94..df633f8 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1698,6 +1698,9 @@ bool Position::see_ge(Move m, Value threshold) const { && count(~sideToMove) == extinction_piece_count() + 1))) return extinction_value() < VALUE_ZERO; + if (must_capture()) + return VALUE_ZERO >= threshold; + int swap = PieceValue[MG][piece_on(to)] - threshold; if (swap < 0) return false; diff --git a/src/search.cpp b/src/search.cpp index 4581995..a781aad 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1099,11 +1099,10 @@ moves_loop: // When in check, search starts from here continue; // Prune moves with negative SEE (~20 Elo) - if (!pos.must_capture() && !pos.see_ge(move, Value(-(32 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth))) + if (!pos.see_ge(move, Value(-(32 - std::min(lmrDepth, 18)) * lmrDepth * lmrDepth))) continue; } - else if ( !pos.must_capture() - && !pos.see_ge(move, Value(-194 - 120 * pos.captures_to_hand()) * depth)) // (~25 Elo) + else if (!pos.see_ge(move, Value(-194 - 120 * pos.captures_to_hand()) * depth)) // (~25 Elo) continue; }