1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

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
This commit is contained in:
jhellis3 2013-03-03 15:13:05 -06:00 committed by Marco Costalba
parent def50020ad
commit 3ce43c20de

View file

@ -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;