The Bellman Optimality Equation

Imagine a robot navigating a warehouse, choosing at every aisle whether to turn left or right. Each choice leads to a new position and a reward. But the robot wants more than to evaluate one fixed route. It wants the best possible route from any starting point. This is the leap from describing a policy to prescribing one. It is exactly the leap the Bellman optimality equation makes. Where The Bellman Equations describe how the value of a fixed policy decomposes recursively, the optimality equation replaces the policy's choice with an explicit maximization over actions. This distinction matters enormously in real systems. Every practical reinforcement-learning algorithm that seeks an optimal controller does this. This includes robotic arms, recommendation engines, and game-playing agents. Each is implicitly solving, approximating, or sampling from this equation. It is the mathematical fixed point that Value Iteration and Policy Iteration are built to compute. It is also the target that deep-RL methods like Q-learning approximate. Its neural-network descendants do the same when exact computation is infeasible. The big picture is this: in any finite Markov Decision Process (MDP), there exists at least one optimal policy. All optimal policies share the same value function. That value function satisfies a system of nonlinear equations — the Bellman optimality equations. Remarkably, it is the unique solution to that system. This uniqueness is not a lucky coincidence. It follows from a contraction-mapping argument. That argument also yields a constructive algorithm for finding the solution. This article makes that argument precise. It defines the optimal state-value and action-value functions. It derives the optimality equations from first principles. It proves existence and uniqueness via the Bellman optimality operator. It also walks through a fully worked numerical example. That example shows the equations being solved by hand. It closes with the connections to the iterative algorithms. These algorithms turn this theory into a computational recipe.

Key takeaways
  • The Bellman optimality equation replaces "expectation over the policy's action" with "maximum over actions," turning an evaluation equation into a prescription for optimal behavior.
  • The optimal state-value function v∗(s)v_*(s) and optimal action-value function q∗(s,a)q_*(s,a) satisfy a joint, mutually recursive, nonlinear fixed-point system.
  • Any finite MDP has at least one optimal deterministic policy, and it can be read off directly from q∗q_* by greedy maximization.
  • Existence and uniqueness of v∗v_* follow from the Bellman optimality operator being a contraction in the max-norm, via the Banach fixed-point theorem.
  • The nonlinearity (the max operator) is the entire reason optimal control is harder than policy evaluation — it destroys the linear-system shortcut available for a fixed policy.
  • This equation is the theoretical anchor for Value Iteration and Policy Iteration, and for Q-learning-style algorithms in deep reinforcement learning.
The core insight

The optimal value function is the unique fixed point of an operator that always chooses the action maximizing immediate reward plus discounted optimal future value.

The idea

Recall that for a fixed policy π\pi, the State-Value and Action-Value Functions vπ(s)v_\pi(s) and qπ(s,a)q_\pi(s,a) satisfy the ordinary Bellman equations, which express today's value as an expectation over the policy's action choice and the environment's transition. The optimal state-value function is defined as the best value achievable at each state, maximizing over all policies:

v∗(s)=max⁡πvπ(s),for all s∈S.v_*(s) = \max_{\pi} v_\pi(s), \qquad \text{for all } s \in \mathcal{S}.

Similarly, the optimal action-value function gives the best value of taking action aa in state ss and then behaving optimally thereafter:

q∗(s,a)=max⁡πqπ(s,a).q_*(s,a) = \max_{\pi} q_\pi(s,a).

A policy π∗\pi_* is called optimal if vπ∗(s)=v∗(s)v_{\pi_*}(s) = v_*(s) for every state ss. A foundational fact about finite MDPs is that such a policy always exists, and moreover it can be chosen to be deterministic and stationary (its action depends only on the current state, not on time). This is not obvious a priori — one might worry that different states demand incompatible tradeoffs requiring randomization — but the structure of MDPs rules this out. The Bellman optimality equation expresses v∗v_* recursively, by noting that the best you can do from state ss is to pick the single best action now, then act optimally forever after:

v∗(s)=max⁡a∈A(s)q∗(s,a)=max⁡a∑s′,rp(s′,r∣s,a)[r+γ v∗(s′)].v_*(s) = \max_{a \in \mathcal{A}(s)} q_*(s,a) = \max_{a} \sum_{s',r} p(s',r \mid s,a)\Big[r + \gamma\, v_*(s')\Big].

The companion equation for the action-value function replaces the outer maximization with an expectation over the next state's best action:

q∗(s,a)=∑s′,rp(s′,r∣s,a)[r+γmax⁡a′q∗(s′,a′)].q_*(s,a) = \sum_{s',r} p(s',r \mid s,a)\Big[r + \gamma \max_{a'} q_*(s',a')\Big].

These two equations are mutually consistent — each can be derived from the other — and together they form a system of ∣S∣|\mathcal{S}| (or ∣S∣∣A∣|\mathcal{S}||\mathcal{A}|) nonlinear equations in the unknowns v∗(s)v_*(s) (or q∗(s,a)q_*(s,a)). The crucial difference from the policy-evaluation Bellman equation is the max⁡\max operator replacing an expectation ∑aπ(a∣s)(⋅)\sum_a \pi(a|s)(\cdot): this single change converts a linear system (solvable by matrix inversion for fixed π\pi) into a nonlinear one with no closed-form solution in general. Once q∗q_* is known, an optimal policy falls out immediately by acting greedily:

π∗(s)=arg⁡max⁡aq∗(s,a).\pi_*(s) = \arg\max_{a} q_*(s,a).

This is the payoff of solving the optimality equation: it converts the global problem of searching over policies (an exponentially large space) into a local, one-step-lookahead decision at each state, because all of the long-term consequences of future decisions are already baked into q∗q_*.

How it works

There is no closed-form algebraic solution to the Bellman optimality equations for a general MDP — the max⁡\max operator makes the system nonlinear, so you cannot simply invert a matrix as you can for policy evaluation. Instead, the standard approach is to construct an operator whose fixed point is v∗v_*, and show that iterating it converges. Define the Bellman optimality operator T∗T^* acting on any value function v:S→Rv: \mathcal{S} \to \mathbb{R} by

(T∗v)(s)=max⁡a∑s′,rp(s′,r∣s,a)[r+γ v(s′)].(T^* v)(s) = \max_{a} \sum_{s',r} p(s',r\mid s,a)\big[r + \gamma\, v(s')\big].

The optimality equation is precisely the statement v∗=T∗v∗v_* = T^* v_*, i.e., v∗v_* is a fixed point of T∗T^*. The algorithmic idea (fully developed under Value Iteration) is to start from an arbitrary v0v_0 and repeatedly apply T∗T^*: ``` ALGORITHM: Bellman Optimality Backup (single sweep, conceptual) Input: MDP (S, A, p, r, gamma), current value estimate v[s] for all s Output: updated value estimate v'[s], and greedy policy pi[s] for each state s in S: best_value <- -infinity best_action <- undefined for each action a in A(s): q_sa <- 0 for each (s', r) with p(s', r | s, a) > 0: q_sa <- q_sa + p(s', r | s, a) (r + gamma v[s']) if q_sa > best_value: best_value <- q_sa best_action <- a v'[s] <- best_value # this is (T v)(s) pi[s] <- best_action # greedy policy w.r.t. v return v', pi ``` ``` ALGORITHM: Iterating to the fixed point (sketch of Value Iteration) Input: MDP, tolerance theta > 0 Initialize v[s] arbitrarily (e.g., 0) for all s, v[terminal] = 0 repeat: delta <- 0 v_old <- copy of v (v, pi) <- Bellman_Optimality_Backup(v_old) # one full sweep delta <- max_s |v[s] - v_old[s]| until delta < theta return v (approximately v_), pi (approximately pi_) ``` Each call to the backup is one application of T∗T^* to the entire value table (a <strong>synchronous sweep</strong>). The claim — proved below — is that this sequence v0,T∗v0,(T∗)2v0,…v_0, T^*v_0, (T^*)^2 v_0, \ldots converges to v∗v_* regardless of the initialization v0v_0, and does so at a geometric rate governed by the discount factor γ\gamma. The diagram below shows the local* computational structure of a single backup at one state: the max-over-actions "fan-out," each action fanning out further into a expectation over stochastic successor states — the classic backup diagram for v∗v_*.

Figure
Backup diagram for the Bellman optimality equation: max over actions, then expectation over outcomes
s state (max over a) a1 a2 a3 ★ expectation over (s', r) s' s' s' s' s' s' v*(s') plugged in recursively v*(s) = max_a Σ p(s',r|s,a) [ r + γ v*(s') ] red square = action node (choice); green circle = environment outcome (chance)

Complexity & correctness

Existence and uniqueness of v∗v_*. Define the max-norm on value functions, ∥u−v∥∞=max⁡s∣u(s)−v(s)∣\|u - v\|_\infty = \max_s |u(s) - v(s)|. The key structural fact is: > Claim. T∗T^* is a γ\gamma-contraction: for any two value functions u,vu, v, > \|T^u - T^v\|_\infty \le \gamma \|u - v\|_\infty. Proof sketch. Fix ss, and let a∗a^* be the action achieving the max in (T∗u)(s)(T^*u)(s) (ties broken arbitrarily). Then

(T∗u)(s)−(T∗v)(s)≤∑s′,rp(s′,r∣s,a∗)[r+γu(s′)]−∑s′,rp(s′,r∣s,a∗)[r+γv(s′)](T^*u)(s) - (T^*v)(s) \le \sum_{s',r} p(s',r\mid s,a^*)\big[r+\gamma u(s')\big] - \sum_{s',r} p(s',r\mid s,a^*)\big[r+\gamma v(s')\big]

because using a∗a^* in the second (possibly suboptimal for vv) term can only decrease it. This simplifies to γ∑s′p(s′∣s,a∗)(u(s′)−v(s′))≤γ∥u−v∥∞\gamma \sum_{s'} p(s'\mid s,a^*)(u(s')-v(s')) \le \gamma \|u-v\|_\infty. By symmetry, the same bound holds with u,vu,v swapped, giving ∣(T∗u)(s)−(T∗v)(s)∣≤γ∥u−v∥∞|(T^*u)(s) - (T^*v)(s)| \le \gamma\|u-v\|_\infty for every ss, hence the claim. ■\blacksquare Because the space of bounded value functions on S\mathcal{S} (with the max-norm) is a complete metric space, and γ∈[0,1)\gamma \in [0,1) makes T∗T^* a strict contraction, the Banach fixed-point theorem guarantees: 1. T∗T^* has a unique fixed point — call it v∗v_* — so the Bellman optimality equation has exactly one solution. 2. Starting from any initial v0v_0, the sequence vk=(T∗)kv0v_k = (T^*)^k v_0 converges to v∗v_*, and does so geometrically:

∥vk−v∗∥∞≤γk∥v0−v∗∥∞.\|v_k - v_*\|_\infty \le \gamma^k \|v_0 - v_*\|_\infty.

That this fixed point v∗v_* genuinely equals max⁡πvπ(s)\max_\pi v_\pi(s) (and is not just some arbitrary solution) is the second half of the argument, usually shown by verifying that (a) the greedy policy with respect to v∗v_* achieves v∗v_* exactly (so v∗≤max⁡πvπv_* \le \max_\pi v_\pi is achieved), and (b) v∗v_* upper-bounds every vπv_\pi (via a standard policy-improvement / induction argument). The upshot: existence of an optimal deterministic stationary policy is not an extra assumption — it is a theorem, and it comes bundled with the fixed-point argument, because the greedy policy with respect to v∗v_* is provably optimal.

Time and space complexity of one backup. For a finite MDP with ∣S∣=n|\mathcal{S}| = n states, ∣A∣=m|\mathcal{A}| = m actions, and letting bb be the number of possible successor states/rewards per (s,a)(s,a) pair (at most nn generally), one full synchronous sweep costs:

  • Time: O(n⋅m⋅b)O(n \cdot m \cdot b) — for each state, try each action, and for each action sum over successor outcomes. In the worst case b=nb = n, giving O(n2m)O(n^2 m) per sweep.
  • Space: O(n)O(n) for the value table (or O(nm)O(nm) if maintaining q∗q_* directly), plus O(nm⋅b)O(nm \cdot b) if the transition model p(s′,r∣s,a)p(s',r\mid s,a) is stored explicitly (this dominates in practice).

Number of sweeps to reach tolerance θ\theta. From the contraction bound, to guarantee ∥vk−v∗∥∞≤θ\|v_k - v_*\|_\infty \le \theta it suffices to take

k≥log⁡(∥v0−v∗∥∞/θ)log⁡(1/γ),k \ge \frac{\log(\|v_0-v_*\|_\infty / \theta)}{\log(1/\gamma)},

so the sweep count grows only logarithmically in the desired precision, but the constant 1/log⁡(1/γ)1/\log(1/\gamma) blows up as γ→1\gamma \to 1 — this is the well-known slow-mixing regime for highly far-sighted agents. Overall time to reach θ\theta-accuracy is O ⁣(nmb⋅log⁡(1/θ)log⁡(1/γ))O\!\left(nmb \cdot \dfrac{\log(1/\theta)}{\log(1/\gamma)}\right).

Honest tradeoffs. The contraction argument requires γ<1\gamma < 1 (or an absorbing-goal / episodic structure ensuring effective contraction); for γ=1\gamma = 1 in a non-episodic setting the fixed-point theorem does not directly apply and the theory needs different tools (average-reward formulations). Also, this whole analysis assumes the transition model p(s′,r∣s,a)p(s',r\mid s,a) is known — this is dynamic programming, not learning from samples. When the model is unknown, algorithms like Q-learning replace the exact expectation with a sampled estimate, trading the clean contraction guarantee for a stochastic-approximation argument (Robbins–Monro conditions) — a different but related correctness story.

Worked example

Consider a tiny MDP: a robot on a 1-D line with states {S1,S2,S3}\{S_1, S_2, S_3\} where S3S_3 is a terminal "goal" state. From S1S_1 or S2S_2 the robot can choose action Right (move toward goal) or Stay (do nothing). Transitions are deterministic. Rewards: moving Right from S2S_2 to S3S_3 gives +10+10; any other Right move gives −1-1 (cost of movement); Stay always gives 00 and keeps the state fixed. Set γ=0.9\gamma = 0.9. S3S_3 is absorbing with value 00 by convention (episode ends). Transition table:

StateActionNext stateReward
S1S_1RightS2S_2−1-1
S1S_1StayS1S_100
S2S_2RightS3S_3+10+10
S2S_2StayS2S_200

We apply the value-iteration backup (deterministic transitions collapse the sum to a single term):

vk+1(s)=max⁡a[r(s,a)+γ vk(s′)].v_{k+1}(s) = \max_a \big[r(s,a) + \gamma\, v_k(s')\big].

Initialize v0(S1)=v0(S2)=0v_0(S_1) = v_0(S_2) = 0.

Sweep 1:

v1(S2)=max⁡(10+0.9⋅0,  0+0.9⋅0)=max⁡(10,0)=10.v_1(S_2) = \max\big(10 + 0.9\cdot 0,\; 0 + 0.9\cdot 0\big) = \max(10, 0) = 10.
v1(S1)=max⁡(−1+0.9⋅v0(S2),  0+0.9⋅v0(S1))=max⁡(−1+0,  0)=0.v_1(S_1) = \max\big(-1 + 0.9\cdot v_0(S_2),\; 0 + 0.9\cdot v_0(S_1)\big) = \max(-1+0,\; 0) = 0.

Sweep 2:

v2(S2)=max⁡(10+0.9⋅0, 0+0.9⋅10)=max⁡(10, 9)=10.v_2(S_2) = \max(10 + 0.9\cdot0,\ 0+0.9\cdot10) = \max(10,\ 9) = 10.
v2(S1)=max⁡(−1+0.9⋅v1(S2), 0.9⋅v1(S1))=max⁡(−1+9, 0)=8.v_2(S_1) = \max(-1 + 0.9\cdot v_1(S_2),\ 0.9\cdot v_1(S_1)) = \max(-1+9,\ 0) = 8.

Sweep 3:

v3(S2)=max⁡(10, 0.9⋅10)=10(unchanged, already at fixed point).v_3(S_2) = \max(10,\ 0.9\cdot 10) = 10 \quad (\text{unchanged, already at fixed point}).
v3(S1)=max⁡(−1+0.9⋅10, 0.9⋅8)=max⁡(8, 7.2)=8(unchanged).v_3(S_1) = \max(-1 + 0.9\cdot 10,\ 0.9\cdot 8) = \max(8,\ 7.2) = 8 \quad (\text{unchanged}).

Since v3=v2v_3 = v_2, we have converged: v∗(S1)=8v_*(S_1) = 8, v∗(S2)=10v_*(S_2) = 10, v∗(S3)=0v_*(S_3)=0. Sanity-check directly against the optimality equation:

v∗(S2)=max⁡(10+0.9(0), 0+0.9(10))=max⁡(10,9)=10✓v_*(S_2) = \max(10 + 0.9(0),\ 0 + 0.9(10)) = \max(10, 9) = 10 \quad\checkmark
v∗(S1)=max⁡(−1+0.9(10), 0+0.9(8))=max⁡(8,7.2)=8✓v_*(S_1) = \max(-1 + 0.9(10),\ 0 + 0.9(8)) = \max(8, 7.2) = 8 \quad\checkmark

Both equations hold exactly, confirming v∗v_* is the fixed point. Reading off the argmax gives the optimal policy: Right in both S1S_1 and S2S_2 — the robot should always push toward the goal, and the −1-1 movement cost is worth paying because γ=0.9\gamma=0.9 discounts the future reward only mildly. Note how the convergence took only 2 sweeps here because the chain is short (length 2) — in general convergence is asymptotic, and this exactness is special to this small deterministic example.

Sweep kkvk(S1)v_k(S_1)vk(S2)v_k(S_2)Max change δ\delta
000—
101010
28108
38100 (converged)

Common pitfalls & traps

PitfallWhy it happensFix
Confusing vπv_\pi's Bellman equation with v∗v_*'sBoth look similar; forgetting the max⁡\max replaces ∑aπ(a∣s)\sum_a \pi(a|s)Always ask: "is this an expectation over a given policy, or a maximization over choices?"
Assuming a unique optimal policyv∗v_* is unique, but many policies can achieve it (ties in the argmax)State "an optimal policy," not "the optimal policy," when actions tie in q∗q_*
Forgetting terminal/absorbing states need v=0v=0 boundary conditionsSweeps propagate incorrect values backward if terminal states are left uninitializedExplicitly fix v(terminal)=0v(\text{terminal}) = 0 and exclude it from updates
Using γ=1\gamma = 1 carelessly in non-episodic tasksContraction argument requires γ<1\gamma<1; without it T∗T^* may not be a contractionVerify episodic/absorbing structure, or switch to average-reward formulation
Treating the equation as directly solvable in closed formThe max⁡\max makes it nonlinear — no matrix inversion trick like in policy evaluationUse iterative fixed-point methods (Value Iteration, Policy Iteration) instead
Synchronous vs. in-place updates mismatchMixing "use old values for whole sweep" with "use updated values immediately" changes convergence speed/guarantees subtlyBe explicit about which sweep style is used; both converge but analyses differ slightly

Pioneers & history

Origins · 1 minRichard Ernest Bellman and how this was discovered
RE
Richard Ernest Bellman
1920–1984 · Mid-20th-century American applied mathematician at RAND Corporation

Bellman developed dynamic programming as a general method for multistage decision problems in the 1950s, coining the "principle of optimality" that underlies the recursive structure of the optimality equation: an optimal policy has the property that, whatever the initial decision, the remaining decisions must constitute an optimal policy with regard to the state resulting from the first decision. This principle is exactly what licenses the recursive decomposition v∗(s)=max⁡a[…+γv∗(s′)]v_*(s) = \max_a[\ldots + \gamma v_*(s')].

History
1953
— Bellman introduces dynamic programming and the principle of optimality at RAND Corporation.
1957
— Bellman publishes Dynamic Programming, formalizing the optimality equation for sequential decision processes.
1960
— Ronald Howard develops policy iteration for Markov decision processes, giving an alternative constructive route to the same fixed point.
1989
— Chris Watkins introduces Q-learning, a sample-based stochastic-approximation algorithm targeting the action-value optimality equation without a known model.
2015
— Deep Q-Networks combine Q-learning with neural function approximation, scaling the same fixed-point idea to high-dimensional perceptual inputs.

Where this matters

The Bellman optimality equation is the theoretical bedrock beneath essentially every optimal-control and reinforcement-learning system that reasons about long-term consequences. Classical dynamic programming solvers for inventory management, scheduling, and finance directly compute approximations to v∗v_* or q∗q_* when the transition model is known. In modern reinforcement learning, Q-learning and its descendants (Deep Q-Networks, Double DQN, Rainbow) are all sample-based stochastic-approximation schemes whose target fixed point is exactly the q∗q_* defined here — the neural network is simply a function approximator standing in for the exact table. AlphaGo and its successors combine Monte Carlo tree search with learned value networks that approximate v∗v_* for the game tree, letting the search prune toward provably good moves. In robotics and autonomous driving, model-based planning modules that simulate forward trajectories are implicitly evaluating one-step Bellman-optimal backups at each planning horizon. Recommendation systems that model user interaction as a sequential decision process (maximizing long-term engagement rather than a single click) also frame their objective as solving this same equation, typically approximately, via policy-gradient or actor-critic methods that estimate advantages relative to v∗v_* or q∗q_*.

Ask the tutor: How does the Bellman optimality equation change when transitioning from a discounted finite-horizon MDP to an average-reward or continuing task?

Is the optimal policy always unique?

No. While the optimal value function v∗v_* is provably unique (it is the unique fixed point of the Bellman optimality operator), multiple policies can achieve it whenever the greedy action set arg⁡max⁡aq∗(s,a)\arg\max_a q_*(s,a) contains ties at some state. Any policy that always selects an action from this maximizing set is optimal. This is why textbooks careful about precision say "an optimal policy" rather than "the optimal policy" — uniqueness lives at the level of values, not necessarily of action choices.

Why can't we just solve the Bellman optimality equation with linear algebra, like we do for policy evaluation?

Policy evaluation's Bellman equation is linear in vπv_\pi because the policy's action-selection is fixed and known, turning the system into vπ=rπ+γPπvπv_\pi = r^\pi + \gamma P^\pi v_\pi, solvable via vπ=(I−γPπ)−1rπv_\pi = (I-\gamma P^\pi)^{-1} r^\pi. The optimality equation instead has a max⁡\max operator baked into the recursion, making it piecewise-linear but globally nonlinear — there is no single matrix PP to invert because the "correct" transition matrix depends on which action is optimal at each state, which is exactly the unknown we're solving for. This forces iterative or combinatorial (policy iteration, linear programming) solution methods.

How does this relate to Value Iteration and Policy Iteration?

Value Iteration directly iterates the Bellman optimality operator T∗T^* on a value table until convergence, exploiting the contraction property proven here. Policy Iteration instead alternates between full policy evaluation (solving the linear Bellman equation for a fixed policy) and policy improvement (making the policy greedy with respect to that value), and it can be shown to also converge to the same v∗,π∗v_*, \pi_* pair, often in fewer iterations at higher per-iteration cost. Both algorithms are constructive proofs that the optimality equation's solution is computable.

Does the Bellman optimality equation require knowing the environment's model?

As formulated with the transition probabilities p(s′,r∣s,a)p(s',r\mid s,a) explicit, yes — this is the dynamic-programming setting where the model is known. When the model is unavailable, model-free algorithms like Q-learning replace the exact expectation inside the equation with a sampled, incrementally-averaged estimate, converging to the same q∗q_* under stochastic-approximation conditions (appropriately decaying learning rates, sufficient exploration). The target being approximated is still exactly the Bellman optimality equation; only the estimation method changes.

What role does the discount factor γ\gamma play in the correctness proof?

The discount factor is precisely the contraction modulus in the Banach fixed-point argument: ∥T∗u−T∗v∥∞≤γ∥u−v∥∞\|T^*u - T^*v\|_\infty \le \gamma\|u-v\|_\infty. Whenever γ∈[0,1)\gamma \in [0,1), this guarantees a unique fixed point and geometric convergence of iterative methods. If γ=1\gamma = 1 without episodic termination, the operator may fail to be a strict contraction, and existence/uniqueness of v∗v_* can break down or require a different theoretical framework (e.g., average-reward MDPs), so γ<1\gamma<1 is not just a modeling convenience but a load-bearing assumption in the proof.

How is q∗q_* related to v∗v_*, and why do we need both?

They satisfy v∗(s)=max⁡aq∗(s,a)v_*(s) = \max_a q_*(s,a) and q∗(s,a)=∑s′,rp(s′,r∣s,a)[r+γv∗(s′)]q_*(s,a) = \sum_{s',r} p(s',r|s,a)[r + \gamma v_*(s')], so each determines the other given the model. v∗v_* is more compact (one number per state) but requires a one-step model lookahead to extract a policy; q∗q_* is larger (one number per state-action pair) but yields the optimal policy by simple argmax with no model needed at decision time. This is why model-free methods like Q-learning target q∗q_* directly — it avoids needing p(s′,r∣s,a)p(s',r|s,a) at action-selection time.

Can the Bellman optimality equation fail to have a solution?

For finite MDPs with γ∈[0,1)\gamma \in [0,1), no — existence and uniqueness are guaranteed by the contraction argument. Issues can arise in more exotic settings: infinite or continuous state/action spaces may require additional regularity conditions (boundedness, continuity) for the same fixed-point machinery to apply, and undiscounted, non-episodic tasks need special handling as discussed above. Within the standard finite, discounted MDP framework taught alongside The Bellman Equations, the solution always exists and is unique.

Before this

Where this leads