From: Marco Costalba Date: Sat, 8 Jun 2013 08:35:35 +0000 (+0200) Subject: Fix search log when using skills X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=05c6f7a40b62f286873945f937c2ef3cae183e41;ds=sidebyside Fix search log when using skills In case of we pick a sub-optimal move be sure to print this, and not the best one on seach log file. Bug spotted by Guenther Demetz. No functional change. --- diff --git a/src/search.cpp b/src/search.cpp index c6ee8c86..7ff9aaa4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -416,8 +416,12 @@ namespace { if (Options["Use Search Log"]) { + RootMove& rm = RootMoves[0]; + if (skill.best != MOVE_NONE) + rm = *std::find(RootMoves.begin(), RootMoves.end(), skill.best); + Log log(Options["Search Log Filename"]); - log << pretty_pv(pos, depth, bestValue, Time::now() - SearchTime, &RootMoves[0].pv[0]) + log << pretty_pv(pos, depth, rm.score, Time::now() - SearchTime, rm.pv.data()) << std::endl; }