From: jhellis3 Date: Sun, 3 Mar 2013 21:13:05 +0000 (-0600) Subject: Stop search if only 1 legal move X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=3ce43c20dee3d0c7afc4ff3b4c67e0530ab2138f;ds=sidebyside Stop search if only 1 legal move There is no point searching a move that is forced. It wastes time while allowing computer opponents to fill hash with 100% accuracy. [edit: Condition moved together with "easy move" ones] Bench identical: 4922272 --- diff --git a/src/search.cpp b/src/search.cpp index 33fff82d..19ebc5e6 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -452,6 +452,7 @@ namespace { && !stop && PVSize == 1 && ( (bestMoveNeverChanged && recapture) + || RootMoves.size() == 1 || Time::now() - SearchTime > (TimeMgr.available_time() * 40) / 100)) { Value rBeta = bestValue - 2 * PawnValueMg;