Compare Monte Carlo and TD(0) value estimation in terms of bias and variance. Given eight episodes, one (A, 0, B, 0), six (B, 1) and one (B, 0), with γ=1, what do batch Monte Carlo and batch TD(0) give for V(A) and V(B)?

Reinforcement learning, Temporal-difference learning
Level L3 Intermediate. Length Medium. Nature Th+Mat Both.

What's being asked

Whether you understand bootstrapping, and can show with numbers that the two methods reach different answers on the same finite data.

Key idea

Monte Carlo updates towards the full return Gt: unbiased, but high variance. TD(0) updates towards rt+1+γV(st+1): biased while V is wrong, but low variance because only one step is random. On a fixed batch, MC fits the observed returns, while TD fits the maximum-likelihood Markov model of the data.

Steps

  1. Write the updates. MC: V(st)←V(st)+α[Gt−V(st)]. TD(0): V(st)←V(st)+α[rt+1+γV(st+1)−V(st)].
  2. Bias and variance: Gt sums many random rewards and transitions, so its variance grows with episode length. The TD target has one random step but inherits the error in V(st+1).
  3. V(B): B appears in all 8 episodes, with return 1 in six of them, so both methods give V(B)=6/8=0.75.
  4. V(A): MC averages the single observed return from A, which is 0, so VMC(A)=0. TD uses the fact that A always moved to B with reward 0, so VTD(A)=0+V(B)=0.75.
  5. Interpret: MC minimises squared error on the training returns. TD gives the certainty-equivalence estimate: the answer you get by fitting a transition-and-reward model to the data and solving it exactly. This usually generalises better when the environment is Markov. TD can also learn online from incomplete episodes; n-step TD and TD(λ) interpolate between the two.

Common mistakes

How long your answer should be

About half a page: the two updates, the bias–variance sentence, and the A–B example.

Last checked on 4 December 2026.

Read this

Previous in Reinforcement learning: Derive the Bellman expectation equation for Vπ. How does the Bellman optimality equation for V∗ differ, and why can the first be solved as a linear system but not the second?
Next in Reinforcement learning: In the cliff-walking gridworld (reward −1 per step, −100 for stepping off the cliff), an ε-greedy SARSA agent learns a safe path away from the edge, while Q-learning learns the path along the edge yet earns less reward per episode during training. Why?