1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

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 <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-02-05 08:19:39 +01:00
parent 337ec0f3d0
commit 6fe36d13de

View file

@ -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;