#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
Stars, last 29 weeks+71
25 Apr 2026: 3,608 stars2 May 2026: 3,609 stars9 May 2026: 3,609 stars16 May 2026: 3,610 stars23 May 2026: 3,614 stars30 May 2026: 3,616 stars6 Jun 2026: 3,617 stars13 Jun 2026: 3,623 stars20 Jun 2026: 3,625 stars27 Jun 2026: 3,629 stars4 Jul 2026: 3,631 stars11 Jul 2026: 3,635 stars18 Jul 2026: 3,641 stars25 Jul 2026: 3,642 stars1 Aug 2026: 3,645 stars8 Aug 2026: 3,648 stars15 Aug 2026: 3,648 stars22 Aug 2026: 3,649 stars29 Aug 2026: 3,652 stars5 Sept 2026: 3,654 stars12 Sept 2026: 3,654 stars19 Sept 2026: 3,657 stars26 Sept 2026: 3,660 stars3 Oct 2026: 3,664 stars10 Oct 2026: 3,668 stars17 Oct 2026: 3,671 stars24 Oct 2026: 3,674 stars31 Oct 2026: 3,676 stars7 Nov 2026: 3,678 stars14 Nov 2026: 3,679 stars

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
Also in Learning and cookbooks
RankProjectScore
1ai-engineering-from-scratchFree curriculum of 542 coding lessons on building AI systems from scratch79.4k starsMIT91 out of 100
2generative-ai-for-beginners21-lesson course on building generative AI apps in Python and TypeScript123.8k starsMIT83 out of 100
3rag_techniquesCollection of 42 runnable notebooks implementing RAG techniques30.4k starscustom license83 out of 100
#4cs249r_bookOpen textbook series on ML systems, with TinyTorch, labs and hardware kits30.2k starscustom license83 out of 100
#5agents-towards-productionJupyter tutorials for taking LLM agents from prototype to production21.9k starscustom license82 out of 100