Skip to content

Latest commit

 

History

History
 
 

DeepQNetwork

breakout

video demo

Reproduce (performance of) the following reinforcement learning methods:

Performance & Speed

Claimed performance in the paper can be reproduced, on several games I've tested with.

DQN

On one GTX 1080Ti, the ALE version took ~3 hours of training to reach 21 (maximum) score on Pong, ~15 hours of training to reach 400 score on Breakout. It runs at 50 batches (~3.2k trained frames, 200 seen frames, 800 game frames) per second on GTX 1080Ti.

How to use

With ALE (paper's setting):

Install ALE and gym.

Download an atari rom, e.g.:

wget https://github.com/openai/atari-py/raw/master/atari_py/atari_roms/breakout.bin

Start Training:

./DQN.py --env breakout.bin
# use `--algo` to select other DQN algorithms. See `-h` for more options.

Watch the agent play:

# Download pretrained models or use one you trained:
wget http://models.tensorpack.com/DeepQNetwork/DoubleDQN-Breakout.npz
./DQN.py --env breakout.bin --task play --load DoubleDQN-Breakout.npz

With gym's Atari:

Install gym and atari_py.

./DQN.py --env BreakoutDeterministic-v4

A3C code and models for Atari games in OpenAI Gym are released in examples/A3C-Gym