import{s as rt,f as at,n as ot,o as ut}from"../chunks/scheduler.37c15a92.js";import{S as pt,i as mt,g as l,s as i,r as U,A as gt,h as r,f as n,c as a,j as lt,u as O,x as M,k as m,y as ct,a as s,v as W,d as D,t as J,w as K}from"../chunks/index.7cb9c9b8.js";import{H as N,E as ft}from"../chunks/index.e79b7fff.js";function ht(Q){let o,H,L,C,g,P,c,V="A task is an <strong>instance</strong> of a Reinforcement Learning problem. We can have two types of tasks: <strong>episodic</strong> and <strong>continuing</strong>.",b,f,y,h,X="In this case, we have a starting point and an ending point <strong>(a terminal state). This creates an episode</strong>: a list of States, Actions, Rewards, and new States.",E,d,Y="For instance, think about Super Mario Bros: an episode begins at the launch of a new Mario Level and ends <strong>when you’re killed or you reached the end of the level.</strong>",S,$,Z='<img src="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/mario.jpg" alt="Mario"/> <figcaption>Beginning of a new episode.</figcaption>',z,v,I,_,tt="These are tasks that continue forever (<strong>no terminal state</strong>). In this case, the agent must <strong>learn how to choose the best actions and simultaneously interact with the environment.</strong>",j,k,et="For instance, an agent that does automated stock trading. For this task, there is no starting point and terminal state. <strong>The agent keeps running until we decide to stop it.</strong>",q,u,nt,A,w,st="To recap:",F,p,it,G,T,R,x,B;return g=new N({props:{title:"Type of tasks",local:"tasks",headingTag:"h1"}}),f=new N({props:{title:"Episodic task",local:"episodic-task",headingTag:"h2"}}),v=new N({props:{title:"Continuing tasks",local:"continuing-tasks",headingTag:"h2"}}),T=new ft({props:{source:"https://github.com/huggingface/deep-rl-class/blob/main/units/en/unit1/tasks.mdx"}}),{c(){o=l("meta"),H=i(),L=l("p"),C=i(),U(g.$$.fragment),P=i(),c=l("p"),c.innerHTML=V,b=i(),U(f.$$.fragment),y=i(),h=l("p"),h.innerHTML=X,E=i(),d=l("p"),d.innerHTML=Y,S=i(),$=l("figure"),$.innerHTML=Z,z=i(),U(v.$$.fragment),I=i(),_=l("p"),_.innerHTML=tt,j=i(),k=l("p"),k.innerHTML=et,q=i(),u=l("img"),A=i(),w=l("p"),w.textContent=st,F=i(),p=l("img"),G=i(),U(T.$$.fragment),R=i(),x=l("p"),this.h()},l(t){const e=gt("svelte-u9bgzb",document.head);o=r(e,"META",{name:!0,content:!0}),e.forEach(n),H=a(t),L=r(t,"P",{}),lt(L).forEach(n),C=a(t),O(g.$$.fragment,t),P=a(t),c=r(t,"P",{"data-svelte-h":!0}),M(c)!=="svelte-fnyfng"&&(c.innerHTML=V),b=a(t),O(f.$$.fragment,t),y=a(t),h=r(t,"P",{"data-svelte-h":!0}),M(h)!=="svelte-1h012q6"&&(h.innerHTML=X),E=a(t),d=r(t,"P",{"data-svelte-h":!0}),M(d)!=="svelte-13qzaar"&&(d.innerHTML=Y),S=a(t),$=r(t,"FIGURE",{"data-svelte-h":!0}),M($)!=="svelte-17irmlf"&&($.innerHTML=Z),z=a(t),O(v.$$.fragment,t),I=a(t),_=r(t,"P",{"data-svelte-h":!0}),M(_)!=="svelte-c0vg6i"&&(_.innerHTML=tt),j=a(t),k=r(t,"P",{"data-svelte-h":!0}),M(k)!=="svelte-rz44as"&&(k.innerHTML=et),q=a(t),u=r(t,"IMG",{src:!0,alt:!0,width:!0}),A=a(t),w=r(t,"P",{"data-svelte-h":!0}),M(w)!=="svelte-mz2ztc"&&(w.textContent=st),F=a(t),p=r(t,"IMG",{src:!0,alt:!0,width:!0}),G=a(t),O(T.$$.fragment,t),R=a(t),x=r(t,"P",{}),lt(x).forEach(n),this.h()},h(){m(o,"name","hf:doc:metadata"),m(o,"content",dt),at(u.src,nt="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/stock.jpg")||m(u,"src",nt),m(u,"alt","Stock Market"),m(u,"width","100%"),at(p.src,it="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/tasks.jpg")||m(p,"src",it),m(p,"alt","Tasks recap"),m(p,"width","100%")},m(t,e){ct(document.head,o),s(t,H,e),s(t,L,e),s(t,C,e),W(g,t,e),s(t,P,e),s(t,c,e),s(t,b,e),W(f,t,e),s(t,y,e),s(t,h,e),s(t,E,e),s(t,d,e),s(t,S,e),s(t,$,e),s(t,z,e),W(v,t,e),s(t,I,e),s(t,_,e),s(t,j,e),s(t,k,e),s(t,q,e),s(t,u,e),s(t,A,e),s(t,w,e),s(t,F,e),s(t,p,e),s(t,G,e),W(T,t,e),s(t,R,e),s(t,x,e),B=!0},p:ot,i(t){B||(D(g.$$.fragment,t),D(f.$$.fragment,t),D(v.$$.fragment,t),D(T.$$.fragment,t),B=!0)},o(t){J(g.$$.fragment,t),J(f.$$.fragment,t),J(v.$$.fragment,t),J(T.$$.fragment,t),B=!1},d(t){t&&(n(H),n(L),n(C),n(P),n(c),n(b),n(y),n(h),n(E),n(d),n(S),n($),n(z),n(I),n(_),n(j),n(k),n(q),n(u),n(A),n(w),n(F),n(p),n(G),n(R),n(x)),n(o),K(g,t),K(f,t),K(v,t),K(T,t)}}}const dt='{"title":"Type of tasks","local":"tasks","sections":[{"title":"Episodic task","local":"episodic-task","sections":[],"depth":2},{"title":"Continuing tasks","local":"continuing-tasks","sections":[],"depth":2}],"depth":1}';function $t(Q){return ut(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class wt extends pt{constructor(o){super(),mt(this,o,$t,ht,rt,{})}}export{wt as component};
