X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=d19c9a9015423192991319e4e6b910db955c4e8e;hp=c5d6e36bf153649cb788a3c2ea87b435a030029d;hb=13d1776a983c8b6b8ee2ed83ef7d2a4a5caf93a9;hpb=a56e1c662c3aa04b88744d62790daa10c01cdc78;ds=sidebyside diff --git a/src/search.cpp b/src/search.cpp index c5d6e36b..d19c9a90 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -931,6 +931,7 @@ namespace { { assert(move_is_ok(move)); + bool fewMoves = (depth <= OnePly && mp.number_of_moves() < 4); 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); @@ -942,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, mateThreat); + Depth ext = extension(pos, move, true, moveIsCheck, singleReply || fewMoves, mateThreat); Depth newDepth = depth - OnePly + ext; // Make and search the move