โ† Curriculum
๐ŸŽฎ

Module 9

Advanced

Reinforcement Learning

Learn how agents learn from reward: MDPs and exploration, Q-learning and DQN, policy gradients and PPO, RL for LLMs (RLHF, DPO, GRPO and verifiable rewards), and what it takes to use RL in the real world.

Your progress

0/5

2.9 hoursโšก 680 XP
Start module

What you'll be able to do

  • โœ“Formulate problems as MDPs and reason about returns, discounting and the exploration-exploitation trade-off
  • โœ“Implement tabular Q-learning and value iteration in NumPy and explain what DQN adds to make Q-learning work with neural networks
  • โœ“Derive the policy gradient, implement REINFORCE with a baseline, and explain actor-critic methods and PPO's clipped objective
  • โœ“Explain RLHF, DPO, and RL from verifiable rewards with group-relative methods like GRPO, and recognise reward hacking
  • โœ“Assess when RL fits a real problem, including sim-to-real transfer, offline RL, off-policy evaluation and safety constraints

Lessons

  1. 1

    Reinforcement Learning Fundamentals

    The agent-environment loop, Markov decision processes, returns and discounting, value functions, and the exploration-exploitation trade-off through multi-armed bandits.

  2. ๐Ÿ”’

    Value-Based Methods: Bellman, Q-Learning and DQN

    The Bellman equations, dynamic programming, temporal-difference learning, tabular Q-learning in NumPy, and the tricks (experience replay, target networks) that made Deep Q-Networks work.

  3. ๐Ÿ”’

    Policy Gradients, Actor-Critic and PPO

    Optimize the policy directly: the policy gradient theorem, REINFORCE on a bandit in NumPy, baselines and advantages, actor-critic with GAE, and PPO's clipped objective, the workhorse of deep RL and classic RLHF.

  4. ๐Ÿ”’

    RL for LLMs: RLHF, DPO and GRPO

    How reinforcement learning shapes modern LLMs: RLHF with a reward model and PPO, DPO as RL-free preference optimization, RL from verifiable rewards with group-relative methods like GRPO for reasoning, and the ever-present danger of reward hacking.

  5. ๐Ÿ”’

    RL in the Real World

    Where reinforcement learning works outside the lab and why it is hard: games and self-play, robotics and sim-to-real transfer, recommender systems and bandits, offline RL and off-policy evaluation, and safety.