Concept · Chapter 5: Vision, Speech & Reinforcement Learning
MDPs, Policies and Value
A Markov decision process formalises an RL problem as states, actions, transitions, rewards and a discount; a policy says what to do, and a value function says how good a situation is under it.
The problem
To design and compare RL algorithms, we need a precise description of what the agent can observe, what it can do and what it is optimising.
The solution
Model the world as an MDP and define value functions that satisfy a recursive (Bellman) relationship between a state and its successors.
The consequence
Most RL algorithms become ways of estimating value functions, improving policies, or both.
You should understand first
The ingredients
A Markov decision process has a set of states , actions , transition probabilities , a reward for each transition, and a discount . Markov means the current state contains everything relevant: where you go next depends on where you are and what you do, not on how you got here. In the gridworld lab the state is the square, the actions are four moves, the transitions are deterministic, and rewards arrive only at the coin, the goal and the pit.
A policy is the agent's behaviour: a probability for each action in each state (or a single fixed choice). Value functions score policies:
- : the expected return starting in and following .
- : the expected return after taking action in , then following .
The Bellman equation
Values are recursive: what a state is worth equals what you get now plus what the next state is worth, discounted. For the best possible behaviour:
Tiny numeric example (gridworld, γ = 0.9): a square next to the +10 goal is worth 10, because you can step in now. One square further back is worth 0 + 0.9 × 10 = 9, the next 8.1, and so on back to the start, five moves away: . Heading for the coin instead, three moves away, is worth only from the start, so the optimal policy walks to the goal.
What to remember
- MDP = (states, actions, transition probabilities, rewards, discount γ).
- Markov: the next state depends only on the current state and action, not on the full history.
- Policy π(a | s): what the agent does. Value V(s): expected return from s. Q(s, a): expected return after taking a in s.
- Bellman: value here = reward now + γ × value of where you land.
Key papers
Reinforcement Learning: An Introduction (2nd edition)
Richard S. Sutton, Andrew G. Barto · 2018 · MIT Press
The standard textbook, free online from the authors. Everything in this chapter's RL half (MDPs, value functions, Q-learning, exploration, policy gradients, actor–critic) is developed carefully there.
How to read it: Chapters 1, 3 and 6 cover the core: the problem, MDPs, and temporal-difference learning including Q-learning. Chapter 13 is policy gradients.
Watch
Steve Brunton
Reinforcement Learning: Machine Learning Meets Control Theory
A compact overview of the RL problem, its leading algorithms and applications, from a control-theory perspective.
Google DeepMind
RL Course by David Silver - Lecture 1: Introduction to Reinforcement Learning
The first lecture of the classic UCL course by the lead researcher on AlphaGo. For when you want the full course after this chapter.