Every AI that takes more than one step to finish a job has to answer the same question at every step: is where I am now good? The Bellman equation is the 1957 piece of mathematics that turns that vague question into a single line of algebra. It is the reason a chess engine can score a board position, the reason RLHF training runs carry a second model called a critic, and, quietly, the reason modern reasoning models are trained the way they are.
The problem Bellman solved
Suppose you are driving from home to work. Every intersection forces a choice, and the quality of a choice only becomes visible miles later. Scoring each turn in isolation is useless: the right turn is the one that leads to a road that leads to a highway that gets you there fast. In 1957, the mathematician Richard Bellman published a book called Dynamic Programming in which he showed that problems with this structure, sequences of decisions whose payoff arrives at the end, can all be cracked with one move. Stop asking what a decision is worth. Ask what a state is worth, and write the answer recursively.
His principle of optimality says it plainly: an optimal policy has the property that whatever the initial state and initial decision are, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision. A good plan stays good from every point partway through it. If it does not, it was never a good plan.
One line, read three ways
The equation is usually written something like this:
V(s) = R(s) + gamma * max V(s')
The value of a state, V(s), equals the reward you collect right now, R(s), plus a discounted copy of the value of the next state. The factor gamma, between 0 and 1, says how much the future counts. The max says: you are allowed to make the best available choice at every step.

Read forward, it is arithmetic: rewards accumulate along a path. Read backward, it is a definition: the value of where you stand today is defined in terms of the value of where you might stand tomorrow. That self-reference is not a bug, it is the entire point. Bellman turned an infinite horizon problem, a decision tree with an unbounded number of branches, into a local equation relating each state to its immediate neighbors.
The same equation appears twice in the literature. The Bellman expectation equation fixes a policy (a rule for choosing actions) and asks what following it is worth from each state. The Bellman optimality equation replaces the fixed policy with a max, and its solution is the best possible value of every state. Iterating the optimality equation, plugging values back into themselves until they stop moving, is the algorithm known as value iteration. Solving large decision problems in practice, from inventory management to robot control, still means running some variation of that loop.
There is an ironic footnote attached to the same man. Making the recursion tractable across thousands of variables is exactly what defeated early dynamic programming, and Bellman coined the phrase that describes the failure: the curse of dimensionality.
From equations to learning
The classical recipe needs a model of the world: you must know the transitions and rewards before you can iterate. The connection to modern AI runs through three relaxations.
The first came in 1988, when Richard Sutton published "Learning to Predict by the Methods of Temporal Differences." TD learning showed you do not need the model. You can nudge V(s) toward R(s) + gamma * V(s') using samples the agent actually experiences, one observed transition at a time. The Bellman equation stops being a solver and becomes a consistency check that experience gradually satisfies.
The second was Watkins and Dayan's 1992 Q-learning paper, which applied the Bellman optimality equation to action-values (Q instead of V) and proved the update converges without any model of the environment at all. Q-learning is the Bellman equation wearing boots.
The third was scale. In 2017, DeepMind's AlphaZero program trained a neural network to act as the value function itself. The network scores a board position as the expected outcome of self-play from that position, which is precisely the Bellman definition of state value, and the search tree then plugs those learned values into the recursion. The value network is Bellman's V, approximated by gradient descent.
Why this belongs in an LLM explainer
If your mental model of training language models stops at next-token prediction, it is out of date for anything labeled a reasoning model, and the Bellman equation sits at the center of the update.

RLHF carries a critic. In OpenAI's 2022 InstructGPT paper, the PPO stage runs two models side by side: the policy being fine-tuned and a value function, initialized from the reward model. That value function exists for one reason. PPO needs to know, at each token, whether the outcome was better or worse than expected from that point onward. "Better than expected from this state onward" is a Bellman quantity, and the training machinery keeps the critic alive purely to estimate it.
The newest methods deleted it. DeepSeek's GRPO, introduced in the 2024 DeepSeekMath paper, does without the critic entirely. It samples a group of answers to the same prompt and uses the group's average reward as the baseline instead of a learned value function. The paper's own description is blunt: GRPO foregoes the value model, instead estimating the baseline from group scores, significantly reducing training resources. A 1957 equation, simplified away by a 2024 budget decision.
Process reward models are value functions in disguise. OpenAI's 2023 "Let's Verify Step by Step" paper compared outcome supervision, a grade on the final answer only, with process supervision, a grade on every intermediate reasoning step. The step-level model, trained on 800,000 human labels in the released PRM800K dataset, solved 78% of a representative MATH subset and clearly outperformed the answer-level baseline. Scoring a step means asking how likely a correct finish is from here. That is state value over a chain of thought, and the comparison result is what a Bellman-literate view predicts: the closer your feedback sits to each decision, the better the credit assignment.
Chain of thought itself looks like dynamic programming. A 2023 theoretical analysis by Feng et al. used circuit complexity to show bounded-depth transformers struggle with sequential arithmetic and dynamic-programming-style problems without intermediate steps, and proved that generating a chain of thought converts those into shallow, tractable computations. A 2025 study by Zhu et al. found that on multiplication and dynamic programming tasks, only the tokens storing intermediate results behave like program variables: preserving just those tokens achieves comparable performance, and the rest is dispensable. And a 2025 paper by Yuan et al. (Trajectory Bellman Residual Minimization) went the other direction, proposing to train LLMs directly on the Bellman residual, treating the model's own logits as Q-values and removing critics, importance ratios, and clipping from the pipeline altogether.
The takeaway
The Bellman equation is one line: value now equals reward now plus discounted value of next. Its power is decomposition. No model, no algorithm, and no training run has to reason about the entire future at once, because every future is one step plus a smaller future. Chess engines, self-driving cost functions, macroeconomic growth models, and the PPO critic in an RLHF pipeline are all the same recursion at different levels of approximation. When a reasoning model is graded step by step instead of answer by answer, or when a training recipe drops its value network for a group average, someone is still arguing about Bellman. The argument is just conducted in GPU hours.
Sources
- Bellman equation, Wikipedia: https://en.wikipedia.org/wiki/Bellman_equation
- Reinforcement Learning: An Introduction, 2nd ed., Sutton & Barto, MIT Press: https://mitpress.mit.edu/9780262352703/reinforcement-learning/
- Sutton, Learning to Predict by the Methods of Temporal Differences, Machine Learning 3, 1988: https://doi.org/10.1007/BF00115039
- Watkins & Dayan, Q-learning, Machine Learning 8, 1992: https://doi.org/10.1007/BF00992698
- Silver et al., Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm: https://arxiv.org/abs/1712.01815
- Ouyang et al., Training language models to follow instructions with human feedback (InstructGPT): https://arxiv.org/abs/2203.02155
- Shao et al., DeepSeekMath: Pushing the Limits of Mathematical Reasoning in Open Language Models (GRPO): https://arxiv.org/abs/2402.03300
- Lightman et al., Let's Verify Step by Step: https://arxiv.org/abs/2305.20050
- Feng et al., Towards Revealing the Mystery behind Chain of Thought: A Theoretical Perspective: https://arxiv.org/abs/2305.15408
- Zhu et al., Chain-of-Thought Tokens are Computer Program Variables: https://arxiv.org/abs/2505.04955
- Yuan et al., Trajectory Bellman Residual Minimization: A Simple Value-Based Method for LLM Reasoning: https://arxiv.org/abs/2505.15311
