abcdrl
abcdrl copied to clipboard
Modular Single-file Reinfocement Learning Algorithms Library
abcdRL (Implement a RL algorithm in four simple steps)
English | 简体中文
abcdRL is a Modular Single-file Reinforcement Learning Algorithms Library that provides modular design without strict and clean single-file implementation.
Understand the full implementation details of the algorithm in a single file quickly when reading the code; Benefit from a lightweight modular design, only need to focus on a small number of modules when modifying the algorithm.
abcdRL mainly references the single-file design philosophy of vwxyzjn/cleanrl and the module design of PaddlePaddle/PARL.
Documentation ➡️ docs.abcdrl.xyz
Roadmap🗺️ #57
🚀 Quickstart
Open the project in Gitpod🌐 and start coding immediately.
Using Docker📦:
# 0. Prerequisites: Docker & Nvidia Drive & NVIDIA Container Toolkit
# 1. Run DQN algorithm
docker run --rm --gpus all sdpkjc/abcdrl python abcdrl/dqn_torch.py
For detailed installation instructions 👀
🐼 Features
- 👨👩👧👦 Unified code structure
- 📄 Single-file implementation
- 🐷 Low code reuse
- 📐 Minimizing code differences
- 📈 Tensorboard & Wandb integration
- 🛤 PEP8(code style) & PEP526(type hint) compliant
🗽 Design Philosophy
- "Copy📋", ~~not "Inheritance🧬"~~
- "Single-file📜", ~~not "Multi-file📚"~~
- "Features reuse🛠", ~~not "Algorithms reuse🖨"~~
- "Unified logic🤖", ~~not "Unified interface🔌"~~
✅ Implemented Algorithms
Weights & Biases Benchmark Report ➡️ report.abcdrl.xyz
-
Deep Q Network (DQN)
dqn_torch.py
,dqn_tf.py
,dqn_atari_torch.py
,dqn_atari_tf.py
-
Deep Deterministic Policy Gradient (DDPG)
ddpg_torch.py
-
Twin Delayed Deep Deterministic Policy Gradient (TD3)
td3_torch.py
-
Soft Actor-Critic (SAC)
sac_torch.py
-
Proximal Policy Optimization (PPO)
ppo_torch.py
-
Double Deep Q Network (DDQN)
ddqn_torch.py
,ddqn_tf.py
-
Prioritized Deep Q Network (PDQN)
pdqn_torch.py
,pdqn_tf.py
Citing abcdRL
@misc{zhao_abcdrl_2022,
author = {Yanxiao, Zhao},
month = {12},
title = {{abcdRL: Modular Single-file Reinforcement Learning Algorithms Library}},
url = {https://github.com/sdpkjc/abcdrl},
year = {2022}
}