google-deepmind / open_spiel

OpenSpiel is a collection of environments and algorithms for research in general reinforcement learning and search/planning in games.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does alphazero support reuse-tree?

Nightbringers opened this issue · comments

Does alphazero support reuse-tree?

After looking through the AlphaZero code quickly, it wasn't clear .. maybe/possibly?

@tewalds, do you remember if you supported this case?

The MCTS implementation does, but I'm pretty sure you can't in AlphaZero since you add noise to the first layer of nodes, which distorts the shape of the tree. If you were to try to reuse the tree you'd either need to not add that noise or add it at all layers. You're welcome to try that, but that's different than the canonical AlphaZero implementation.

Does this python version AlphaZero have the speed of c++ version?

The MCTS implementation does, but I'm pretty sure you can't in AlphaZero since you add noise to the first layer of nodes, which distorts the shape of the tree. If you were to try to reuse the tree you'd either need to not add that noise or add it at all layers. You're welcome to try that, but that's different than the canonical AlphaZero implementation.

how can I use sub-tree in eval or play with human?

Does this python version AlphaZero have the speed of c++ version?

The Python AlphaZero is not as fast as the C++ version.

The MCTS implementation does, but I'm pretty sure you can't in AlphaZero since you add noise to the first layer of nodes, which distorts the shape of the tree. If you were to try to reuse the tree you'd either need to not add that noise or add it at all layers. You're welcome to try that, but that's different than the canonical AlphaZero implementation.

how can I use sub-tree in eval or play with human?

Yes, you can plat AlphaZero checkpoints from the keyboard, see here: https://github.com/google-deepmind/open_spiel/blob/master/open_spiel/python/examples/alpha_zero.py

(Apologies for the late replies -- I missed your follow-up questions.)