From: Marco Costalba Date: Thu, 8 Oct 2009 08:09:19 +0000 (+0100) Subject: Fix the polling frequency when pondering X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=e59ff49a55da737a70d2a50fd12d830ae9f22b90 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 --- diff --git a/src/search.cpp b/src/search.cpp index 6dd854c6..719fc0ea 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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;