- if (Options["OwnBook"] && !Limits.infinite && !Limits.mate)
- {
- Move bookMove = book.probe(RootPos, Options["Book File"], Options["Best Book Move"]);
-
- if (bookMove && std::count(RootMoves.begin(), RootMoves.end(), bookMove))
- {
- std::swap(RootMoves[0], *std::find(RootMoves.begin(), RootMoves.end(), bookMove));
- goto finalize;
- }
- }
-
- if (Options["Write Search Log"])
- {
- Log log(Options["Search Log Filename"]);
- log << "\nSearching: " << RootPos.fen()
- << "\ninfinite: " << Limits.infinite
- << " ponder: " << Limits.ponder
- << " time: " << Limits.time[RootColor]
- << " increment: " << Limits.inc[RootColor]
- << " moves to go: " << Limits.movestogo
- << "\n" << std::endl;
- }
-