Skip to content

Commit

Permalink
Same weight for black and white nonPawnCorrection history
Browse files Browse the repository at this point in the history
Passed STC-non regression
https://tests.stockfishchess.org/tests/view/6740a63286d5ee47d953f656
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 122336 W: 31499 L: 31372 D: 59465
Ptnml(0-2): 336, 14535, 31301, 14658, 338

Passed LTC-non regression
https://tests.stockfishchess.org/tests/view/67419bae86d5ee47d953f7b6
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 101400 W: 25870 L: 25731 D: 49799
Ptnml(0-2): 78, 11109, 28166, 11290, 57

bench: 850104
  • Loading branch information
pb00067 committed Nov 24, 2024
1 parent b7f1734 commit a2f1487
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ Value Search::Worker::search(
|| (bestValue > ss->staticEval && bestMove))) // positive correction & no fail low
{
const auto m = (ss - 1)->currentMove;
static const int nonPawnWeight = 154;

auto bonus = std::clamp(int(bestValue - ss->staticEval) * depth / 8,
-CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4);
Expand All @@ -1435,9 +1436,9 @@ Value Search::Worker::search(
thisThread->majorPieceCorrectionHistory[us][major_piece_index(pos)] << bonus * 162 / 128;
thisThread->minorPieceCorrectionHistory[us][minor_piece_index(pos)] << bonus * 148 / 128;
thisThread->nonPawnCorrectionHistory[WHITE][us][non_pawn_index<WHITE>(pos)]
<< bonus * 122 / 128;
<< bonus * nonPawnWeight / 128;
thisThread->nonPawnCorrectionHistory[BLACK][us][non_pawn_index<BLACK>(pos)]
<< bonus * 185 / 128;
<< bonus * nonPawnWeight / 128;

if (m.is_ok())
(*(ss - 2)->continuationCorrectionHistory)[pos.piece_on(m.to_sq())][m.to_sq()] << bonus;
Expand Down

0 comments on commit a2f1487

Please sign in to comment.