]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Track seldepth in qsearch too
[stockfish] / src / search.cpp
index 89879374c1a40643a9d2a73b6893fb869a336593..10a36cbf26131b6ac449a92885b18579c6d27aaa 100644 (file)
@@ -1421,6 +1421,10 @@ Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) {
     ss->inCheck        = pos.checkers();
     moveCount          = 0;
 
+    // Used to send selDepth info to GUI (selDepth counts from 1, ply from 0)
+    if (PvNode && thisThread->selDepth < ss->ply + 1)
+        thisThread->selDepth = ss->ply + 1;
+
     // Step 2. Check for an immediate draw or maximum ply reached
     if (pos.is_draw(ss->ply) || ss->ply >= MAX_PLY)
         return (ss->ply >= MAX_PLY && !ss->inCheck) ? evaluate(pos) : VALUE_DRAW;