]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Do not overwrite valuable TT data after probcut.
[stockfish] / src / search.cpp
index 6cf2f90d409f96dbe4f6a88ce625d71341153493..17ccab9251abb052a12c7e1b6a41ef8db75f5e4f 100644 (file)
@@ -925,9 +925,12 @@ namespace {
 
                 if (value >= probcutBeta)
                 {
-                    tte->save(posKey, value_to_tt(value, ss->ply), ttPv,
-                        BOUND_LOWER,
-                        depth - 3, move, ss->staticEval);
+                    if ( !(ttHit
+                       && tte->depth() >= depth - 3
+                       && ttValue != VALUE_NONE))
+                        tte->save(posKey, value_to_tt(value, ss->ply), ttPv,
+                            BOUND_LOWER,
+                            depth - 3, move, ss->staticEval);
                     return value;
                 }
             }