Allow shallow depth pruning for horde pawn pushes
authorFabian Fichter <ianfab@users.noreply.github.com>
Wed, 17 Apr 2019 20:12:20 +0000 (22:12 +0200)
committerFabian Fichter <ianfab@users.noreply.github.com>
Wed, 17 Apr 2019 20:12:20 +0000 (22:12 +0200)
horde STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1701 W: 905 L: 779 D: 17
http://35.161.250.236:6543/tests/view/5cb4d5d96e23db76ed252721

horde LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1307 W: 708 L: 587 D: 12
http://35.161.250.236:6543/tests/view/5cb609536e23db76ed252731

giveaway STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 3966 W: 1558 L: 1529 D: 879
http://35.161.250.236:6543/tests/view/5cb4d6fd6e23db76ed25272a

kinglet STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 8117 W: 3649 L: 3644 D: 824
http://35.161.250.236:6543/tests/view/5cb4d7146e23db76ed25272c

src/search.cpp

index 8b0ad18..179728c 100644 (file)
@@ -969,8 +969,8 @@ moves_loop: // When in check, search starts from here
 
           if (   !captureOrPromotion
               && !givesCheck
-              && (!pos.must_capture() || !pos.attackers_to(to_sq(move), ~pos.side_to_move()))
-              && !pos.advanced_pawn_push(move))
+              && (!pos.must_capture() || !pos.attackers_to(to_sq(move), ~us))
+              && (!pos.advanced_pawn_push(move) || pos.count<ALL_PIECES>(us) == pos.count<PAWN>(us)))
           {
               // Move count based pruning (~30 Elo)
               if (moveCountPruning)