]> git.sesse.net Git - stockfish/blobdiff - src/tt.cpp
Re-enable TT.insert_pv()
[stockfish] / src / tt.cpp
index 55aad112af3c252d6006265132e8cb657d70d5f6..a8aa1b6574604d48fb91a513a066e6dedbaec0ae 100644 (file)
@@ -208,7 +208,9 @@ void TranspositionTable::insert_pv(const Position& pos, Move pv[]) {
 
   for (int i = 0; pv[i] != MOVE_NONE; i++)
   {
-      store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]);
+      TTEntry *tte = retrieve(p.get_key());
+      if (!tte || tte->move() != pv[i])
+          store(p.get_key(), VALUE_NONE, VALUE_TYPE_NONE, Depth(-127*OnePly), pv[i]);
       p.do_move(pv[i], st);
   }
 }