mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Retire pv[] from SearchStack
Extract PV info from TT instead of using a set of arrays. This is almost equivalent except for cases when TT is full and the PV entry is overwritten, but this is very rare. (Almost) No functional change Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -192,9 +192,9 @@ void TranspositionTable::extract_pv(const Position& pos, Move pv[], const int PL
|
||||
Position p(pos, pos.thread());
|
||||
int ply = 0;
|
||||
|
||||
// Update position to the end of current PV
|
||||
while (pv[ply] != MOVE_NONE)
|
||||
p.do_move(pv[ply++], st);
|
||||
assert(pv[0] != MOVE_NONE);
|
||||
|
||||
p.do_move(pv[ply++], st);
|
||||
|
||||
// Try to add moves from TT while possible
|
||||
while ( (tte = retrieve(p.get_key())) != NULL
|
||||
|
||||
Reference in New Issue
Block a user