English | 中文版
MetaxDRL is a lightweight framework designed specifically for Deep Reinforcement Learning (DRL), offering high-quality, single-file implementations of various mainstream reinforcement learning algorithms. Its core design philosophy centers on simplicity, readability, and practicality, enabling users to quickly grasp algorithm principles while supporting flexible customization and experimental innovation.
-
Online Algorithm: Each online algorithm module is meticulously crafted with a clear and concise code structure, avoiding redundant encapsulation to preserve the intuitive expression of algorithmic logic. This "de-engineered" approach is particularly suitable for teaching, rapid prototyping, and research exploration, allowing researchers and developers to focus on algorithm optimization and innovation.
-
Offline Algorithm: Leveraging the d3rlpy framework, MetaxDRL provides efficient support for offline algorithms, harnessing the robust performance of Metax C-series GPUs to demonstrate compatibility with mainstream frameworks.
-
Environment Compatibility and Performance: MetaxDRL supports a wide range of classic and modern reinforcement learning environments, delivering excellent runtime performance and user-friendly training and evaluation functionalities, catering to both beginners and seasoned researchers.
With its simple yet powerful design, MetaxDRL is ideal for the following scenarios:
-
Teaching and Learning: Clear single-file implementations help students and beginners quickly understand the core principles of reinforcement learning algorithms.
-
Research Exploration: Flexible code structure facilitates algorithm improvements and experimental innovation for researchers.
-
Rapid Prototyping: Enables fast development and testing, empowering developers to validate new ideas efficiently.
| Algorithm | type | Implemented | Action Space | Device | Example Environment | Reward | Speed(FPS) | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Online | Offline | Discrete | Continuous | CPU | C500 | GPU | CPU | C500 | GPU | ||||
| ✅A2C | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 2527 | 1052 | 430 |
| ✅A3C | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 114028 | 375080 | 123180 |
| ✅AC | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 1590 | 843 | 330 |
| ✅C51 | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 32598 | 15796 | 19836 |
| ✅DDPG | ✅ | / | train.py | / | ✅ | ✅ | ✅ | ✅ | HalfCheetah-v4 | 4800 | 33746 | 98095 | 41333 |
| ✅Double DQN | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 151048 | 206638 | 121803 |
| ✅DQN | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 164655 | 222177 | 127998 |
| ✅Dueling DQN | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 134419 | 192030 | 91482 |
| ✅Policy Gradient | ✅ | / | train.py | ✅ | / | ✅ | ✅ | ✅ | CartPole-v0 | 195 | 17 | 10 | 5 |
| ✅PPO | ✅ | / | train.py | / | ✅ | ✅ | ✅ | ✅ | HalfCheetah-v4 | 4800 | 15315 | 7064 | 2780 |
| ✅SAC | ✅ | / | train.py | / | ✅ | ✅ | ✅ | ✅ | HalfCheetah-v4 | 4800 | 737 | 1108 | 610 |
| ✅TD3 | ✅ | / | train.py | / | ✅ | ✅ | ✅ | ✅ | HalfCheetah-v4 | 4800 | 52359 | 77272 | 45469 |
| ✅AWAC | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 19 | 66 | 30 |
| ✅BCQ | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 9 | 95 | 46 |
| ✅BEAR | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 32 | 108 | 43 |
| ✅CQL | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 16 | 77 | 34 |
| ✅CRR | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 70 | 159 | 62 |
| ✅Decision Transformer | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 14 | 126 | 54 |
| ✅IQL | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 109 | 150 | 61 |
| ✅PLAS | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 127 | 323 | 113 |
| ✅TD3 | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 137 | 194 | 80 |
| ✅TD3+BC | / | ✅ | train.py | / | ✅ | ✅ | ✅ | ✅ | Hopper-v0 | 3000 | 131 | 188 | 80 |
Please refer to install.md for environment setup.
Please refer to usage.md for usage.
The offline algorithms in this project rely on d3rlpy