This repo is the official code base for our AAAI'21 "Distributional Reinforcement Learning via Moment Matching".
- tensorflow==1.15
- tensorflow-probability==0.8.0
- atari-py
- gym==0.12.1
- gin-config
- cv2
- Dopamine framework (already integrated into this code base)
- To train and evaluate
MMDQN
in an Atari game with the default settings, use the following example command (from within the main directorymmdrl
):python main.py --env Breakout --agent_id mmd \ --agent_name mmd_dqn_1 --gin_files ./configs/mmd_atari.gin
where env
is an Atari game name, agent_id
is a registered agent id ('mmd' for MMDQN), agent_name
for the directory name to save the agent training and evaluation results, and gin_files
is a path to the hyperparameter configuration (in gin
format).
- For convenience, we can directly modify the bash script
run_mmdqn.sh
for various hyperparameter settings and run the bash viachmod +x ./run_mmdqn.sh; ./run_mmdqn.sh
env
: One of the 57 Atari gamesagent_id
: ['mmd', 'quantile', 'iqn'], agent id (for MMDQN, QR-DQN and IQN)agent_name
: str, the experiment log saved to./results/<env>/<agent_name>
policy
: ['eps_greedy', 'ucb', 'ps'], policy used by the agent (epsilon-greey, UCB or Thompson sampling)num_atoms
: int, the number of particles Nbandwidth_selection_type
: 'mixture', the method for kernel bandwidth selectiongin_files
: str, the path to a gin file containing the hyperparameters of the agentgin_bindings
: str, overwrite hyperparameters in a gin file
mmd_agent.py
: An implementation of MMDQN agentquantile_agent.py
: An implementation of QR-DQNmain.py
: Main file to train and evaluate an agentrun_mmdqn.sh
: A bash script to train and evaluate MMDQN agentconfigs/mmd_atari_gin
: Hyperparameters of MMDQN agentdopamine/
: The code base of Dopamine framework
@misc{nguyen2020distributional,
title={Distributional Reinforcement Learning via Moment Matching},
author={Thanh Tang Nguyen and Sunil Gupta and Svetha Venkatesh},
year={2020},
eprint={2007.12354},
archivePrefix={arXiv},
primaryClass={cs.LG}
}