changed the pawnhist update function | bench 8216434
This commit is contained in:
1 parent
6ccd416840
commit
40339b2d45
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -659,7 +659,7 @@ SearchResults PVS(Board& board, int depth, int alpha, int beta, int ply, SearchC
|
||||
if (ctx->searchStopped) return 0;
|
||||
if (!ctx->excluded) {
|
||||
|
||||
if (!board.InCheck() && (results.bestMove.IsQuiet())
|
||||
if (!board.InCheck() && ((results.bestMove.IsQuiet() || !results.bestMove))
|
||||
&& !(nodeType == AllNode && results.score >= staticEval)) {
|
||||
|
||||
int corrHistBonus = std::clamp(results.score - staticEval, -CORRHIST_LIMIT, CORRHIST_LIMIT);
|
||||
|
||||
+1
-1
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user