Coinrun Base code is taken from https://github.com/openai/coinrun
Setup coinrun:-
Linux with Python 3.6
apt-get install mpich build-essential qt5-default pkg-config
Mac with Python 3.6
brew install qt open-mpi pkg-config
git clone https://github.com/unimax/coinrun-dqn-pytorch.git
cd coinrun-dqn-pytorch/Project-Code/
pip install tensorflow==1.12.0 tensorflow-gpu==1.12.0
pip install -r requirements.txt
pip install -e .
Try it out
Try the environment out with the keyboard:
python -m coinrun.interactive
If this fails, you may be missing a dependency or may need to fix coinrun/Makefile
for your machine.
For tenserflow based PPO traning check out commands from orignal coinrun repo https://github.com/openai/coinrun
Start DQN Learning:-
python -m q_learning.solution --num-levels 1 --set-seed 1
for more custimization option and traning parameters check Project-code/q_learning/config.py
output graphs in logs dir (orange is when --CUSTOM_REWARD_SHAPING True):-
Following graphs clearly show the difference in perfomance in DQN and Double DQN :-
Colab
There's also a Colab notebook showing how to setup CoinRun.
See LICENSES for asset license information.