]> git.sesse.net Git - stockfish/blobdiff - src/movepick.h
Simplify history update.
[stockfish] / src / movepick.h
index 299925a582e7729677b06fcc07a623527e378bef..e032b0c7c79b33e4417b8a0409ba11d0b4861d02 100644 (file)
@@ -58,7 +58,7 @@ class StatsEntry {
         assert(abs(bonus) <= D);  // Ensure range is [-D, D]
         static_assert(D <= std::numeric_limits<T>::max(), "D overflows T");
 
-        entry += (bonus * D - entry * abs(bonus)) / (D * 5 / 4);
+        entry += bonus - entry * abs(bonus) / D;
 
         assert(abs(entry) <= D);
     }