diff --git a/src/search.cpp b/src/search.cpp index 734372004..50585eb13 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -813,12 +813,11 @@ Value Search::Worker::search( // Use static evaluation difference to improve quiet move ordering if (((ss - 1)->currentMove).is_ok() && !(ss - 1)->inCheck && !priorCapture) { - int bonus = std::clamp(-10 * int((ss - 1)->staticEval + ss->staticEval), -2023, 1563) + 583; - mainHistory[~us][((ss - 1)->currentMove).from_to()] << bonus * 944 / 1024; + int evalDiff = std::clamp(-int((ss - 1)->staticEval + ss->staticEval), -200, 156) + 58; + mainHistory[~us][((ss - 1)->currentMove).from_to()] << evalDiff * 9; if (!ttHit && type_of(pos.piece_on(prevSq)) != PAWN && ((ss - 1)->currentMove).type_of() != PROMOTION) - pawnHistory[pawn_history_index(pos)][pos.piece_on(prevSq)][prevSq] - << bonus * 1438 / 1024; + pawnHistory[pawn_history_index(pos)][pos.piece_on(prevSq)][prevSq] << evalDiff * 14; } // Set up the improving flag, which is true if current static evaluation is