Skip shallow depth pruning when there are forced captures
authorianfab <ianfab@users.noreply.github.com>
Tue, 7 Aug 2018 21:38:19 +0000 (23:38 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Thu, 27 Sep 2018 16:50:16 +0000 (18:50 +0200)
STC losers
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3558 W: 1779 L: 1629 D: 150
http://35.161.250.236:6543/tests/view/5b6a11c66e23db0fbab0dc43

STC giveaway
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 16582 W: 8319 L: 7979 D: 284
http://35.161.250.236:6543/tests/view/5b6a11a86e23db0fbab0dc40

src/search.cpp

index 7b4bf8b..69cf8e4 100644 (file)
@@ -939,6 +939,7 @@ moves_loop: // When in check, search starts from here
       {
           if (   !captureOrPromotion
               && !givesCheck
+              && (!pos.must_capture() || !(pos.attackers_to(to_sq(move)) & pos.pieces(~pos.side_to_move())))
               && (!pos.advanced_pawn_push(move) || pos.non_pawn_material() >= Value(5000)))
           {
               // Move count based pruning (~30 Elo)