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

Fix the polling frequency when pondering

When pondering InfiniteSearch == false but myTime == 0 so that
NodesBetweenPolls = 1000 instead of the standard.

The patch fixes the bug and is more robust because checks
directly myTime for a non-zero value, without relying on
an indirect test (InfiniteSearch in this case).

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-10-08 09:09:19 +01:00
parent 225dcfeeb7
commit e59ff49a55

View file

@ -471,11 +471,9 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
NodesBetweenPolls = Min(MaxNodes, 30000);
InfiniteSearch = true; // HACK
}
else if (InfiniteSearch)
NodesBetweenPolls = 30000;
else if (myTime < 1000)
else if (myTime && myTime < 1000)
NodesBetweenPolls = 1000;
else if (myTime < 5000)
else if (myTime && myTime < 5000)
NodesBetweenPolls = 5000;
else
NodesBetweenPolls = 30000;