Lessons21
0/21 modules masteredStart Here
2 lessons · 45 minNo libraries and almost no maths: the loop of act, see and adjust, three slot machines worked out by hand, and a first Q-table filled in with a pencil.
Reinforcement Learning: Start Here
Up NextHow a program can learn by trying things and getting a score back, the loop of act, see and adjust, and a first game with three slot machines worked out by hand. No maths and no libraries needed.
Your First Q-Table
A tiny grid with a prize and a pit, and a table of scores that you fill in by hand one update at a time. Then the same table is filled in by a program, and you watch good moves appear. No libraries needed.
Foundations
5 lessons · 3 hrThe formal words (state, policy, value), bandits and exploration, exact solutions with dynamic programming, then learning from experience with Monte Carlo, TD and tabular Q-learning.
RL Foundations
Agent, environment, reward, MDPs, Bellman equations. Learning by trial and error.
Exploration vs Exploitation
Bandits first: epsilon-greedy, UCB, Thompson sampling, then curiosity-driven exploration (RND, ICM) as a preview of full RL.
Dynamic Programming: Value & Policy Iteration
Exact-solution methods when the MDP is fully known. Policy evaluation, policy improvement, value iteration, generalized policy iteration.
Monte Carlo & TD Learning
First model-free methods. MC vs TD bias-variance tradeoff, n-step returns, eligibility traces, on-policy vs off-policy.
Q-Learning
Tabular control. SARSA (on-policy) vs Q-learning (off-policy). Build a table of state-action values; watch an agent learn a maze.
Core: Deep and Policy Methods
5 lessons · 4 hrReplace the table with a network (DQN), then learn the policy directly: policy gradients, actor-critic, PPO and soft actor-critic.
Deep Q-Networks (DQN)
Replace Q-table with neural network. Vanilla DQN, Double DQN, Dueling, Prioritized Replay, Rainbow.
Policy Gradient Methods
REINFORCE with baselines. Learn the policy directly via gradient ascent on expected return.
Actor-Critic Methods: A2C, A3C, and IMPALA
Combine policy and value learning. A2C, A3C, GAE, IMPALA: the lineage to PPO.
Proximal Policy Optimization
TRPO and PPO. A widely used workhorse of modern deep RL: stable, efficient, and the policy-optimization step in many RLHF pipelines.
SAC & TD3: Continuous Control RL
Maximum entropy RL for robotics and locomotion. Twin critics, Gaussian policies, off-policy efficiency.
Advanced: Beyond a Reward and a Simulator
5 lessons · 2 hrLearning from demonstrations and logged data, learning a model of the world, search plus learning, and many agents at once.
Imitation Learning
Learn from expert demos. BC, DAgger (covariate shift fix), GAIL (adversarial), AIRL, Max-Ent IRL.
Offline / Batch RL
Train from logged data. CQL, IQL, BCQ, Decision Transformer. Why naive Q-learning fails on a fixed dataset.
Model-Based RL & MCTS
Learn a world model. Plan in imagination. Dyna, Dreamer, world models, MuZero teaser.
Search + Learning: The Idea Behind AlphaGo, AlphaZero, MuZero
MCTS + neural networks. One of the most spectacular successes of RL: game playing from Go to AlphaProof.
Multi-Agent RL
Self-play, CFR, MADDPG, QMIX, MAPPO. AlphaStar, Pluribus, CICERO: multi-agent coordination and competition.
Expert: Language Models and Planning
4 lessons · 3 hrRL for language models (RLHF, GRPO), AlphaZero and MuZero in full, and hierarchical RL with options.
The RL to RLHF Bridge
From game-playing to language model alignment. PPO/GRPO/DPO plus outcome-based RL with verifiable rewards (reasoning models).
AlphaZero & MuZero: Search + Learning in One Loop
AlphaZero trains a policy network to imitate MCTS and uses MCTS to play by querying the network; MuZero runs the same loop in a learned latent model with no simulator.
Hierarchical RL & Options: Reasoning at Multiple Time Scales
Options give an agent actions that last many time steps, with a semi-Markov Bellman equation to match: Option-Critic, FeUdal Networks, HIRO, and LLMs as high-level planners.
RL From Scratch Lab
Eight from-scratch numpy exercises with automatic checking: discounted return, an epsilon-greedy bandit step, the Q-learning and SARSA updates, policy evaluation and value iteration on a grid, the REINFORCE gradient checked numerically, and GAE advantages, plus the traps and a capstone checklist.
Practice labs
10 interactive labs — hands-on exercises for this track
RL Grid World
Train an agent to navigate a maze — it learns from rewards and penalties
Q-Table Viewer
Peek inside the agent's brain — a table showing how valuable each action is in each state
Exploration vs Exploitation
5 slot machines, hidden rewards, limited pulls — find the best arm without wasting too many pulls on bad ones.
Policy vs Value Function
Two agents solve the same 5×5 grid side-by-side — one with explicit arrows (policy), one with a value landscape. Inject a bad arrow and watch the value agent still succeed.
PPO Clipped Surrogate Objective
Drag ε and flip advantage sign to see PPO's three curves: unclipped, clipped step function, and PPO = min(unclipped, clipped).
TD vs Monte Carlo
Run a 5-state random walk with three estimators — MC, TD(0), and TD(λ). Drag λ from 0 (TD) to 1 (MC) to see the bias-variance dial.
Actor-Critic Flow
Actor + Critic neural networks learning together. Step through TD error flowing back into both networks on a 3-arm contextual bandit.
Reward Shaping: Sparse vs Dense
Two Q-learning agents on the same 8×8 grid. Sparse reward (+1 only at goal) vs dense reward (distance-based). Dense wins — but beware reward hacking.
Monte Carlo Tree Search
Tic-tac-toe MCTS with the full 4-phase loop: Selection (UCB1) → Expansion → Simulation (rollout) → Backpropagation.
Discount Factor Impact
Drag γ from 0 to 0.999 on a 1D chain with a cliff. Watch the optimal policy flip from myopic (γ≈0) to far-sighted (γ≈0.99).
Test your knowledge
386 questions across 21 modules — check how well you understood this track.