To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Languages
Recent
Show all languages
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

# Temporal difference learning

Temporal difference (TD) learning refers to a class of model-free reinforcement learning methods which learn by bootstrapping from the current estimate of the value function. These methods sample from the environment, like Monte Carlo methods, and perform updates based on current estimates, like dynamic programming methods.[1]

While Monte Carlo methods only adjust their estimates once the final outcome is known, TD methods adjust predictions to match later, more accurate, predictions about the future before the final outcome is known.[2] This is a form of bootstrapping, as illustrated with the following example:

"Suppose you wish to predict the weather for Saturday, and you have some model that predicts Saturday's weather, given the weather of each day in the week. In the standard case, you would wait until Saturday and then adjust all your models. However, when it is, for example, Friday, you should have a pretty good idea of what the weather would be on Saturday – and thus be able to change, say, Saturday's model before Saturday arrives."[2]

Temporal difference methods are related to the temporal difference model of animal learning.[3][4][5][6][7]

• 1/5
Views:
116 492
948
908
5 644
11 043
• ✪ Q Learning Explained (tutorial)
• ✪ Machine Learning #84 RL Framework, Temporal Difference (TD) Learning
• ✪ Temporal Difference Learning & SARSA
• ✪ TD Lambda
• ✪ Randomized ensemble reinforcement learning in Mario AI

## Mathematical formulation

The tabular TD(0) method, one of the simplest TD methods, estimates the state value function of a finite-state Markov decision process (MDP) under a policy ${\displaystyle \pi }$. Let ${\displaystyle V^{\pi }}$ denote the state value function of the MDP with states ${\displaystyle (s_{t})_{t\in \mathbb {N} }}$, rewards ${\displaystyle (r_{t})_{t\in \mathbb {N} }}$ and discount rate ${\displaystyle \gamma }$ under the policy ${\displaystyle \pi }$:

${\displaystyle V^{\pi }(s)=E_{\pi }\left\{\sum _{t=0}^{\infty }\gamma ^{t}r_{t}{\Bigg |}s_{0}=s\right\}.}$

${\displaystyle V^{\pi }}$ satisfies the Hamilton-Jacobi-Bellman Equation:

${\displaystyle V^{\pi }(s)=E_{\pi }\{r_{0}+\gamma V^{\pi }(s_{1})|s_{0}=s\},}$

so ${\displaystyle r_{0}+\gamma V^{\pi }(s_{1})}$ is an unbiased estimate for ${\displaystyle V^{\pi }(s)}$. This observation motivates the following algorithm for estimating ${\displaystyle V^{\pi }}$.

The algorithm starts by initializing a table ${\displaystyle V(s)}$ arbitrarily, with one value for each state of the MDP. A positive learning rate ${\displaystyle \alpha }$ is chosen.

We then repeatedly evaluate the policy ${\displaystyle \pi }$, obtain a reward ${\displaystyle r}$ and update the value function for the old state using the rule:[8]

${\displaystyle V(s)\leftarrow V(s)+\alpha (\overbrace {r+\gamma V(s')} ^{\text{The TD target}}-V(s))}$

where ${\displaystyle s}$ and ${\displaystyle s'}$are the old and new states, respectively.

The value ${\displaystyle r+\gamma V(s')}$ is known as the TD target.

## TD-Lambda

TD-Lambda is a learning algorithm invented by Richard S. Sutton based on earlier work on temporal difference learning by Arthur Samuel.[1] This algorithm was famously applied by Gerald Tesauro to create TD-Gammon, a program that learned to play the game of backgammon at the level of expert human players.[9]

The lambda (${\displaystyle \lambda }$) parameter refers to the trace decay parameter, with ${\displaystyle 0\leqslant \lambda \leqslant 1}$. Higher settings lead to longer lasting traces; that is, a larger proportion of credit from a reward can be given to more distant states and actions when ${\displaystyle \lambda }$ is higher, with ${\displaystyle \lambda =1}$ producing parallel learning to Monte Carlo RL algorithms.

## TD algorithm in neuroscience

The TD algorithm has also received attention in the field of neuroscience. Researchers discovered that the firing rate of dopamine neurons in the ventral tegmental area (VTA) and substantia nigra (SNc) appear to mimic the error function in the algorithm.[3][4][5][6][7] The error function reports back the difference between the estimated reward at any given state or time step and the actual reward received. The larger the error function, the larger the difference between the expected and actual reward. When this is paired with a stimulus that accurately reflects a future reward, the error can be used to associate the stimulus with the future reward.

Dopamine cells appear to behave in a similar manner. In one experiment measurements of dopamine cells were made while training a monkey to associate a stimulus with the reward of juice.[10] Initially the dopamine cells increased firing rates when the monkey received juice, indicating a difference in expected and actual rewards. Over time this increase in firing back propagated to the earliest reliable stimulus for the reward. Once the monkey was fully trained, there was no increase in firing rate upon presentation of the predicted reward. Continually, the firing rate for the dopamine cells decreased below normal activation when the expected reward was not produced. This mimics closely how the error function in TD is used for reinforcement learning.

The relationship between the model and potential neurological function has produced research attempting to use TD to explain many aspects of behavioral research.[11] It has also been used to study conditions such as schizophrenia or the consequences of pharmacological manipulations of dopamine on learning.[12]

## Notes

1. ^ a b Richard Sutton & Andrew Barto (1998). Reinforcement Learning. MIT Press. ISBN 978-0-585-02445-5. Archived from the original on 2017-03-30.
2. ^ a b Richard Sutton (1988). "Learning to predict by the methods of temporal differences". Machine Learning. 3 (1): 9–44. doi:10.1007/BF00115009. (A revised version is available on Richard Sutton's publication page Archived 2017-03-30 at the Wayback Machine)
3. ^ a b Schultz, W, Dayan, P & Montague, PR. (1997). "A neural substrate of prediction and reward". Science. 275 (5306): 1593–1599. CiteSeerX 10.1.1.133.6176. doi:10.1126/science.275.5306.1593. PMID 9054347.CS1 maint: Multiple names: authors list (link)
4. ^ a b Montague, P. R.; Dayan, P.; Sejnowski, T. J. (1996-03-01). "A framework for mesencephalic dopamine systems based on predictive Hebbian learning". The Journal of Neuroscience. 16 (5): 1936–1947. doi:10.1523/JNEUROSCI.16-05-01936.1996. ISSN 0270-6474. PMID 8774460.
5. ^ a b Montague, P.R.; Dayan, P.; Nowlan, S.J.; Pouget, A.; Sejnowski, T.J. (1993). "Using aperiodic reinforcement for directed self-organization" (PDF). Advances in Neural Information Processing Systems. 5: 969–976.
6. ^ a b Montague, P. R.; Sejnowski, T. J. (1994). "The predictive brain: temporal coincidence and temporal order in synaptic learning mechanisms". Learning & Memory. 1 (1): 1–33. ISSN 1072-0502. PMID 10467583.
7. ^ a b Sejnowski, T.J.; Dayan, P.; Montague, P.R. (1995). "Predictive hebbian learning" (PDF). Proceedings of Eighth ACM Conference on Computational Learning Theory: 15–18. doi:10.1145/230000/225300/p15-sejnowski (inactive 2019-02-17).
8. ^ Reinforcement learning: An introduction (PDF). p. 130. Archived from the original (PDF) on 2017-07-12.
9. ^ Tesauro, Gerald (March 1995). "Temporal Difference Learning and TD-Gammon". Communications of the ACM. 38 (3): 58–68. doi:10.1145/203330.203343. Retrieved 2010-02-08.
10. ^ Schultz, W. (1998). "Predictive reward signal of dopamine neurons". Journal of Neurophysiology. 80 (1): 1–27. doi:10.1152/jn.1998.80.1.1. PMID 9658025.
11. ^ Dayan, P. (2001). "Motivated reinforcement learning" (PDF). Advances in Neural Information Processing Systems. MIT Press. 14: 11–18.
12. ^ Smith, A., Li, M., Becker, S. and Kapur, S. (2006). "Dopamine, prediction error, and associative learning: a model-based account". Network: Computation in Neural Systems. 17 (1): 61–84. doi:10.1080/09548980500361624. PMID 16613795.CS1 maint: Multiple names: authors list (link)

## Bibliography

Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.