This Reinforcement Learning concept is the current idea: keep the same invariant visible across Intuition, Math, Code, Interactive Demo.
Reinforcement Learning
Bellman Equations
Bellman equations make value recursive: a state's value must equal immediate reward plus discounted value flowing back from the next states.
Concept Structure
Bellman Equations
Start with the picture, metaphor, or geometric mechanism.
Make the objects explicit and connect them with notation.
Mirror the equations with runnable implementation details.
Manipulate the mechanism and watch the idea respond.
Learner Contract
What this page should let you do.
1 prerequisite listed; refresh them before leaning on the math or code.
Explain the mechanism, trace the main notation, and test one prediction in the live demo.
Read the intuition before the notation; the math should name a mechanism you already felt.
Follow this edge after making one prediction here; the next page should reuse the result, not restart the route.
Claim/source review status
Substantive review recorded
1/1 claims have bounded review metadata; still check caveats and source scope.Metadata-derived; review may be AI-assisted. Not a human certification.01
Intuition
Build the mental picture first so the rest of the page has something to attach to.
The MDP formalism gave us the one-step contract:
current state, action, transition probabilities, and rewards.
Bellman equations ask the next question:
If the future already has value estimates, what should this state's value be?
The answer is recursive. A state is valuable when its next transition gives reward now and lands in states that are valuable later.
That is the Bellman idea:
- reward flows forward from the transition;
- value flows backward from the next state;
- discount decides how much future value matters.
For a fixed policy , the Bellman expectation equation is a consistency equation. It does not search for the best action. It asks whether the value function agrees with the policy's own behavior.
For control, the Bellman optimality equation changes one operator: instead of averaging actions with , it takes the best action. That distinction matters. Policy evaluation answers "what is this policy worth?" Optimality answers "what would the best action be worth?"
This page keeps those two backups next to each other, but it does not run value iteration yet. First we need to feel one backup.
02
Math
Translate the story into symbols, assumptions, and a derivation you can inspect.
Let be a finite discounted MDP, with discount .
For a policy , the state-value function is
The Bellman expectation equation says this infinite return can be split into one reward plus the discounted value of the next state:
Read the equation from inside out.
First, for a particular transition , compute the bracket:
Then average those brackets over next states using . Then average the action rows using .
For an arbitrary value estimate , the one-step Bellman expectation backup is an operator:
The true value is the fixed point:
The Bellman optimality backup removes the fixed policy and chooses the best action:
The optimal value function satisfies
This page is about the backup itself. Value iteration repeatedly applies ; temporal-difference methods learn related targets from sampled transitions.
03
Code
Keep the implementation aligned with the notation so the algorithm is legible.
states = ["Start", "Practice", "Confused", "Mastered"]
V = {"Start": 0.40, "Practice": 1.20, "Confused": -0.60, "Mastered": 0.0}
gamma = 0.90
pi = {"drill": 0.70, "skim": 0.30}
P = {
"drill": [("Practice", 0.62, 1.0), ("Confused", 0.23, -0.5), ("Mastered", 0.15, 3.0)],
"skim": [("Start", 0.30, 0.1), ("Practice", 0.45, 0.5), ("Confused", 0.25, -0.2)],
}
def action_backup(action, gamma=gamma):
total = 0.0
for next_state, prob, reward in P[action]:
bracket = reward + gamma * V[next_state]
total += prob * bracket
return total
def expectation_backup(policy, gamma=gamma):
total = 0.0
for action, weight in policy.items():
total += weight * action_backup(action, gamma)
return total
print("T^pi V(Start):", round(expectation_backup(pi), 3))
print("T^pi with gamma=0:", round(expectation_backup(pi, gamma=0.0), 3))
print("T^* V(Start):", round(max(action_backup(a) for a in pi), 3))
The same transition kernel from the MDP page is still here. The new ingredient is that every next state carries a value estimate, so each transition contributes
04
Interactive Demo
Use direct manipulation to connect the explanation to a moving system.
Use the Bellman Backup Lab as a value-flow prediction check.
Pick a case, then predict which backup is being computed:
- immediate reward only;
- reward plus discounted next value under a fixed policy;
- or a max over action rows.
Before reveal, the backup value and contribution ledger stay locked. After reveal, inspect which terms were averaged, which future values flowed backward, and whether the update was policy evaluation or control.
Live Concept Demo
Explore Bellman Equations
The stage is code-native and interactive. Use it to test the explanation against the mechanism.
Manipulate one control and predict the visible change.
Commit to what Bellman Equations should make visible before reading the result.
After The First Pass
Turn the concept into an inspected object.
Once the invariant is visible in the intuition, math, code, and demo, use these panels to inspect the mechanism visually, check source support, practice the idea, and attach a grounded research question.
Mechanism Storyboard
See the idea move before the page explains it
Bellman equations make value recursive: a state's value must equal immediate reward plus discounted value flowing back from the next states.
Start with the picture, metaphor, or geometric mechanism.
Before reading further, choose the kind of change Bellman Equations should make visible.
Visual Inquiry
Make the image answer a mathematical question
Bellman equations make value recursive: a state's value must equal immediate reward plus discounted value flowing back from the next states.
Which visible object should carry the first intuition?
Pick the cue that should make Bellman Equations easier to reason about before the page gives the answer.
Source Grounding
Canonical references for the mechanism on this page.
Canonical source for value functions, Bellman expectation equations, Bellman optimality equations, and bootstrapping from one-step dynamics.
Open sourceGraduate RL course source for value functions, Bellman equations, policy evaluation, and planning with known dynamics.
Open sourceCourse-note source for recursive value updates, discounted future value, and the max-over-actions optimality backup.
Open sourceOpen textbook source for Bellman optimality and value-iteration framing in tabular reinforcement learning.
Open sourceClaim Review
Bellman equations make value recursive: a state's value must equal immediate reward plus discounted value flowing back from the next states.
Claims without a substantive review badge still need exact source-support review.
sutton-barto-2018-rl, stanford-cs234-bellman, berkeley-cs188-value-iteration, d2l-value-iteration
Use equations, runnable code, and demos to check whether the source support is operational.
The sources support discounted value functions, one-step Bellman recursion, the fixed-policy expectation backup, and the optimality backup that selects the best action under known dynamics.
Sources: Reinforcement Learning: An Introduction, Second Edition, Stanford CS234: Lecture 2, MDPs, Bellman Equations, and Planning, UC Berkeley CS188: Value Iteration, Dive into Deep Learning: Value IterationFinite tabular teaching MDP only; excludes convergence proofs, contraction mapping details, asynchronous dynamic programming, stochastic approximation, temporal-difference learning, continuous state/action spaces, function approximation, and off-policy data.A bounded review summary is present; still check caveats and exact reference scope.Checked Sutton and Barto for value functions and Bellman expectation/optimality equations; Stanford CS234 for graduate policy-evaluation and planning framing; Berkeley CS188 for recursive value updates and optimality backups; and D2L for value-iteration/Bellman optimality context. GPT Pro publication critique remains pending because 127.0.0.1:51672 is unavailable.
Reviewer: codex-local-source-review; reviewed 2026-07-03Source support candidates
book 2018Reinforcement Learning: An Introduction, Second EditionCanonical source for value functions, Bellman expectation equations, Bellman optimality equations, and bootstrapping from one-step dynamics.
course-notes 2026Stanford CS234: Lecture 2, MDPs, Bellman Equations, and PlanningGraduate RL course source for value functions, Bellman equations, policy evaluation, and planning with known dynamics.
course-notes 2026UC Berkeley CS188: Value IterationCourse-note source for recursive value updates, discounted future value, and the max-over-actions optimality backup.
book 2026Dive into Deep Learning: Value IterationOpen textbook source for Bellman optimality and value-iteration framing in tabular reinforcement learning.
Practice Loop
Try the idea before it explains itself
Bellman equations make value recursive: a state's value must equal immediate reward plus discounted value flowing back from the next states.
Before touching the demo, predict one visible change that should happen in Bellman Equations.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
Reveal when your model needs a nudge.
A concrete answer is on the canvas.
The answer names why the claim should hold.
It touches the page context or a neighboring idea.
Research Room
Attach the question to a claim, equation, code, or demo
Pick the concept, equation, source, runnable code, claim, misconception, or demo state before asking for help. The handoff keeps that page item in context.Open the draft below to save one note and next action in this browser.
Bellman Equations
What is the smallest example that makes Bellman Equations click without losing the math?
Local action draftNo local draft saved yetExpand only when ready to capture one local next action
This draft stays in this browser, attached to the selected learning item.
- References to inspect: attached references on this page.
- Definition, prerequisite, and contrast concept links
- The equation or runnable code that makes the concept operational
- One demo state that shows the invariant instead of a slogan
- The learner can state the mechanism in their own words
- The learner can name the prerequisite that would repair confusion
- The learner can predict how the mechanism changes under one perturbation
I am working in Continuous Function's research reading room. Object: concept - Bellman Equations Selected item key: recorded for copy. Context: Reinforcement Learning Page anchor: recorded for copy. Open question: What is the smallest example that makes Bellman Equations click without losing the math? Evidence to inspect: - References to inspect: attached references on this page. - Definition, prerequisite, and contrast concept links - The equation or runnable code that makes the concept operational - One demo state that shows the invariant instead of a slogan What would resolve this: - The learner can state the mechanism in their own words - The learner can name the prerequisite that would repair confusion - The learner can predict how the mechanism changes under one perturbation Answer as a careful research tutor: stay source-grounded, separate verified evidence from assumptions, name the relevant math objects, and end with one next action.
concept/concept-notebook/reinforcement-learning/bellman-equations
concept:reinforcement-learning/bellman-equations