Implemented from my DQN framework: https://github.com/romainducrocq/DQN-frameworQ


flappy-seamonkai

The boosted seamonkai flappying around.

  1. Train: python3 train.py -algo PerDuelingDoubleDQNAgent -max_total_steps 9000000
  2. Observe: python3 observe.py -d ./save/PerDuelingDoubleDQNAgent_lr0.001_model.pack
  3. Visualize: tensorboard --logdir ./logs/train/
  4. Play: python3 play.py

Build dependencies

make: cd bin/ && bash make.sh

  1. Apt packages:

apt-get update && apt-get install build-essential libpq-dev libssl-dev openssl libffi-dev sqlite3 libsqlite3-dev libbz2-dev zlib1g-dev cmake

  1. Python 3.7.m:

m=0 && while wget -q --method=HEAD https://www.python.org/ftp/python/3.7.$(( $m + 1 ))/Python-3.7.$(( $m + 1 )).tar.xz; do m=$(( $m + 1 )); done && wget https://www.python.org/ftp/python/3.7.$m/Python-3.7.$m.tar.xz && tar xvf Python-3.7.$m.tar.xz && cd Python-3.7.$m && ./configure && make && make altinstall && cd .. && rm -rv Python-3.7.$m.tar.xz Python-3.7.$m

  1. Venv (venv):

mkdir venv && python3.7 -m venv venv/
source venv/bin/activate
(venv) ... Pip3 packages
deactivate

  1. Pip3 packages:

(venv) export TMPDIR='/var/tmp'
(venv) pip3 install 'pyglet==1.5.0' gym torch tensorboard 'msgpack==1.0.2' wheel --no-cache-dir


Demo

Demo gif

Demo tensorboard png