]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Fix search log when using skills
[stockfish] / src / search.cpp
index 8ba5b41af8be9cf182a02650dc9457d7fa515239..7ff9aaa466902ae5b851ea2c225a853d8416c576 100644 (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;
         }
 
@@ -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);