We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5ec63eb commit e46a72dCopy full SHA for e46a72d
src/search.cpp
@@ -1401,6 +1401,7 @@ void RootMove::extract_pv_from_tt(Position& pos) {
1401
const TTEntry* tte;
1402
int ply = 0;
1403
Move m = pv[0];
1404
+ Value expectedScore = score;
1405
1406
pv.clear();
1407
@@ -1411,8 +1412,10 @@ void RootMove::extract_pv_from_tt(Position& pos) {
1411
1412
1413
pos.do_move(pv[ply++], *st++);
1414
tte = TT.probe(pos.key());
1415
+ expectedScore = -expectedScore;
1416
1417
} while ( tte
1418
+ && expectedScore == value_from_tt(tte->value(), ply)
1419
&& pos.pseudo_legal(m = tte->move()) // Local copy, TT could change
1420
&& pos.legal(m, pos.pinned_pieces(pos.side_to_move()))
1421
&& ply < MAX_PLY
0 commit comments