]> git.sesse.net Git - stockfish/commitdiff
Fix bestmove output in multi PV case
authorMarco Costalba <mcostalba@gmail.com>
Sun, 28 Nov 2010 16:05:49 +0000 (17:05 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 28 Nov 2010 16:05:49 +0000 (17:05 +0100)
When MultiPV > 1, always take bestmove from the RootMoveList
(and don't bother with a ponder move). Without that the bestmove
is most probably incorrect.

Patch from Peter Petrov.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 4bacbef01b6c813a9cd2ec6b1354e3b20b32b909..f5e1a00002b2fc1fc21035d3835c710632132ca7 100644 (file)
@@ -661,7 +661,7 @@ namespace {
              << " time " << current_search_time() << endl;
 
     // Print the best move and the ponder move to the standard output
-    if (pv[0] == MOVE_NONE)
+    if (pv[0] == MOVE_NONE || MultiPV > 1)
     {
         pv[0] = rml.move(0);
         pv[1] = MOVE_NONE;