Gradium × TensorTonic Voice Challenge is open for registration.Register now
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.

Upgrade to Pro
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

  1. MDPs and dynamic programming: discounted returns, the Bellman equations, value iteration and policy iteration.
  2. Tabular model-free RL: Monte Carlo evaluation, TD(0), SARSA, Q-learning and expected SARSA.
  3. Bandits and exploration: epsilon-greedy, UCB1, Thompson sampling, Boltzmann exploration and LinUCB.
  4. Deep value-based RL: DQN with a target network, experience replay, prioritized replay, double DQN and dueling DQN.
  5. Policy gradient and PPO: REINFORCE with and without a baseline, GAE, actor-critic and the PPO clipped objective.
  6. 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.