Skip to content

sdpkjc/abcdrl

Repository files navigation

abcdRL (Implement a RL algorithm in four simple steps)

English | 简体中文

license pytest pre-commit pypi docker autobuild docs Gitpod ready-to-code benchmark mirror repo Checked with mypy Code style: black Imports: isort python versions

abcdRL is a Modular Single-file Reinforcement Learning Algorithms Library that provides modular design without strict and clean single-file implementation.

adam

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.

Open in Gitpod

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


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}
}