# Q-learning

__: Model-free reinforcement learning algorithm__

**Short description**Machine learning and data mining |
---|

** Q-learning** is a model-free reinforcement learning algorithm to learn the value of an action in a particular state. It does not require a model of the environment (hence "model-free"), and it can handle problems with stochastic transitions and rewards without requiring adaptations.

^{[1]}

For any finite Markov decision process, *Q*-learning finds an optimal policy in the sense of maximizing the expected value of the total reward over any and all successive steps, starting from the current state.^{[2]} *Q*-learning can identify an optimal action-selection policy for any given finite Markov decision process, given infinite exploration time and a partly random policy.^{[2]} "Q" refers to the function that the algorithm computes – the expected rewards for an action taken in a given state.^{[3]}

## Reinforcement learning

Reinforcement learning involves an agent, a set of *states* [math]\displaystyle{ \mathcal{S} }[/math], and a set [math]\displaystyle{ \mathcal{A} }[/math] of *actions* per state. By performing an action [math]\displaystyle{ a \in \mathcal{A} }[/math], the agent transitions from state to state. Executing an action in a specific state provides the agent with a *reward* (a numerical score).

The goal of the agent is to maximize its total reward. It does this by adding the maximum reward attainable from future states to the reward for achieving its current state, effectively influencing the current action by the potential future reward. This potential reward is a weighted sum of expected values of the rewards of all future steps starting from the current state.^{[1]}

As an example, consider the process of boarding a train, in which the reward is measured by the negative of the total time spent boarding (alternatively, the cost of boarding the train is equal to the boarding time). One strategy is to enter the train door as soon as they open, minimizing the initial wait time for yourself. If the train is crowded, however, then you will have a slow entry after the initial action of entering the door as people are fighting you to depart the train as you attempt to board. The total boarding time, or cost, is then:

- 0 seconds wait time + 15 seconds fight time

On the next day, by random chance (exploration), you decide to wait and let other people depart first. This initially results in a longer wait time. However, less time is spent fighting the departing passengers. Overall, this path has a higher reward than that of the previous day, since the total boarding time is now:

- 5 second wait time + 0 second fight time

Through exploration, despite the initial (patient) action resulting in a larger cost (or negative reward) than in the forceful strategy, the overall cost is lower, thus revealing a more rewarding strategy.

## Algorithm

After [math]\displaystyle{ \Delta t }[/math] steps into the future the agent will decide some next step. The weight for this step is calculated as [math]\displaystyle{ \gamma^{\Delta t} }[/math], where [math]\displaystyle{ \gamma }[/math] (the *discount factor*) is a number between 0 and 1 ([math]\displaystyle{ 0 \le \gamma \le 1 }[/math]). Assuming [math]\displaystyle{ \gamma \lt 1 }[/math], it has the effect of valuing rewards received earlier higher than those received later (reflecting the value of a "good start"). [math]\displaystyle{ \gamma }[/math] may also be interpreted as the probability to succeed (or survive) at every step [math]\displaystyle{ \Delta t }[/math].

The algorithm, therefore, has a function that calculates the quality of a state–action combination:

- [math]\displaystyle{ Q: \mathcal{S} \times \mathcal{A} \to \mathbb{R} }[/math].

Before learning begins, [math]\displaystyle{ Q }[/math] is initialized to a possibly arbitrary fixed value (chosen by the programmer). Then, at each time [math]\displaystyle{ t }[/math] the agent selects an action [math]\displaystyle{ A_t }[/math], observes a reward [math]\displaystyle{ R_{t+1} }[/math], enters a new state [math]\displaystyle{ S_{t+1} }[/math] (that may depend on both the previous state [math]\displaystyle{ S_t }[/math] and the selected action), and [math]\displaystyle{ Q }[/math] is updated. The core of the algorithm is a Bellman equation as a simple value iteration update, using the weighted average of the current value and the new information:^{[4]}

- [math]\displaystyle{ Q^{new}(S_{t},A_{t}) \leftarrow (1 - \underbrace{\alpha}_{\text{learning rate}}) \cdot \underbrace{Q(S_{t},A_{t})}_{\text{current value}} + \underbrace{\alpha}_{\text{learning rate}} \cdot \bigg( \underbrace{\underbrace{R_{t+1}}_{\text{reward}} + \underbrace{\gamma}_{\text{discount factor}} \cdot \underbrace{\max_{a}Q(S_{t+1}, a)}_{\text{estimate of optimal future value}}}_{\text{new value (temporal difference target)}} \bigg) }[/math]

where *[math]\displaystyle{ R_{t+1} }[/math]* is the reward received when moving from the state [math]\displaystyle{ S_{t} }[/math] to the state [math]\displaystyle{ S_{t+1} }[/math], and [math]\displaystyle{ \alpha }[/math] is the learning rate [math]\displaystyle{ (0 \lt \alpha \le 1) }[/math].

Note that [math]\displaystyle{ Q^{new}(S_t,A_t) }[/math] is the sum of three factors:

- [math]\displaystyle{ (1 - \alpha)Q(S_t,A_t) }[/math]: the current value (weighted by one minus the learning rate)
- [math]\displaystyle{ \alpha \, R_{t+1} }[/math]: the reward [math]\displaystyle{ R_{t+1} }[/math] to obtain if action [math]\displaystyle{ A_t }[/math] is taken when in state [math]\displaystyle{ S_t }[/math] (weighted by learning rate)
- [math]\displaystyle{ \alpha \gamma \max_{a}Q(S_{t+1},a) }[/math]: the maximum reward that can be obtained from state [math]\displaystyle{ S_{t+1} }[/math](weighted by learning rate and discount factor)

An episode of the algorithm ends when state [math]\displaystyle{ S_{t+1} }[/math] is a final or *terminal state*. However, *Q*-learning can also learn in non-episodic tasks (as a result of the property of convergent infinite series). If the discount factor is lower than 1, the action values are finite even if the problem can contain infinite loops.

For all final states [math]\displaystyle{ s_f }[/math], [math]\displaystyle{ Q(s_f, a) }[/math] is never updated, but is set to the reward value [math]\displaystyle{ r }[/math] observed for state [math]\displaystyle{ s_f }[/math]. In most cases, [math]\displaystyle{ Q(s_f,a) }[/math] can be taken to equal zero.

## Influence of variables

### Learning rate

The learning rate or *step size* determines to what extent newly acquired information overrides old information. A factor of 0 makes the agent learn nothing (exclusively exploiting prior knowledge), while a factor of 1 makes the agent consider only the most recent information (ignoring prior knowledge to explore possibilities). In fully deterministic environments, a learning rate of [math]\displaystyle{ \alpha_t = 1 }[/math] is optimal. When the problem is stochastic, the algorithm converges under some technical conditions on the learning rate that require it to decrease to zero. In practice, often a constant learning rate is used, such as [math]\displaystyle{ \alpha_t = 0.1 }[/math] for all [math]\displaystyle{ t }[/math].^{[5]}

### Discount factor

The discount factor [math]\displaystyle{ \gamma }[/math] determines the importance of future rewards. A factor of 0 will make the agent "myopic" (or short-sighted) by only considering current rewards, i.e. [math]\displaystyle{ r_t }[/math] (in the update rule above), while a factor approaching 1 will make it strive for a long-term high reward. If the discount factor meets or exceeds 1, the action values may diverge. For [math]\displaystyle{ \gamma = 1 }[/math], without a terminal state, or if the agent never reaches one, all environment histories become infinitely long, and utilities with additive, undiscounted rewards generally become infinite.^{[6]} Even with a discount factor only slightly lower than 1, *Q*-function learning leads to propagation of errors and instabilities when the value function is approximated with an artificial neural network.^{[7]} In that case, starting with a lower discount factor and increasing it towards its final value accelerates learning.^{[8]}

### Initial conditions (*Q*_{0})

Since *Q*-learning is an iterative algorithm, it implicitly assumes an initial condition before the first update occurs. High initial values, also known as "optimistic initial conditions",^{[9]} can encourage exploration: no matter what action is selected, the update rule will cause it to have lower values than the other alternative, thus increasing their choice probability. The first reward [math]\displaystyle{ r }[/math] can be used to reset the initial conditions.^{[10]} According to this idea, the first time an action is taken the reward is used to set the value of [math]\displaystyle{ Q }[/math]. This allows immediate learning in case of fixed deterministic rewards. A model that incorporates *reset of initial conditions* (RIC) is expected to predict participants' behavior better than a model that assumes any *arbitrary initial condition* (AIC).^{[10]} RIC seems to be consistent with human behaviour in repeated binary choice experiments.^{[10]}

## Implementation

*Q*-learning at its simplest stores data in tables. This approach falters with increasing numbers of states/actions since the likelihood of the agent visiting a particular state and performing a particular action is increasingly small.

### Function approximation

*Q*-learning can be combined with function approximation.^{[11]} This makes it possible to apply the algorithm to larger problems, even when the state space is continuous.

One solution is to use an (adapted) artificial neural network as a function approximator.^{[12]} Another possibility is to integrate Fuzzy Rule Interpolation (FRI) and use sparse fuzzy rule-bases^{[13]} instead of discrete Q-tables or ANNs, which has the advantage of being a human-readable knowledge representation form. Function approximation may speed up learning in finite problems, due to the fact that the algorithm can generalize earlier experiences to previously unseen states.

### Quantization

Another technique to decrease the state/action space quantizes possible values. Consider the example of learning to balance a stick on a finger. To describe a state at a certain point in time involves the position of the finger in space, its velocity, the angle of the stick and the angular velocity of the stick. This yields a four-element vector that describes one state, i.e. a snapshot of one state encoded into four values. The problem is that infinitely many possible states are present. To shrink the possible space of valid actions multiple values can be assigned to a bucket. The exact distance of the finger from its starting position (-Infinity to Infinity) is not known, but rather whether it is far away or not (Near, Far).^{[14]}

## History

*Q*-learning was introduced by Chris Watkins in 1989.^{[15]} A convergence proof was presented by Watkins and Peter Dayan in 1992.^{[16]}

Watkins was addressing “Learning from delayed rewards”, the title of his PhD thesis. Eight years earlier in 1981 the same problem, under the name of “Delayed reinforcement learning”, was solved by Bozinovski's Crossbar Adaptive Array (CAA).^{[17]}^{[18]} The memory matrix [math]\displaystyle{ W = \|w(a,s)\| }[/math] was the same as the eight years later Q-table of Q-learning. The architecture introduced the term “state evaluation” in reinforcement learning. The crossbar learning algorithm, written in mathematical pseudocode in the paper, in each iteration performs the following computation:

- In state s perform action a;
- Receive consequence state s';
- Compute state evaluation [math]\displaystyle{ v(s') }[/math];
- Update crossbar value [math]\displaystyle{ w'(a,s) = w(a,s) + v(s') }[/math].

The term “secondary reinforcement” is borrowed from animal learning theory, to model state values via backpropagation: the state value [math]\displaystyle{ v(s') }[/math] of the consequence situation is backpropagated to the previously encountered situations. CAA computes state values vertically and actions horizontally (the "crossbar"). Demonstration graphs showing delayed reinforcement learning contained states (desirable, undesirable, and neutral states), which were computed by the state evaluation function. This learning system was a forerunner of the Q-learning algorithm.^{[19]}

In 2014, Google DeepMind patented^{[20]} an application of Q-learning to deep learning, titled "deep reinforcement learning" or "deep Q-learning" that can play Atari 2600 games at expert human levels.

## Variants

### Deep Q-learning

The DeepMind system used a deep convolutional neural network, with layers of tiled convolutional filters to mimic the effects of receptive fields. Reinforcement learning is unstable or divergent when a nonlinear function approximator such as a neural network is used to represent Q. This instability comes from the correlations present in the sequence of observations, the fact that small updates to Q may significantly change the policy of the agent and the data distribution, and the correlations between Q and the target values. The method can be used for stochastic search in various domains and applications.^{[1]}^{[21]}

The technique used *experience replay,* a biologically inspired mechanism that uses a random sample of prior actions instead of the most recent action to proceed.^{[3]} This removes correlations in the observation sequence and smooths changes in the data distribution. Iterative updates adjust Q towards target values that are only periodically updated, further reducing correlations with the target.^{[22]}

### Double Q-learning

Because the future maximum approximated action value in Q-learning is evaluated using the same Q function as in current action selection policy, in noisy environments Q-learning can sometimes overestimate the action values, slowing the learning. A variant called Double Q-learning was proposed to correct this. Double Q-learning^{[23]} is an off-policy reinforcement learning algorithm, where a different policy is used for value evaluation than what is used to select the next action.

In practice, two separate value functions [math]\displaystyle{ Q^A }[/math] and [math]\displaystyle{ Q^B }[/math] are trained in a mutually symmetric fashion using separate experiences. The double Q-learning update step is then as follows:

- [math]\displaystyle{ Q^A_{t+1}(s_{t}, a_{t}) = Q^A_{t}(s_{t}, a_{t}) + \alpha_{t}(s_{t}, a_{t}) \left(r_{t} + \gamma Q^B_{t}\left(s_{t+1}, \mathop\operatorname{arg~max}_{a} Q^A_t(s_{t+1}, a)\right) - Q^A_{t}(s_{t}, a_{t})\right) }[/math], and
- [math]\displaystyle{ Q^B_{t+1}(s_{t}, a_{t}) = Q^B_{t}(s_{t}, a_{t}) + \alpha_{t}(s_{t}, a_{t}) \left(r_{t} + \gamma Q^A_{t}\left(s_{t+1}, \mathop\operatorname{arg~max}_{a} Q^B_t(s_{t+1}, a)\right) - Q^B_{t}(s_{t}, a_{t})\right). }[/math]

Now the estimated value of the discounted future is evaluated using a different policy, which solves the overestimation issue.

This algorithm was later modified in 2015 and combined with deep learning,^{[24]} as in the DQN algorithm, resulting in Double DQN, which outperforms the original DQN algorithm.^{[25]}

### Others

Delayed Q-learning is an alternative implementation of the online *Q*-learning algorithm, with probably approximately correct (PAC) learning.^{[26]}

Greedy GQ is a variant of *Q*-learning to use in combination with (linear) function approximation.^{[27]} The advantage of Greedy GQ is that convergence is guaranteed even when function approximation is used to estimate the action values.

Distributional Q-learning is a variant of *Q*-learning which seeks to model the distribution of returns rather than the expected return of each action. It has been observed to facilitate estimate by deep neural networks and can enable alternative control methods, such as risk-sensitive control.^{[28]}

### Multi-agent learning

Q-learning has been proposed in the multi-agent setting (see Section 4.1.2 in ^{[29]}). One approach consists in pretending the environment is passive.^{[30]} Littman proposes the minimax Q learning algorithm.^{[31]}

## Limitations

The standard Q-learning algorithm (using a [math]\displaystyle{ Q }[/math] table) applies only to discrete action and state spaces. Discretization of these values leads to inefficient learning, largely due to the curse of dimensionality. However, there are adaptations of Q-learning that attempt to solve this problem such as Wire-fitted Neural Network Q-Learning.^{[32]}

## See also

## References

- ↑
^{1.0}^{1.1}^{1.2}Li, Shengbo (2023).*Reinforcement Learning for Sequential Decision and Optimal Control*(First ed.). Springer Verlag, Singapore. pp. 1–460. doi:10.1007/978-981-19-7784-8. ISBN 978-9-811-97783-1. https://link.springer.com/book/10.1007/978-981-19-7784-8. - ↑
^{2.0}^{2.1}Melo, Francisco S.. "Convergence of Q-learning: a simple proof". http://users.isr.ist.utl.pt/~mtjspaan/readingGroup/ProofQlearning.pdf. - ↑
^{3.0}^{3.1}Matiisen, Tambet (December 19, 2015). "Demystifying Deep Reinforcement Learning" (in en-US). Computational Neuroscience Lab. http://neuro.cs.ut.ee/demystifying-deep-reinforcement-learning/. - ↑ Dietterich, Thomas G. (21 May 1999). "Hierarchical Reinforcement Learning with the MAXQ Value Function Decomposition". arXiv:cs/9905014.
- ↑ Sutton, Richard; Barto, Andrew (1998).
*Reinforcement Learning: An Introduction*. MIT Press. http://incompleteideas.net/sutton/book/ebook/the-book.html. - ↑ Russell, Stuart J.; Norvig, Peter (2010).
*Artificial Intelligence: A Modern Approach*(Third ed.). Prentice Hall. p. 649. ISBN 978-0136042594. - ↑ Baird, Leemon (1995). "Residual algorithms: Reinforcement learning with function approximation".
*ICML*: 30–37. http://www.leemon.com/papers/1995b.pdf. - ↑ François-Lavet, Vincent; Fonteneau, Raphael; Ernst, Damien (2015-12-07). "How to Discount Deep Reinforcement Learning: Towards New Dynamic Strategies". arXiv:1512.02011 [cs.LG].
- ↑ Sutton, Richard S.; Barto, Andrew G.. "2.7 Optimistic Initial Values".
*Reinforcement Learning: An Introduction*. http://webdocs.cs.ualberta.ca/~sutton/book/ebook/node21.html. Retrieved 2013-07-18. - ↑
^{10.0}^{10.1}^{10.2}Shteingart, Hanan; Neiman, Tal; Loewenstein, Yonatan (May 2013). "The role of first impression in operant learning." (in en).*Journal of Experimental Psychology: General***142**(2): 476–488. doi:10.1037/a0029550. ISSN 1939-2222. PMID 22924882. http://ratio.huji.ac.il/sites/default/files/publications/dp626.pdf. - ↑ Hasselt, Hado van (5 March 2012). "Reinforcement Learning in Continuous State and Action Spaces".
*Reinforcement Learning: State-of-the-Art*. Springer Science & Business Media. pp. 207–251. ISBN 978-3-642-27645-3. https://books.google.com/books?id=YPjNuvrJR0MC. - ↑ Tesauro, Gerald (March 1995). "Temporal Difference Learning and TD-Gammon".
*Communications of the ACM***38**(3): 58–68. doi:10.1145/203330.203343. http://www.bkgm.com/articles/tesauro/tdl.html. Retrieved 2010-02-08. - ↑ Vincze, David (2017). "Fuzzy rule interpolation and reinforcement learning".
*2017 IEEE 15th International Symposium on Applied Machine Intelligence and Informatics (SAMI)*. IEEE. pp. 173–178. doi:10.1109/SAMI.2017.7880298. ISBN 978-1-5090-5655-2. http://users.iit.uni-miskolc.hu/~vinczed/research/vinczed_sami2017_author_draft.pdf. - ↑ Krishnan, Srivatsan; Lam, Maximilian; Chitlangia, Sharad; Wan, Zishen; Barth-Maron, Gabriel; Faust, Aleksandra; Reddi, Vijay Janapa (13 November 2022). "QuaRL: Quantization for Fast and Environmentally Sustainable Reinforcement Learning". arXiv:1910.01055 [cs.LG].
- ↑ Watkins, C.J.C.H. (1989).
*Learning from Delayed Rewards*(PDF) (Ph.D. thesis). University of Cambridge. EThOS uk.bl.ethos.330022. - ↑ Watkins, Chris; Dayan, Peter (1992). "Q-learning".
*Machine Learning***8**(3–4): 279–292. doi:10.1007/BF00992698. - ↑ Bozinovski, S. (15 July 1999). "Crossbar Adaptive Array: The first connectionist network that solved the delayed reinforcement learning problem".
*Artificial Neural Nets and Genetic Algorithms: Proceedings of the International Conference in Portorož, Slovenia, 1999*. Springer Science & Business Media. pp. 320–325. ISBN 978-3-211-83364-3. https://books.google.com/books?id=clKwynlfZYkC&pg=PA320-325. - ↑ Bozinovski, S. (1982). "A self learning system using secondary reinforcement". in Trappl, Robert.
*Cybernetics and Systems Research: Proceedings of the Sixth European Meeting on Cybernetics and Systems Research*. North Holland. pp. 397–402. ISBN 978-0-444-86488-8. https://books.google.com/books?id=mGtQAAAAMAAJ&pg=PA397. - ↑ Barto, A. (24 February 1997). "Reinforcement learning".
*Neural Systems for Control*. Elsevier. ISBN 978-0-08-053739-9. https://books.google.com/books?id=oLcAiySCow0C. - ↑ "Methods and Apparatus for Reinforcement Learning, US Patent #20150100530A1". US Patent Office. 9 April 2015. https://patentimages.storage.googleapis.com/71/91/4a/c5cf4ffa56f705/US20150100530A1.pdf.
- ↑ Matzliach B.; Ben-Gal I.; Kagan E. (2022). "Detection of Static and Mobile Targets by an Autonomous Agent with Deep Q-Learning Abilities".
*Entropy***24**(8): 1168. doi:10.3390/e24081168. PMID 36010832. PMC 9407070. Bibcode: 2022Entrp..24.1168M. http://www.eng.tau.ac.il/~bengal/DeepQ_MBK_2023.pdf. - ↑ Mnih, Volodymyr; Kavukcuoglu, Koray; Silver, David; Rusu, Andrei A.; Veness, Joel; Bellemare, Marc G.; Graves, Alex; Riedmiller, Martin
*et al*. (Feb 2015). "Human-level control through deep reinforcement learning" (in en).*Nature***518**(7540): 529–533. doi:10.1038/nature14236. ISSN 0028-0836. PMID 25719670. Bibcode: 2015Natur.518..529M. - ↑ van Hasselt, Hado (2011). "Double Q-learning" (PDF).
*Advances in Neural Information Processing Systems***23**: 2613–2622. http://papers.nips.cc/paper/3964-double-q-learning. - ↑ van Hasselt, Hado; Guez, Arthur; Silver, David (8 December 2015). "Deep Reinforcement Learning with Double Q-learning". arXiv:1509.06461 [cs.LG].
- ↑ van Hasselt, Hado; Guez, Arthur; Silver, David (2015). "Deep reinforcement learning with double Q-learning" (PDF).
*AAAI Conference on Artificial Intelligence*: 2094–2100. https://www.aaai.org/ocs/index.php/AAAI/AAAI16/paper/download/12389/11847. - ↑ Strehl, Alexander L.; Li, Lihong; Wiewiora, Eric; Langford, John; Littman, Michael L. (2006). "Pac model-free reinforcement learning".
*Proc. 22nd ICML*: 881–888. https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/published-14.pdf. - ↑ Maei, Hamid; Szepesvári, Csaba; Bhatnagar, Shalabh; Sutton, Richard (2010). "Toward off-policy learning control with function approximation in Proceedings of the 27th International Conference on Machine Learning". pp. 719–726. https://webdocs.cs.ualberta.ca/~sutton/papers/MSBS-10.pdf.
- ↑ Hessel, Matteo; Modayil, Joseph; van Hasselt, Hado; Schaul, Tom; Ostrovski, Georg; Dabney, Will; Horgan, Dan; Piot, Bilal
*et al*. (February 2018). "Rainbow: Combining Improvements in Deep Reinforcement Learning".*AAAI Conference on Artificial Intelligence***32**. doi:10.1609/aaai.v32i1.11796. - ↑ Shoham, Yoav; Powers, Rob; Grenager, Trond (1 May 2007). "If multi-agent learning is the answer, what is the question?".
*Artificial Intelligence***171**(7): 365–377. doi:10.1016/j.artint.2006.02.006. ISSN 0004-3702. https://dl.acm.org/doi/10.1016/j.artint.2006.02.006. Retrieved 4 April 2023. - ↑ Sen, Sandip; Sekaran, Mahendra; Hale, John (1 August 1994). "Learning to coordinate without sharing information".
*Proceedings of the Twelfth AAAI National Conference on Artificial Intelligence*(AAAI Press): 426–431. https://dl.acm.org/doi/10.5555/2891730.2891796. Retrieved 4 April 2023. - ↑ Littman, Michael L. (10 July 1994). "Markov games as a framework for multi-agent reinforcement learning".
*Proceedings of the Eleventh International Conference on International Conference on Machine Learning*(Morgan Kaufmann Publishers Inc.): 157–163. ISBN 9781558603356. https://dl.acm.org/doi/10.5555/3091574.3091594. Retrieved 4 April 2023. - ↑ Gaskett, Chris; Wettergreen, David; Zelinsky, Alexander (1999). "Q-Learning in Continuous State and Action Spaces". http://users.cecs.anu.edu.au/~rsl/rsl_papers/99ai.kambara.pdf.

## External links

- Watkins, C.J.C.H. (1989). Learning from Delayed Rewards. PhD thesis, Cambridge University, Cambridge, England.
- Strehl, Li, Wiewiora, Langford, Littman (2006). PAC model-free reinforcement learning
*Reinforcement Learning: An Introduction*by Richard Sutton and Andrew S. Barto, an online textbook. See "6.5 Q-Learning: Off-Policy TD Control".- Piqle: a Generic Java Platform for Reinforcement Learning
- Reinforcement Learning Maze, a demonstration of guiding an ant through a maze using
*Q*-learning *Q*-learning work by Gerald Tesauro

Original source: https://en.wikipedia.org/wiki/Q-learning.
Read more |