In this chapter we introduced a new kind of learning method, temporal-difference (TD) learning, and shown how it can be applied to the reinforcement learning problem. As usual, we divided the overall problem into a prediction problem and a control problem. TD methods are alternatives to Monte Carlo methods for solving the prediction problem. In both cases, the extension to the control problem is via the idea of generalized policy iteration (GPI) that we abstracted from dynamic programming. This is the idea that approximate policy and value functions should interact in such a way that they both move toward their optimal values.

One of the two processes making up GPI drives the value function to accurately predict returns for the current policy; this is the prediction problem. The other process drives the policy to improve locally (e.g., to be -greedy) with respect to the current value function. When the first process is based on experience, a complication arises concerning maintaining sufficient exploration. As in Chapter 5, we have grouped the TD control methods according to whether they deal with this complication by using an on-policy or off-policy approach. Sarsa and actor-critic methods are on-policy methods, and Q-learning and R-learning are off-policy methods.

The methods presented in this chapter are today the most widely used
reinforcement learning methods. This is probably due to their great
simplicity: they can be applied on-line, with a minimal amount of computation, to
experience generated from interaction with an environment;
they can be expressed nearly completely by single equations that can be implemented with small
computer programs. In the next few
chapters we extend these algorithms, making them slightly more complicated and
significantly more powerful. All the new algorithms will retain the essence of those
introduced here: they will be able to process experience on-line, with relatively
little computation, and they will be driven by TD errors. The
special cases of TD methods introduced in the present chapter should rightly be
called *one-step, tabular, modelfree* TD methods. In the next
three chapters we extend them to multistep forms (a link to Monte Carlo
methods), forms using function approximation rather than tables (a link to
artificial neural networks), and forms that include a model of the environment
(a link to planning and dynamic programming).

Finally, in this chapter we have discussed TD methods entirely within the context of reinforcement learning problems, but TD methods are actually more general than this. They are general methods for learning to make long-term predictions about dynamical systems. For example, TD methods may be relevant to predicting financial data, life spans, election outcomes, weather patterns, animal behavior, demands on power stations, or customer purchases. It was only when TD methods were analyzed as pure prediction methods, independent of their use in reinforcement learning, that their theoretical properties first came to be well understood. Even so, these other potential applications of TD learning methods have not yet been extensively explored.