X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=fca3d2c9dbc431a89f1acdf9e764fa0f18ada6fd;hp=f29041847c0ae033cc4b25d403f266fc633a15f5;hb=74fd57220e4e5a214761adc2d12335a12bef56f3;hpb=74f1efee263aadcceb1df716ebd87776b932238a diff --git a/src/search.cpp b/src/search.cpp index f2904184..fca3d2c9 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -931,7 +931,7 @@ namespace { { assert(move_is_ok(move)); - bool fewMoves = (depth <= OnePly && mp.number_of_moves() < 4); + bool lastMinuteSurprise = (depth <= OnePly && mp.current_move_type() == MovePicker::PH_GOOD_CAPTURES); bool singleReply = (pos.is_check() && mp.number_of_moves() == 1); bool moveIsCheck = pos.move_is_check(move, dcCandidates); bool moveIsCapture = pos.move_is_capture(move); @@ -943,7 +943,7 @@ namespace { PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move)); // Decide the new search depth - Depth ext = extension(pos, move, true, moveIsCheck, singleReply || fewMoves, mateThreat); + Depth ext = extension(pos, move, true, moveIsCheck, singleReply || lastMinuteSurprise, mateThreat); Depth newDepth = depth - OnePly + ext; // Make and search the move