Improve move order near the root
[stockfish] / src / thread.cpp
index 10ec96dddbae31005fb2fee3c79e0753e34d41eb..b5cb87d9356974553a50bea29c92342f67c9c173 100644 (file)
@@ -68,6 +68,7 @@ void Thread::clear() {
 
   counterMoves.fill(MOVE_NONE);
   mainHistory.fill(0);
+  lowPlyHistory.fill(0);
   captureHistory.fill(0);
 
   for (bool inCheck : { false, true })
@@ -211,6 +212,7 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states,
       th->rootDepth = th->completedDepth = 0;
       th->rootMoves = rootMoves;
       th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th);
+      th->lowPlyHistory.fill(0);
   }
 
   setupStates->back() = tmp;