The optimality equation replaces the expectation by one observed sample and uses a max over next actions:
target=r+γmaxa′Q(s′,a′)=3+0.95(20)=3+19=22
This is the bootstrapped estimate that Q-Learning chases.
Vπ is the policy-weighted average of the Q values (this is the bridge in the parent's Qπ derivation):
Vπ(s′)=∑a′π(a′∣s′)Qπ(s′,a′)=0.3(8)+0.7(5)=2.4+3.5=5.9
The next state iss, so Vπ(s) appears on both sides:
Vπ(s)=−1+0.9Vπ(s)
Move it over: Vπ(s)−0.9Vπ(s)=−1⇒0.1Vπ(s)=−1.
Vπ(s)=1−0.9−1=−10What it looks like: an infinite geometric sum −1−0.9−0.92−⋯=1−γ−1. Look at the figure — the reward stack shrinks by γ each layer and converges.
From the parent's simplification:
0.55Vπ(s1)=−1+0.45V
Substitute V=−6:
0.55Vπ(s1)=−1+0.45(−6)=−1−2.7=−3.7Vπ(s1)=0.55−3.7≈−6.727Analysis:s1 is slightly worse than s2/s3 because two of its four moves waste a step bouncing off a wall.
Vπ(s)=∑t=0∞γt(1)=1−γ1
For γ=0.99: Vπ(s)=0.011=100.
As γ→1 the denominator →0, so Vπ(s)→∞. That divergence is exactly whyγ∈[0,1) strictly — the boundary γ=1 breaks the infinite-horizon sum.
Two coupled equations:
VA=0+0.5VB,VB=1+0.5VA
Substitute the first into the second: VB=1+0.5(0.5VB)=1+0.25VB, so 0.75VB=1, VB=34≈1.333.
Then VA=0.5(34)=32≈0.667, and VB≈1.333.
This is a tiny instance of Dynamic Programming solving the Bellman system exactly.
Fixed point: V=1−0.52=4. The iterates 0,2,3,3.5,… climb toward 4, halving the gap each step — this is value iteration (Dynamic Programming) converging as a contraction.
Terminal means no future value, so each action's value is just its reward.
(a) V∗(s)=max(10,0)=10 (greedy picks g).
(b) Vπ(s)=0.5(10)+0.5(0)=5 (uniform averages good and bad).
(c) Gap =10−5=5. This gap is exactly what Policy Gradient Methods and value-based methods work to close by shifting probability toward g.
∣Vπ(s)∣=∣∑t=0∞γtRt+1∣≤∑t=0∞γtRmax=1−γRmax=1−0.93=0.13=30
Every value function on this MDP lives inside [−30,30] — a fact used to prove Bellman updates are contractions on a Markov Decision Process.
Recall Quick self-quiz
The symbol that distinguishes V∗ from Vπ ::: maxa (optimality) versus ∑aπ(a∣s) (expectation)
Fixed-point value of a self-loop with reward r, discount γ ::: 1−γr
The TD target in Q-learning ::: r+γmaxa′Q(s′,a′)
Value of a terminal state ::: 0
Tightest bound on ∣Vπ∣ given ∣R∣≤Rmax ::: 1−γRmax