Learning objectives
- Compute a TD error.
- Compare TD with Monte Carlo and DP.
The idea
TD updates the value estimate after every step using the estimate of the next state (bootstrapping) instead of waiting for the end of the episode.
Explanation
It combines real samples (like MC) with partial estimates (like DP), so it learns faster in long tasks but is slightly biased because the target itself is an estimate.
Equations
V(S_t)\leftarrow V(S_t)+\alpha\,[R_{t+1}+\gamma V(S_{t+1})-V(S_t)],\qquad \delta_t=R_{t+1}+\gamma V(S_{t+1})-V(S_t)δ is the TD error; every tabular value method uses it.
Worked example
With V=[0,0.5], α=0.1, r=1, γ=0.9: δ = 1+0.9×0.5−0 = 1.45 so V(S_t)=0.145.
Common mistakes
A large α oscillates.
Forgetting that the target moves while learning.
Summary
TD learns from the difference between two consecutive estimates without waiting for the episode to end.
Related experiments
Assessment questions
References
- Sutton, R. S. (1988). Learning to predict by the methods of temporal differences. Machine Learning 3(1):9-44. doi:10.1007/bf00115009
- Sutton, R. S.; Barto, A. G. (1998). Reinforcement learning: an introduction (first-edition record; the second edition is free at the author's page). IEEE Transactions on Neural Networks 9(5):1054. doi:10.1109/tnn.1998.712192
