Silver RL·Lecture 2·Lecture Notes

Lecture 2 · Markov Decision Processes

Updated 2026-08-30·EN

Slides: David Silver, UCL Course on Reinforcement Learning (2015), CC BY-NC 4.0. Some slide content is from third parties and is outside that licence.

Slides: David Silver - RL Course (UCL 2015) · Previous: Introduction to RL (L1) · Next: Lecture 3 · Planning by Dynamic Programming
Companion: Silver RL Lecture 2 — Question List (your own stuck points, in Korean) · Markov Decision Process (MDP)

Read this instead of watching. Each slide is embedded below with only what the slide itself does not say — the reasoning, the caveats, and the questions worth being able to answer.


The one idea

L2 builds the MDP by adding one ingredient at a time, and each addition creates exactly one new question:

Object Tuple New ingredient New question
Markov process ⟨S,P⟩\langle\mathcal{S},\mathcal{P}\rangle — what happens?
Markov reward process ⟨S,P,R,γ⟩\langle\mathcal{S},\mathcal{P},\mathcal{R},\gamma\rangle reward how good is it?
Markov decision process ⟨S,A,P,R,γ⟩\langle\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\gamma\rangle actions what should I do?

Each layer inherits everything below it, so once you can evaluate an MRP you can evaluate any MDP with a fixed policy — because fixing a policy collapses an MDP back into an MRP (p.27).

Two Bellman equations, and knowing which is which organizes the whole course

Both say value now = immediate reward + discounted value of where you land. They differ in one symbol:

vπ(s)=∑aπ(a∣s)(…)⏟expectation: average over your policyv∗(s)=max⁡a(…)⏟optimality: take the best action\underbrace{v_\pi(s)=\sum_a\pi(a|s)\big(\dots\big)}_{\text{expectation: average over your policy}}\qquad\underbrace{v_*(s)=\max_a\big(\dots\big)}_{\text{optimality: take the best action}}

Expectation → evaluation (how good is this policy). Optimality → control (how good is the best policy).
The consequence is immediate and decides everything downstream: the expectation equation is linear and can be solved by matrix inversion; the optimality equation contains a max⁡\max, is non-linear, and has no closed form. That single fact is why L3 exists.

Solving an MDP means finding q∗q_*

Not v∗v_*. Knowing v∗(s)v_*(s) tells you how much reward is available but not how to get it — you would still need a one-step lookahead through P\mathcal{P} and R\mathcal{R} to choose.
Knowing q∗(s,a)q_*(s,a) finishes the job: π∗(s)=arg⁡max⁡aq∗(s,a)\pi_*(s)=\arg\max_a q_*(s,a), no model required. Hold onto this, because L5 spends its first ten minutes rediscovering it as the reason model-free control uses QQ rather than VV.

Contents


1 · The Markov property

p.3–6 · Markov Property and Markov Processes ⏱ 3:05

Lecture 2 Markov Decision Processes, slide 4
Lecture 2 Markov Decision Processes, slide 4

P[St+1∣St]=P[St+1∣S1,…,St]\mathbb{P}[S_{t+1}\mid S_t]=\mathbb{P}[S_{t+1}\mid S_1,\dots,S_t]

"The future is independent of the past given the present." The operational phrasing is better: the state is a sufficient statistic of the future, so once you know StS_t you may throw the history away.

The slide claims almost all RL problems can be formalized as MDPs, and the three examples are each doing work:

  • Optimal control is a continuous MDP — the differential-dynamics framing is the same object with continuous S\mathcal{S} and A\mathcal{A}.
  • Partially observable problems are not exceptions; they convert into MDPs (p.53 shows how).
  • Bandits are MDPs with one state. Which is why L9 can spend an hour on bandits and call it reinforcement learning.

Lecture 2 Markov Decision Processes, slide 5
Lecture 2 Markov Decision Processes, slide 5

P\mathcal{P} has one row per state, each summing to 1. That single matrix is the entire dynamics.

What if the transition probabilities change over time — say Facebook gets less addictive the longer you stay?

Two answers, and the second is the more useful one.
(1) Allow non-stationarity and use the same algorithms, incrementally tracking the drifting solution rather than converging to a fixed one. This is exactly the constant-α\alpha argument in L4.
(2) Absorb it into the state. If the probability depends on how long you have been somewhere, then how long you have been there is part of the state. Add a counter and the process is Markov again — at the cost of many more states, possibly infinitely many.
Option 2 is the deeper point: "non-Markov" usually means "your state is missing something." The small diagrams in this lecture are chosen to fit on a page; MDPs routinely have 1017010^{170} states.

p.7–9 · Student Markov Chain ⏱ 7:44

Lecture 2 Markov Decision Processes, slide 8
Lecture 2 Markov Decision Processes, slide 8

Three classes, Facebook as a distraction with a 0.90.9 self-loop, a pub, and Sleep as a terminal state.

A terminal state needs no special machinery — it is just an absorbing state with a self-loop of probability 1 collecting zero reward forever. Worth knowing early, because it means "episodic" and "continuing" are not two different formalisms.

The samples are variable-length sequences drawn from the chain. There is no reward yet and nothing to decide; this is only what happens.


2 · Markov reward processes

p.10–13 · Reward, Return, and Discounting ⏱ 13:04

Lecture 2 Markov Decision Processes, slide 11
Lecture 2 Markov Decision Processes, slide 11

Gt=Rt+1+γRt+2+⋯=∑k=0∞γkRt+k+1G_t=R_{t+1}+\gamma R_{t+2}+\dots=\sum_{k=0}^{\infty}\gamma^k R_{t+k+1}

Two things to keep straight from the start:

  • Rs=E[Rt+1∣St=s]\mathcal{R}_s=\mathbb{E}[R_{t+1}\mid S_t=s] is immediate reward — one step only.
  • GtG_t is a random variable, one sample of a whole trajectory. There is no expectation in it yet. That arrives with the value function two slides later, and the distinction is the source of most early confusion.

Lecture 2 Markov Decision Processes, slide 13
Lecture 2 Markov Decision Processes, slide 13

The honest ranking of the reasons to discount

The slide lists six. In the lecture the ordering is explicit and worth inheriting:

  1. It is mathematically convenient — stated as the main reason, plainly.
  2. It bounds returns in cyclic processes. Without it, a loop that keeps collecting reward gives ∞\infty and the mathematics stops working.
  3. It represents an imperfect model. This is the intuitive one: a plan promising a bigger reward in ten years requires you to trust your model for ten years. Discounting is how much you trust it.
  4. Interest rates, if reward is money — γ\gamma behaves like the inverse of an interest rate.
  5. Humans and animals genuinely prefer immediate reward (roughly hyperbolic, not exponential).

And the escape hatch: if all sequences terminate, γ=1\gamma=1 is fine.

Can a sample from a Markov chain be infinite?

No — any single drawn sample terminates, provided no state has a self-loop of probability exactly 1 that traps you. The process contains infinite loops; each sample is finite, and only its length is random.
The exception matters: a probability-1 self-loop does produce an infinite sample. That is precisely when you need γ<1\gamma<1, or the technical conditions, or the average-reward formulation on p.54–56.

p.14–18 · The Value Function ⏱ 23:04

Lecture 2 Markov Decision Processes, slide 14
Lecture 2 Markov Decision Processes, slide 14

v(s)=E[Gt∣St=s]v(s)=\mathbb{E}[G_t\mid S_t=s]

The returns are random; the value function is not. v(s)v(s) is an expectation over trajectories — a fixed number attached to a state. Holding that apart from GtG_t is what makes the next hour parse.

Lecture 2 Markov Decision Processes, slide 15
Lecture 2 Markov Decision Processes, slide 15

The four sample returns from C1C_1 at γ=12\gamma=\tfrac12 give −2.25,−3.125,−3.41,−3.20-2.25,-3.125,-3.41,-3.20 — all different, all legitimate samples of the same quantity. Averaging enough of them estimates v(C1)v(C_1), which is exactly Monte-Carlo evaluation in L4, arriving three lectures early without being named.

Lecture 2 Markov Decision Processes, slide 16
Lecture 2 Markov Decision Processes, slide 16

Read the two γ panels as showing what discounting is

At γ=0\gamma=0 the value of every state is just its own immediate reward: v(C2)=−2v(C_2)=-2, because nothing beyond one step is visible. The +10+10 for passing is worth nothing from two states away.
At γ=0.9\gamma=0.9, v(C2)v(C_2) rises to about 0.90.9 — the same state, revalued because the eventual +10+10 now reaches back through the chain.
γ\gamma is not a nuisance parameter. It defines what problem you are solving, and the same MDP with different γ\gamma has genuinely different optimal behavior.


3 · The Bellman equation for MRPs

p.19–21 · The Decomposition ⏱ 29:52

Lecture 2 Markov Decision Processes, slide 19
Lecture 2 Markov Decision Processes, slide 19

v(s)=E[Rt+1+γv(St+1)∣St=s]v(s)=\mathbb{E}[R_{t+1}+\gamma v(S_{t+1})\mid S_t=s]

The derivation is four lines and each has a name worth knowing: unroll GtG_t; factor out γ\gamma; recognize the remainder as Gt+1G_{t+1}; then apply the law of iterated expectations to replace E[Gt+1]\mathbb{E}[G_{t+1}] with E[v(St+1)]\mathbb{E}[v(S_{t+1})].

That last step is the only non-mechanical one — it is what turns a statement about trajectories into a statement about states.

Lecture 2 Markov Decision Processes, slide 20
Lecture 2 Markov Decision Processes, slide 20

v(s)=Rs+γ∑s′∈SPss′v(s′)v(s)=\mathcal{R}_s+\gamma\sum_{s'\in\mathcal{S}}\mathcal{P}_{ss'}v(s')
The Bellman equation is a consistency condition, not a formula

It does not compute vv; it characterizes it. If your numbers satisfy it everywhere, they are the value function. If they do not, they are not.
That is why p.21 verifies rather than derives: 4.3=−2+0.6×10+0.4×0.84.3=-2+0.6\times 10+0.4\times 0.8 checks one state's self-consistency. Every algorithm in L3–L8 is a way of forcing this equation to hold.

Why rewards are indexed Rt+1R_{t+1} and not RtR_t

The convention follows Sutton & Barto: the agent acts, control passes to the environment, and everything that comes back carries the new time index. So the reward for leaving state StS_t is Rt+1R_{t+1}.
Nothing mathematical depends on it — re-index throughout and every result is unchanged. The lecture notes its own slides may be inconsistent on this point. Read the diagrams as you exit a state, you collect its reward, and do not let the subscript mislead you.

p.22–23 · Matrix Form and Direct Solution ⏱ 38:41

Lecture 2 Markov Decision Processes, slide 23
Lecture 2 Markov Decision Processes, slide 23

v=R+γPv  ⟹  (I−γP)v=R  ⟹  v=(I−γP)−1R\mathbf{v}=\mathcal{R}+\gamma\mathcal{P}\mathbf{v}\;\Longrightarrow\;(I-\gamma\mathcal{P})\mathbf{v}=\mathcal{R}\;\Longrightarrow\;\mathbf{v}=(I-\gamma\mathcal{P})^{-1}\mathcal{R}
This slide is the reason the rest of the course exists

Because the Bellman expectation equation is linear, an MRP can be solved exactly, in one shot. No iteration, no learning, no approximation.
Then the bill: O(n3)O(n^3) for nn states. That kills it for anything real, and the slide names its three replacements in order — dynamic programming (L3), Monte-Carlo (L4), TD learning (L4).
Everything from here to L10 is a response to this one complexity bound. When the same O(n3)O(n^3) reappears in L6 for LSTD and in L8 for solving a learned model, it is this same inversion.

Note also what linearity depended on: averaging over a fixed policy. Once you introduce a max⁡\max (p.48), linearity is gone and so is the closed form.


4 · Adding actions

p.24–25 · The MDP ⏱ 43:19

Lecture 2 Markov Decision Processes, slide 24
Lecture 2 Markov Decision Processes, slide 24

⟨S,A,P,R,γ⟩\langle\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\gamma\rangle. Both P\mathcal{P} and R\mathcal{R} now carry a superscript aa — think of one transition matrix per action.

The reward depending on the action is not a technicality. A trading agent that buys £1,000 of goods pays £1,000 for the action, regardless of where it lands. Costs attach to what you do, not only to where you end up.

Lecture 2 Markov Decision Processes, slide 25
Lecture 2 Markov Decision Processes, slide 25

The Student MDP is not the Student MRP with labels — the state space changed

Pub was a state; it is now an action. The diagram gained black dots (action nodes) between the white circles (states), and that is where the environment's randomness now lives: you choose Pub, then the dice decide whether you land in C1C_1, C2C_2, or C3C_3.
Every other action also has a black dot, with transition probability 1 — they are simply not drawn. Reading the diagram as "some arcs are stochastic and others are not" misses that all of them pass through the same two-stage structure: your choice, then the environment's roll.

p.26–27 · Policies ⏱ 46:23

Lecture 2 Markov Decision Processes, slide 27
Lecture 2 Markov Decision Processes, slide 27

π(a∣s)=P[At=a∣St=s]\pi(a|s)=\mathbb{P}[A_t=a\mid S_t=s]

Policies are stationary — they depend on the state, not on tt. That is not a restriction but a consequence: the Markov property says ss already contains everything relevant, so a time index would add nothing.

Fixing a policy collapses an MDP into an MRP
Ps,s′π=∑aπ(a∣s)Pss′a,Rsπ=∑aπ(a∣s)Rsa\mathcal{P}^\pi_{s,s'}=\sum_a\pi(a|s)\mathcal{P}^a_{ss'},\qquad \mathcal{R}^\pi_s=\sum_a\pi(a|s)\mathcal{R}^a_s

Average the dynamics over your own action choices and the actions vanish — the state sequence is a Markov process, the state-and-reward sequence a Markov reward process.
This is the structural reason prediction and control are separate problems, and why every prediction method in the course is really an MRP method. L4's driving-home example is stated as an MRP for exactly this reason.

Why does the policy definition contain no reward term?

Because the state already characterizes all future reward. The Markov property guarantees ss is a sufficient statistic, so a policy conditioning on ss has everything it needs.
The sharper point: past rewards are irrelevant to optimal behavior. Already banked a million, or lost one? Neither changes what is best to do now. Optimality always looks forward from the current state, which is what makes a state-conditioned policy sufficient rather than merely convenient.


5 · Value functions and the Bellman expectation equation

p.28–29 · Two Value Functions ⏱ 51:01

Lecture 2 Markov Decision Processes, slide 28
Lecture 2 Markov Decision Processes, slide 28

vπ(s)=Eπ[Gt∣St=s],qπ(s,a)=Eπ[Gt∣St=s,At=a]v_\pi(s)=\mathbb{E}_\pi[G_t\mid S_t=s],\qquad q_\pi(s,a)=\mathbb{E}_\pi[G_t\mid S_t=s,A_t=a]

The subscript π\pi is new and necessary: with actions there is no longer one expectation. Different policies induce different distributions over trajectories, so "how good is this state" is ill-posed until you say under what behavior.

qπq_\pi is the one that will matter. It is the quantity you compare when choosing — "should I go left or right" is answered by comparing qq values, not vv values.

p.30–35 · The Backup Diagrams ⏱ 54:51

Lecture 2 Markov Decision Processes, slide 31
Lecture 2 Markov Decision Processes, slide 31

vπ(s)=∑a∈Aπ(a∣s) qπ(s,a)v_\pi(s)=\sum_{a\in\mathcal{A}}\pi(a|s)\,q_\pi(s,a)

Lecture 2 Markov Decision Processes, slide 32
Lecture 2 Markov Decision Processes, slide 32

qπ(s,a)=Rsa+γ∑s′∈SPss′a vπ(s′)q_\pi(s,a)=\mathcal{R}^a_s+\gamma\sum_{s'\in\mathcal{S}}\mathcal{P}^a_{ss'}\,v_\pi(s')
The two half-steps, and who controls each

v→qv\to q (white node down to black): average over your policy. You control this.
q→vq\to v (black node down to white): average over the environment's dynamics. You do not control this.
The alternation is the whole structure. Stack the two half-steps and you get the full backup on p.33; stack them the other way and you get p.34. There is no third kind of step in the entire course — later lectures only change how the averages are computed (sampled, approximated) or replace one of them with a max.

Lecture 2 Markov Decision Processes, slide 33
Lecture 2 Markov Decision Processes, slide 33

vπ(s)=∑a∈Aπ(a∣s)(Rsa+γ∑s′∈SPss′avπ(s′))v_\pi(s)=\sum_{a\in\mathcal{A}}\pi(a|s)\Big(\mathcal{R}^a_s+\gamma\sum_{s'\in\mathcal{S}}\mathcal{P}^a_{ss'}v_\pi(s')\Big)

Lecture 2 Markov Decision Processes, slide 35
Lecture 2 Markov Decision Processes, slide 35

The verification at C3C_3 with π=\pi= uniform:

7.4=0.5(1+0.2(−1.3)+0.4(2.7)+0.4(7.4))+0.5×107.4=0.5\big(1+0.2(-1.3)+0.4(2.7)+0.4(7.4)\big)+0.5\times 10

Note the equation refers to vπ(C3)=7.4v_\pi(C_3)=7.4 on both sides — the state can reach itself through the pub. Self-consistency, not a computation you could run forward.

Lecture 2 Markov Decision Processes, slide 36
Lecture 2 Markov Decision Processes, slide 36

Same linear structure, same closed form, now via the induced MRP: vπ=(I−γPπ)−1Rπv_\pi=(I-\gamma\mathcal{P}^\pi)^{-1}\mathcal{R}^\pi.


6 · Optimality

p.37–39 · Optimal Value Functions ⏱ 1:08:33

Lecture 2 Markov Decision Processes, slide 37
Lecture 2 Markov Decision Processes, slide 37

v∗(s)=max⁡πvπ(s),q∗(s,a)=max⁡πqπ(s,a)v_*(s)=\max_\pi v_\pi(s),\qquad q_*(s,a)=\max_\pi q_\pi(s,a)

The maximum is over all policies — so v∗v_* tells you the best performance achievable in the MDP, without telling you what achieves it.

Lecture 2 Markov Decision Processes, slide 39
Lecture 2 Markov Decision Processes, slide 39

The slide's q∗(Pub)=8.4q_*(\text{Pub})=8.4 drops the immediate reward
q∗(Pub)=Rpub+γ(0.2 v∗(C1)+0.4 v∗(C2)+0.4 v∗(C3))=1+(0.2(6)+0.4(8)+0.4(10))=1+8.4=9.4q_*(\text{Pub})=\mathcal{R}^{\text{pub}}+\gamma\big(0.2\,v_*(C_1)+0.4\,v_*(C_2)+0.4\,v_*(C_3)\big)=1+\big(0.2(6)+0.4(8)+0.4(10)\big)=1+8.4=\mathbf{9.4}

8.48.4 is the transition term alone, without the +1+1 for going to the pub. The correct value is 9.49.4, and 9.49.4 is also what appears in later printings of this deck.
The conclusion is unaffected — studying still wins, 10>9.410>9.4 — but the margin is much narrower than the slide implies. You caught this yourself by hand-checking → Silver RL Lecture 2 — Question List.

p.40–42 · The Optimal Policy Theorem ⏱ 1:16:07

Lecture 2 Markov Decision Processes, slide 40
Lecture 2 Markov Decision Processes, slide 40

Define π≥π′\pi\ge\pi' iff vπ(s)≥vπ′(s)v_\pi(s)\ge v_{\pi'}(s) for all ss. Note it is a partial order: two policies each better somewhere are simply incomparable.

Why this theorem is a relief rather than a formality

It rules out the pathology you would otherwise have to worry about: that no single policy dominates, and the best behavior requires switching between policies depending on where you are or how long you have been going.
The theorem says no. There is always at least one π∗\pi_* that is ≥\ge every other policy simultaneously, in every state. All optimal policies achieve the same v∗v_* and the same q∗q_* — the optimum is unique as a value, even when the policy achieving it is not.
Non-uniqueness is easy: two actions leading to the same state are both optimal. It costs nothing.

Lecture 2 Markov Decision Processes, slide 41
Lecture 2 Markov Decision Processes, slide 41

π∗(a∣s)={1if a=arg⁡max⁡a∈Aq∗(s,a)0otherwise\pi_*(a|s)=\begin{cases}1 & \text{if }a=\arg\max_{a\in\mathcal{A}}q_*(s,a)\\ 0&\text{otherwise}\end{cases}
There is always a deterministic optimal policy — and where that stops being true

Stochasticity buys you nothing at the optimum: just always take the best action. The search space collapses from all distributions over actions to a finite set of deterministic maps.
Attach the condition, because L7 breaks it. This holds for a Markov, fully observed MDP. Under state aliasing or partial observability the problem is effectively a POMDP, the theorem does not apply, and a stochastic policy can strictly beat every deterministic one → Lecture 7 · Policy Gradient.

And the practical payoff, stated repeatedly: once you have q∗q_*, you are done. Read off the argmax and act. No lookahead, no model, no further computation.


7 · The Bellman optimality equation

p.43–47 · Optimality Backups ⏱ 1:22:57

Lecture 2 Markov Decision Processes, slide 43
Lecture 2 Markov Decision Processes, slide 43

v∗(s)=max⁡aq∗(s,a)v_*(s)=\max_a q_*(s,a)

Lecture 2 Markov Decision Processes, slide 44
Lecture 2 Markov Decision Processes, slide 44

q∗(s,a)=Rsa+γ∑s′∈SPss′av∗(s′)q_*(s,a)=\mathcal{R}^a_s+\gamma\sum_{s'\in\mathcal{S}}\mathcal{P}^a_{ss'}v_*(s')
One half-step changed, and only one

Compare against p.31–32. The q→vq\to v step is identical — still an average over P\mathcal{P}, because you never control the environment's dice.
The v→qv\to q step changed from ∑aπ(a∣s)\sum_a\pi(a|s) to max⁡a\max_a — because now you are choosing, and you choose the best.
Average over what you do not control; maximize over what you do. That sentence is the entire difference between the expectation and optimality equations, and it is why exactly one of the two backup diagrams gained an arc.

Lecture 2 Markov Decision Processes, slide 45
Lecture 2 Markov Decision Processes, slide 45

v∗(s)=max⁡a(Rsa+γ∑s′∈SPss′av∗(s′))v_*(s)=\max_a\Big(\mathcal{R}^a_s+\gamma\sum_{s'\in\mathcal{S}}\mathcal{P}^a_{ss'}v_*(s')\Big)

Lecture 2 Markov Decision Processes, slide 47
Lecture 2 Markov Decision Processes, slide 47

6=max⁡{−2+8,  −1+6}=max⁡{6,5}6=\max\{-2+8,\;-1+6\}=\max\{6,5\}

Study gives −2-2 then a state worth 88; Facebook gives −1-1 then a state worth 66. The immediate reward is worse and the total is better — a one-line demonstration that greedy on q∗q_* is not myopic, which is the misreading L3 has to correct explicitly.

p.48 · Solving It ⏱ 1:29:52

Lecture 2 Markov Decision Processes, slide 48
Lecture 2 Markov Decision Processes, slide 48

The max is what breaks everything, and the whole course is the repair

(I−γP)−1(I-\gamma\mathcal{P})^{-1} worked because the expectation equation is linear. The optimality equation has a max⁡\max inside, so it is non-linear, and there is no closed form in general.
The four named replacements are the course: value iteration and policy iteration (L3), Q-learning and Sarsa (L5).
Worth noting what "iterative" means here, since matrix inversion is itself iterative underneath: these methods maintain an estimate of the value function and improve it step by step, rather than performing a fixed numerical routine. That is a different kind of iteration, and it is the one that survives when you no longer know P\mathcal{P}.


Study checklist

Answer these without the notes before moving on to L3. Each item links back to where it is worked out; open the toggle only after you have tried.

1. Give the three layers of the formalism and the question each new ingredient creates.
→ p.24–25 · The MDP ⏱ 43:19

Answer

Markov process ⟨S,P⟩\langle\mathcal{S},\mathcal{P}\rangle — what happens?
Markov reward process ⟨S,P,R,γ⟩\langle\mathcal{S},\mathcal{P},\mathcal{R},\gamma\rangle — adds reward — how good is it?
Markov decision process ⟨S,A,P,R,γ⟩\langle\mathcal{S},\mathcal{A},\mathcal{P},\mathcal{R},\gamma\rangle — adds actions — what should I do?
Each inherits the layer below, and fixing a policy collapses an MDP back to an MRP, which is why prediction and control separate cleanly.

2. State the Markov property operationally, and say what to do when it fails.
→ p.3–6 · Markov Property and Markov Processes ⏱ 3:05

Answer

P[St+1∣St]=P[St+1∣S1,…,St]\mathbb{P}[S_{t+1}|S_t]=\mathbb{P}[S_{t+1}|S_1,\dots,S_t] — the state is a sufficient statistic of the future, so the history can be discarded.
When it fails, either allow non-stationarity and track the drifting solution, or — better — absorb the missing information into the state. If transition probabilities depend on how long you have been somewhere, that duration is part of the state. "Non-Markov" usually means your state is incomplete.

3. Distinguish GtG_t from v(s)v(s), and give the honest ranking of reasons to discount.
→ p.10–13 · Reward, Return, and Discounting ⏱ 13:04

Answer

GtG_t is a random variable — one sampled trajectory's discounted reward. v(s)=E[Gt∣St=s]v(s)=\mathbb{E}[G_t|S_t=s] is an expectation, a fixed number per state. Averaging sampled GtG_t estimates vv — that is Monte-Carlo evaluation, arriving early.
Discounting: (1) mathematically convenient — stated as the real reason; (2) bounds returns in cyclic processes; (3) represents an imperfect model — trusting a ten-year plan means trusting your model that long; (4) interest rates for financial reward; (5) humans and animals genuinely prefer immediate reward. If all sequences terminate, γ=1\gamma=1 is fine.

4. Derive the Bellman equation for an MRP and say what kind of statement it is.
→ p.19–21 · The Decomposition ⏱ 29:52

Answer

Unroll GtG_t; factor out γ\gamma; recognize the remainder as Gt+1G_{t+1}; apply the law of iterated expectations to get E[v(St+1)]\mathbb{E}[v(S_{t+1})]. Result: v(s)=E[Rt+1+γv(St+1)∣St=s]=Rs+γ∑s′Pss′v(s′)v(s)=\mathbb{E}[R_{t+1}+\gamma v(S_{t+1})|S_t=s]=\mathcal{R}_s+\gamma\sum_{s'}\mathcal{P}_{ss'}v(s').
It is a consistency condition, not a formula. It does not compute vv; it characterizes it. Satisfy it everywhere and you have the value function. Every algorithm in L3–L8 forces it to hold.

5. Why can an MRP be solved in closed form, and why does that not settle the subject?
→ p.22–23 · Matrix Form and Direct Solution ⏱ 38:41

Answer

Because the Bellman expectation equation is linear: v=R+γPv⇒v=(I−γP)−1R\mathbf{v}=\mathcal{R}+\gamma\mathcal{P}\mathbf{v}\Rightarrow\mathbf{v}=(I-\gamma\mathcal{P})^{-1}\mathcal{R}.
It costs O(n3)O(n^3), which is hopeless at scale — and the linearity depended on averaging over a fixed policy. Introduce a max⁡\max and both the linearity and the closed form are gone.
The three named replacements are the rest of the course: dynamic programming, Monte-Carlo, TD learning.

6. What changed between the Student MRP and the Student MDP diagrams?
→ p.24–25 · The MDP ⏱ 43:19

Answer

The state space. Pub was a state; it is now an action. The diagram gained black action-nodes between the white state-nodes, and that is where randomness lives: you choose Pub, then the environment's dice pick C1C_1, C2C_2, or C3C_3.
Every other action has a black dot too, with transition probability 1 — just not drawn. All actions share the same two-stage structure: your choice, then the environment's roll.

7. What are the two half-steps of a backup, and who controls each?
→ p.30–35 · The Backup Diagrams ⏱ 54:51

Answer

v→qv\to q (white to black): average over your policy, vπ(s)=∑aπ(a∣s)qπ(s,a)v_\pi(s)=\sum_a\pi(a|s)q_\pi(s,a). You control it.
q→vq\to v (black to white): average over the environment, qπ(s,a)=Rsa+γ∑s′Pss′avπ(s′)q_\pi(s,a)=\mathcal{R}^a_s+\gamma\sum_{s'}\mathcal{P}^a_{ss'}v_\pi(s'). You do not.
Stack them and you get the full backup. There is no third kind of step in the course — later lectures only change how the averages are computed, or replace one with a max.

8. State the optimal policy theorem and the two conditions worth attaching to it.
→ p.40–42 · The Optimal Policy Theorem ⏱ 1:16:07

Answer

For any MDP there exists π∗≥π\pi_*\ge\pi for all π\pi (with ≥\ge meaning vπ(s)≥vπ′(s)v_\pi(s)\ge v_{\pi'}(s) in every state), all optimal policies achieve v∗v_* and q∗q_*, and there is always a deterministic optimal policy.
It rules out needing to switch policies depending on where you are — a single policy dominates everywhere at once.
Conditions: the order is partial, so incomparable policies exist; and determinism holds for a Markov, fully observed MDP. Under aliasing or partial observability the theorem does not apply and a stochastic policy can strictly win (L7).

9. Write both Bellman equations for vv and say precisely what differs.
→ p.43–47 · Optimality Backups ⏱ 1:22:57

Answer

Expectation: vπ(s)=∑aπ(a∣s)(Rsa+γ∑s′Pss′avπ(s′))v_\pi(s)=\sum_a\pi(a|s)\big(\mathcal{R}^a_s+\gamma\sum_{s'}\mathcal{P}^a_{ss'}v_\pi(s')\big).
Optimality: v∗(s)=max⁡a(Rsa+γ∑s′Pss′av∗(s′))v_*(s)=\max_a\big(\mathcal{R}^a_s+\gamma\sum_{s'}\mathcal{P}^a_{ss'}v_*(s')\big).
Exactly one half-step changed. The q→vq\to v step is identical — still an average over P\mathcal{P}, because you never control the dice. The v→qv\to q step went from ∑aπ(a∣s)\sum_a\pi(a|s) to max⁡a\max_a, because now you are choosing.
Average over what you do not control; maximize over what you do.

10. Why is solving an MDP defined as finding q∗q_* rather than v∗v_*?
→ p.37–39 · Optimal Value Functions ⏱ 1:08:33

Answer

v∗v_* tells you how much reward is available but not how to get it — choosing would still need a one-step lookahead through P\mathcal{P} and R\mathcal{R}, i.e. a model.
q∗q_* finishes the job: π∗(s)=arg⁡max⁡aq∗(s,a)\pi_*(s)=\arg\max_a q_*(s,a), no model needed. Once you have q∗q_*, read off the argmax and act.
This is exactly the argument L5 reconstructs as its first substitution (V→QV\to Q) when it removes the model.

11. Why is there no closed-form solution to the Bellman optimality equation?
→ p.48 · Solving It ⏱ 1:29:52

Answer

The max⁡\max makes it non-linear. (I−γP)−1(I-\gamma\mathcal{P})^{-1} worked only because the expectation equation was linear in vv.
The replacements named on the slide are the course: value iteration and policy iteration (L3), Q-learning and Sarsa (L5).
"Iterative" here means maintaining an estimate of the value function and improving it step by step — not a numerical routine for a fixed computation. That is the kind of iteration that survives losing P\mathcal{P}.

12. The slide says q∗(Pub)=8.4q_*(\text{Pub})=8.4. Check it.
→ p.37–39 · Optimal Value Functions ⏱ 1:08:33

Answer

q∗(Pub)=1+(0.2(6)+0.4(8)+0.4(10))=1+8.4=9.4q_*(\text{Pub})=1+\big(0.2(6)+0.4(8)+0.4(10)\big)=1+8.4=\mathbf{9.4}.
8.48.4 is the transition term with the +1+1 immediate reward dropped. The decision is unchanged — studying gives 10>9.410>9.4 — but the margin is far narrower than the slide suggests, and 9.49.4 appears in later printings.

Gaps to close on your own

Slides p.49–56 — the entire Extensions section — are skipped

The lecture runs out of time and takes questions instead. The slides are marked (no exam), but two of the three blocks matter a great deal for where you are going.

Lecture 2 Markov Decision Processes, slide 50
Lecture 2 Markov Decision Processes, slide 50

Infinite MDPs. Countably infinite spaces are straightforward; continuous state and action spaces have a closed form in the linear-quadratic case (LQR); and continuous time requires PDEs, giving the Hamilton-Jacobi-Bellman equation — the limiting case of the Bellman equation as the time-step goes to zero.
This is the bridge between this course and classical optimal control, and the reason "RL and control are the same subject in different notation" is more than a slogan → LQR and the Riccati Equation · Hamilton-Jacobi-Bellman (HJB) · your own Silver RL Lecture 2 — Question List Q5.

Lecture 2 Markov Decision Processes, slide 53
Lecture 2 Markov Decision Processes, slide 53

POMDPs. A POMDP adds observations O\mathcal{O} and an observation function Z\mathcal{Z}. The key result is on this slide: both the history HtH_t and the belief state b(Ht)b(H_t) satisfy the Markov property, so a POMDP reduces to an (infinite) MDP over either. That is the precise sense in which "partially observable problems can be converted into MDPs" from p.3 — and the belief-state tree is the direct ancestor of L9's information-state search.

Lecture 2 Markov Decision Processes, slide 55
Lecture 2 Markov Decision Processes, slide 55

Average-reward MDPs. For an ergodic MDP (recurrent + aperiodic), there is a stationary distribution dπd^\pi and an average reward per step ρπ\rho^\pi independent of the start state, with its own Bellman equation in terms of v~π\tilde v_\pi. This is the principled alternative to discounting for continuing problems, and dπd^\pi reappears as the state distribution in L7's policy objectives.

  • Technical conditions for undiscounted MDPs. The lecture defers to Bertsekas (Dynamic Programming and Optimal Control, vol. 2) for when undiscounted MDPs are well defined. If you ever want γ=1\gamma=1 without guaranteed termination, this is the gap.
  • The optimal policy theorem is stated, not proved. Your own Silver RL Lecture 2 — Question List Q3 already asked whether the proof is worth knowing; the proof itself is in Puterman or Sutton & Barto.
  • Why the Bellman equation has a unique solution is assumed throughout and answered in L3 by the contraction mapping theorem → Contraction Mapping & Bellman Convergence.
  • Sherman-Morrison for incremental matrix inversion is mentioned as reducing O(n3)O(n^3) to O(n2)O(n^2) in special cases. It returns in L6 for LSTD.

Language notes

Phrasings worth stealing for your own technical writing and talks:

Expression Use
the future is independent of the past given the present the Markov property in one sentence
a sufficient statistic of the future a compression that loses nothing predictive
how much juice you can extract informal gloss on optimal value
value judgments rewards, framed as the modeller's choice rather than a fact
maximally shortsighted / maximally farsighted the two ends of a discount factor
you have to really trust your model why long-horizon plans get discounted
the environment rolls the dice the stochastic half of a transition
this is a sanity theorem a result confirming everything you hoped was true
once we have q∗q_* we're done, the game is solved naming the terminal goal of a formalism
don't confuse yourselves, it's just a convention flagging notation as arbitrary before it derails someone
rlsilver-courselecture-notesmdpbellman-equationmarkov-propertyoptimal-policy