Semester 3 · Elective
Reinforcement Learning Foundations
https://epochschool.com/subjects/reinforcement-learning-foundations
How an agent learns to act from the rewards its own actions earn, built from the MDPs of Classical AI.
You start with bandits and exploration, learn values from experience with Monte Carlo and temporal-difference methods, and find good behaviour with SARSA and Q-learning. You then scale up with function approximation and deep Q-networks, optimise policies directly with policy gradients and actor-critic methods, and learn with less interaction through learned models, logged data and expert demonstrations. Every algorithm is derived by hand, built in NumPy or PyTorch and tested on one CPU core, on environments you write yourself.
- Prerequisites
- Required: Finish this subject before you start. The subject builds directly on it.Recommended: Helpful background. You can start without it if you are willing to fill the gaps.
What you’ll be able to do
- LO1Analyse the exploration–exploitation trade-off, and implement and compare ε-greedy, UCB and Thompson sampling by their regret.
- LO2Estimate value functions from experience with Monte Carlo, TD(0), n-step and TD(λ) methods, explain their bias–variance trade-offs, and evaluate one policy from another's data with importance sampling.
- LO3Derive, implement and compare model-free control methods (SARSA, Q-learning, Expected SARSA and Double Q-learning), including on- against off-policy learning, reward shaping and the handling of termination and truncation.
- LO4Apply value-function approximation, explain the deadly triad, and build a deep Q-network with experience replay and a target network that learns a control task on one CPU core.
- LO5Derive the policy-gradient theorem, implement REINFORCE with baselines and actor-critic methods, and explain how trust regions and PPO's clipped objective keep policy updates safe.
- LO6Plan with learned models (Dyna, Monte Carlo tree search), and learn from fixed data with offline RL and imitation learning (behaviour cloning, DAgger), explaining extrapolation error and compounding errors.
- LO7Design and report RL experiments honestly: seeded runs, held-out start states, checkpoints chosen on validation episodes, standard errors and robust summaries, and recognise when a problem needs RL at all.
Chapters
- 01Bandits: learning to choose under uncertainty
- 02Learning values from experience: Monte Carlo and temporal-difference prediction
- 03Model-free control: SARSA, Q-learning and their relatives
- 04Function approximation and deep Q-networks
- 05Policy gradients and actor-critic methods
- 06Learning with models, logged data and experts
Graded labs
- L1
Bandit algorithms and an honest comparison
After chapter 1 · about 5 hours · Seeded Bernoulli bandit instances · Own work, CC BY 4.0 · Runs on a CPU
- L2
Prediction and control in grid worlds
After chapter 3 · about 6 hours · Five-state random walk, the A/B batch example, 4 x 12 cliff walking and the maximisation-bias MDP · Course own work, CC BY 4.0 · Runs on a CPU
- L3
A deep Q-network for cart-pole on one core
After chapter 4 · about 6 hours · Cart-pole environment · Course own work, CC BY 4.0 · Runs on a CPU
- L4
Policy gradients and actor-critic on cart-pole
After chapter 5 · about 5 hours · Cart-pole · Course own work, CC BY 4.0 · Runs on a CPU
- L5
Learning from a model, from logs and from an expert
After chapter 6 · about 5 hours · Dyna maze · Course own work, CC BY 4.0 · Runs on a CPU
Before you start
Required
Finish this subject before you start. The subject builds directly on it.
Probability & Statistics for ML
Neural Networks & Deep Learning
Recommended
Helpful background. You can start without it if you are willing to fill the gaps.
Foundations of Machine Learning
Linear Algebra & Calculus for ML
Optimisation & Training at Scale
How it’s taught
You read short sections written for the page. Each ends with a check, and in-browser exercises let you practise. Graded labs run on your own cloud lab machine, CPU-friendly.
No videos. No live classes. No AI tutor.