Skip to content

Trains deep reinforcement learning agents in Atari environments via the DRLA library.

License

Notifications You must be signed in to change notification settings

benborder/drla-atari

Repository files navigation

DRLA Atari

Trains a deep reinforcement learning agent in Atari environments with the DRLA library.

galaxianmspacmanbreakout

Installation

Install libtorch at /usr/local/libtorch and ensure cmake is also installed.

cmake --preset release
cmake --build --preset release --target install --parallel 8

Dependencies

All below dependencies are fetched automatically via cmake fetch content.

Training

To run training pass the config json file and the path to store the training data:

../install/drla-atari/bin/atari_train --config /path/to/config.json --data /path/to/data/directory/

An example config can be found here.

The performance of running 16 envs on a AMD Ryzen 9 5950X and nVidia RTX 3080 Ti is ~7000fps. It takes approx 45mins to train 10M environment steps via PPO.

Monitoring training

Run Tensorboard to view current and previous training runs:

tensorboard --max_reload_threads 4 --load_fast=false --bind_all --logdir /path/to/data/directory/

Goto http://localhost:6006 to view webpage.

Running an agent

A trained agent can be run via:

../install/drla-atari/bin/atari_run --data /path/to/data/directory/

The final score will be printed out in the terminal. To save a gif as well add the --save_gif arg.

Releases

No releases published