mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
search_pv: an enpassant move is a capture
Fix the logic in search_pv and sp_search_pv An additional issue to consider is that a castle move is not a capture but destination square is not empty. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
725c504a5f
commit
b09cbaebb9
1 changed files with 7 additions and 5 deletions
|
@ -1003,9 +1003,8 @@ namespace {
|
||||||
movesSearched[moveCount++] = ss[ply].currentMove = move;
|
movesSearched[moveCount++] = ss[ply].currentMove = move;
|
||||||
|
|
||||||
if (moveIsCapture)
|
if (moveIsCapture)
|
||||||
ss[ply].currentMoveCaptureValue = pos.midgame_value_of_piece_on(move_to(move));
|
ss[ply].currentMoveCaptureValue =
|
||||||
else if (move_is_ep(move))
|
move_is_ep(move)? PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
||||||
ss[ply].currentMoveCaptureValue = PawnValueMidgame;
|
|
||||||
else
|
else
|
||||||
ss[ply].currentMoveCaptureValue = Value(0);
|
ss[ply].currentMoveCaptureValue = Value(0);
|
||||||
|
|
||||||
|
@ -1691,8 +1690,11 @@ namespace {
|
||||||
|
|
||||||
assert(move_is_ok(move));
|
assert(move_is_ok(move));
|
||||||
|
|
||||||
ss[sp->ply].currentMoveCaptureValue = move_is_ep(move)?
|
if (moveIsCapture)
|
||||||
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
ss[sp->ply].currentMoveCaptureValue =
|
||||||
|
move_is_ep(move)? PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
||||||
|
else
|
||||||
|
ss[sp->ply].currentMoveCaptureValue = Value(0);
|
||||||
|
|
||||||
lock_grab(&(sp->lock));
|
lock_grab(&(sp->lock));
|
||||||
int moveCount = ++sp->moves;
|
int moveCount = ++sp->moves;
|
||||||
|
|
Loading…
Add table
Reference in a new issue