X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=7ff9aaa466902ae5b851ea2c225a853d8416c576;hp=8ba5b41af8be9cf182a02650dc9457d7fa515239;hb=05c6f7a40b62f286873945f937c2ef3cae183e41;hpb=d3608c4e79a29110f4c4a369d7207c6dd8e01f34 diff --git a/src/search.cpp b/src/search.cpp index 8ba5b41a..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; } @@ -1251,7 +1255,6 @@ split_point_start: // At split points actual search starts from here // Prune moves with negative or equal SEE and also moves with positive // SEE where capturing piece loses a tempo and SEE < beta - futilityBase. if ( futilityBase < beta - && depth < DEPTH_ZERO && pos.see(move, beta - futilityBase) <= 0) { bestValue = std::max(bestValue, futilityBase);