<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>Approximate Solution Methods on Massimo Nocentini</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/</link><description>Recent content in Approximate Solution Methods on Massimo Nocentini</description><generator>Hugo</generator><language>en-US</language><atom:link href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/index.xml" rel="self" type="application/rss+xml"/><item><title>On-policy Prediction with Approximation</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/09-prediction-approx/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/09-prediction-approx/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;A table cannot generalize.&lt;/span&gt; Every method of Part I, up to the Dyna and tree-search planners of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-1/08-planning/"&gt;Chapter&amp;nbsp;8&lt;/a&gt;, stores one number per state (or per state–action pair), and learning about one state teaches nothing about any other. In a game of backgammon, a camera image or a robot&amp;rsquo;s sensor readings, almost every state the agent meets is new, so this is no longer a question of memory alone: a table would never be filled. In this chapter we replace the table by a parameterized function &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mo&gt;^&lt;/mo&gt;&lt;/mover&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;𝐰&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;v&lt;/mi&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\hat v(s, \mathbf{w}) \approx v_\pi(s)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; with a weight vector &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐰&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{w} \in \mathbb{R}^d&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mo&gt;≪&lt;/mo&gt;&lt;mi mathvariant="normal"&gt;∣&lt;/mi&gt;&lt;mi&gt;𝒮&lt;/mi&gt;&lt;mi mathvariant="normal"&gt;∣&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;d \ll |\mathcal{S}|&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; and ask what happens to the prediction problem of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-1/06-td/"&gt;Chapter&amp;nbsp;6&lt;/a&gt; when changing one weight changes the estimated value of many states at once.&lt;label for="sn-c64f94-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-c64f94-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="sutton2018"&gt;Richard S. Sutton and Andrew G. Barto. &lt;cite&gt;Reinforcement Learning: An Introduction&lt;/cite&gt;. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA, second edition, 2018. ISBN 978-0-262-03924-6. URL &lt;a href="http://incompleteideas.net/book/the-book-2nd.html"&gt;http://incompleteideas.net/book/the-book-2nd.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; The answer has three parts: an objective that says which errors matter, the &lt;em&gt;semi-gradient&lt;/em&gt; methods that bootstrap towards it, and, for linear functions, a complete theory of where semi-gradient TD converges and how far that point can be from the best possible one.&lt;/p&gt;</description></item><item><title>On-policy Control with Approximation</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/10-control-approx/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/10-control-approx/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Control with a function approximator&lt;/span&gt; looks at first like a routine extension of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/09-prediction-approx/"&gt;Chapter&amp;nbsp;9&lt;/a&gt;: approximate action values &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mover accent="true"&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mo&gt;^&lt;/mo&gt;&lt;/mover&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;𝐰&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo&gt;≈&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;q&lt;/mi&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/msub&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\hat q(s, a, \mathbf{w}) \approx q_\pi(s, a)&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; instead of state values, act &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ε&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\varepsilon&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-greedily with respect to them, and let generalized policy iteration do the rest.&lt;label for="sn-ed8bb6-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-ed8bb6-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="sutton2018"&gt;Richard S. Sutton and Andrew G. Barto. &lt;cite&gt;Reinforcement Learning: An Introduction&lt;/cite&gt;. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA, second edition, 2018. ISBN 978-0-262-03924-6. URL &lt;a href="http://incompleteideas.net/book/the-book-2nd.html"&gt;http://incompleteideas.net/book/the-book-2nd.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt; For episodic tasks this is exactly what we do, and the result is semi-gradient Sarsa. For continuing tasks the extension forces a surprising retreat. Once states can no longer be told apart, the discounted formulation stops defining a sensible problem: averaged over the states the policy visits, the discounted value of &lt;em&gt;every&lt;/em&gt; policy is its average reward divided by &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mn&gt;1&lt;/mn&gt;&lt;mo&gt;−&lt;/mo&gt;&lt;mi&gt;γ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;1 - \gamma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; whatever &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;γ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\gamma&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; is. We therefore replace discounting by the &lt;strong&gt;average-reward&lt;/strong&gt; setting, with &lt;em&gt;differential&lt;/em&gt; returns, values, Bellman equations and TD errors. This chapter develops both halves and proves the facts on which the change of setting rests.&lt;/p&gt;</description></item><item><title>Off-policy Methods with Approximation</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/11-offpolicy-approx/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/11-offpolicy-approx/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Tabular Q-learning makes&lt;/span&gt; off-policy learning look easy: learn about the greedy policy while behaving in any sufficiently exploratory way, and convergence is guaranteed. &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/10-control-approx/"&gt;Chapter&amp;nbsp;10&lt;/a&gt; carried on-policy control over to function approximation and stopped short of Q-learning. With function approximation the off-policy idea becomes treacherous. The difficulty has two parts. The first, already met in the tabular case, concerns the &lt;em&gt;targets&lt;/em&gt; of the updates: returns generated by a behavior policy &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; must be corrected, by importance sampling or by expectations, to say something about a target policy &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt; The second part is new and is the real subject of this chapter. It concerns the &lt;em&gt;distribution&lt;/em&gt; of the updates. In &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/09-prediction-approx/"&gt;Chapter&amp;nbsp;9&lt;/a&gt; the stability of semi-gradient TD rested, silently, on the fact that states were updated in proportion to how often &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; visits them. Off-policy, they are updated as often as &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;b&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;b&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; visits them, and that is enough to make the simplest linear TD method diverge. We first locate the mechanism of divergence exactly, in one matrix inequality; then we look at the geometry of linear value functions to see which objectives could be optimized instead; and we end with the two families of stable algorithms, Gradient-TD and Emphatic-TD, that this analysis produces.&lt;label for="sn-08c79b-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-08c79b-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="sutton2018"&gt;Richard S. Sutton and Andrew G. Barto. &lt;cite&gt;Reinforcement Learning: An Introduction&lt;/cite&gt;. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA, second edition, 2018. ISBN 978-0-262-03924-6. URL &lt;a href="http://incompleteideas.net/book/the-book-2nd.html"&gt;http://incompleteideas.net/book/the-book-2nd.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Eligibility Traces</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/12-traces/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/12-traces/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;An eligibility trace is&lt;/span&gt; the mechanism that turns the one-step methods of the last three chapters into multi-step ones without waiting for the future: a short-term memory vector &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;𝐳&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{z}_t \in \mathbb{R}^d&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; that runs alongside the long-term weight vector &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;msub&gt;&lt;mi&gt;𝐰&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{w}_t&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;.&lt;/span&gt; When a component of &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐰&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{w}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; helps to produce an estimate, the matching component of &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝐳&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\mathbf{z}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; is bumped up and then fades; if a TD error arrives before it has faded, that component learns. The &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-step methods of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-1/07-nstep/"&gt;Chapter&amp;nbsp;7&lt;/a&gt; already interpolate between one-step TD and Monte Carlo, but they must store the last &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; feature vectors and they learn &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; steps late. A trace needs one vector and learns at once. The chapter develops one idea in several layers. First we define an ideal &lt;em&gt;forward view&lt;/em&gt;, the &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-return, which looks ahead from each state to a geometric mixture of all &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;n&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;n&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-step returns. Then we find &lt;em&gt;backward views&lt;/em&gt;, algorithms that look back from the current TD error along the trace, and prove that they implement the forward view, approximately for TD(&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt; and exactly for true online TD(&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;).&lt;/span&gt; Finally we generalize the forward view, to variable bootstrapping and discounting and to off-policy data, and read off the corresponding traces.&lt;label for="sn-6eb703-1" class="margin-toggle sidenote-number"&gt;&lt;/label&gt;&lt;input type="checkbox" id="sn-6eb703-1" class="margin-toggle"/&gt;&lt;span class="sidenote citation"&gt;&lt;span class="bib-entry" data-cite="sutton2018"&gt;Richard S. Sutton and Andrew G. Barto. &lt;cite&gt;Reinforcement Learning: An Introduction&lt;/cite&gt;. Adaptive Computation and Machine Learning. MIT Press, Cambridge, MA, second edition, 2018. ISBN 978-0-262-03924-6. URL &lt;a href="http://incompleteideas.net/book/the-book-2nd.html"&gt;http://incompleteideas.net/book/the-book-2nd.html&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;</description></item><item><title>Policy Gradient Methods</title><link>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/13-policy-gradient/</link><dc:creator>Massimo Nocentini</dc:creator><guid>https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/13-policy-gradient/</guid><description>&lt;p&gt;&lt;span class="newthought"&gt;Every control method so far&lt;/span&gt;, up to the Sarsa(&lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;λ&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\lambda&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;)&lt;/span&gt; of &lt;a class="xref" href="https://massimo-nocentini.github.io/book/reinforcement-learning/part-2/12-traces/"&gt;Chapter&amp;nbsp;12&lt;/a&gt;, has been built on action values: learn &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;Q&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;Q&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; then act greedily or &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;ε&lt;/mi&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\varepsilon&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;-greedily with respect to it, so that the policy exists only as a by-product of the value estimates. This chapter turns the construction around. The policy itself becomes the object of learning, a differentiable function &lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;π&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;mo&gt;≐&lt;/mo&gt;&lt;mi&gt;Pr&lt;/mi&gt;&lt;mo&gt;⁡&lt;/mo&gt;&lt;mo stretchy="false"&gt;{&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;A&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;a&lt;/mi&gt;&lt;mo&gt;∣&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;S&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;s&lt;/mi&gt;&lt;mo separator="true"&gt;,&lt;/mo&gt;&lt;msub&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mi&gt;t&lt;/mi&gt;&lt;/msub&gt;&lt;mo&gt;=&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo stretchy="false"&gt;}&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\pi(a \mid s, \boldsymbol{\theta}) \doteq \Pr\{A_t = a \mid S_t = s, \boldsymbol{\theta}_t = \boldsymbol{\theta}\}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt; of a parameter &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo&gt;∈&lt;/mo&gt;&lt;msup&gt;&lt;mi&gt;ℝ&lt;/mi&gt;&lt;msup&gt;&lt;mi&gt;d&lt;/mi&gt;&lt;mo mathvariant="normal" lspace="0em" rspace="0em"&gt;′&lt;/mo&gt;&lt;/msup&gt;&lt;/msup&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;\boldsymbol{\theta} \in \mathbb{R}^{d&amp;#x27;}&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;,&lt;/span&gt; and it is improved by &lt;strong&gt;stochastic gradient ascent&lt;/strong&gt;&lt;span class="index-anchor" data-index="policy gradient method"&gt;&lt;/span&gt; on a scalar performance measure &lt;span class="tufte-nobr"&gt;&lt;span class="katex tufte-math-euler"&gt;&lt;span class="katex-mathml"&gt;&lt;math xmlns="http://www.w3.org/1998/Math/MathML"&gt;&lt;semantics&gt;&lt;mrow&gt;&lt;mi&gt;J&lt;/mi&gt;&lt;mo stretchy="false"&gt;(&lt;/mo&gt;&lt;mi&gt;𝜽&lt;/mi&gt;&lt;mo stretchy="false"&gt;)&lt;/mo&gt;&lt;/mrow&gt;&lt;annotation encoding="application/x-tex"&gt;J(\boldsymbol{\theta})&lt;/annotation&gt;&lt;/semantics&gt;&lt;/math&gt;&lt;/span&gt;&lt;/span&gt;:&lt;/span&gt;&lt;/p&gt;</description></item></channel></rss>