mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-17 15:46:24 +08:00
Fix sending of best move during an infinite search
According to UCI standard once engine receives 'go infinite' command it should search until the "stop" command and do not exit the search without being told so, even if PLY_MAX has been reached. Patch is quite invasive because it cleanups some hacks used by fixed depth and fixed nodes modes, mainly during benchmarks. Bug found by Pascal Georges. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -155,7 +155,7 @@ void benchmark(const string& commandLine) {
|
||||
cerr << "\nBench position: " << cnt << '/' << positions.size() << endl << endl;
|
||||
if (limitType == "perft")
|
||||
totalNodes += perft(pos, maxDepth * OnePly);
|
||||
else if (!think(pos, true, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
|
||||
else if (!think(pos, false, false, 0, dummy, dummy, 0, maxDepth, maxNodes, secsPerPos, moves))
|
||||
break;
|
||||
totalNodes += nodes_searched();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user