"Bridging theory and practice: An exploration from Markov Decision Processes to Rainbow DQN."
drl_lab is a modular, extensible Deep Reinforcement Learning (DRL) experimental platform designed to provide out-of-the-box implementations of classic control tasks with a modern debugging experience.
- Modern Architecture: Built on PyTorch and Gymnasium, featuring a modular design for
Agent,Task, andTrainer. - Rainbow DQN Integration:
- ✅ Double DQN (DDQN): Mitigates Q-value overestimation.
- ✅ Dueling Networks: Separates value and advantage streams for faster convergence.
- ✅ Huber Loss: Gradient clipping for stability.
- Interactive TUI: Terminal User Interface powered by Textual, enabling real-time visualization of training and inference (Braille animations, status dashboards, live logs).
- Developer Friendly: Lifecycle hooks (
pre_training,on_step, etc.) and a standardizedBaseTaskinterface. - Practical Optimizations: Includes Reward Shaping for sparse reward tasks like CartPole.
This project uses uv for package management:
# Clone the repository
git clone https://github.com/1shin-7/rl_lab.git
cd rl_lab
# Sync dependencies
uv syncStart training the CartPole task with TUI visualization enabled:
uv run rlab train cartpole --visual --episodes 500Run inference using a trained model:
uv run rlab infer cartpole --visual --weight outputs/cartpole.pthRemove generated models and plots for a task:
uv run rlab clean cartpole- Development Overview: Architecture, Tasks, and Hooks.
- TUI Guide: Visualization and UI design.
- CLI Reference: Detailed documentation for all CLI commands.