Simplify futility pruning condition
authorFabian Fichter <ianfab@users.noreply.github.com>
Sun, 31 Jan 2021 15:16:40 +0000 (16:16 +0100)
committerFabian Fichter <ianfab@users.noreply.github.com>
Sun, 31 Jan 2021 15:16:40 +0000 (16:16 +0100)
No functional change.

src/search.cpp

index 3c9036c..50c490b 100644 (file)
@@ -1149,8 +1149,7 @@ moves_loop: // When in check, search starts from here
               // Futility pruning: parent node (~5 Elo)
               if (   lmrDepth < 7
                   && !ss->inCheck
-                  && !(   pos.extinction_value() == -VALUE_MATE
-                       && pos.extinction_piece_types().find(ALL_PIECES) == pos.extinction_piece_types().end())
+                  && !pos.extinction_single_piece()
                   && ss->staticEval + (254 + 159 * lmrDepth) * (1 + pos.check_counting()) <= alpha
                   &&  (*contHist[0])[history_slot(movedPiece)][to_sq(move)]
                     + (*contHist[1])[history_slot(movedPiece)][to_sq(move)]