Monte Carlo Methods in RL

1 min read

Monte Carlo (MC) methods learn value functions from complete episodes of experience — no model needed.

Key idea: estimate Vπ(s)V^\pi(s) as the average return observed after visiting state ss:

Vπ(s)1N(s)visits to sGtV^\pi(s) \approx \frac{1}{N(s)}\sum_{\text{visits to } s} G_t

where Gt=Rt+1+γRt+2+G_t = R_{t+1} + \gamma R_{t+2} + \dots is the actual return from that visit.

First-visit MC: average returns only from the first time ss is visited in each episode. Every-visit MC: average returns from every visit to ss.

Properties:

  • Unbiased: uses actual returns, no bootstrapping
  • High variance: full returns are noisy (depend on many random transitions)
  • Requires complete episodes: can't learn from incomplete trajectories
  • Model-free: doesn't need P(ss,a)P(s'|s,a)

MC vs TD:

MCTD
Update usesActual return GtG_tEstimated return R+γV(s)R + \gamma V(s')
BiasNoneSome (bootstrapping)
VarianceHighLower
EpisodesMust be completeCan update every step

MC control: MC + ϵ\epsilon-greedy policy improvement → learns Q-values and improves the policy.

See also: Miscoral Difference Learning, Value Functions, Q-Learning

Linked from