diff --git a/src/search.cpp b/src/search.cpp index 561e2a5ae..ca3a9a461 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -65,7 +65,6 @@ using namespace Search; namespace { constexpr int SEARCHEDLIST_CAPACITY = 32; -constexpr int mainHistoryDefault = 68; using SearchedList = ValueList; // (*Scalers): @@ -316,8 +315,7 @@ void Search::Worker::iterative_deepening() { for (Color c : {WHITE, BLACK}) for (int i = 0; i < UINT_16_HISTORY_SIZE; i++) - mainHistory[c][i] = - (mainHistory[c][i] - mainHistoryDefault) * 3 / 4 + mainHistoryDefault; + mainHistory[c][i] = mainHistory[c][i] * 3 / 4; // Iterative deepening loop until requested to stop or the target depth is reached while (++rootDepth < MAX_PLY && !threads.stop @@ -585,7 +583,7 @@ void Search::Worker::undo_null_move(Position& pos) { pos.undo_null_move(); } // Reset histories, usually before a new game void Search::Worker::clear() { - mainHistory.fill(mainHistoryDefault); + mainHistory.fill(0); captureHistory.fill(-689); // Each thread is responsible for clearing their part of shared history