From 10b24af98af777c58e8a11137075f24207f4746d Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 17 Sep 2011 16:41:01 +0100 Subject: [PATCH] Correctly score capture underpromotions Be sure a queen capture promotion is tried in front of an underpromotion. Signed-off-by: Marco Costalba --- src/movepick.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/movepick.cpp b/src/movepick.cpp index e9f31456..c898127f 100644 --- a/src/movepick.cpp +++ b/src/movepick.cpp @@ -255,7 +255,7 @@ void MovePicker::score_captures() { - piece_type(pos.piece_on(move_from(m))); if (move_is_promotion(m)) - cur->score += QueenValueMidgame; + cur->score += piece_value_midgame(Piece(promotion_piece_type(m))); } } @@ -331,8 +331,7 @@ Move MovePicker::get_next_move() { if (seeValue >= captureThreshold) return move; - // Losing capture, move it to the tail of the array, note - // that move has now been already checked for pseudo legality. + // Losing capture, move it to the tail of the array (--badCaptures)->move = move; badCaptures->score = seeValue; } -- 2.39.2