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:
Tord Romstad
2009-08-06 18:07:32 +02:00
parent 2fff532f4e
commit ae49677446
3 changed files with 25 additions and 1 deletions

View File

@@ -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]);