Skip to content

Commit ba50f83

Browse files
daniel-monroePikaCat-OuO
authored andcommitted
Simplify away main history default
1 parent dc29416 commit ba50f83

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/search.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ using namespace Search;
5252
namespace {
5353

5454
constexpr int SEARCHEDLIST_CAPACITY = 32;
55-
constexpr int mainHistoryDefault = 59;
5655
using SearchedList = ValueList<Move, SEARCHEDLIST_CAPACITY>;
5756

5857
// (*Scalers):
@@ -293,8 +292,7 @@ void Search::Worker::iterative_deepening() {
293292

294293
for (Color c : {WHITE, BLACK})
295294
for (int i = 0; i < UINT_16_HISTORY_SIZE; i++)
296-
mainHistory[c][i] =
297-
(mainHistory[c][i] - mainHistoryDefault) * 3 / 4 + mainHistoryDefault;
295+
mainHistory[c][i] = mainHistory[c][i] * 3 / 4;
298296

299297
// Iterative deepening loop until requested to stop or the target depth is reached
300298
while (++rootDepth < MAX_PLY && !threads.stop
@@ -540,7 +538,7 @@ void Search::Worker::undo_null_move(Position& pos) { pos.undo_null_move(); }
540538

541539
// Reset histories, usually before a new game
542540
void Search::Worker::clear() {
543-
mainHistory.fill(mainHistoryDefault);
541+
mainHistory.fill(0);
544542
captureHistory.fill(-607);
545543

546544
// Each thread is responsible for clearing their part of shared history

0 commit comments

Comments
 (0)