From f214823b7b478c8efc0831d5b3c80562f892b408 Mon Sep 17 00:00:00 2001 From: Eren Araz Date: Tue, 18 Mar 2025 01:05:54 +0300 Subject: [PATCH 1/2] an idea from Perseus engine --- src/search.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/search.c b/src/search.c index acac3de8..1a2c424b 100644 --- a/src/search.c +++ b/src/search.c @@ -285,7 +285,7 @@ void updatePawnCorrectionHistory(board *position, const int depth, const int dif int entry = pawnCorrectionHistory[position->side][pawnKey % CORRHIST_SIZE]; const int scaledDiff = diff * CORRHIST_GRAIN; - const int newWeight = myMIN(depth + 1, 16); + const int newWeight = 2 * myMIN(depth + 1, 16); entry = (entry * (CORRHIST_WEIGHT_SCALE - newWeight) + scaledDiff * newWeight) / CORRHIST_WEIGHT_SCALE; entry = clamp(entry, -CORRHIST_MAX, CORRHIST_MAX); @@ -299,7 +299,7 @@ void updateMinorCorrectionHistory(board *position, const int depth, const int di int entry = minorCorrectionHistory[position->side][minorKey % CORRHIST_SIZE]; const int scaledDiff = diff * CORRHIST_GRAIN; - const int newWeight = myMIN(depth + 1, 16); + const int newWeight = 2 * myMIN(depth + 1, 16); entry = (entry * (CORRHIST_WEIGHT_SCALE - newWeight) + scaledDiff * newWeight) / CORRHIST_WEIGHT_SCALE; entry = clamp(entry, -CORRHIST_MAX, CORRHIST_MAX); @@ -312,7 +312,7 @@ void update_non_pawn_corrhist(board *position, const int depth, const int diff) U64 blackKey = position->blackNonPawnKey; const int scaledDiff = diff * CORRHIST_GRAIN; - const int newWeight = myMIN(depth + 1, 16); + const int newWeight = 2 * myMIN(depth + 1, 16); int whiteEntry = nonPawnCorrectionHistory[white][position->side][whiteKey % CORRHIST_SIZE]; From 8a1bf82f088a26a7f73a2eaf3c2fc13d0cb5e448 Mon Sep 17 00:00:00 2001 From: Eren Araz Date: Tue, 18 Mar 2025 01:06:06 +0300 Subject: [PATCH 2/2] bench: 5216084 --- src/search.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/search.c b/src/search.c index 1a2c424b..e162bdc4 100644 --- a/src/search.c +++ b/src/search.c @@ -264,7 +264,6 @@ void printMove(int move) { } } - int getLmrReduction(int depth, int moveNumber, bool isQuiet) { return lmrTable[isQuiet][myMIN(63, depth)][myMIN(63, moveNumber)]; }