]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Try only recaptures in qsearch if depth is very low
[stockfish] / src / search.cpp
index c30fe92e35c2a048ac608873a03c886614f6db06..50dfcc0ced1dc210acb6bf8cb23ffe9c7e6458e7 100644 (file)
@@ -1134,7 +1134,7 @@ split_point_start: // At split points actual search starts from here
           bool doFullDepthSearch = true;
           alpha = SpNode ? sp->alpha : alpha;
 
-          if (    depth >= 3 * ONE_PLY
+          if (    depth > 3 * ONE_PLY
               && !captureOrPromotion
               && !dangerous
               && !move_is_castle(move)
@@ -1393,7 +1393,7 @@ split_point_start: // At split points actual search starts from here
     // to search the moves. Because the depth is <= 0 here, only captures,
     // queen promotions and checks (only if depth >= DEPTH_QS_CHECKS) will
     // be generated.
-    MovePicker mp(pos, ttMove, depth, H);
+    MovePicker mp(pos, ttMove, depth, H, move_to((ss-1)->currentMove));
     CheckInfo ci(pos);
     Bitboard pinned = pos.pinned_pieces(pos.side_to_move());