Back to rankings

Curt-Park/rainbow-is-all-you-need

Python

Rainbow is all you need! A step-by-step tutorial from DQN to Rainbow

pytorchreinforcement-learningdqnrainbowgym-environmentcolab-notebooknbviewer
Star Growth
Stars
2k
Forks
353
Weekly Growth
Issues
1
1k2k
Jun 2019Oct 2021Mar 2024Jul 2026
ArtifactsPyPIpip install rainbow-is-all-you-need
README
Rainbow is All You Need

All Contributors

This is a step-by-step tutorial from DQN to Rainbow. Every chapter contains both of theoretical backgrounds and object-oriented implementation. Just pick any topic in which you are interested, and learn! You can run them directly in the cloud with molab — no local setup needed.

Built with marimo — a reactive Python notebook that runs as a pure .py file with better reproducibility, git diffs, and interactive UI.

Please feel free to open an issue or a pull-request if you have any idea to make it better. :)

If you want a tutorial for policy gradient methods, please see PG is All You Need.

Contents

  1. DQN [GitHub] [Preview]
  2. DoubleDQN [GitHub] [Preview]
  3. PrioritizedExperienceReplay [GitHub] [Preview]
  4. DuelingNet [GitHub] [Preview]
  5. NoisyNet [GitHub] [Preview]
  6. CategoricalDQN [GitHub] [Preview]
  7. N-stepLearning [GitHub] [Preview]
  8. Rainbow [GitHub] [Preview]
  9. Rainbow IQN [GitHub] [Preview]

Click "Run in molab" on the preview page to open an interactive session where you can edit and run the notebook.

Prerequisites

# Install mise
curl https://mise.run | sh

# Clone the project
git clone https://github.com/Curt-Park/rainbow-is-all-you-need.git
cd rainbow-is-all-you-need

# Install Python + Create venv + Install Python packages
make init
make setup

How to Run

Run and experiment with any notebook:

make run notebook=01_dqn.py

Development

make format    # run the formatter
make lint      # run the linter
  1. V. Mnih et al., "Human-level control through deep reinforcement learning." Nature, 518 (7540):529–533, 2015.
  2. van Hasselt et al., "Deep Reinforcement Learning with Double Q-learning." arXiv preprint arXiv:1509.06461, 2015.
  3. T. Schaul et al., "Prioritized Experience Replay." arXiv preprint arXiv:1511.05952, 2015.
  4. Z. Wang et al., "Dueling Network Architectures for Deep Reinforcement Learning." arXiv preprint arXiv:1511.06581, 2015.
  5. M. Fortunato et al., "Noisy Networks for Exploration." arXiv preprint arXiv:1706.10295, 2017.
  6. M. G. Bellemare et al., "A Distributional Perspective on Reinforcement Learning." arXiv preprint arXiv:1707.06887, 2017.
  7. R. S. Sutton, "Learning to predict by the methods of temporal differences." Machine learning, 3(1):9–44, 1988.
  8. M. Hessel et al., "Rainbow: Combining Improvements in Deep Reinforcement Learning." arXiv preprint arXiv:1710.02298, 2017.
  9. W. Dabney et al., "Implicit Quantile Networks for Distributional Reinforcement Learning." arXiv preprint arXiv:1806.06923, 2018.

Contributors

Thanks goes to these wonderful people (emoji key):

Jinwoo Park (Curt)
Jinwoo Park (Curt)

💻 📖
Kyunghwan Kim
Kyunghwan Kim

💻
Wei Chen
Wei Chen

🚧
WANG Lei
WANG Lei

🚧
leeyaf
leeyaf

💻
ahmadF
ahmadF

📖
Roberto Schiavone
Roberto Schiavone

💻
David Yuan
David Yuan

💻
dhanushka2001
dhanushka2001

💻
Pierre Couy
Pierre Couy

💻
Claude
Claude

💻

This project follows the all-contributors specification. Contributions of any kind welcome!

Related repositories
AUTOMATIC1111/stable-diffusion-webui

Stable Diffusion web UI

PythonPyPIGNU Affero General Public License v3.0deep-learningdiffusion
164.3k30.4k
huggingface/transformers

🤗 Transformers: the model-definition framework for state-of-the-art machine learning models in text, vision, audio, and multimodal models, for both inference and training.

PythonPyPIApache License 2.0nlpnatural-language-processing
huggingface.co/transformers
162.8k34k
Comfy-Org/ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.

PythonPyPIGNU General Public License v3.0stable-diffusionpytorch
comfy.org
121.7k14.3k
rasbt/LLMs-from-scratch

Implement a ChatGPT-like LLM in PyTorch from scratch, step by step

Jupyter NotebookOthergptlarge-language-models
amzn.to/4fqvn0D
99.5k15.3k
vllm-project/vllm

A high-throughput and memory-efficient inference and serving engine for LLMs

PythonPyPIApache License 2.0gptllm
vllm.ai
86.8k19.7k
comfyanonymous/ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.

PythonPyPIGNU General Public License v3.0stable-diffusionpytorch
comfy.org
70.2k7.6k
labmlai/annotated_deep_learning_paper_implementations

🧑‍🏫 60+ Implementations/tutorials of deep learning papers with side-by-side notes 📝; including transformers (original, xl, switch, feedback, vit, ...), optimizers (adam, adabelief, sophia, ...), gans(cyclegan, stylegan2, ...), 🎮 reinforcement learning (ppo, dqn), capsnet, distillation, ... 🧠

PythonPyPIMIT Licensedeep-learningdeep-learning-tutorial
nn.labml.ai
67.2k6.7k
keras-team/keras

Deep Learning for humans

PythonPyPIApache License 2.0deep-learningtensorflow
keras.io
64.2k19.7k
CorentinJ/Real-Time-Voice-Cloning

Clone a voice in 5 seconds to generate arbitrary speech in real-time

PythonPyPIOtherdeep-learningpytorch
60k9.4k
ultralytics/ultralytics

Ultralytics YOLO26, YOLO11, YOLOv8 — object detection, instance segmentation, semantic segmentation, image classification, pose estimation, object tracking

PythonPyPIGNU Affero General Public License v3.0ultralyticsyolov8
platform.ultralytics.com
59.7k11.4k
ultralytics/yolov5

Ultralytics YOLOv5 in PyTorch for object detection, instance segmentation, classification, training, and export.

PythonPyPIGNU Affero General Public License v3.0yolov5object-detection
docs.ultralytics.com/yolov5/
57.7k17.5k
GokuMohandas/Made-With-ML

Learn how to develop, deploy and iterate on production-grade ML applications.

Jupyter NotebookMIT Licensemachine-learningdeep-learning
madewithml.com
48.8k7.7k