changed the pawnhist update function | bench 8216434

This commit is contained in:
rektdie committed 2025-09-03 01:21:16 +02:00
1 parent 6ccd416840
commit 40339b2d45
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -50,7 +50,7 @@ public:
int* entry = &pawnHist[board.sideToMove][board.pawnKey % CORRHIST_SIZE];
const int scaledDiff = diff * CORRHIST_GRAIN;
const int newWeight = 4 * std::min(depth + 1, 16);
const int newWeight = std::min(depth * depth + 2 * depth + 1, 128);
*entry = (*entry * (CORRHIST_WEIGHT_SCALE - newWeight) + scaledDiff * newWeight) / CORRHIST_WEIGHT_SCALE;
*entry = std::clamp(*entry, -CORRHIST_MAX, CORRHIST_MAX);