From: Marco Costalba Date: Fri, 5 Feb 2010 07:19:39 +0000 (+0100) Subject: Be sure negative see evasions are at the bottom X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=6fe36d13de0ec25a8d35ca256dacee8b854856be Be sure negative see evasions are at the bottom Because H.move_ordering_score() can return negative values some negative see moves could be searched before non-negative see moves with negative history. This patch restores proper ordering. Signed-off-by: Marco Costalba --- diff --git a/src/movepick.cpp b/src/movepick.cpp index 901aa60e..650218f4 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -240,7 +240,7 @@ void MovePicker::score_evasions_or_checks() { { m = cur->move; if ((seeScore = pos.see_sign(m)) < 0) - cur->score = seeScore; + cur->score = seeScore - HistoryMax; // Be sure are at the bottom else if (pos.move_is_capture(m)) cur->score = pos.midgame_value_of_piece_on(move_to(m)) - pos.type_of_piece_on(move_from(m)) + HistoryMax;