← Back to curriculum

Module 5 — Policy gradients

Welcome to Module 5

Why policies beat Q-learning in continuous action spaces, and module roadmap.

~20 min read + exercises

Welcome to Module 5

Before we begin

Welcome to Module 5 of Deep Reinforcement Learning. This module is standalone within the track — read lessons in order unless you already know the prerequisites listed below.

Figure

Module 5 at a glance

Module 5 — lesson flow1Welcome2Lesson 13Lesson 24Lesson 35Lesson 46Quiz7Project
Welcome, core lessons, quiz, then a hands-on project.

What this module covers

LessonFocus
Why learn policies directlyCore concepts + checkpoints
REINFORCE & the policy gradient theoremCore concepts + checkpoints
Baseline & variance reductionCore concepts + checkpoints
Actor–critic architectureCore concepts + checkpoints
QuizMultiple-choice review with lesson links
ProjectPortfolio-ready code you can extend

Prerequisites

  • Comfort with basic Python and NumPy.
  • For Module 1: no prior RL required. Later modules assume earlier modules in this track (or equivalent background).
  • Optional: the AI course Modules 1–3 help with gradients and neural networks before Module 4.

Figure

The RL loop

Agentpolicy πEnvironmentaction astate s′, reward r
Agent observes state, chooses action, receives reward — repeat.

What to install before the project

  • Python 3.10+
  • pip install gymnasium numpy matplotlib
  • From Module 4 onward: pip install torch
  • From Module 6 onward: pip install stable-baselines3 (optional but recommended for PPO/SAC labs)

Ready?

Open the first technical lesson: Why learn policies directly