diff --git a/src/search.cpp b/src/search.cpp index 04c04b5be..64f8ea189 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1449,9 +1449,11 @@ moves_loop: // When in check, search starts here && ((bestValue < ss->staticEval && bestValue < beta) // negative correction & no fail high || (bestValue > ss->staticEval && bestMove))) // positive correction & no fail low { - auto bonus = std::clamp(int(bestValue - ss->staticEval) * depth / 8, - -CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4); - update_correction_history(pos, ss, *this, bonus); + auto bonus = + std::clamp(int(bestValue - ss->staticEval) * depth / (8 + (bestValue > ss->staticEval)), + -CORRECTION_HISTORY_LIMIT / 4, CORRECTION_HISTORY_LIMIT / 4); + update_correction_history(pos, ss, *this, + (1088 - 180 * (bestValue > ss->staticEval)) * bonus / 1024); } assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);