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.
✅ 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!
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
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/dqnfolder - The models and episodic returns are stored in
experiments/lunar_lander/exp_output/test_run/dqnfolder
To train on cluster:
launch_job/lunar_lander/cluster_dqn.sh --experiment_name test_run --first_seed 0 --last_seed 0 --disable_wandb
