
30 Problems
Cracking RL
From dynamic programming and tabular methods to PPO, DPO, and GRPO. Thirty implement-from-scratch problems covering the math behind every major RL algorithm.
13 Easy14 Medium3 Hard
Unlock the full study plan
Upgrade to Pro to access the full curriculum.
6 sections
What you will learn
This plan covers the math behind every major reinforcement learning algorithm, from dynamic programming to the preference-optimization methods used to train language models. It has 30 problems in six sections, ending with PPO, DPO and GRPO.
Prerequisites
Python, plus basic probability and expected values. The Probability and Statistics study plan covers what you need.
The sections, in order
- MDPs and dynamic programming: discounted returns, the Bellman equations, value iteration and policy iteration.
- Tabular model-free RL: Monte Carlo evaluation, TD(0), SARSA, Q-learning and expected SARSA.
- Bandits and exploration: epsilon-greedy, UCB1, Thompson sampling, Boltzmann exploration and LinUCB.
- Deep value-based RL: DQN with a target network, experience replay, prioritized replay, double DQN and dueling DQN.
- Policy gradient and PPO: REINFORCE with and without a baseline, GAE, actor-critic and the PPO clipped objective.
- RLHF and preference optimization: reward model loss, PPO with a KL penalty, DPO, GRPO and RLOO.
Where to go next
Combine search and learning in Build AlphaGo from Scratch, or read how these methods align language models in RLHF explained.