X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=53a8bec9b15751981c22354e4a02525274c79887;hp=d93fbdf79635d3b14a854fa979e87babb802df7c;hb=22ede4442cd285d7365b9497c3be65fb2c66b4be;hpb=f902ddaa89440cd2f3a981cc1dfbfad609a9e0fb diff --git a/src/search.cpp b/src/search.cpp index d93fbdf7..53a8bec9 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -484,7 +484,7 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[ std::string name = Options["Search Log Filename"].value(); LogFile.open(name.c_str(), std::ios::out | std::ios::app); - LogFile << "Searching: " << pos.to_fen() + LogFile << "Searching: " << pos.to_fen(Options["UCI_Chess960"].value()) << "\ninfinite: " << infinite << " ponder: " << ponder << " time: " << myTime @@ -513,6 +513,9 @@ bool think(Position& pos, bool infinite, bool ponder, int time[], int increment[ << move_to_san(pos, ponderMove) // Works also with MOVE_NONE << endl; + // Return from think() with unchanged position + pos.undo_move(bestMove); + LogFile.close(); } @@ -567,7 +570,7 @@ namespace { Iteration = 1; // Send initial RootMoveList scoring (iteration 1) - cout << set960(pos.is_chess960()) // Is enough to set once at the beginning + cout << set960(Options["UCI_Chess960"].value()) // Is enough to set once at the beginning << "info depth " << Iteration << "\n" << rml[0].pv_info_to_uci(pos, alpha, beta) << endl;