mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Correctly score capture underpromotions
Be sure a queen capture promotion is tried in front of an underpromotion. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
be9aba2fa0
commit
10b24af98a
1 changed files with 2 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue