Skip to content

Latest commit

 

History

368 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

slimDQN - simple, minimal and flexible implementation of Deep Q-Network

python jax_badge Static Badge Code style: black License: MIT

slimDQN provides a concise and customizable implementation of Deep Q-Network (DQN) algorithm in Reinforcement Learning⛳ for Lunar Lander and Atari environments. It enables to quickly code and run proof-of-concept type of experiments in off-policy Deep RL settings.

🚀 Key advantages

✅ Easy to read - clears the clutter with minimal lines of code 🧹
✅ Easy to experiment - flexible to play with algorithms and environments 📊
✅ Fast to run - jax accleration, support for GPU and multiprocessing ⚡

Let's dive in!

User installation

CPU installation for Lunar Lander:

python3 -m venv env_cpu
source env_cpu/bin/activate
pip install --upgrade pip setuptools wheel
pip install -e .[dev]

GPU installation for Atari:

python3 -m venv env
source env/bin/activate
pip install --upgrade pip setuptools wheel
pip install -e .[dev,gpu]

To verify the installation, run the tests as:pytest

Running experiments

Training

To train a DQN agent on Lunar Lander on your local system, run:
launch_job/lunar_lander/local_dqn.sh --experiment_name test_run --first_seed 0 --last_seed 0 --disable_wandb

It trains a DQN agent with 2 hidden layers of size 100, for 100_000 gradient steps.

  • To see the stage of training, you can check the logs in experiments/lunar_lander/logs/test_run/dqn folder
  • The models and episodic returns are stored in experiments/lunar_lander/exp_output/test_run/dqn folder

To train on cluster:
launch_job/lunar_lander/cluster_dqn.sh --experiment_name test_run --first_seed 0 --last_seed 0 --disable_wandb

About

🚀Simple and concise implementation of DQN on Atari Games in JAX🚀

Resources

Stars

17 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages