]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Simplify lowply-history logic
[stockfish] / src / search.cpp
index 3f860ac5e5b9d073e93ab6f1f476a6a49e9c9eff..544c3ee51ec4c38e110ea9d046a642e4395ee59a 100644 (file)
@@ -957,7 +957,7 @@ moves_loop: // When in check, search starts from here
                                       contHist,
                                       countermove,
                                       ss->killers,
-                                      depth > 12 && ttPv ? ss->ply : MAX_PLY);
+                                      depth > 12 ? ss->ply : MAX_PLY);
 
     value = bestValue;
     singularLMR = moveCountPruning = false;
@@ -1339,7 +1339,7 @@ moves_loop: // When in check, search starts from here
     if (PvNode)
         bestValue = std::min(bestValue, maxValue);
 
-    if (!excludedMove)
+    if (!excludedMove && !(rootNode && thisThread->pvIdx))
         tte->save(posKey, value_to_tt(bestValue, ss->ply), ttPv,
                   bestValue >= beta ? BOUND_LOWER :
                   PvNode && bestMove ? BOUND_EXACT : BOUND_UPPER,