← Back to Reinforcement Learning Mind Map
中文·English
🎮 Reinforcement LearningID: monte-carlo-td

MC vs TD Learning

蒙特卡洛 vs 时序差分
🎯Core Definition
Monte Carlo (MC) updates from the full episode return, defined as discounted cumulative reward Gt=∑k=0T−t−1γkrt+k+1G_t = \sum_{k=0}^{T-t-1} \gamma^k r_{t+k+1}, where TT is the terminal time step, rt+k+1r_{t+k+1} the reward k+1k+1 steps after tt, and γk\gamma^k the discount; the update is V(st)←V(st)+α[Gt−V(st)]V(s_t) \leftarrow V(s_t) + \alpha\left[ G_t - V(s_t) \right].Since GtG_t is an unbiased sample estimate of vπ(st)v_\pi(s_t) (real samples only, no reliance on current estimates), MC is unbiased; but it sums T−tT-t stochastic rewards, so variance grows with episode length and γ\gamma, and learning must wait until episode end — episodic tasks only.
📌Overview
Temporal Difference (TD) learns from a one-step transition plus bootstrapping, with target rt+1+γV(st+1)r_{t+1} + \gamma V(s_{t+1}) — the real reward rt+1r_{t+1} plus the discounted current estimate V(st+1)V(s_{t+1}); the update is V(st)←V(st)+α[rt+1+γV(st+1)−V(st)]V(s_t) \leftarrow V(s_t) + \alpha\left[ r_{t+1} + \gamma V(s_{t+1}) - V(s_t) \right], the bracket being the TD error. Because the target contains an estimate, TD is biased (toward the current estimate), but it involves little stochasticity — low variance — learns at every step, and works on continuing tasks. MC corresponds to accumulating the TD error over a full trajectory (λ=1\lambda = 1); DP is full bootstrapping at λ=0\lambda = 0 — TD sits between the two; in tabular settings TD(0) converges to the true vπv_\pi under standard conditions.
💡Use Cases
model-free online learning (unknown P,RP, R) — Q-learning/DQN/Actor-Critic all build on TD errors; MC serves for diagnostic comparisons and episodic tasks (e.g. board evaluation updated per game). The bias-variance trade-off is a classic interview topic.
⚡Key Problems Solved
model-free environments rule out DP, while MC is impractical due to high variance and delayed updates; TD uses the one-step error as the learning signal via bootstrapping, trading bias (from the estimate) against variance (from randomness), achieving sample efficiency, online learning, and stability — the dominant learning paradigm.
🎯Core Interview Exam Points
Fundamentals · Production Scenarios · Deep Dive
Core Def
Explain the core definition, underlying mechanism/math, and key principles of MC vs TD Learning.
Use Cases
In production engineering, what are the primary use cases for MC vs TD Learning and what core pain points does it solve?
🔥 High-Frequency Deep-Dive Questions
1
Write GtG_t and the TD target in full and explain each term. How do the two updates differ?
2
Why is MC unbiased with high variance, and TD biased with low variance? Where do the bias and variance come from?
3
What does TD's "bootstrapping" mean? Its key differences from MC?
4
How does TD(λ) unify MC and TD? What do λ = 0 and λ = 1 reduce to?
5
Why does TD dominate in practice? How does the TD error appear in DQN/Q-learning updates?
Updated 2026-08-12
🎯
Test Your Knowledge: Practice Questions for "MC vs TD Learning"
Single choice pitfall questions with instant feedback and mistake tracking.
🚀 Start Card Practice ➔
← Previous CardValue vs Policy IterationNext Card →Q-Learning (Off-Policy)

🔗 More Reinforcement Learning Knowledge Cards

Actor-CriticBehavioral CloningContextual BanditCoT & Reasoning RL