mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 00:26:33 +08:00
Fixed a bug in PV extraction from the transposition table: The
previous used move_is_legal to verify that the move from the TT was legal, and the old version of move_is_legal only works when the side to move is not in check. Fixed this by adding a separate, slower version of move_is_legal which works even when the side to move is in check.
This commit is contained in:
@@ -207,7 +207,7 @@ void TranspositionTable::extract_pv(const Position& pos, Move pv[]) {
|
||||
tte && tte->move() != MOVE_NONE && !stop;
|
||||
tte = retrieve(p.get_key()), ply++)
|
||||
{
|
||||
if (!move_is_legal(p, tte->move(), p.pinned_pieces(p.side_to_move())))
|
||||
if (!move_is_legal(p, tte->move()))
|
||||
break;
|
||||
pv[ply] = tte->move();
|
||||
p.do_move(pv[ply], st[ply]);
|
||||
|
||||
Reference in New Issue
Block a user