The Bellman equation says that the value of being somewhere is what you collect on the next step plus the (discounted) value of wherever that step takes you. It turns a question about the whole future into a question about one step and its successor.
In a Markov decision process, the value function of a policy gives the expected total discounted reward from each state. Written out, the value of state s averages, over the actions the policy might take and the states they might lead to, the immediate reward plus γ times the value of the next state. The discount γ, between 0 and 1, makes rewards further in the future count for less. Sutton and Barto note that a policy’s value function is the unique solution to its Bellman equation.
Two versions
- Bellman expectation equation: describes the value of following a fixed policy. It answers “how good is this plan?”
- Bellman optimality equation: replaces the average over the policy’s actions with a maximum over actions. Its solution is the value of acting optimally, and once you have it, acting greedily with respect to it is an optimal policy.
Why it matters
The equation is the common thread through most of reinforcement learning. Dynamic programming, the family of methods named by Richard Bellman in the 1950s, solves it directly when the environment’s dynamics are known. Q-learning applies the optimality version to action values, nudging each estimate toward the observed reward plus the best estimated value of the next state. DQN does the same with a neural network standing in for the table. Each of these updates is a “Bellman backup”: use one step of real experience to make the value estimate more consistent with itself.