Skip to content

Commit 9783710

Browse files
authored
Fix for starting fens that differ only in 50 move ply. (LeelaChessZero#1204)
1 parent bcb9eb1 commit 9783710

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mcts/node.cc

+3-1
Original file line numberDiff line numberDiff line change
@@ -471,7 +471,9 @@ bool NodeTree::ResetToPosition(const std::string& starting_fen,
471471
int no_capture_ply;
472472
int full_moves;
473473
starting_board.SetFromFen(starting_fen, &no_capture_ply, &full_moves);
474-
if (gamebegin_node_ && history_.Starting().GetBoard() != starting_board) {
474+
if (gamebegin_node_ &&
475+
(history_.Starting().GetBoard() != starting_board ||
476+
history_.Starting().GetNoCaptureNoPawnPly() != no_capture_ply)) {
475477
// Completely different position.
476478
DeallocateTree();
477479
}

0 commit comments

Comments
 (0)