From 3ce43c20dee3d0c7afc4ff3b4c67e0530ab2138f Mon Sep 17 00:00:00 2001 From: jhellis3 Date: Sun, 3 Mar 2013 15:13:05 -0600 Subject: [PATCH] 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 --- src/search.cpp | 1 + 1 file changed, 1 insertion(+) 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; -- 2.39.2