]> git.sesse.net Git - stockfish/blobdiff - src/history.cpp
Retire HistoryMax
[stockfish] / src / history.cpp
index 6849839ca2305161b24b32e4be106de833126c2f..f10e7619126fe03528fb82347164a0f979dcfcb9 100644 (file)
@@ -57,12 +57,6 @@ void History::success(Piece p, Square to, Depth d) {
   assert(square_is_ok(to));
 
   history[p][to] += int(d) * int(d);
   assert(square_is_ok(to));
 
   history[p][to] += int(d) * int(d);
-
-  // Prevent history overflow
-  if (history[p][to] >= HistoryMax)
-      for (int i = 0; i < 16; i++)
-          for (int j = 0; j < 64; j++)
-              history[i][j] /= 2;
 }
 
 
 }
 
 
@@ -76,12 +70,6 @@ void History::failure(Piece p, Square to, Depth d) {
   assert(square_is_ok(to));
 
   history[p][to] -= int(d) * int(d);
   assert(square_is_ok(to));
 
   history[p][to] -= int(d) * int(d);
-
-  // Prevent history underflow
-  if (history[p][to] <= -HistoryMax)
-      for (int i = 0; i < 16; i++)
-          for (int j = 0; j < 64; j++)
-              history[i][j] /= 2;
 }
 
 
 }