Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable tree reuse in training. #536

Merged
merged 11 commits into from
May 8, 2018
2 changes: 1 addition & 1 deletion src/UCI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,8 @@ namespace {
// Return the score from the self-play game.
// Precondition: bh.cur() is not a terminal position.
int play_one_game(BoardHistory& bh) {
auto search = std::make_unique<UCTSearch>(bh.shallow_clone());
for (int game_ply = 0; game_ply < 450; ++game_ply) {
auto search = std::make_unique<UCTSearch>(bh.shallow_clone());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about a comment saying we are doing this on purpose to avoid tree reuse? Otherwise it might look like a bug.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Limits.startTime = now();
Move move = search->think(bh.shallow_clone());

Expand Down