1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

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.
This commit is contained in:
Marco Costalba 2013-06-08 10:35:35 +02:00
parent 2a98042c21
commit 05c6f7a40b

View file

@ -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;
}