Skip to content

Commit 21b0974

Browse files
daniel-monroeDisservin
authored andcommitted
Simplify away main history default
Passed non-regression STC LLR: 2.97 (-2.94,2.94) <-1.75,0.25> Total: 130752 W: 33725 L: 33605 D: 63422 Ptnml(0-2): 421, 15472, 33460, 15612, 411 https://tests.stockfishchess.org/tests/view/697eb9e35f56030af97b5a9e Passed non-regression LTC LLR: 2.94 (-2.94,2.94) <-1.75,0.25> Total: 53352 W: 13697 L: 13509 D: 26146 Ptnml(0-2): 36, 5804, 14811, 5986, 39 https://tests.stockfishchess.org/tests/view/6980e5846362aee5c8a55396 closes official-stockfish#6590 Bench: 2375860
1 parent 6b6334c commit 21b0974

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
@@ -65,7 +65,6 @@ using namespace Search;
6565
namespace {
6666

6767
constexpr int SEARCHEDLIST_CAPACITY = 32;
68-
constexpr int mainHistoryDefault = 68;
6968
using SearchedList = ValueList<Move, SEARCHEDLIST_CAPACITY>;
7069

7170
// (*Scalers):
@@ -316,8 +315,7 @@ void Search::Worker::iterative_deepening() {
316315

317316
for (Color c : {WHITE, BLACK})
318317
for (int i = 0; i < UINT_16_HISTORY_SIZE; i++)
319-
mainHistory[c][i] =
320-
(mainHistory[c][i] - mainHistoryDefault) * 3 / 4 + mainHistoryDefault;
318+
mainHistory[c][i] = mainHistory[c][i] * 3 / 4;
321319

322320
// Iterative deepening loop until requested to stop or the target depth is reached
323321
while (++rootDepth < MAX_PLY && !threads.stop
@@ -585,7 +583,7 @@ void Search::Worker::undo_null_move(Position& pos) { pos.undo_null_move(); }
585583

586584
// Reset histories, usually before a new game
587585
void Search::Worker::clear() {
588-
mainHistory.fill(mainHistoryDefault);
586+
mainHistory.fill(0);
589587
captureHistory.fill(-689);
590588

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

0 commit comments

Comments
 (0)