]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplify singularQuietLMR
[stockfish] / src / search.cpp
index b79fa6beaf894a5c9b15c7ced60ed14492aeabc4..b5e190c8c81cac56780797fbe1244616fe2c424d 100644 (file)
@@ -1196,7 +1196,7 @@ moves_loop: // When in check, search starts from here
 
           // Decrease reduction if ttMove has been singularly extended (~3 Elo)
           if (singularQuietLMR)
-              r -= 1 + formerPv;
+              r--;
 
           if (!captureOrPromotion)
           {
@@ -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