]> git.sesse.net Git - stockfish/blobdiff - src/tt.cpp
Further simplification of TT replace strategy
[stockfish] / src / tt.cpp
index d887844caf12eccae99b84c63ffc9d15a193ef48..efaf9928213f7b2aa06e80c4a4d197d80322bb75 100644 (file)
@@ -111,9 +111,9 @@ void TranspositionTable::store(const Key key, Value v, Bound b, Depth d, Move m,
       }
 
       // Implement replace strategy
-      if (  (replace->generation8 == generation) * 2
-          - (tte->generation8 == generation || tte->bound() == BOUND_EXACT) * 2
-          + (tte->depth16 < replace->depth16) > 0)
+      if (  (    tte->generation8 == generation || tte->bound() == BOUND_EXACT)
+          - (replace->generation8 == generation)
+          < (tte->depth16 < replace->depth16))
           replace = tte;
   }