

RMS error vs. episodes (Sutton & Barto Example 6.2, right panel)
The plot above shows the final value estimates after a fixed number of episodes. Sutton & Barto’s right panel instead shows how the RMS error of the value estimates from the true values, averaged over the five non-terminal states, evolves across episodes, for several values of , comparing MC against TD(0). Curves are averaged over 100 independent runs to smooth out per-walk variance.
The MC vs TD(0) trade-off
The two curves above are not just two implementations of the same idea — they sit at opposite ends of a real bias / variance / structure trade-off, and that trade-off explains the gap visible in the RMS plot. Bias. The MC target is the actual return , an unbiased sample of . The TD(0) target is , which is biased whenever is wrong — and at episode 0 it is wrong everywhere because is initialised to 0.5. Early in training MC has the more honest target. Variance. depends on the entire random trajectory from to termination, so its variance grows with horizon. The TD(0) target depends on only one stochastic transition , so its variance is much lower. On the random walk, where episodes can take dozens of steps to terminate, MC’s per-update target swings wildly between 0 and 1 while TD(0)‘s target swings only by the local change in . Lower variance is what lets TD(0) take larger learning rates without going unstable, and what produces the smoother curves in the figure above. Use of the Markov property. TD(0) treats as a sufficient statistic for everything that happens after — it bootstraps. That is exactly the Markov assumption. MC ignores the Markov structure entirely and just averages observed returns. When the environment really is Markov (as the random walk is), TD(0) gets to reuse all the information it has already accumulated about successor states; MC has to rediscover it from scratch each episode. This is the deepest reason TD(0) wins on this MRP. Asymptotic fixed points. Run on a finite batch of episodes until the parameters stop moving:- MC converges to the value function that minimises mean-squared error on the observed returns.
- TD(0) converges to the value function of the maximum-likelihood MDP fitted to the data — the certainty-equivalence solution.
- Episodic vs continuing. MC needs , which requires the episode to terminate. TD(0) updates after every step and works on continuing tasks.
- Long horizons. MC’s variance scales with horizon; TD(0) does not. The longer the episode, the bigger the gap.
- Sample efficiency. TD(0) starts learning from the first transition of the first episode; MC waits until the episode ends. On the random walk this is why TD(0) drops below MC within the first few walks.
- Function approximation. With non-linear function approximation (deep RL), TD’s bootstrapping interacts with the off-policy / function-approximation parts of the deadly triad and can diverge; MC remains a safe (if higher-variance) baseline.
References
- Ma, S., Yu, J. (2016). Transition-based versus State-based Reward Functions for MDPs with Value-at-Risk. arXiv [cs.AI].
- Mandt, S., Hoffman, M., Blei, D. (2017). Stochastic Gradient Descent as approximate Bayesian inference. arXiv [stat.ML].
- Mansour, Y., Singh, S. (2013). On the Complexity of Policy Iteration. arXiv [cs.AI].
- (2016). Bayesian Optimization for Reinforcement Learning.
- Schulman, J., Wolski, F., Dhariwal, P., Radford, A., Klimov, O. (2017). Proximal Policy Optimization Algorithms. arXiv [cs.LG].
Found an error on this page? Report an issue.

