import{s as U,n as B,o as j}from"../chunks/scheduler.37c15a92.js";import{S as F,i as O,g as i,s as o,r as q,A as J,h as l,f as s,c as r,j as N,u as S,x as b,k as V,y as K,a,v as z,d as I,t as R,w as G}from"../chunks/index.7cb9c9b8.js";import{H as W,E as X}from"../chunks/EditOnGithub.858acfec.js";function Y(P){let n,w,d,y,p,x,g,M="This is a community-created glossary. Contributions are welcomed!",T,u,D=`<li><p><strong>Tabular Method:</strong> Type of problem in which the state and action spaces are small enough to approximate value functions to be represented as arrays and tables.
<strong>Q-learning</strong> is an example of tabular method since a table is used to represent the value for different state-action pairs.</p></li> <li><p><strong>Deep Q-Learning:</strong> Method that trains a neural network to approximate, given a state, the different <strong>Q-values</strong> for each possible action at that state.
It is used to solve problems when observational space is too big to apply a tabular Q-Learning approach.</p></li> <li><p><strong>Temporal Limitation</strong> is a difficulty presented when the environment state is represented by frames. A frame by itself does not provide temporal information.
In order to obtain temporal information, we need to <strong>stack</strong> a number of frames together.</p></li> <li><p><strong>Phases of Deep Q-Learning:</strong></p> <ul><li><strong>Sampling:</strong> Actions are performed, and observed experience tuples are stored in a <strong>replay memory</strong>.</li> <li><strong>Training:</strong> Batches of tuples are selected randomly and the neural network updates its weights using gradient descent.</li></ul></li> <li><p><strong>Solutions to stabilize Deep Q-Learning:</strong></p> <ul><li><p><strong>Experience Replay:</strong> A replay memory is created to save experiences samples that can be reused during training.
This allows the agent to learn from the same experiences multiple times. Also, it helps the agent avoid forgetting previous experiences as it gets new ones.</p></li> <li><p><strong>Random sampling</strong> from replay buffer allows to remove correlation in the observation sequences and prevents action values from oscillating or diverging
catastrophically.</p></li> <li><p><strong>Fixed Q-Target:</strong> In order to calculate the <strong>Q-Target</strong> we need to estimate the discounted optimal <strong>Q-value</strong> of the next state by using Bellman equation. The problem
is that the same network weights are used to calculate the <strong>Q-Target</strong> and the <strong>Q-value</strong>. This means that everytime we are modifying the <strong>Q-value</strong>, the <strong>Q-Target</strong> also moves with it.
To avoid this issue, a separate network with fixed parameters is used for estimating the Temporal Difference Target. The target network is updated by copying parameters from
our Deep Q-Network after certain <strong>C steps</strong>.</p></li> <li><p><strong>Double DQN:</strong> Method to handle <strong>overestimation</strong> of <strong>Q-Values</strong>. This solution uses two networks to decouple the action selection from the target <strong>Value generation</strong>:</p> <ul><li><strong>DQN Network</strong> to select the best action to take for the next state (the action with the highest <strong>Q-Value</strong>)</li> <li><strong>Target Network</strong> to calculate the target <strong>Q-Value</strong> of taking that action at the next state.
This approach reduces the <strong>Q-Values</strong> overestimation, it helps to train faster and have more stable learning.</li></ul></li></ul></li>`,_,m,H='If you want to improve the course, you can <a href="https://github.com/huggingface/deep-rl-class/pulls" rel="nofollow">open a Pull Request.</a>',Q,h,E="This glossary was made possible thanks to:",$,c,A='<li><a href="https://github.com/dario248" rel="nofollow">Dario Paez</a></li>',k,f,L,v,C;return p=new W({props:{title:"Glossary",local:"glossary",headingTag:"h1"}}),f=new X({props:{source:"https://github.com/huggingface/deep-rl-class/blob/main/units/en/unit3/glossary.mdx"}}),{c(){n=i("meta"),w=o(),d=i("p"),y=o(),q(p.$$.fragment),x=o(),g=i("p"),g.textContent=M,T=o(),u=i("ul"),u.innerHTML=D,_=o(),m=i("p"),m.innerHTML=H,Q=o(),h=i("p"),h.textContent=E,$=o(),c=i("ul"),c.innerHTML=A,k=o(),q(f.$$.fragment),L=o(),v=i("p"),this.h()},l(e){const t=J("svelte-u9bgzb",document.head);n=l(t,"META",{name:!0,content:!0}),t.forEach(s),w=r(e),d=l(e,"P",{}),N(d).forEach(s),y=r(e),S(p.$$.fragment,e),x=r(e),g=l(e,"P",{"data-svelte-h":!0}),b(g)!=="svelte-m5t86f"&&(g.textContent=M),T=r(e),u=l(e,"UL",{"data-svelte-h":!0}),b(u)!=="svelte-16u5xdu"&&(u.innerHTML=D),_=r(e),m=l(e,"P",{"data-svelte-h":!0}),b(m)!=="svelte-1p0vyzq"&&(m.innerHTML=H),Q=r(e),h=l(e,"P",{"data-svelte-h":!0}),b(h)!=="svelte-1abantd"&&(h.textContent=E),$=r(e),c=l(e,"UL",{"data-svelte-h":!0}),b(c)!=="svelte-1y0oths"&&(c.innerHTML=A),k=r(e),S(f.$$.fragment,e),L=r(e),v=l(e,"P",{}),N(v).forEach(s),this.h()},h(){V(n,"name","hf:doc:metadata"),V(n,"content",Z)},m(e,t){K(document.head,n),a(e,w,t),a(e,d,t),a(e,y,t),z(p,e,t),a(e,x,t),a(e,g,t),a(e,T,t),a(e,u,t),a(e,_,t),a(e,m,t),a(e,Q,t),a(e,h,t),a(e,$,t),a(e,c,t),a(e,k,t),z(f,e,t),a(e,L,t),a(e,v,t),C=!0},p:B,i(e){C||(I(p.$$.fragment,e),I(f.$$.fragment,e),C=!0)},o(e){R(p.$$.fragment,e),R(f.$$.fragment,e),C=!1},d(e){e&&(s(w),s(d),s(y),s(x),s(g),s(T),s(u),s(_),s(m),s(Q),s(h),s($),s(c),s(k),s(L),s(v)),s(n),G(p,e),G(f,e)}}}const Z='{"title":"Glossary","local":"glossary","sections":[],"depth":1}';function ee(P){return j(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class ne extends F{constructor(n){super(),O(this,n,ee,Y,U,{})}}export{ne as component};
