mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 02:57:11 +08: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user