mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Fix score_captures() for the case of capture promotions
In case we have more than one promotion move, prefer the one that captures the biggest piece. Almost no functional change, anyhow I don't expect any ELO change, it is just the correct thing to do. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
89ec224cb9
commit
4b8a7f2793
1 changed files with 4 additions and 4 deletions
|
@ -224,11 +224,11 @@ void MovePicker::score_captures() {
|
||||||
for (MoveStack* cur = moves; cur != lastMove; cur++)
|
for (MoveStack* cur = moves; cur != lastMove; cur++)
|
||||||
{
|
{
|
||||||
m = cur->move;
|
m = cur->move;
|
||||||
if (move_is_promotion(m))
|
|
||||||
cur->score = QueenValueMidgame;
|
|
||||||
else
|
|
||||||
cur->score = pos.midgame_value_of_piece_on(move_to(m))
|
cur->score = pos.midgame_value_of_piece_on(move_to(m))
|
||||||
- pos.type_of_piece_on(move_from(m));
|
- pos.type_of_piece_on(move_from(m));
|
||||||
|
|
||||||
|
if (move_is_promotion(m))
|
||||||
|
cur->score += QueenValueMidgame;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue