Skip to content

David Silver: Reinforcement Learning lectures (UCL, 2015)

optionalcorefundamentalcourserubric 9/122015 · UCL Advanced Topics (COMPM050/COMPGI13) · ~900 min

David Silver

Status

TL;DR. Ten lectures from UCL in 2015, about 16.4 hours of video with slide PDFs, an assignment (Easy21) and past exam questions with answers. Lectures 1–7 take you from “what is an MDP” to REINFORCE and actor-critic in about 11 hours. That is the foundation every PPO, GRPO and RLHF paper assumes. Use it as the main intuitive course for stages 1–2 of the course map.

Why it matters now. Silver teaches each idea first on tiny examples, then scales it up. That is exactly how you should learn RL as an IR researcher: one small search toy you can solve by hand, then token generation. The vocabulary (return, value, Bellman backup, bootstrapping, on-/off-policy, score function, baseline, advantage) is what later LLM-RL papers use without defining it.

  • Official page: davidsilver.uk/teaching redirects to the author’s WordPress page, titled “Advanced Topics 2015 (COMPM050/COMPGI13) Reinforcement Learning”. All ten slide decks, the Easy21 assignment and previous exam questions with answers are linked there. The page states the material is under CC-BY-NC 4.0, with some third-party content excluded.
  • Videos: the official playlist is “DeepMind x UCL | Introduction to Reinforcement Learning 2015” on the Google DeepMind channel. Lecture lengths range from 88 to 111 minutes.
  • No timestamps here. The chapter markers YouTube shows on these videos are auto-generated (checked on L1–L9; L10 has none). Older timestamp lists circulating online are unofficial, so this page gives slide-section names instead.
Map from David Silver lectures to site pages Ten lecture boxes on the left (L1 Introduction to L10 Classic games) connected by lines to twelve site pages on the right. L1 and L2 feed MDPs and returns; L2 and L3 feed value functions and Bellman; L4 and L5 feed MC, TD and Q-learning; L4 feeds GAE; L5 feeds PPO via importance sampling; L6 feeds DQN and actor-critic; L7 feeds REINFORCE, actor-critic and TRPO; L8 (optional, dashed) feeds long-horizon tool agents; L9 feeds entropy mechanism and RL reasoning boundary; L10 is optional background. Silver lecture Site page L1 Introduction L2 MDPs L3 Dynamic programming L4 Model-free prediction L5 Model-free control L6 Value fn approximation L7 Policy gradient L8 Learning + planning L9 Exploration L10 Classic games (optional) MDPs and returns Value functions, Bellman MC, TD, Q-learning GAE PPO DQN Actor-critic REINFORCE TRPO Long-horizon tool agents Entropy mechanism RL reasoning boundary
Original sketch. Which Silver lecture prepares you for which site page. Solid lines are the main route; L8 and L10 are optional for the LLM path.

Video links go to the official playlist; slide links to the official PDFs. “Key slide sections” are section names from the decks.

#LectureLengthKey slide sectionsPrepares you forPriority
1Introduction to RL · slides88 minreward hypothesis, agent and environment, state, policy / value / model, taxonomy of agentsMDPs and returnsCore
2Markov Decision Processes · slides102 minMarkov process → Markov reward process → MDP, Bellman expectation and optimality equationsMDPs and returns, Value functions and BellmanCore
3Planning by Dynamic Programming · slides99 minpolicy evaluation, policy iteration, value iteration, contraction mappingValue functions and BellmanCore
4Model-Free Prediction · slides97 minMonte Carlo, TD(0), TD(λ), bias vs variance of targetsMC, TD, Q-learning, GAE (λ intuition)Core
5Model-Free Control · slides97 minε-greedy and GLIE, Sarsa and Sarsa(λ), off-policy learning with importance sampling, Q-learningMC, TD, Q-learning; importance sampling for PPOCore
6Value Function Approximation · slides97 minincremental and batch methods, experience replay, DQN with fixed Q-targetsDQN; value heads in Actor-criticCore (skim)
7Policy Gradient Methods · slides94 minfinite differences, score function (softmax and Gaussian), policy gradient theorem, REINFORCE, actor-critic, compatible function approximation, advantage baseline, natural policy gradientREINFORCE, Actor-critic, TRPO (natural gradient)Core: most important
8Integrating Learning and Planning · slides100 minmodel-based RL, Dyna, simulation-based search, MCTSSearch and tree search in agents (Long-horizon tool agents)Optional
9Exploration and Exploitation · slides99 minmulti-armed bandits, regret, optimism and UCB, contextual banditsEntropy mechanism, RL reasoning boundaryStage 6
10Case Study: RL in Classic Games · slides111 mingame theory, minimax search, self-playBackground for self-play ideasOptional

Suggested pacing. Week 1: L1–L3, then solve the toy by hand. Week 2: L4–L5 and the first three parts of Easy21. Week 3: L7 (with L6 skimmed), then read REINFORCE and Actor-critic. Come back to L9 when you reach entropy collapse in reasoning RL.

Bellman backups (L2–L3). The value of a state is the expected immediate reward plus the discounted value of where you land: vπ(s)=∑aπ(a∣s)∑s′,rp(s′,r∣s,a) [r+γvπ(s′)]v_\pi(s) = \sum_a \pi(a\mid s) \sum_{s',r} p(s',r\mid s,a)\,[r + \gamma v_\pi(s')]. Value iteration replaces the average over actions with a max and sweeps until nothing changes.

MC versus TD targets (L4). Monte Carlo updates towards the full observed return GtG_t, which is unbiased but noisy. TD(0) updates towards rt+1+γV(st+1)r_{t+1} + \gamma V(s_{t+1}), which has lower variance but is biased by the current estimate. TD(λ) mixes the two. This is the same knob as λ in GAE.

Sarsa versus Q-learning (L5). Sarsa’s target is r+γQ(s′,a′)r + \gamma Q(s', a') with a′a' the action the behaviour policy actually takes next, so it learns the value of the exploring policy. Q-learning’s target is r+γmax⁡a′Q(s′,a′)r + \gamma \max_{a'} Q(s', a'), so it learns the optimal values while behaving differently: it is off-policy.

The score function (L7). For a softmax policy with features ϕ(s,a)\phi(s,a), ∇θlog⁡πθ(s,a)=ϕ(s,a)−Eπθ[ϕ(s,⋅)]\nabla_\theta \log \pi_\theta(s,a) = \phi(s,a) - \mathbb{E}_{\pi_\theta}[\phi(s,\cdot)]. Its expectation under the policy is zero. That one fact is why a baseline does not bias the gradient.

Advantage actor-critic (L7). Subtract a state baseline B(s)=V(s)B(s) = V(s) and the policy gradient weights each action by its advantage A(s,a)=Q(s,a)−V(s)A(s,a) = Q(s,a) - V(s). A learned critic estimates VV. This is the structure PPO keeps and GRPO replaces with a group mean.

Worked example: the search toy, Silver-style

Section titled “Worked example: the search toy, Silver-style”

Toy (shared across the course map): in s₀ (“no evidence”) the agent can search (cost −0.1, go to s₁) or answer (+1 with probability 0.2). In s₁ (“evidence in context”) answer pays +1 with probability 0.9, and search costs −0.1 and stays in s₁. Take γ = 0.9.

  • Value iteration (L3). Start at V = 0. Sweep 1: V(s₁) = 0.9, V(s₀) = max(0.2, −0.1) = 0.2, so answering looks best. Sweep 2: V(s₀) = max(0.2, −0.1 + 0.9·0.9) = 0.71, and the greedy action flips to search. Sweep 3 changes nothing.
  • Sarsa vs Q-learning (L5). Behave ε-greedily with ε = 0.2, so the greedy action has probability 0.9. Q-learning still converges to Q*(s₀, search) = 0.71. Sarsa learns the exploring policy’s value: in s₁, V = 0.9·0.9 + 0.1·(−0.1 + 0.9·V) gives V ≈ 0.879, so Q(s₀, search) ≈ 0.69. The gap is the price of exploratory extra searches.
  • Policy gradient (L7). Make the s₀ decision a softmax over two logits. One episode “search, then a correct answer” has return −0.1 + 0.9·1 = 0.8 with γ = 0.9. The update raises the search logit by 0.8·(1 − π(search)) and lowers the answer logit by 0.8·π(answer). With an LLM, the “two logits” are a vocabulary of logits, and the same formula holds token by token.
  • 2015 content: no TRPO or PPO, no GAE, nothing on RLHF, reward models, KL to a reference model, or verifiable rewards.
  • The examples are games and small control problems. You have to do the translation to tokens and tool calls yourself (this section’s toy is meant to help).
  • Function approximation is mostly linear; deep RL appears only as DQN in L6.

Questions to think through

These questions have no single right answer. Write or say your answer before you open the hints. Mark a question once you could defend your answer in a reading group.

  1. Derive / compute

    Run synchronous value iteration (Lecture 3) on the search toy with γ = 0.9, starting from V = 0 everywhere. Give V(s0) and V(s1) after sweeps 1, 2 and 3, the greedy action in s0 after each sweep, and explain why the greedy action changes at sweep 2.

    What a strong answer covers
    • Sweep 1: V(s1) = max(0.9, −0.1 + 0.9·0) = 0.9; V(s0) = max(0.2, −0.1 + 0) = 0.2; greedy action in s0 is answer.
    • Sweep 2: V(s1) stays 0.9; V(s0) = max(0.2, −0.1 + 0.9·0.9) = 0.71; greedy action becomes search.
    • Sweep 3: nothing changes, so the values have converged to V*(s0) = 0.71 and V*(s1) = 0.9.
    • The flip happens because value information propagates one step per sweep: s0 only learns that s1 is valuable after s1's own value has been backed up.
  2. Mechanism

    Lecture 5 contrasts Sarsa (on-policy) with Q-learning (off-policy). In the search toy, the agent behaves ε-greedily with ε = 0.2 (two actions, so the greedy action is taken with probability 0.9), γ = 0.9. What does each method converge to for Q(s0, search), and why do they differ?

    What a strong answer covers
    • Sarsa's target uses the next action actually taken, so it learns the value of the ε-greedy policy itself. In s1: V = 0.9·0.9 + 0.1·(−0.1 + 0.9·V), so V ≈ 0.879 and Q(s0, search) ≈ −0.1 + 0.9·0.879 ≈ 0.69.
    • Q-learning's target takes the max over next actions, so it learns Q* regardless of the exploration: Q(s0, search) = 0.71.
    • The gap is the cost of exploratory extra searches that Sarsa counts and Q-learning ignores. Both still prefer search over answer (0.2) here.
    • This is the on-policy versus off-policy distinction that later decides whether stale rollouts need importance weights.
  3. Connect

    Lecture 7 gives the softmax-policy score function ∇ log π(s, a) = φ(s, a) − E_π[φ(s, ·)]. Show what this becomes for an LLM whose logits are the action preferences, and use it to explain why a REINFORCE update on one sampled token also pushes down every other token.

    What a strong answer covers
    • With one-hot features per action, the gradient of log-softmax with respect to the logits is onehot(a) − π(·|s).
    • The sampled token's logit gets +(1 − π(a|s)) and every other token b gets −π(b|s), weighted by the return or advantage.
    • So a positive advantage raises the chosen token and lowers the others in proportion to their current probability; a negative advantage does the reverse.
    • The expected score under π is zero, which is why subtracting a baseline does not bias the gradient.
  4. What if…

    The Easy21 assignment asks for Sarsa(λ) with λ = 0, 0.1, …, 1, reporting mean-squared error against the Monte Carlo Q* after 1,000 episodes. What does each end of the sweep correspond to, what would you expect to see, and how does the same knob reappear in GAE for PPO?

    What a strong answer covers
    • λ = 0 is one-step TD: low-variance targets but biased by the current estimates. λ = 1 behaves like Monte Carlo: unbiased returns with high variance.
    • After a fixed, small number of episodes the best error is often at an intermediate λ; the exact shape depends on step sizes and exploration, so it must be measured, not assumed.
    • The learning curves for λ = 0 and λ = 1 show the bias–variance trade-off over time, not only at the end.
    • GAE's λ mixes n-step advantage estimates in the same way. λ near 1 is close to Monte Carlo advantages, smaller λ leans on the critic.
  5. Critique

    Someone proposes Silver's ten lectures as the complete RL background for reading GRPO and RLHF papers. Identify what the course covers well and the specific gaps you must fill elsewhere.

    What a strong answer covers
    • Strong: MDPs, Bellman equations, DP, MC and TD, Sarsa and Q-learning, function approximation with replay and fixed targets, the policy gradient theorem, REINFORCE, actor-critic with an advantage baseline.
    • Missing: TRPO and PPO, GAE, and the practicalities of training large neural policies, all post-2015.
    • Missing entirely: reward models from human preferences, KL regularization to a reference model, DPO, verifiable rewards and LLM-specific issues such as token-level credit assignment and length bias.
    • Fill with Spinning Up or CS285 (stage 3) and Lambert's course and book (stages 4–7).
  6. Design

    Design an Easy21-style assignment for a retrieval agent: a small environment where actions are search, read and answer. Specify the state, reward, the four parts of the assignment, and what each part is meant to teach.

    What a strong answer covers
    • State: a compact summary such as number of searches so far and whether a relevant document is in context. Actions: search, read, answer. Reward: +1 for a correct answer, a small cost per search or read, no discounting.
    • Part 1: implement step() as a sampler without exposing transition probabilities, so the methods are model-free.
    • Part 2: Monte Carlo control with ε-greedy exploration to get a reference Q*. Part 3: Sarsa(λ) with a λ sweep and MSE against that Q*.
    • Part 4: linear features over the state, then a discussion of where bootstrapping and function approximation help or hurt.
    • Extension: replace tabular states with an embedding of the context and compare against a policy-gradient agent.

Done with this page?

Status