import{s as st,f as X,n as lt,o as rt}from"../chunks/scheduler.37c15a92.js";import{S as ot,i as ut,g as l,s as a,r as Y,A as mt,h as r,f as n,c as s,j as Z,u as tt,x as m,k as x,y as gt,a as i,v as et,d as nt,t as it,w as at}from"../chunks/index.7cb9c9b8.js";import{H as ft,E as pt}from"../chunks/index.e79b7fff.js";function ct(j){let o,M,$,y,g,T,u,D,C,f,F="In the first unit of this class, we learned about Reinforcement Learning (RL), the RL process, and the different methods to solve an RL problem. We also <strong>trained our first agents and uploaded them to the Hugging Face Hub.</strong>",P,p,U="In this unit, we’re going to <strong>dive deeper into one of the Reinforcement Learning methods: value-based methods</strong> and study our first RL algorithm: <strong>Q-Learning.</strong>",R,c,O="We’ll also <strong>implement our first RL agent from scratch</strong>, a Q-Learning agent, and will train it in two environments:",k,d,W="<li>Frozen-Lake-v1 (non-slippery version): where our agent will need to <strong>go from the starting state (S) to the goal state (G)</strong> by walking only on frozen tiles (F) and avoiding holes (H).</li> <li>An autonomous taxi: where our agent will need <strong>to learn to navigate</strong> a city to <strong>transport its passengers from point A to point B.</strong></li>",E,h,B,q,v,J="Concretely, we will:",I,L,K="<li>Learn about <strong>value-based methods</strong>.</li> <li>Learn about the <strong>differences between Monte Carlo and Temporal Difference Learning</strong>.</li> <li>Study and implement <strong>our first RL algorithm</strong>: Q-Learning.</li>",Q,_,N="This unit is <strong>fundamental if you want to be able to work on Deep Q-Learning</strong>: the first Deep RL algorithm that played Atari games and beat the human level on some of them (breakout, space invaders, etc).",S,w,V="So let’s get started! 🚀",A,b,z,H,G;return g=new ft({props:{title:"Introduction to Q-Learning",local:"introduction-q-learning",headingTag:"h1"}}),b=new pt({props:{source:"https://github.com/huggingface/deep-rl-class/blob/main/units/en/unit2/introduction.mdx"}}),{c(){o=l("meta"),M=a(),$=l("p"),y=a(),Y(g.$$.fragment),T=a(),u=l("img"),C=a(),f=l("p"),f.innerHTML=F,P=a(),p=l("p"),p.innerHTML=U,R=a(),c=l("p"),c.innerHTML=O,k=a(),d=l("ol"),d.innerHTML=W,E=a(),h=l("img"),q=a(),v=l("p"),v.textContent=J,I=a(),L=l("ul"),L.innerHTML=K,Q=a(),_=l("p"),_.innerHTML=N,S=a(),w=l("p"),w.textContent=V,A=a(),Y(b.$$.fragment),z=a(),H=l("p"),this.h()},l(t){const e=mt("svelte-u9bgzb",document.head);o=r(e,"META",{name:!0,content:!0}),e.forEach(n),M=s(t),$=r(t,"P",{}),Z($).forEach(n),y=s(t),tt(g.$$.fragment,t),T=s(t),u=r(t,"IMG",{src:!0,alt:!0,width:!0}),C=s(t),f=r(t,"P",{"data-svelte-h":!0}),m(f)!=="svelte-1ynp68f"&&(f.innerHTML=F),P=s(t),p=r(t,"P",{"data-svelte-h":!0}),m(p)!=="svelte-1dfcpck"&&(p.innerHTML=U),R=s(t),c=r(t,"P",{"data-svelte-h":!0}),m(c)!=="svelte-1xt90qk"&&(c.innerHTML=O),k=s(t),d=r(t,"OL",{"data-svelte-h":!0}),m(d)!=="svelte-1avcekp"&&(d.innerHTML=W),E=s(t),h=r(t,"IMG",{src:!0,alt:!0}),q=s(t),v=r(t,"P",{"data-svelte-h":!0}),m(v)!=="svelte-innzr2"&&(v.textContent=J),I=s(t),L=r(t,"UL",{"data-svelte-h":!0}),m(L)!=="svelte-y97j7m"&&(L.innerHTML=K),Q=s(t),_=r(t,"P",{"data-svelte-h":!0}),m(_)!=="svelte-1c70rr4"&&(_.innerHTML=N),S=s(t),w=r(t,"P",{"data-svelte-h":!0}),m(w)!=="svelte-vkoquy"&&(w.textContent=V),A=s(t),tt(b.$$.fragment,t),z=s(t),H=r(t,"P",{}),Z(H).forEach(n),this.h()},h(){x(o,"name","hf:doc:metadata"),x(o,"content",dt),X(u.src,D="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/thumbnail.jpg")||x(u,"src",D),x(u,"alt","Unit 2 thumbnail"),x(u,"width","100%"),X(h.src,B="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit3/envs.gif")||x(h,"src",B),x(h,"alt","Environments")},m(t,e){gt(document.head,o),i(t,M,e),i(t,$,e),i(t,y,e),et(g,t,e),i(t,T,e),i(t,u,e),i(t,C,e),i(t,f,e),i(t,P,e),i(t,p,e),i(t,R,e),i(t,c,e),i(t,k,e),i(t,d,e),i(t,E,e),i(t,h,e),i(t,q,e),i(t,v,e),i(t,I,e),i(t,L,e),i(t,Q,e),i(t,_,e),i(t,S,e),i(t,w,e),i(t,A,e),et(b,t,e),i(t,z,e),i(t,H,e),G=!0},p:lt,i(t){G||(nt(g.$$.fragment,t),nt(b.$$.fragment,t),G=!0)},o(t){it(g.$$.fragment,t),it(b.$$.fragment,t),G=!1},d(t){t&&(n(M),n($),n(y),n(T),n(u),n(C),n(f),n(P),n(p),n(R),n(c),n(k),n(d),n(E),n(h),n(q),n(v),n(I),n(L),n(Q),n(_),n(S),n(w),n(A),n(z),n(H)),n(o),at(g,t),at(b,t)}}}const dt='{"title":"Introduction to Q-Learning","local":"introduction-q-learning","sections":[],"depth":1}';function ht(j){return rt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends ot{constructor(o){super(),ut(this,o,ht,ct,st,{})}}export{wt as component};
