mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +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;
|
||||
|
||||
if (moveIsCapture)
|
||||
ss[ply].currentMoveCaptureValue = pos.midgame_value_of_piece_on(move_to(move));
|
||||
else if (move_is_ep(move))
|
||||
ss[ply].currentMoveCaptureValue = PawnValueMidgame;
|
||||
ss[ply].currentMoveCaptureValue =
|
||||
move_is_ep(move)? PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
||||
else
|
||||
ss[ply].currentMoveCaptureValue = Value(0);
|
||||
|
||||
|
@ -1691,8 +1690,11 @@ namespace {
|
|||
|
||||
assert(move_is_ok(move));
|
||||
|
||||
ss[sp->ply].currentMoveCaptureValue = move_is_ep(move)?
|
||||
PawnValueMidgame : pos.midgame_value_of_piece_on(move_to(move));
|
||||
if (moveIsCapture)
|
||||
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));
|
||||
int moveCount = ++sp->moves;
|
||||
|
|
Loading…
Add table
Reference in a new issue