Skip futility pruning for extinction variants
authorFabian Fichter <ianfab@users.noreply.github.com>
Fri, 14 Sep 2018 17:26:33 +0000 (19:26 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 19 Sep 2018 20:44:43 +0000 (22:44 +0200)
STC extinction
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 419 W: 251 L: 147 D: 21
http://35.161.250.236:6543/tests/view/5b9bef726e23db0fbab0dd88

src/search.cpp

index d2646cc..d2b8255 100644 (file)
@@ -742,6 +742,8 @@ namespace {
     // Step 8. Futility pruning: child node (~30 Elo)
     if (   !rootNode
         &&  depth < 7 * ONE_PLY
+        && !(   pos.extinction_value() == -VALUE_MATE
+             && pos.extinction_piece_types().find(ALL_PIECES) == pos.extinction_piece_types().end())
         &&  eval - futility_margin(depth, improving) * (1 + !!pos.max_check_count()) >= beta
         &&  eval < VALUE_KNOWN_WIN) // Do not return unproven wins
         return eval;
@@ -958,6 +960,8 @@ moves_loop: // When in check, search starts from here
               // Futility pruning: parent node (~2 Elo)
               if (   lmrDepth < 7
                   && !inCheck
+                  && !(   pos.extinction_value() == -VALUE_MATE
+                       && pos.extinction_piece_types().find(ALL_PIECES) == pos.extinction_piece_types().end())
                   && ss->staticEval + 256 + 200 * lmrDepth <= alpha)
                   continue;
 
@@ -1322,6 +1326,8 @@ moves_loop: // When in check, search starts from here
       // Futility pruning
       if (   !inCheck
           && !givesCheck
+          && !(   pos.extinction_value() == -VALUE_MATE
+               && pos.extinction_piece_types().find(ALL_PIECES) == pos.extinction_piece_types().end())
           &&  futilityBase > -VALUE_KNOWN_WIN
           && !pos.advanced_pawn_push(move))
       {