]> git.sesse.net Git - stockfish/commitdiff
Less pruning in qsearch
authorUnai Corzo <corzounai@gmail.com>
Wed, 2 Sep 2020 14:45:49 +0000 (16:45 +0200)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 4 Sep 2020 05:55:41 +0000 (07:55 +0200)
do not prune moves that give discovery checks, even if with negative SSE.

STC https://tests.stockfishchess.org/tests/view/5f4cb5e8ba100690c5cc5d25
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 91328 W: 9940 L: 9667 D: 71721
Ptnml(0-2): 491, 7345, 29693, 7670, 465

LTC https://tests.stockfishchess.org/tests/view/5f4dbc2eba100690c5cc5dac
LLR: 2.97 (-2.94,2.94) {0.25,1.25}
Total: 52448 W: 2799 L: 2586 D: 47063
Ptnml(0-2): 53, 2220, 21459, 2445, 47

closes https://github.com/official-stockfish/Stockfish/pull/3098

bench: 4031192

src/search.cpp

index b79fa6beaf894a5c9b15c7ced60ed14492aeabc4..0d823c8e02425d1cf617d7a7e1939490d4c4b600 100644 (file)
@@ -1564,7 +1564,9 @@ moves_loop: // When in check, search starts from here
       }
 
       // Do not search moves with negative SEE values
-      if (!ss->inCheck && !pos.see_ge(move))
+      if (   !ss->inCheck
+          && !(givesCheck && pos.is_discovery_check_on_king(~pos.side_to_move(), move))
+          && !pos.see_ge(move))
           continue;
 
       // Speculative prefetch as early as possible