Reinforcement Learning

Bellman Equations

Decomposing cumulative value functions into immediate rewards plus discounted future values.

🟡 intermediate5 min readrl
Bellman Equations form the recursive foundation of dynamic programming and Reinforcement Learning. They express the value of a state V(s) or state-action pair Q(s,a) as the immediate reward plus the discounted expected value of successor states. Bellman Expectation Equations evaluate a fixed policy π; Bellman Optimality Equations define the unique optimal value functions V*(s) and Q*(s,a). Dynamic Programming methods (Policy Iteration, Value Iteration) solve Bellman equations iteratively.

Recursive Value Decomposition

The fundamental principle of Dynamic Programming (Richard Bellman, 1957):

                       CUMULATIVE DISCOUNTED RETURN
        G_t = R_{t+1} + γ R_{t+2} + γ² R_{t+3} + γ³ R_{t+4} + ...
            = R_{t+1} + γ ( R_{t+2} + γ R_{t+3} + ... )
            = R_{t+1} + γ G_{t+1}

Taking expectations yields the Bellman Equations!

1. Bellman Expectation Equations (Policy Evaluation)

For a fixed policy $\pi$:

State-Value Function $V^\pi(s)$:

$$V^\pi(s) = \sum_{a \in A} \pi(a \mid s) \sum_{s' \in S} P(s' \mid s, a) \left[ R(s, a, s') + \gamma V^\pi(s') \right]$$

Action-Value Function $Q^\pi(s, a)$:

$$Q^\pi(s, a) = \sum_{s' \in S} P(s' \mid s, a) \left[ R(s, a, s') + \gamma \sum_{a' \in A} \pi(a' \mid s') Q^\pi(s', a') \right]$$

2. Bellman Optimality Equations

For the optimal policy $\pi^*$:

$$V^(s) = \max_{a \in A} \sum_{s' \in S} P(s' \mid s, a) \left[ R(s, a, s') + \gamma V^(s') \right]$$

$$Q^(s, a) = \sum_{s' \in S} P(s' \mid s, a) \left[ R(s, a, s') + \gamma \max_{a' \in A} Q^(s', a') \right]$$

                        Bellman Optimality Backup Diagram
                                  (State s)
                                      │
                                 a = max_a
                                      │
                                      ▼
                               (Action-State s,a)
                                    /   \
                         P(s'|s,a) /     \
                                  ▼       ▼
                              (State s') (State s'')

Value Iteration Algorithm

Turn Bellman Optimality Equation into an iterative update rule:

$$V_{k+1}(s) \leftarrow \max_{a \in A} \sum_{s' \in S} P(s' \mid s, a) \left[ R(s, a, s') + \gamma V_k(s') \right]$$

By the Contraction Mapping Theorem, repeatedly applying this operator guarantees linear convergence to unique optimal fixed point $V^*(s)$.

Say this out loud

"Bellman Equations recursively express the value of a state V(s) or action Q(s,a) as immediate reward plus discounted expected value of successor states: V(s) = E[R + γ V(s')]. Bellman Expectation Equations evaluate a fixed policy π, while Bellman Optimality Equations incorporate the max operator over actions, forming the update rule for Value Iteration and Q-Learning."

Follow-ups to expect

Check yourself

Question 1 of 3

What is the core recursive intuition behind the Bellman Equation for State Value V(s)?

More in Reinforcement Learning

See all →
Value-Based vs Policy-Based Methods5 minMulti-Armed Bandits4 minProximal Policy Optimization5 min