Simplify losing chess SEE
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 29 May 2020 16:56:31 +0000 (18:56 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Fri, 29 May 2020 16:56:31 +0000 (18:56 +0200)
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

src/position.cpp
src/search.cpp

index 7d25a94..df633f8 100644 (file)
@@ -1698,6 +1698,9 @@ bool Position::see_ge(Move m, Value threshold) const {
               && count<ALL_PIECES>(~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;
index 4581995..a781aad 100644 (file)
@@ -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;
       }