-
Hello, ./build/examples/alpha_zero_torch_game_example.cc You can set a trained AlphaZero agent to play against another player (mcts/random/human). What's the best way to change it so that it allows both players to be trained AlphaZero agents loaded from different checkpoint paths, or to load a trained DQN agent to play AZ vs DQN? Thank you. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, We don't have examples of that but it should be as easy as just copying the logic from lines 184-212. I believe the For DQN you'd have to train it separately (see the examples of how to do that here: https://github.com/deepmind/open_spiel/blob/master/open_spiel/algorithms/dqn_torch/dqn_torch_test.cc) and then query the agent for moves. You can find the logic to run simulations on any game in OpenSpiel in examples/example.cc. So you'd just have to ask the agent which action it wants by giving it a state (usually via a If it doesn't exist already you can make a simple DQNBot wrapper that uses the Bot API so that you don't have to special-case how you get moves from DQN (if you do that, feel free to contribute it :)) |
Beta Was this translation helpful? Give feedback.
Hi,
We don't have examples of that but it should be as easy as just copying the logic from lines 184-212. I believe the
az_checkpoint
flag refers to which checkpoint to load.For DQN you'd have to train it separately (see the examples of how to do that here: https://github.com/deepmind/open_spiel/blob/master/open_spiel/algorithms/dqn_torch/dqn_torch_test.cc) and then query the agent for moves. You can find the logic to run simulations on any game in OpenSpiel in examples/example.cc. So you'd just have to ask the agent which action it wants by giving it a state (usually via a
step
function).If it doesn't exist already you can make a simple DQNBot wrapper that uses the Bot API so that you …