import{s as rt,a as it,n as ot,o as pt}from"../chunks/scheduler.ef843396.js";import{S as ut,i as mt,e as l,s as a,c as U,h as gt,a as r,d as n,b as i,f as lt,g as O,j as M,k as m,l as ct,m as s,n as W,t as D,o as J,p as K}from"../chunks/index.05ef1181.js";import{H as N,E as ft}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.ef6649bf.js";function ht(Q){let o,x,L,b,g,C,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>.",P,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,p,nt,F,T,st="To recap:",G,u,at,R,w,A,H,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"}}),w=new ft({props:{source:"https://github.com/huggingface/deep-rl-class/blob/main/units/en/unit1/tasks.mdx"}}),{c(){o=l("meta"),x=a(),L=l("p"),b=a(),U(g.$$.fragment),C=a(),c=l("p"),c.innerHTML=V,P=a(),U(f.$$.fragment),y=a(),h=l("p"),h.innerHTML=X,E=a(),d=l("p"),d.innerHTML=Y,S=a(),$=l("figure"),$.innerHTML=Z,z=a(),U(v.$$.fragment),I=a(),_=l("p"),_.innerHTML=tt,j=a(),k=l("p"),k.innerHTML=et,q=a(),p=l("img"),F=a(),T=l("p"),T.textContent=st,G=a(),u=l("img"),R=a(),U(w.$$.fragment),A=a(),H=l("p"),this.h()},l(t){const e=gt("svelte-u9bgzb",document.head);o=r(e,"META",{name:!0,content:!0}),e.forEach(n),x=i(t),L=r(t,"P",{}),lt(L).forEach(n),b=i(t),O(g.$$.fragment,t),C=i(t),c=r(t,"P",{"data-svelte-h":!0}),M(c)!=="svelte-fnyfng"&&(c.innerHTML=V),P=i(t),O(f.$$.fragment,t),y=i(t),h=r(t,"P",{"data-svelte-h":!0}),M(h)!=="svelte-1h012q6"&&(h.innerHTML=X),E=i(t),d=r(t,"P",{"data-svelte-h":!0}),M(d)!=="svelte-13qzaar"&&(d.innerHTML=Y),S=i(t),$=r(t,"FIGURE",{"data-svelte-h":!0}),M($)!=="svelte-17irmlf"&&($.innerHTML=Z),z=i(t),O(v.$$.fragment,t),I=i(t),_=r(t,"P",{"data-svelte-h":!0}),M(_)!=="svelte-c0vg6i"&&(_.innerHTML=tt),j=i(t),k=r(t,"P",{"data-svelte-h":!0}),M(k)!=="svelte-rz44as"&&(k.innerHTML=et),q=i(t),p=r(t,"IMG",{src:!0,alt:!0,width:!0}),F=i(t),T=r(t,"P",{"data-svelte-h":!0}),M(T)!=="svelte-mz2ztc"&&(T.textContent=st),G=i(t),u=r(t,"IMG",{src:!0,alt:!0,width:!0}),R=i(t),O(w.$$.fragment,t),A=i(t),H=r(t,"P",{}),lt(H).forEach(n),this.h()},h(){m(o,"name","hf:doc:metadata"),m(o,"content",dt),it(p.src,nt="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/stock.jpg")||m(p,"src",nt),m(p,"alt","Stock Market"),m(p,"width","100%"),it(u.src,at="https://huggingface.co/datasets/huggingface-deep-rl-course/course-images/resolve/main/en/unit1/tasks.jpg")||m(u,"src",at),m(u,"alt","Tasks recap"),m(u,"width","100%")},m(t,e){ct(document.head,o),s(t,x,e),s(t,L,e),s(t,b,e),W(g,t,e),s(t,C,e),s(t,c,e),s(t,P,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,p,e),s(t,F,e),s(t,T,e),s(t,G,e),s(t,u,e),s(t,R,e),W(w,t,e),s(t,A,e),s(t,H,e),B=!0},p:ot,i(t){B||(D(g.$$.fragment,t),D(f.$$.fragment,t),D(v.$$.fragment,t),D(w.$$.fragment,t),B=!0)},o(t){J(g.$$.fragment,t),J(f.$$.fragment,t),J(v.$$.fragment,t),J(w.$$.fragment,t),B=!1},d(t){t&&(n(x),n(L),n(b),n(C),n(c),n(P),n(y),n(h),n(E),n(d),n(S),n($),n(z),n(I),n(_),n(j),n(k),n(q),n(p),n(F),n(T),n(G),n(u),n(R),n(A),n(H)),n(o),K(g,t),K(f,t),K(v,t),K(w,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 pt(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Tt extends ut{constructor(o){super(),mt(this,o,$t,ht,rt,{})}}export{Tt as component};
