#101101st of 118 in Learning and cookbooks
reinforcement-learning
PyTorch reference implementations of classic and deep RL algorithms, one file each
- Stars
- 3.7k
- License
- MIT
- Last commit
- Jun 2026
- Language
- Python
3,608 on 25 Apr 20263,679 on 14 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
A set of single-file PyTorch implementations of reinforcement learning algorithms, from policy and value iteration on a grid world to DQN, A2C and PPO on CartPole and Atari. Each file opens with a paper citation and the core update equation. The README includes Breakout benchmarks on an Apple M3 and Montezuma's Revenge results with PPO+RND and Go-Explore.
Who it is for: Students and engineers learning RL by reading and running short PyTorch code
Strengths
- One file per algorithm, with paper citation and update equation at the top
- Covers tabular methods through DQN, A2C and PPO on Atari
- Benchmarks list params, train time, peak RAM and score for Breakout
- Atari scripts run offline unless --wandb is passed
Weaknesses
- Benchmarks use a single seed per row
- Breakout DQN took about 9 hours on an M3 laptop
- Go-Explore robustification yields no from-reset score on one machine
- Scripts are standalone examples, not an importable library
What it needs
- GPU optional
- Needs Python 3.11, uv, PyTorch, gymnasium, pygame, Weights & Biases (optional)
Also in Learning and cookbooks
See all 118| Rank | Project | Score |
|---|---|---|
| 1 | ai-engineering-from-scratchFree curriculum of 542 coding lessons on building AI systems from scratch | 91 out of 100 |
| 2 | generative-ai-for-beginners21-lesson course on building generative AI apps in Python and TypeScript | 83 out of 100 |
| 3 | rag_techniquesCollection of 42 runnable notebooks implementing RAG techniques | 83 out of 100 |
| #4 | cs249r_bookOpen textbook series on ML systems, with TinyTorch, labs and hardware kits | 83 out of 100 |
| #5 | agents-towards-productionJupyter tutorials for taking LLM agents from prototype to production | 82 out of 100 |