Bellman Optimality Equation
The best value of a state equals the best action's immediate reward plus discounted next value.
The idea
Replace the policy average by a maximum: V*(s) = maxₐ Σ P(s′|s,a)[r + γV*(s′)]. The optimal values are the unique solution of this non-linear system, and acting greedily with respect to them gives an optimal policy. Q-learning and value iteration are ways of solving it.
V*(s) = maxₐ Σ P(s′|s,a)[r + γ V*(s′)]
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- positive value
- negative value
- best action
Every state starts with value zero. A state's value is the total future reward expected from it.
- sweep:
- 0
Each cell shows its estimated value; arrows show the action the policy would take.
Step by step
- 1For each state evaluate every action's expected return.
- 2Take the maximum over actions.
- 3That maximum is the optimal value V*(s).
- 4The maximising action is the optimal action.
Where it is used
Defines what "optimal" means in an MDP.
Watch out for
Non-linear because of the max, so it needs iteration or learning to solve.