Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Reinforcement learning
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Value function === {{see also|Value function}} Value function approaches attempt to find a policy that maximizes the discounted return by maintaining a set of estimates of expected discounted returns <math>\operatorname \mathbb{E}[G]</math> for some policy (usually either the "current" [on-policy] or the optimal [off-policy] one). These methods rely on the theory of Markov decision processes, where optimality is defined in a sense stronger than the one above: A policy is optimal if it achieves the best-expected discounted return from ''any'' initial state (i.e., initial distributions play no role in this definition). Again, an optimal policy can always be found among stationary policies. To define optimality in a formal manner, define the state-value of a policy <math>\pi</math> by :<math> V^{\pi} (s) = \operatorname \mathbb{E}[G\mid s,\pi],</math> where <math>G</math> stands for the discounted return associated with following <math>\pi</math> from the initial state <math>s</math>. Defining <math>V^*(s)</math> as the maximum possible state-value of <math>V^\pi(s)</math>, where <math>\pi</math> is allowed to change, :<math>V^*(s) = \max_\pi V^\pi(s).</math> A policy that achieves these optimal state-values in each state is called ''optimal''. Clearly, a policy that is optimal in this sense is also optimal in the sense that it maximizes the expected discounted return, since <math>V^*(s) = \max_\pi \mathbb{E}[G\mid s,\pi]</math>, where <math>s</math> is a state randomly sampled from the distribution <math>\mu</math> of initial states (so <math>\mu(s) = \Pr(S_0 = s)</math>). Although state-values suffice to define optimality, it is useful to define action-values. Given a state <math>s</math>, an action <math>a</math> and a policy <math>\pi</math>, the action-value of the pair <math>(s,a)</math> under <math>\pi</math> is defined by :<math>Q^\pi(s,a) = \operatorname \mathbb{E}[G\mid s,a,\pi],\,</math> where <math>G</math> now stands for the random discounted return associated with first taking action <math>a</math> in state <math>s</math> and following <math>\pi</math>, thereafter. The theory of Markov decision processes states that if <math>\pi^*</math> is an optimal policy, we act optimally (take the optimal action) by choosing the action from <math>Q^{\pi^*}(s,\cdot)</math> with the highest action-value at each state, <math>s</math>. The ''action-value function'' of such an optimal policy (<math>Q^{\pi^*}</math>) is called the ''optimal action-value function'' and is commonly denoted by <math>Q^*</math>. In summary, the knowledge of the optimal action-value function alone suffices to know how to act optimally. Assuming full knowledge of the Markov decision process, the two basic approaches to compute the optimal action-value function are [[value iteration]] and [[policy iteration]]. Both algorithms compute a sequence of functions <math>Q_k</math> (<math>k=0,1,2,\ldots</math>) that converge to <math>Q^*</math>. Computing these functions involves computing expectations over the whole state-space, which is impractical for all but the smallest (finite) Markov decision processes. In reinforcement learning methods, expectations are approximated by averaging over samples and using function approximation techniques to cope with the need to represent value functions over large state-action spaces. ==== Monte Carlo methods ==== [[Monte Carlo sampling|Monte Carlo methods]]<ref>{{Cite journal |last1=Singh |first1=Satinder P. |last2=Sutton |first2=Richard S. |date=1996-03-01 |title=Reinforcement learning with replacing eligibility traces |url=https://link.springer.com/article/10.1007/BF00114726 |journal=Machine Learning |language=en |volume=22 |issue=1 |pages=123–158 |doi=10.1007/BF00114726 |issn=1573-0565}}</ref> are used to solve reinforcement learning problems by averaging sample returns. Unlike methods that require full knowledge of the environment's dynamics, Monte Carlo methods rely solely on actual or [[Simulation|simulated]] experience—sequences of states, actions, and rewards obtained from interaction with an environment. This makes them applicable in situations where the complete dynamics are unknown. Learning from actual experience does not require prior knowledge of the environment and can still lead to optimal behavior. When using simulated experience, only a model capable of generating sample transitions is required, rather than a full specification of [[Markov chain|transition probabilities]], which is necessary for [[dynamic programming]] methods. Monte Carlo methods apply to episodic tasks, where experience is divided into episodes that eventually terminate. Policy and value function updates occur only after the completion of an episode, making these methods incremental on an episode-by-episode basis, though not on a step-by-step (online) basis. The term "Monte Carlo" generally refers to any method involving [[random sampling]]; however, in this context, it specifically refers to methods that compute averages from ''complete'' returns, rather than ''partial'' returns. These methods function similarly to the [[Multi-armed bandit|bandit algorithms]], in which returns are averaged for each state-action pair. The key difference is that actions taken in one state affect the returns of subsequent states within the same episode, making the problem [[non-stationary]]. To address this non-stationarity, Monte Carlo methods use the framework of general policy iteration (GPI). While dynamic programming computes [[value function]]s using full knowledge of the [[Markov decision process]] (MDP), Monte Carlo methods learn these functions through sample returns. The value functions and policies interact similarly to dynamic programming to achieve [[Mathematical optimization|optimality]], first addressing the prediction problem and then extending to policy improvement and control, all based on sampled experience.<ref name=":0" /> ==== Temporal difference methods ==== {{Main|Temporal difference learning}} The first problem is corrected by allowing the procedure to change the policy (at some or all states) before the values settle. This too may be problematic as it might prevent convergence. Most current algorithms do this, giving rise to the class of ''generalized policy iteration'' algorithms. Many [[Actor-critic algorithm|''actor-critic'' methods]] belong to this category. The second issue can be corrected by allowing trajectories to contribute to any state-action pair in them. This may also help to some extent with the third problem, although a better solution when returns have high variance is Sutton's [[temporal difference]] (TD) methods that are based on the recursive [[Bellman equation]].<ref>{{cite thesis|last = Sutton|first = Richard S.|title = Temporal Credit Assignment in Reinforcement Learning|degree = PhD|publisher = University of Massachusetts, Amherst, MA|url = http://incompleteideas.net/sutton/publications.html#PhDthesis|author-link = Richard S. Sutton|year = 1984|access-date = 2017-03-29|archive-date = 2017-03-30|archive-url = https://web.archive.org/web/20170330002227/http://incompleteideas.net/sutton/publications.html#PhDthesis|url-status = dead}}</ref>{{sfn|Sutton|Barto|2018|loc=[http://incompleteideas.net/sutton/book/ebook/node60.html §6. Temporal-Difference Learning]}} The computation in TD methods can be incremental (when after each transition the memory is changed and the transition is thrown away), or batch (when the transitions are batched and the estimates are computed once based on the batch). Batch methods, such as the least-squares temporal difference method,<ref>{{cite journal | doi = 10.1023/A:1018056104778 | last1 = Bradtke | first1 = Steven J. | author-link1 = Steven J. Bradtke | last2 = Barto | first2 = Andrew G. | author-link2 = Andrew G. Barto | title = Learning to predict by the method of temporal differences | journal = Machine Learning | volume = 22 | pages = 33–57 | year = 1996 | citeseerx = 10.1.1.143.857 | s2cid = 20327856 }}</ref> may use the information in the samples better, while incremental methods are the only choice when batch methods are infeasible due to their high computational or memory complexity. Some methods try to combine the two approaches. Methods based on temporal differences also overcome the fourth issue. Another problem specific to TD comes from their reliance on the recursive Bellman equation. Most TD methods have a so-called <math>\lambda</math> parameter <math>(0\le \lambda\le 1)</math> that can continuously interpolate between Monte Carlo methods that do not rely on the Bellman equations and the basic TD methods that rely entirely on the Bellman equations. This can be effective in palliating this issue. ==== Function approximation methods ==== In order to address the fifth issue, ''function approximation methods'' are used. ''Linear function approximation'' starts with a mapping <math>\phi</math> that assigns a finite-dimensional vector to each state-action pair. Then, the action values of a state-action pair <math>(s,a)</math> are obtained by linearly combining the components of <math>\phi(s,a)</math> with some ''weights'' <math>\theta</math>: :<math>Q(s,a) = \sum_{i=1}^d \theta_i \phi_i(s,a).</math> The algorithms then adjust the weights, instead of adjusting the values associated with the individual state-action pairs. Methods based on ideas from [[nonparametric statistics]] (which can be seen to construct their own features) have been explored. Value iteration can also be used as a starting point, giving rise to the [[Q-learning]] algorithm and its many variants.<ref>{{cite thesis | last = Watkins | first = Christopher J.C.H. | author-link = Christopher J.C.H. Watkins | degree= PhD | title= Learning from Delayed Rewards | year= 1989 | publisher = King's College, Cambridge, UK | url= http://www.cs.rhul.ac.uk/~chrisw/new_thesis.pdf}}</ref> Including Deep Q-learning methods when a neural network is used to represent Q, with various applications in stochastic search problems.<ref name="MBK">{{Cite journal |title = Detection of Static and Mobile Targets by an Autonomous Agent with Deep Q-Learning Abilities | journal=Entropy | year=2022 | volume=24 | issue=8 | page=1168 | doi=10.3390/e24081168 | pmid=36010832 | pmc=9407070 | bibcode=2022Entrp..24.1168M | doi-access=free | last1=Matzliach | first1=Barouch | last2=Ben-Gal | first2=Irad | last3=Kagan | first3=Evgeny }}</ref> The problem with using action-values is that they may need highly precise estimates of the competing action values that can be hard to obtain when the returns are noisy, though this problem is mitigated to some extent by temporal difference methods. Using the so-called compatible function approximation method compromises generality and efficiency.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)