diff --git a/src/search.cpp b/src/search.cpp index 199b9355403..229aef9b218 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -88,7 +88,8 @@ Value to_corrected_static_eval(Value v, const Worker& w, const Position& pos) { const auto wnpcv = w.nonPawnCorrectionHistory[WHITE][us][non_pawn_index(pos)]; const auto bnpcv = w.nonPawnCorrectionHistory[BLACK][us][non_pawn_index(pos)]; const auto cv = - (98198 * pcv + 68968 * mcv + 54353 * macv + 85174 * micv + 85581 * (wnpcv + bnpcv)) / 2097152; + (99916 * pcv + 55067 * mcv + 55530 * macv + 95324 * micv + 105056 * (wnpcv + bnpcv)) + / 2097152; v += cv; return std::clamp(v, VALUE_TB_LOSS_IN_MAX_PLY + 1, VALUE_TB_WIN_IN_MAX_PLY - 1); } @@ -1409,12 +1410,15 @@ Value Search::Worker::search( { auto bonus = std::clamp(int(bestValue - ss->staticEval) * depth / 8, -CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4); - thisThread->pawnCorrectionHistory[us][pawn_structure_index(pos)] << bonus; - thisThread->materialCorrectionHistory[us][material_index(pos)] << bonus; - thisThread->majorPieceCorrectionHistory[us][major_piece_index(pos)] << bonus; - thisThread->minorPieceCorrectionHistory[us][minor_piece_index(pos)] << bonus; - thisThread->nonPawnCorrectionHistory[WHITE][us][non_pawn_index(pos)] << bonus; - thisThread->nonPawnCorrectionHistory[BLACK][us][non_pawn_index(pos)] << bonus; + thisThread->pawnCorrectionHistory[us][pawn_structure_index(pos)] + << bonus * 101 / 128; + thisThread->materialCorrectionHistory[us][material_index(pos)] << bonus * 99 / 128; + thisThread->majorPieceCorrectionHistory[us][major_piece_index(pos)] << bonus * 157 / 128; + thisThread->minorPieceCorrectionHistory[us][minor_piece_index(pos)] << bonus * 153 / 128; + thisThread->nonPawnCorrectionHistory[WHITE][us][non_pawn_index(pos)] + << bonus * 123 / 128; + thisThread->nonPawnCorrectionHistory[BLACK][us][non_pawn_index(pos)] + << bonus * 165 / 128; } assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);