diff --git a/lecture-08/404.html b/lecture-08/404.html new file mode 100644 index 0000000000000000000000000000000000000000..6717f27970f86a26402a91f2c9dccb7aa5d86a4e --- /dev/null +++ b/lecture-08/404.html @@ -0,0 +1,30 @@ + + + + + +Deep Reinforcement Learning - Slidev + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/lecture-08/_redirects b/lecture-08/_redirects new file mode 100644 index 0000000000000000000000000000000000000000..bdc8a08e90af7526ac48238e8fbb2f0f26121fa3 --- /dev/null +++ b/lecture-08/_redirects @@ -0,0 +1 @@ +./* ./index.html 200 diff --git a/lecture-08/assets/404-bkedjYjP.css b/lecture-08/assets/404-bkedjYjP.css new file mode 100644 index 0000000000000000000000000000000000000000..0b95cae68cb7a9eeaa0fecc385b94688be2b2945 --- /dev/null +++ b/lecture-08/assets/404-bkedjYjP.css @@ -0,0 +1 @@ +.page-link[data-v-b584852f]{background-color:#9ca3af1a;border-radius:.25rem;padding:.5rem 1rem}.page-link[data-v-b584852f]:hover{background-color:#9ca3af33} diff --git a/lecture-08/assets/Citation-CcKhBxpe.js b/lecture-08/assets/Citation-CcKhBxpe.js new file mode 100644 index 0000000000000000000000000000000000000000..3b9913625f5d47ab747b0b43369dd38193350c03 --- /dev/null +++ b/lecture-08/assets/Citation-CcKhBxpe.js @@ -0,0 +1 @@ +import{B as e,Ct as t,S as n,T as r,U as i,b as a,m as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-DB-9afGB.js";var l={class:`dl-citation`},u=[`href`],d=s(r({__name:`Citation`,props:{source:{},url:{}},setup(r){let{$slidev:s,$nav:d,$clicksContext:f,$clicks:p,$page:m,$renderContext:h,$frontmatter:g}=c(),_=r;return(r,s)=>(e(),a(`span`,l,[_.url?(e(),a(`a`,{key:0,href:_.url,target:`_blank`,rel:`noopener`},t(_.source),9,u)):(e(),a(o,{key:1},[n(t(_.source),1)],64)),i(r.$slots,`default`,{},void 0,!0)]))}}),[[`__scopeId`,`data-v-11a8cabc`]]);export{d as t}; \ No newline at end of file diff --git a/lecture-08/assets/Citation-rca7ok54.css b/lecture-08/assets/Citation-rca7ok54.css new file mode 100644 index 0000000000000000000000000000000000000000..e05f98641af8c02e0c505fbe6d1239942e4d8dd3 --- /dev/null +++ b/lecture-08/assets/Citation-rca7ok54.css @@ -0,0 +1 @@ +.dl-citation[data-v-11a8cabc]{font-size:var(--dl-fs-citation);color:var(--dl-muted)}.dl-citation a[data-v-11a8cabc]{color:inherit;border-bottom:1px dotted} diff --git a/lecture-08/assets/DeckFooter-B6vKMo6W.css b/lecture-08/assets/DeckFooter-B6vKMo6W.css new file mode 100644 index 0000000000000000000000000000000000000000..bd00073f9a4233c8d949a2f8f1202003aec12052 --- /dev/null +++ b/lecture-08/assets/DeckFooter-B6vKMo6W.css @@ -0,0 +1 @@ +.dl-footer[data-v-fe908050]{letter-spacing:.04em;color:var(--dl-muted);pointer-events:none;justify-content:space-between;align-items:center;gap:1rem;font-size:.72rem;display:flex;position:absolute;bottom:1rem;left:3rem;right:3rem}.dl-footer__left[data-v-fe908050]{align-items:center;gap:.4rem;min-width:0;display:flex}.dl-footer__code[data-v-fe908050]{color:var(--dl-accent);font-weight:700}.dl-footer__sep[data-v-fe908050]{opacity:.5}.dl-footer__title[data-v-fe908050]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dl-footer__right[data-v-fe908050]{font-variant-numeric:tabular-nums;flex-shrink:0} diff --git a/lecture-08/assets/DeckFooter-BmHxwiXu.js b/lecture-08/assets/DeckFooter-BmHxwiXu.js new file mode 100644 index 0000000000000000000000000000000000000000..fb10e25587fa155793ad6e3307a65361b72876cb --- /dev/null +++ b/lecture-08/assets/DeckFooter-BmHxwiXu.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,_ as r,b as i,g as a,y as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{t as c}from"./useNav-B0kQsolV.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as u}from"./slidev/context-DB-9afGB.js";import"./slidev/client-beF_Q0xG.js";var d={class:`dl-footer`},f={class:`dl-footer__left`},p={key:0,class:`dl-footer__code`},m={key:1,class:`dl-footer__sep`},h={key:2},g={key:3,class:`dl-footer__sep`},_={key:4,class:`dl-footer__title`},v={class:`dl-footer__right`},y=l(n({__name:`DeckFooter`,setup(n){let{$slidev:l}=u(),y=c(),b=a(()=>l?.themeConfigs??{}),x=a(()=>b.value.courseCode??``),S=a(()=>b.value.lecture??``),C=a(()=>b.value.lectureTitle??``);return(n,a)=>(e(),i(`footer`,d,[r(`div`,f,[x.value?(e(),i(`span`,p,t(x.value),1)):o(`v-if`,!0),S.value?(e(),i(`span`,m,`·`)):o(`v-if`,!0),S.value?(e(),i(`span`,h,`Lecture `+t(S.value),1)):o(`v-if`,!0),C.value?(e(),i(`span`,g,`·`)):o(`v-if`,!0),C.value?(e(),i(`span`,_,t(C.value),1)):o(`v-if`,!0)]),r(`div`,v,t(s(y).currentPage.value)+` / `+t(s(y).total.value),1)]))}}),[[`__scopeId`,`data-v-fe908050`]]);export{y as t}; \ No newline at end of file diff --git a/lecture-08/assets/DqnFlow-B46GQSY5.css b/lecture-08/assets/DqnFlow-B46GQSY5.css new file mode 100644 index 0000000000000000000000000000000000000000..7484197616e87335c383798311c898581a2308f9 --- /dev/null +++ b/lecture-08/assets/DqnFlow-B46GQSY5.css @@ -0,0 +1 @@ +.dl-dqn[data-v-10cdf00f]{width:100%;max-width:42rem;margin:0}.dl-dqn svg[data-v-10cdf00f]{width:100%;height:auto}.dl-dqn g[data-v-10cdf00f]{transition:opacity .25s}.dl-dqn__env[data-v-10cdf00f]{fill:color-mix(in srgb, var(--dl-enc) 14%, var(--dl-bg));stroke:var(--dl-enc);stroke-width:1.8px}.dl-dqn__box[data-v-10cdf00f]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.6px}.dl-dqn__box.is-accent[data-v-10cdf00f]{stroke:var(--dl-accent)}.dl-dqn__row[data-v-10cdf00f]{fill:var(--dl-bg);stroke:var(--dl-border)}.dl-dqn__row.is-pick[data-v-10cdf00f]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-dqn__net[data-v-10cdf00f]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1.8px}.dl-dqn__net.is-target[data-v-10cdf00f]{fill:color-mix(in srgb, var(--dl-q) 12%, var(--dl-bg));stroke:var(--dl-q)}.dl-dqn__loss[data-v-10cdf00f]{fill:var(--dl-bg);stroke:var(--dl-heading);stroke-width:1.8px}.dl-dqn__lab[data-v-10cdf00f]{fill:var(--dl-heading);font-size:13px;font-weight:600}.dl-dqn__in[data-v-10cdf00f]{fill:var(--dl-accent-strong);font-size:13px;font-weight:700}.dl-dqn__in.is-target[data-v-10cdf00f]{fill:var(--dl-q)}.dl-dqn__small[data-v-10cdf00f]{fill:var(--dl-muted);font-size:11px}.dl-dqn__tiny[data-v-10cdf00f]{fill:var(--dl-muted);font-size:9px}.dl-dqn__small.is-current[data-v-10cdf00f]{fill:var(--dl-k);font-weight:600}.dl-dqn__small.is-target[data-v-10cdf00f]{fill:var(--dl-q);font-weight:600}.dl-dqn__small.is-bad[data-v-10cdf00f]{fill:var(--dl-danger);font-weight:600}.dl-dqn__arrow[data-v-10cdf00f]{fill:none;stroke:var(--dl-body);stroke-width:1.8px}.dl-dqn__arrow.is-current[data-v-10cdf00f]{stroke:var(--dl-k);stroke-width:2.4px}.dl-dqn__arrow.is-target[data-v-10cdf00f]{stroke:var(--dl-q);stroke-width:2.4px}.dl-dqn__grad[data-v-10cdf00f]{fill:none;stroke:var(--dl-danger);stroke-width:2px;stroke-dasharray:5 3}.dl-dqn__copy[data-v-10cdf00f]{fill:none;stroke:var(--dl-body);stroke-width:1.8px;stroke-dasharray:6 4}.dl-dqn__head[data-v-10cdf00f]{fill:var(--dl-body)}.dl-dqn__head.is-current[data-v-10cdf00f]{fill:var(--dl-k)}.dl-dqn__head.is-target[data-v-10cdf00f]{fill:var(--dl-q)}.dl-dqn__head.is-bad[data-v-10cdf00f]{fill:var(--dl-danger)}.dl-dqn__cap[data-v-10cdf00f]{color:var(--dl-body);min-height:1.3rem;margin-top:.3rem;font-size:.85rem} diff --git a/lecture-08/assets/DqnFlow-DlxgPWo3.js b/lecture-08/assets/DqnFlow-DlxgPWo3.js new file mode 100644 index 0000000000000000000000000000000000000000..90e00cd051e227e733386acc22caee3d42e53023 --- /dev/null +++ b/lecture-08/assets/DqnFlow-DlxgPWo3.js @@ -0,0 +1 @@ +import{B as e,Ct as t,H as n,St as r,T as i,_ as a,b as o,bt as s,g as c,m as l,q as u,y as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m}from"./slidev/context-DB-9afGB.js";var h={class:`dl-dqn`},g={viewBox:`0 0 680 318`,role:`img`,"aria-label":`The deep Q-network training loop: environment, replay buffer, batch, Q-network, target network and loss`},_=[`id`],v=[`id`],y=[`id`],b=[`id`],x=[`y`],S=[`marker-end`],C=[`marker-end`],w=[`marker-end`],T=[`marker-end`],E=[`marker-end`],D=[`marker-end`],O=[`marker-end`],k=[`marker-end`],A=[`marker-end`],j={class:`dl-dqn__cap`},M=p(i({__name:`DqnFlow`,props:{step:{default:0}},setup(i){let{$slidev:p,$nav:M,$clicksContext:N,$clicks:P,$page:F,$renderContext:I,$frontmatter:L}=m(),R=i,z=u(),B=[`The whole loop. Acting and learning run side by side.`,`1 · The Q-network picks an action (ε-greedy). The environment returns a reward and the next state.`,`2 · The move (s, a, r, s′) is stored in the replay buffer.`,`3 · A random batch of stored moves is drawn — not the latest ones.`,`4 · The Q-network predicts Q(s, a) for each move in the batch.`,`5 · The target network gives max Q(s′, ·). Target = r + γ · max.`,`6 · Loss = mean of (target − predicted)² over the batch.`,`7 · Backpropagation updates the Q-network. The target network does not change.`,`8 · Every T steps, copy the Q-network's weights into the target network.`],V=(...e)=>({opacity:R.step===0||e.includes(R.step)?1:.18}),H=c(()=>B[Math.min(8,Math.max(0,R.step))]);return(i,c)=>(e(),o(`figure`,h,[(e(),o(`svg`,g,[a(`defs`,null,[a(`marker`,{id:`dq-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[0]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head`},null,-1)]],8,_),a(`marker`,{id:`dqc-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[1]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-current`},null,-1)]],8,v),a(`marker`,{id:`dqt-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[2]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-target`},null,-1)]],8,y),a(`marker`,{id:`dqb-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[3]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-bad`},null,-1)]],8,b)]),d(` environment `),a(`g`,{style:r(V(1,2))},[...c[4]||=[a(`rect`,{x:`14`,y:`20`,width:`132`,height:`60`,rx:`10`,class:`dl-dqn__env`},null,-1),a(`text`,{x:`80`,y:`46`,"text-anchor":`middle`,class:`dl-dqn__lab`},`environment`,-1),a(`text`,{x:`80`,y:`64`,"text-anchor":`middle`,class:`dl-dqn__small`},`the robot's floor`,-1)]],4),d(` replay buffer `),a(`g`,{style:r(V(2,3))},[c[5]||=a(`rect`,{x:`236`,y:`14`,width:`168`,height:`96`,rx:`6`,class:`dl-dqn__box`},null,-1),c[6]||=a(`text`,{x:`320`,y:`31`,"text-anchor":`middle`,class:`dl-dqn__lab`},`replay buffer`,-1),(e(),o(l,null,n(4,e=>a(`rect`,{key:e,x:`248`,y:38+(e-1)*17,width:`144`,height:`13`,rx:`2`,class:s([`dl-dqn__row`,{"is-pick":e===2||e===4}])},null,10,x)),64)),c[7]||=a(`text`,{x:`320`,y:`48`,"text-anchor":`middle`,class:`dl-dqn__tiny`},`(s, a, r, s′)`,-1)],4),d(` batch `),a(`g`,{style:r(V(3,4,5))},[...c[8]||=[a(`rect`,{x:`490`,y:`30`,width:`150`,height:`56`,rx:`6`,class:`dl-dqn__box is-accent`},null,-1),a(`text`,{x:`565`,y:`48`,"text-anchor":`middle`,class:`dl-dqn__lab`},`random batch`,-1),a(`rect`,{x:`502`,y:`56`,width:`126`,height:`11`,rx:`2`,class:`dl-dqn__row is-pick`},null,-1),a(`rect`,{x:`502`,y:`70`,width:`126`,height:`11`,rx:`2`,class:`dl-dqn__row is-pick`},null,-1)]],4),d(` Q-network `),a(`g`,{style:r(V(1,4,7,8))},[...c[9]||=[a(`polygon`,{points:`190,168 320,184 320,240 190,256`,class:`dl-dqn__net`},null,-1),a(`text`,{x:`255`,y:`210`,"text-anchor":`middle`,class:`dl-dqn__in`},`Q-network`,-1),a(`text`,{x:`255`,y:`226`,"text-anchor":`middle`,class:`dl-dqn__small`},`weights w`,-1)]],4),d(` target network `),a(`g`,{style:r(V(5,8))},[...c[10]||=[a(`polygon`,{points:`470,168 600,184 600,240 470,256`,class:`dl-dqn__net is-target`},null,-1),a(`text`,{x:`535`,y:`210`,"text-anchor":`middle`,class:`dl-dqn__in is-target`},`target network`,-1),a(`text`,{x:`535`,y:`226`,"text-anchor":`middle`,class:`dl-dqn__small`},`weights w⁻ (frozen)`,-1)]],4),d(` loss `),a(`g`,{style:r(V(6,7))},[...c[11]||=[a(`circle`,{cx:`395`,cy:`286`,r:`22`,class:`dl-dqn__loss`},null,-1),a(`text`,{x:`395`,y:`291`,"text-anchor":`middle`,class:`dl-dqn__lab`},`MSE`,-1)]],4),d(` 1: act `),a(`g`,{style:r(V(1))},[a(`path`,{d:`M190 200 C110 200, 80 150, 80 88`,class:`dl-dqn__arrow is-current`,"marker-end":`url(#dqc-${f(z)})`},null,8,S),c[12]||=a(`text`,{x:`40`,y:`150`,class:`dl-dqn__small is-current`},`action a`,-1),c[13]||=a(`text`,{x:`40`,y:`164`,class:`dl-dqn__small`},`(ε-greedy)`,-1)],4),d(` 2: store `),a(`g`,{style:r(V(2))},[a(`path`,{d:`M148 50 H230`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,C),c[14]||=a(`text`,{x:`189`,y:`42`,"text-anchor":`middle`,class:`dl-dqn__small`},`store`,-1)],4),d(` 3: sample `),a(`g`,{style:r(V(3))},[a(`path`,{d:`M406 60 H484`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,w),c[15]||=a(`text`,{x:`445`,y:`52`,"text-anchor":`middle`,class:`dl-dqn__small`},`sample`,-1)],4),d(` 4: batch s, a → Q-net `),a(`g`,{style:r(V(4))},[a(`path`,{d:`M520 88 C470 130, 330 120, 290 166`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,T),c[16]||=a(`text`,{x:`402`,y:`134`,"text-anchor":`middle`,class:`dl-dqn__small`},`s, a`,-1),a(`path`,{d:`M322 230 C350 250, 362 266, 372 278`,class:`dl-dqn__arrow is-current`,"marker-end":`url(#dqc-${f(z)})`},null,8,E),c[17]||=a(`text`,{x:`366`,y:`306`,"text-anchor":`end`,class:`dl-dqn__small is-current`},`predicted Q(s, a)`,-1)],4),d(` 5: batch s′, r → target `),a(`g`,{style:r(V(5))},[a(`path`,{d:`M590 88 V164`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,D),c[18]||=a(`text`,{x:`598`,y:`130`,class:`dl-dqn__small`},`s′, r`,-1),a(`path`,{d:`M470 236 C450 258, 432 274, 418 280`,class:`dl-dqn__arrow is-target`,"marker-end":`url(#dqt-${f(z)})`},null,8,O),c[19]||=a(`text`,{x:`442`,y:`296`,class:`dl-dqn__small is-target`},`target r + γ max Q(s′, ·)`,-1)],4),d(` 7: backprop `),a(`g`,{style:r(V(7))},[a(`path`,{d:`M374 296 C300 312, 230 300, 224 262`,class:`dl-dqn__grad`,"marker-end":`url(#dqb-${f(z)})`},null,8,k),c[20]||=a(`text`,{x:`150`,y:`300`,class:`dl-dqn__small is-bad`},`backprop → w`,-1)],4),d(` 8: copy `),a(`g`,{style:r(V(8))},[a(`path`,{d:`M322 196 H464`,class:`dl-dqn__copy`,"marker-end":`url(#dq-${f(z)})`},null,8,A),c[21]||=a(`text`,{x:`393`,y:`190`,"text-anchor":`middle`,class:`dl-dqn__small`},`copy w → w⁻ every T steps`,-1)],4)])),a(`figcaption`,j,t(H.value),1)]))}}),[[`__scopeId`,`data-v-10cdf00f`]]);export{M as t}; \ No newline at end of file diff --git a/lecture-08/assets/DrawingControls-Dhbx0szf.css b/lecture-08/assets/DrawingControls-Dhbx0szf.css new file mode 100644 index 0000000000000000000000000000000000000000..85375579327c847940a8710fedd96a5b987c16c1 --- /dev/null +++ b/lecture-08/assets/DrawingControls-Dhbx0szf.css @@ -0,0 +1 @@ +.v-popper--theme-dropdown .v-popper__arrow-inner{border-color:#9ca3af33} diff --git a/lecture-08/assets/GridWorld-CYBTngYz.css b/lecture-08/assets/GridWorld-CYBTngYz.css new file mode 100644 index 0000000000000000000000000000000000000000..89dc5907d75937df9793bf8a3e5fe856884e2aae --- /dev/null +++ b/lecture-08/assets/GridWorld-CYBTngYz.css @@ -0,0 +1 @@ +.dl-grid[data-v-9e69cef1]{max-width:100%;height:auto;font-family:inherit}.dl-grid__cell[data-v-9e69cef1]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.5px}.dl-grid__cell.is-charger[data-v-9e69cef1]{fill:color-mix(in srgb, var(--dl-enc) 16%, var(--dl-bg));stroke:var(--dl-enc)}.dl-grid__cell.is-hole[data-v-9e69cef1]{fill:color-mix(in srgb, var(--dl-danger) 12%, var(--dl-bg));stroke:var(--dl-danger)}.dl-grid__cell.is-start[data-v-9e69cef1]{fill:var(--dl-accent-soft)}.dl-grid__cell.is-hl[data-v-9e69cef1]{stroke:var(--dl-accent);stroke-width:3px}.dl-grid__battery[data-v-9e69cef1]{fill:var(--dl-bg);stroke:var(--dl-enc);stroke-width:2.4px}.dl-grid__battery-cap[data-v-9e69cef1],.dl-grid__bolt[data-v-9e69cef1]{fill:var(--dl-enc)}.dl-grid__hole[data-v-9e69cef1]{fill:var(--dl-body);stroke:var(--dl-danger);stroke-width:2px}.dl-grid__hole-in[data-v-9e69cef1]{fill:var(--dl-bg);fill-opacity:.15}.dl-grid__reward[data-v-9e69cef1]{font-size:12px;font-weight:700}.dl-grid__reward.is-good[data-v-9e69cef1]{fill:var(--dl-enc)}.dl-grid__reward.is-bad[data-v-9e69cef1]{fill:var(--dl-danger)}.dl-grid__coord[data-v-9e69cef1]{fill:var(--dl-muted);font-size:9.5px}.dl-grid__value[data-v-9e69cef1]{fill:var(--dl-heading);font-variant-numeric:tabular-nums;font-weight:700}.dl-grid__q[data-v-9e69cef1]{fill:var(--dl-muted);font-variant-numeric:tabular-nums;font-weight:600}.dl-grid__q.is-pos[data-v-9e69cef1]{fill:var(--dl-accent-strong)}.dl-grid__q.is-neg[data-v-9e69cef1]{fill:var(--dl-danger)}.dl-grid__diag[data-v-9e69cef1]{stroke:var(--dl-border);stroke-width:1px}.dl-grid__mark[data-v-9e69cef1]{fill:var(--dl-bg);stroke-width:2.2px}.dl-grid__mark.is-current[data-v-9e69cef1]{stroke:var(--dl-k)}.dl-grid__mark.is-target[data-v-9e69cef1]{stroke:var(--dl-q)}.dl-grid__arrow[data-v-9e69cef1]{stroke:var(--dl-accent);stroke-width:3px;fill:none;stroke-linecap:round}.dl-grid__arrowhead[data-v-9e69cef1]{fill:var(--dl-accent)}.dl-grid__path[data-v-9e69cef1]{fill:none;stroke:var(--dl-k);stroke-width:3px;stroke-linejoin:round;stroke-linecap:round;stroke-dasharray:7 4}.dl-grid__pathhead[data-v-9e69cef1]{fill:var(--dl-k)}.dl-grid__slip[data-v-9e69cef1]{stroke:var(--dl-k);stroke-width:1.6px;stroke-dasharray:3 3}.dl-grid__slip.is-main[data-v-9e69cef1]{stroke-width:3px;stroke-dasharray:none}.dl-grid__sliplab[data-v-9e69cef1]{fill:var(--dl-k);font-size:11px;font-weight:700}.dl-grid__robot-body[data-v-9e69cef1]{fill:var(--dl-accent)}.dl-grid__robot-line[data-v-9e69cef1]{stroke:var(--dl-accent);stroke-width:2px}.dl-grid__robot-eye[data-v-9e69cef1]{fill:var(--dl-bg)}.dl-grid__robot-wheels[data-v-9e69cef1]{fill:var(--dl-body)} diff --git a/lecture-08/assets/GridWorld-D5i5gg4u.js b/lecture-08/assets/GridWorld-D5i5gg4u.js new file mode 100644 index 0000000000000000000000000000000000000000..db8ef8339041b1d0483c0db6232b6ef8fdf4cd35 --- /dev/null +++ b/lecture-08/assets/GridWorld-D5i5gg4u.js @@ -0,0 +1 @@ +import{B as e,Ct as t,H as n,St as r,T as i,_ as a,b as o,bt as s,g as c,m as l,q as u,x as d,y as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{t as m}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as h}from"./slidev/context-DB-9afGB.js";import{a as g,h as ee,l as _}from"./useReinforcement-11RE6Te1.js";var v=[`viewBox`,`width`,`height`,`aria-label`],y=[`id`],b=[`id`],x=[`x`,`y`,`width`,`height`],te=[`x`,`y`],ne=[`transform`],re=[`x`,`y`],ie=[`transform`],ae=[`x`,`y`],oe=[`x`,`y`],S=[`x`,`y`],C=[`x1`,`y1`,`x2`,`y2`],w=[`x1`,`y1`,`x2`,`y2`],T=[`x`,`y`,`width`,`height`],se=[`x`,`y`],ce=[`d`,`marker-end`],le={key:5},ue=[`d`,`marker-end`],de=[`d`,`marker-end`],fe=[`d`,`marker-end`],E=[`x`,`y`],D=[`x`,`y`],O=[`x`,`y`],k=[`d`,`marker-end`],A=[`transform`],j=4,M=m(i({__name:`GridWorld`,props:{cell:{default:72},path:{},pathStep:{default:99},values:{default:null},q:{default:null},arrows:{default:null},greedy:{type:Boolean,default:!1},marks:{default:()=>[]},highlight:{default:()=>[]},robot:{},slip:{type:Boolean,default:!1},coords:{type:Boolean,default:!1},precision:{default:2},plain:{type:Boolean,default:!1}},setup(i){let{$slidev:m,$nav:M,$clicksContext:pe,$clicks:me,$page:he,$renderContext:ge,$frontmatter:_e}=h(),N=i,P=u(),F=c(()=>N.cell*3+8),I=e=>j+e%3*N.cell,L=e=>j+Math.floor(e/3)*N.cell,R=e=>I(e)+N.cell/2,z=e=>L(e)+N.cell/2,B=Array.from({length:9},(e,t)=>t),V=c(()=>N.path?ee(N.path.slice(0,Math.max(0,N.pathStep))).cells:null),H=c(()=>N.robot===void 0?V.value?V.value[V.value.length-1]:7:N.robot),ve=c(()=>{let e=H.value??7,t=N.cell/72;return N.q?`translate(${I(e)+N.cell*.2}, ${L(e)+N.cell*.24}) scale(${t*.42})`:N.values?`translate(${R(e)}, ${z(e)}) scale(${t*.72})`:`translate(${R(e)}, ${z(e)-N.cell*.06}) scale(${t*(N.slip?.75:1)})`}),U=c(()=>{let e=V.value;if(!e||e.length<2)return``;let t=e.map(e=>[R(e),z(e)]),[n,r]=t[t.length-1],[i,a]=t[t.length-2],o=Math.hypot(n-i,r-a)||1,s=N.cell*.3;return t[t.length-1]=[n-(n-i)/o*s,r-(r-a)/o*s],t.map((e,t)=>`${t?`L`:`M`}${e[0].toFixed(1)} ${e[1].toFixed(1)}`).join(` `)}),W=c(()=>{let e=[];for(let t of B){if(_(t))continue;let n=[];N.greedy&&N.q?n=g(N.q[t]).length<4?g(N.q[t]):[]:N.arrows&&N.arrows[t]!==null&&N.arrows[t]!==void 0&&(n=[].concat(N.arrows[t]));for(let r of n)e.push({s:t,a:r})}return e}),G=[[0,-1],[0,1],[-1,0],[1,0]],K=c(()=>!!N.values&&W.value.length>0);function ye(e,t){let[n,r]=G[t],i=N.cell*(N.q?.06:K.value?.04:.1),a=N.cell*(N.q||K.value?.2:.34),o=z(e)-(K.value?N.cell*.16:0);return`M${R(e)+n*i} ${o+r*i} L${R(e)+n*a} ${o+r*a}`}let q=e=>e.length*.6*$.value;function J(e,t){let[n,r]=G[t],i=q(X(N.q?.[e][t]??0))/2,a=n?Math.min(N.cell*.34,N.cell/2-i-4):N.cell*.34;return{x:R(e)+n*a,y:z(e)+r*a+4}}let Y=(e,t)=>Math.max(N.cell*.34,q(X(N.q?.[e][t]??0))+8);function X(e){return Math.abs(e)<1e-9?`0`:Number(e.toFixed(N.precision)).toString().replace(`-`,`−`)}function Z(e,t){return N.marks.find(n=>n.s===e&&n.a===t)?.tone}let Q=c(()=>Math.max(10,Math.round(N.cell*.17))),$=c(()=>Math.max(9,Math.round(N.cell*.13)));return(c,u)=>(e(),o(`svg`,{class:`dl-grid`,viewBox:`0 0 ${F.value} ${F.value}`,width:F.value,height:F.value,role:`img`,"aria-label":`A 3 by 3 floor: the robot, its charger top right worth plus ${p(5)}, a hole in the middle worth ${p(-10)}`},[a(`defs`,null,[a(`marker`,{id:`gw-path-${p(P)}`,markerWidth:`7`,markerHeight:`7`,refX:`5`,refY:`3.5`,orient:`auto`},[...u[0]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-grid__pathhead`},null,-1)]],8,y),a(`marker`,{id:`gw-arrow-${p(P)}`,markerWidth:`6`,markerHeight:`6`,refX:`4`,refY:`3`,orient:`auto`},[...u[1]||=[a(`path`,{d:`M0 0 L6 3 L0 6 z`,class:`dl-grid__arrowhead`},null,-1)]],8,b)]),f(` floor `),(e(!0),o(l,null,n(p(B),n=>(e(),o(`g`,{key:`c${n}`},[a(`rect`,{x:I(n),y:L(n),width:i.cell,height:i.cell,class:s([`dl-grid__cell`,{"is-charger":n===p(2),"is-hole":n===p(4),"is-start":n===p(7),"is-hl":i.highlight.includes(n)}])},null,10,x),i.coords&&!p(_)(n)?(e(),o(`text`,{key:0,x:I(n)+4,y:L(n)+11,class:`dl-grid__coord`},`(`+t(Math.floor(n/p(3))+1)+`,`+t(n%p(3)+1)+`)`,9,te)):f(`v-if`,!0)]))),128)),f(` the charger: a battery with a bolt `),a(`g`,{transform:`translate(${R(p(2))}, ${z(p(2))-(i.plain?0:i.cell*.08)}) scale(${i.cell/72})`},[...u[2]||=[a(`rect`,{x:`-13`,y:`-17`,width:`26`,height:`30`,rx:`4`,class:`dl-grid__battery`},null,-1),a(`rect`,{x:`-5`,y:`-21`,width:`10`,height:`5`,rx:`1.5`,class:`dl-grid__battery-cap`},null,-1),a(`path`,{d:`M2 -12 L-6 0 H0 L-2 9 L7 -4 H1 Z`,class:`dl-grid__bolt`},null,-1)]],8,ne),i.plain?f(`v-if`,!0):(e(),o(`text`,{key:0,x:R(p(2)),y:L(p(2))+i.cell-6,"text-anchor":`middle`,class:`dl-grid__reward is-good`},`+`+t(p(5)),9,re)),f(` the hole `),a(`g`,{transform:`translate(${R(p(4))}, ${z(p(4))-(i.plain?0:i.cell*.08)}) scale(${i.cell/72})`},[...u[3]||=[a(`ellipse`,{cx:`0`,cy:`0`,rx:`22`,ry:`13`,class:`dl-grid__hole`},null,-1),a(`ellipse`,{cx:`0`,cy:`3`,rx:`15`,ry:`7`,class:`dl-grid__hole-in`},null,-1)]],8,ie),i.plain?f(`v-if`,!0):(e(),o(`text`,{key:1,x:R(p(4)),y:L(p(4))+i.cell-6,"text-anchor":`middle`,class:`dl-grid__reward is-bad`},t(p(-10).toString().replace(`-`,`−`)),9,ae)),!i.values&&!i.q?(e(),o(`text`,{key:2,x:R(p(7)),y:L(p(7))+i.cell-5,"text-anchor":`middle`,class:`dl-grid__coord`},`start`,8,oe)):f(`v-if`,!0),f(` state values `),i.values?(e(!0),o(l,{key:3},n(p(B).filter(e=>!p(_)(e)),n=>(e(),o(`text`,{key:`v${n}`,x:R(n),y:K.value?L(n)+i.cell*.8:z(n)+(H.value===n?i.cell*.36:Q.value/3),"text-anchor":`middle`,class:`dl-grid__value`,style:r({fontSize:`${Q.value}px`})},t(X(i.values[n])),13,S))),128)):f(`v-if`,!0),f(` action values `),i.q?(e(!0),o(l,{key:4},n(p(B).filter(e=>!p(_)(e)),c=>(e(),o(`g`,{key:`q${c}`},[a(`line`,{x1:I(c)+3,y1:L(c)+3,x2:I(c)+i.cell-3,y2:L(c)+i.cell-3,class:`dl-grid__diag`},null,8,C),a(`line`,{x1:I(c)+i.cell-3,y1:L(c)+3,x2:I(c)+3,y2:L(c)+i.cell-3,class:`dl-grid__diag`},null,8,w),(e(),o(l,null,n([0,1,2,3],n=>a(`g`,{key:n},[Z(c,n)?(e(),o(`rect`,{key:0,x:J(c,n).x-Y(c,n)/2,y:J(c,n).y-$.value-1,width:Y(c,n),height:$.value+6,rx:`3`,class:s([`dl-grid__mark`,`is-${Z(c,n)}`])},null,10,T)):f(`v-if`,!0),a(`text`,{x:J(c,n).x,y:J(c,n).y,"text-anchor":`middle`,class:s([`dl-grid__q`,{"is-neg":i.q[c][n]<-1e-9,"is-pos":i.q[c][n]>1e-9}]),style:r({fontSize:`${$.value}px`})},t(X(i.q[c][n])),15,se)])),64))]))),128)):f(`v-if`,!0),f(` policy arrows `),(e(!0),o(l,null,n(W.value,(t,n)=>(e(),o(`path`,{key:`a${n}`,d:ye(t.s,t.a),class:`dl-grid__arrow`,"marker-end":`url(#gw-arrow-${p(P)})`},null,8,ce))),128)),f(` the slippery floor `),i.slip?(e(),o(`g`,le,[a(`path`,{d:`M${R(5)} ${z(5)-8} L${R(5)} ${L(5)-i.cell*.28}`,class:`dl-grid__slip is-main`,"marker-end":`url(#gw-path-${p(P)})`},null,8,ue),a(`path`,{d:`M${R(5)-8} ${z(5)} L${I(5)-i.cell*.28} ${z(5)}`,class:`dl-grid__slip`,"marker-end":`url(#gw-path-${p(P)})`},null,8,de),a(`path`,{d:`M${R(5)+8} ${z(5)} L${I(5)+i.cell-4} ${z(5)}`,class:`dl-grid__slip`,"marker-end":`url(#gw-path-${p(P)})`},null,8,fe),a(`text`,{x:R(5)+6,y:L(5)+12,class:`dl-grid__sliplab is-main`},`0.8`,8,E),a(`text`,{x:I(5)+3,y:z(5)-6,class:`dl-grid__sliplab`},`0.1`,8,D),a(`text`,{x:I(5)+i.cell-22,y:z(5)+16,class:`dl-grid__sliplab`},`0.1`,8,O)])):f(`v-if`,!0),f(` the path walked so far `),U.value?(e(),o(`path`,{key:6,d:U.value,class:`dl-grid__path`,"marker-end":`url(#gw-path-${p(P)})`},null,8,k)):f(`v-if`,!0),f(` the robot `),f(` With Q-values the four edges are taken, so the robot sits small in a corner. `),H.value!==null&&H.value!==void 0?(e(),o(`g`,{key:7,transform:ve.value,class:`dl-grid__robot`},[...u[4]||=[d(``,6)]],8,A)):f(`v-if`,!0)],8,v))}}),[[`__scopeId`,`data-v-9e69cef1`]]);export{M as t}; \ No newline at end of file diff --git a/lecture-08/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 b/lecture-08/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..0acaaff03d4bb7606de02a827aeee338e5a86910 Binary files /dev/null and b/lecture-08/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 differ diff --git a/lecture-08/assets/KaTeX_AMS-Regular-DMm9YOAa.woff b/lecture-08/assets/KaTeX_AMS-Regular-DMm9YOAa.woff new file mode 100644 index 0000000000000000000000000000000000000000..b804d7b33a3fa5b2587d2d1d55006aed678e3eb2 Binary files /dev/null and b/lecture-08/assets/KaTeX_AMS-Regular-DMm9YOAa.woff differ diff --git a/lecture-08/assets/KaTeX_AMS-Regular-DRggAlZN.ttf b/lecture-08/assets/KaTeX_AMS-Regular-DRggAlZN.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6f9a5e7c03f9e64e9c7b4773a8e37ade8eaf406 Binary files /dev/null and b/lecture-08/assets/KaTeX_AMS-Regular-DRggAlZN.ttf differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf b/lecture-08/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..9ff4a5e04421e5107f74c28e27354e0b2a4e7ef8 Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff b/lecture-08/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff new file mode 100644 index 0000000000000000000000000000000000000000..9759710d1d3e16eb10012d56babb73f2479ba9f0 Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 b/lecture-08/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..f390922eceffe1f6dfb81a3dc086a92d98171b02 Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff b/lecture-08/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff new file mode 100644 index 0000000000000000000000000000000000000000..9bdd534fd2beb9b878f0219da9d63ffba56677e2 Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 b/lecture-08/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..75344a1f98e37e2c631e178065854c3a81fb842f Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 differ diff --git a/lecture-08/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf b/lecture-08/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..f522294ff0f3f8c52dfdaef7ebfaa06ebfcfaabf Binary files /dev/null and b/lecture-08/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf b/lecture-08/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4e98259c3b54076d684bf3459baeaeae8dbce97a Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff b/lecture-08/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff new file mode 100644 index 0000000000000000000000000000000000000000..e7730f66275c87c28f26530d89264cffecf90be0 Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 b/lecture-08/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..395f28beac23c7b0f7f3a1e714bd8dac253dd3bc Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Regular-CB_wures.ttf b/lecture-08/assets/KaTeX_Fraktur-Regular-CB_wures.ttf new file mode 100644 index 0000000000000000000000000000000000000000..b8461b275fae76efd0d21fd0f1aaa696a5b10f9a Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Regular-CB_wures.ttf differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 b/lecture-08/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..735f6948d63c8cc7f8233735bb9c8d843c83d804 Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 differ diff --git a/lecture-08/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff b/lecture-08/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff new file mode 100644 index 0000000000000000000000000000000000000000..acab069f90b6fe6301a004e6f8beaf6a0db48bce Binary files /dev/null and b/lecture-08/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff differ diff --git a/lecture-08/assets/KaTeX_Main-Bold-Cx986IdX.woff2 b/lecture-08/assets/KaTeX_Main-Bold-Cx986IdX.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..ab2ad21da6fbe6c171bb869240954d0ead8f68fd Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Bold-Cx986IdX.woff2 differ diff --git a/lecture-08/assets/KaTeX_Main-Bold-Jm3AIy58.woff b/lecture-08/assets/KaTeX_Main-Bold-Jm3AIy58.woff new file mode 100644 index 0000000000000000000000000000000000000000..f38136ac1cc2dcdc9d9b10b8521487468b1f768c Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Bold-Jm3AIy58.woff differ diff --git a/lecture-08/assets/KaTeX_Main-Bold-waoOVXN0.ttf b/lecture-08/assets/KaTeX_Main-Bold-waoOVXN0.ttf new file mode 100644 index 0000000000000000000000000000000000000000..4060e627dc341c1854260cbc3f7386e222a4d297 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Bold-waoOVXN0.ttf differ diff --git a/lecture-08/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 b/lecture-08/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..5931794de4a2a485fa70099bf2659b145976d043 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 differ diff --git a/lecture-08/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf b/lecture-08/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dc007977ee709a236d9e82719cf7d4e5577a81b9 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf differ diff --git a/lecture-08/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff b/lecture-08/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff new file mode 100644 index 0000000000000000000000000000000000000000..67807b0bd4f867853271f5917fb3adf377f93f53 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff differ diff --git a/lecture-08/assets/KaTeX_Main-Italic-3WenGoN9.ttf b/lecture-08/assets/KaTeX_Main-Italic-3WenGoN9.ttf new file mode 100644 index 0000000000000000000000000000000000000000..0e9b0f354ad460202bba554359f5adcc8da666b7 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Italic-3WenGoN9.ttf differ diff --git a/lecture-08/assets/KaTeX_Main-Italic-BMLOBm91.woff b/lecture-08/assets/KaTeX_Main-Italic-BMLOBm91.woff new file mode 100644 index 0000000000000000000000000000000000000000..6f43b594b6c1d863a0e3f93b001f8dd503316464 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Italic-BMLOBm91.woff differ diff --git a/lecture-08/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 b/lecture-08/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b50920e138807f385d0b0359f4f0f09891f18406 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 differ diff --git a/lecture-08/assets/KaTeX_Main-Regular-B22Nviop.woff2 b/lecture-08/assets/KaTeX_Main-Regular-B22Nviop.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..eb24a7ba282b03d830fa6c63ee897d92a5188736 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Regular-B22Nviop.woff2 differ diff --git a/lecture-08/assets/KaTeX_Main-Regular-Dr94JaBh.woff b/lecture-08/assets/KaTeX_Main-Regular-Dr94JaBh.woff new file mode 100644 index 0000000000000000000000000000000000000000..21f5812968c42392a3eaea9b0c6320870b6b8b38 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Regular-Dr94JaBh.woff differ diff --git a/lecture-08/assets/KaTeX_Main-Regular-ypZvNtVU.ttf b/lecture-08/assets/KaTeX_Main-Regular-ypZvNtVU.ttf new file mode 100644 index 0000000000000000000000000000000000000000..dd45e1ed2e18b32c516d9b481ebed3cb8bffa711 Binary files /dev/null and b/lecture-08/assets/KaTeX_Main-Regular-ypZvNtVU.ttf differ diff --git a/lecture-08/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf b/lecture-08/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf new file mode 100644 index 0000000000000000000000000000000000000000..728ce7a1e2cb689df32c3a6c26e1bd072dcf2acb Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf differ diff --git a/lecture-08/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 b/lecture-08/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..29657023adc09956249f6295746c8ce4469b50d3 Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 differ diff --git a/lecture-08/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff b/lecture-08/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff new file mode 100644 index 0000000000000000000000000000000000000000..0ae390d74c9f665cf8b1e5ea5483395da7513444 Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff differ diff --git a/lecture-08/assets/KaTeX_Math-Italic-DA0__PXp.woff b/lecture-08/assets/KaTeX_Math-Italic-DA0__PXp.woff new file mode 100644 index 0000000000000000000000000000000000000000..eb5159d4c1ca83fb92b3190223698427df0e010c Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-Italic-DA0__PXp.woff differ diff --git a/lecture-08/assets/KaTeX_Math-Italic-flOr_0UB.ttf b/lecture-08/assets/KaTeX_Math-Italic-flOr_0UB.ttf new file mode 100644 index 0000000000000000000000000000000000000000..70d559b4e937ca1b805eb39f544cbebe3c58ca6f Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-Italic-flOr_0UB.ttf differ diff --git a/lecture-08/assets/KaTeX_Math-Italic-t53AETM-.woff2 b/lecture-08/assets/KaTeX_Math-Italic-t53AETM-.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..215c143fd7805a5c2b222bd7892a1a2b09610020 Binary files /dev/null and b/lecture-08/assets/KaTeX_Math-Italic-t53AETM-.woff2 differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf b/lecture-08/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf new file mode 100644 index 0000000000000000000000000000000000000000..2f65a8a3a6d3628d11ea9c26c9077cef672fe427 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 b/lecture-08/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..cfaa3bda59246b49e94298478d6de3b3208066c8 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff b/lecture-08/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff new file mode 100644 index 0000000000000000000000000000000000000000..8d47c02d9408d34b2a9d566c0fe0d42bf82fb735 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 b/lecture-08/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..349c06dc609f896392fd5bc8b364d3bc3efc9330 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff b/lecture-08/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff new file mode 100644 index 0000000000000000000000000000000000000000..7e02df963621a5e26d53d510f0b4992eebde1c60 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf b/lecture-08/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf new file mode 100644 index 0000000000000000000000000000000000000000..d5850df98ec19de2eee9ff922ef59586efe471d0 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf b/lecture-08/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf new file mode 100644 index 0000000000000000000000000000000000000000..537279f6bd2184ed32f1a5168850609147d58ee6 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff b/lecture-08/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff new file mode 100644 index 0000000000000000000000000000000000000000..31b84829b42edae20d0148eeec0d922dad2108c4 Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff differ diff --git a/lecture-08/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 b/lecture-08/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..a90eea85f6f7bded69ff5d40114447a6d8b48cfe Binary files /dev/null and b/lecture-08/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 differ diff --git a/lecture-08/assets/KaTeX_Script-Regular-C5JkGWo-.ttf b/lecture-08/assets/KaTeX_Script-Regular-C5JkGWo-.ttf new file mode 100644 index 0000000000000000000000000000000000000000..fd679bf374af72f2a183b97b40c9c7e9e51fbe5e Binary files /dev/null and b/lecture-08/assets/KaTeX_Script-Regular-C5JkGWo-.ttf differ diff --git a/lecture-08/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 b/lecture-08/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..b3048fc115681ee6c1bc86b0aa158cfbbf59daa3 Binary files /dev/null and b/lecture-08/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 differ diff --git a/lecture-08/assets/KaTeX_Script-Regular-D5yQViql.woff b/lecture-08/assets/KaTeX_Script-Regular-D5yQViql.woff new file mode 100644 index 0000000000000000000000000000000000000000..0e7da821eee0dd05a0a6f0b16c2c1345dc573a84 Binary files /dev/null and b/lecture-08/assets/KaTeX_Script-Regular-D5yQViql.woff differ diff --git a/lecture-08/assets/KaTeX_Size1-Regular-C195tn64.woff b/lecture-08/assets/KaTeX_Size1-Regular-C195tn64.woff new file mode 100644 index 0000000000000000000000000000000000000000..7f292d91184f257054ef77cc1cd3443db757c9cc Binary files /dev/null and b/lecture-08/assets/KaTeX_Size1-Regular-C195tn64.woff differ diff --git a/lecture-08/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf b/lecture-08/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf new file mode 100644 index 0000000000000000000000000000000000000000..871fd7d19d8658f64d8696ed9cdfc82c821ed76d Binary files /dev/null and b/lecture-08/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf differ diff --git a/lecture-08/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 b/lecture-08/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..c5a8462fbfe2c39a7c1857b9e296e62500a8a8a5 Binary files /dev/null and b/lecture-08/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 differ diff --git a/lecture-08/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf b/lecture-08/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf new file mode 100644 index 0000000000000000000000000000000000000000..7a212caf91c0007e826fee2d622bf48acbd30dde Binary files /dev/null and b/lecture-08/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf differ diff --git a/lecture-08/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 b/lecture-08/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..e1bccfe2403a4ed770c1697ae7c15b9e1cd9bc4e Binary files /dev/null and b/lecture-08/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 differ diff --git a/lecture-08/assets/KaTeX_Size2-Regular-oD1tc_U0.woff b/lecture-08/assets/KaTeX_Size2-Regular-oD1tc_U0.woff new file mode 100644 index 0000000000000000000000000000000000000000..d241d9be2d317f7b39b401d96c8b18836acea0fa Binary files /dev/null and b/lecture-08/assets/KaTeX_Size2-Regular-oD1tc_U0.woff differ diff --git a/lecture-08/assets/KaTeX_Size3-Regular-CTq5MqoE.woff b/lecture-08/assets/KaTeX_Size3-Regular-CTq5MqoE.woff new file mode 100644 index 0000000000000000000000000000000000000000..e6e9b658dcf1cd031ac82b6b8f312444c55d4fc0 Binary files /dev/null and b/lecture-08/assets/KaTeX_Size3-Regular-CTq5MqoE.woff differ diff --git a/lecture-08/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf b/lecture-08/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf new file mode 100644 index 0000000000000000000000000000000000000000..00bff3495fa9d2f98c1c9ce436add6a1bcfe87fb Binary files /dev/null and b/lecture-08/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf differ diff --git a/lecture-08/assets/KaTeX_Size4-Regular-BF-4gkZK.woff b/lecture-08/assets/KaTeX_Size4-Regular-BF-4gkZK.woff new file mode 100644 index 0000000000000000000000000000000000000000..e1ec5457664f438ce5a1cc6dd8409bf60ca7804b Binary files /dev/null and b/lecture-08/assets/KaTeX_Size4-Regular-BF-4gkZK.woff differ diff --git a/lecture-08/assets/KaTeX_Size4-Regular-DWFBv043.ttf b/lecture-08/assets/KaTeX_Size4-Regular-DWFBv043.ttf new file mode 100644 index 0000000000000000000000000000000000000000..74f08921f00f71f413ca42c9d1c90202e672ef38 Binary files /dev/null and b/lecture-08/assets/KaTeX_Size4-Regular-DWFBv043.ttf differ diff --git a/lecture-08/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 b/lecture-08/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..680c13085076a2f6c5a7e695935ec3f21cddb65f Binary files /dev/null and b/lecture-08/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 differ diff --git a/lecture-08/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff b/lecture-08/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff new file mode 100644 index 0000000000000000000000000000000000000000..2432419f28936aff53ddfa2a732d027e6a6648fd Binary files /dev/null and b/lecture-08/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff differ diff --git a/lecture-08/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 b/lecture-08/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 new file mode 100644 index 0000000000000000000000000000000000000000..771f1af705f5cef5f578b3a1e7d8eff66f9b76b0 Binary files /dev/null and b/lecture-08/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 differ diff --git a/lecture-08/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf b/lecture-08/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c83252c5714c71a3e0ec62195884167339a0129b Binary files /dev/null and b/lecture-08/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf differ diff --git a/lecture-08/assets/NoteDisplay-DCBzjb4F.css b/lecture-08/assets/NoteDisplay-DCBzjb4F.css new file mode 100644 index 0000000000000000000000000000000000000000..249a685ef5ff9168a0e2385b2e0bb8802f138a28 --- /dev/null +++ b/lecture-08/assets/NoteDisplay-DCBzjb4F.css @@ -0,0 +1 @@ +.slidev-note :first-child{margin-top:0}.slidev-note{overflow-wrap:anywhere;word-break:break-word} diff --git a/lecture-08/assets/PollSlide-C7CHIzYm.css b/lecture-08/assets/PollSlide-C7CHIzYm.css new file mode 100644 index 0000000000000000000000000000000000000000..b3093394de288c41a62676784455c5efe27b9a2b --- /dev/null +++ b/lecture-08/assets/PollSlide-C7CHIzYm.css @@ -0,0 +1 @@ +.dl-poll__question[data-v-743a908f]{color:var(--dl-heading);margin-bottom:1.1rem;font-size:1.7rem;font-weight:600}.dl-poll__item[data-v-743a908f]{font-size:var(--dl-fs-body);align-items:baseline;gap:.7rem;margin:.55rem 0;display:flex}.dl-poll__bullet[data-v-743a908f]{background:var(--dl-accent-soft);width:1.5rem;height:1.5rem;color:var(--dl-accent);border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;font-size:.85rem;font-weight:700;display:inline-flex} diff --git a/lecture-08/assets/PollSlide-CA6YXjEC.js b/lecture-08/assets/PollSlide-CA6YXjEC.js new file mode 100644 index 0000000000000000000000000000000000000000..0d9398ba2094a469f402b68985f6bc4ec5aa1e96 --- /dev/null +++ b/lecture-08/assets/PollSlide-CA6YXjEC.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,H as r,T as i,_ as a,b as o,et as s,m as c}from"./modules/shiki-CJZsCeMT.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as u}from"./slidev/context-DB-9afGB.js";import{t as d}from"./slidev/VClicks-lrjw2pb1.js";var f={class:`dl-poll`},p={class:`dl-poll__question`},m=l(i({__name:`PollSlide`,props:{question:{},items:{}},setup(i){let{$slidev:l,$nav:m,$clicksContext:h,$clicks:g,$page:_,$renderContext:v,$frontmatter:y}=u(),b=i;return(i,l)=>{let u=d;return e(),o(`div`,f,[a(`div`,p,n(b.question),1),t(u,null,{default:s(()=>[(e(!0),o(c,null,r(b.items,t=>(e(),o(`div`,{key:t,class:`dl-poll__item`},[l[0]||=a(`span`,{class:`dl-poll__bullet`},`?`,-1),a(`span`,null,n(t),1)]))),128))]),_:1})])}}}),[[`__scopeId`,`data-v-743a908f`]]);export{m as t}; \ No newline at end of file diff --git a/lecture-08/assets/RlGlyph-DU7BVq-e.css b/lecture-08/assets/RlGlyph-DU7BVq-e.css new file mode 100644 index 0000000000000000000000000000000000000000..eb6486361efbc655f99c673202b29bc99b38b494 --- /dev/null +++ b/lecture-08/assets/RlGlyph-DU7BVq-e.css @@ -0,0 +1 @@ +.dl-rlglyph[data-v-4b66796b]{vertical-align:middle;flex-direction:column;align-items:center;margin:0;display:inline-flex}.dl-rlglyph__agent[data-v-4b66796b]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.6px}.dl-rlglyph__env[data-v-4b66796b]{fill:var(--dl-surface);stroke:var(--dl-body);stroke-width:2.4px}.dl-rlglyph__arrow[data-v-4b66796b]{fill:none;stroke:var(--dl-body);stroke-width:2.4px}.dl-rlglyph__arrow.is-thick[data-v-4b66796b]{stroke-width:5px}.dl-rlglyph__arrow.is-thin[data-v-4b66796b]{stroke-width:1.6px}.dl-rlglyph__arrow.is-good[data-v-4b66796b]{stroke:var(--dl-enc)}.dl-rlglyph__head[data-v-4b66796b]{fill:var(--dl-body)}.dl-rlglyph__head.is-good[data-v-4b66796b]{fill:var(--dl-enc)}.dl-rlglyph__state[data-v-4b66796b]{fill:var(--dl-surface);stroke:var(--dl-body);stroke-width:2.2px}.dl-rlglyph__state.is-accent[data-v-4b66796b]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-rlglyph__bar[data-v-4b66796b]{fill:var(--dl-accent)}.dl-rlglyph__axis[data-v-4b66796b]{stroke:var(--dl-body);stroke-width:1.6px}.dl-rlglyph__cell[data-v-4b66796b]{fill:var(--dl-accent);stroke:var(--dl-bg);stroke-width:2px}.dl-rlglyph__cell.is-hole[data-v-4b66796b]{fill:var(--dl-danger)}.dl-rlglyph__tcell[data-v-4b66796b]{fill:var(--dl-surface);stroke:var(--dl-body);stroke-width:1.4px}.dl-rlglyph__tcell.is-hot[data-v-4b66796b]{fill:var(--dl-accent-soft);stroke:var(--dl-k);stroke-width:3px}.dl-rlglyph__net[data-v-4b66796b]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:2.4px}.dl-rlglyph__dot[data-v-4b66796b]{fill:var(--dl-body)}.dl-rlglyph__dot.is-good[data-v-4b66796b]{fill:var(--dl-enc)}.dl-rlglyph__t[data-v-4b66796b]{fill:var(--dl-enc);font-size:13px;font-weight:700}.dl-rlglyph__t.is-sm[data-v-4b66796b]{fill:var(--dl-muted);font-size:9px;font-weight:600}.dl-rlglyph__robot[data-v-4b66796b]{fill:var(--dl-accent)}.dl-rlglyph__robot-line[data-v-4b66796b]{stroke:var(--dl-accent);stroke-width:2px}.dl-rlglyph__eye[data-v-4b66796b]{fill:var(--dl-bg)}.dl-rlglyph__wheels[data-v-4b66796b]{fill:var(--dl-body)}.dl-rlglyph__label[data-v-4b66796b]{color:var(--dl-body);text-align:center;margin-top:.2rem;font-size:.78rem;font-weight:600} diff --git a/lecture-08/assets/RlGlyph-i3WvlmEb.js b/lecture-08/assets/RlGlyph-i3WvlmEb.js new file mode 100644 index 0000000000000000000000000000000000000000..60f9cee5df30c242b4d2a25c638b5160fea36254 --- /dev/null +++ b/lecture-08/assets/RlGlyph-i3WvlmEb.js @@ -0,0 +1 @@ +import{B as e,H as t,St as n,T as r,U as i,_ as a,b as o,bt as s,m as c,q as l,x as u,y as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m}from"./slidev/context-DB-9afGB.js";var h=[`width`,`height`,`aria-label`],g=[`id`],_=[`id`],v={key:0},y=[`marker-end`],b=[`marker-end`],x={key:1},S=[`marker-end`],C=[`marker-end`],w=[`marker-end`],T={key:2},E=[`x`,`y`,`height`],D={key:3},O=[`x`,`y`],k={key:4},A=[`x`,`y`],j=[`marker-end`],M={key:5},N=[`y`],P=[`marker-end`],F=[`d`],I=[`cy`],L={key:6,transform:`translate(50 54) scale(2)`},R={key:0,class:`dl-rlglyph__label`},z=p(r({__name:`RlGlyph`,props:{kind:{},size:{default:64},label:{}},setup(r){let{$slidev:p,$nav:z,$clicksContext:B,$clicks:V,$page:H,$renderContext:U,$frontmatter:W}=m(),G=r,K=l(),q=[0,1,2,3,4].map(e=>.75**e),J=[.55,.85,1,.35,0,.85,.2,.35,.55];return(r,l)=>(e(),o(`figure`,{class:`dl-rlglyph`,style:n({width:`${G.size}px`})},[(e(),o(`svg`,{viewBox:`0 0 100 100`,width:G.size,height:G.size,role:`img`,"aria-label":G.label??G.kind},[a(`defs`,null,[a(`marker`,{id:`rg-${f(K)}`,markerWidth:`6`,markerHeight:`6`,refX:`5`,refY:`3`,orient:`auto`},[...l[0]||=[a(`path`,{d:`M0 0 L6 3 L0 6 z`,class:`dl-rlglyph__head`},null,-1)]],8,g),a(`marker`,{id:`rgk-${f(K)}`,markerWidth:`6`,markerHeight:`6`,refX:`5`,refY:`3`,orient:`auto`},[...l[1]||=[a(`path`,{d:`M0 0 L6 3 L0 6 z`,class:`dl-rlglyph__head is-good`},null,-1)]],8,_)]),G.kind===`loop`?(e(),o(`g`,v,[l[2]||=a(`rect`,{x:`6`,y:`34`,width:`30`,height:`30`,rx:`6`,class:`dl-rlglyph__agent`},null,-1),l[3]||=a(`circle`,{cx:`76`,cy:`49`,r:`18`,class:`dl-rlglyph__env`},null,-1),a(`path`,{d:`M24 30 C34 8, 62 8, 70 28`,class:`dl-rlglyph__arrow`,"marker-end":`url(#rg-${f(K)})`},null,8,y),a(`path`,{d:`M70 70 C62 92, 34 92, 24 70`,class:`dl-rlglyph__arrow is-good`,"marker-end":`url(#rgk-${f(K)})`},null,8,b),l[4]||=a(`text`,{x:`47`,y:`96`,"text-anchor":`middle`,class:`dl-rlglyph__t is-good`},`+1`,-1)])):G.kind===`mdp`?(e(),o(`g`,x,[a(`path`,{d:`M28 30 L68 24`,class:`dl-rlglyph__arrow is-thick`,"marker-end":`url(#rg-${f(K)})`},null,8,S),a(`path`,{d:`M24 38 L44 70`,class:`dl-rlglyph__arrow`,"marker-end":`url(#rg-${f(K)})`},null,8,C),a(`path`,{d:`M76 36 L60 70`,class:`dl-rlglyph__arrow is-thin`,"marker-end":`url(#rg-${f(K)})`},null,8,w),l[5]||=a(`circle`,{cx:`20`,cy:`30`,r:`11`,class:`dl-rlglyph__state is-accent`},null,-1),l[6]||=a(`circle`,{cx:`80`,cy:`24`,r:`11`,class:`dl-rlglyph__state`},null,-1),l[7]||=a(`circle`,{cx:`52`,cy:`80`,r:`11`,class:`dl-rlglyph__state`},null,-1)])):G.kind===`return`?(e(),o(`g`,T,[(e(!0),o(c,null,t(f(q),(t,r)=>(e(),o(`rect`,{key:r,x:8+r*18,y:86-t*70,width:`13`,height:t*70,rx:`2`,class:`dl-rlglyph__bar`,style:n({opacity:.45+.55*t})},null,12,E))),128)),l[8]||=a(`line`,{x1:`4`,y1:`86`,x2:`96`,y2:`86`,class:`dl-rlglyph__axis`},null,-1),l[9]||=a(`text`,{x:`50`,y:`98`,"text-anchor":`middle`,class:`dl-rlglyph__t is-sm`},`γ⁰ γ¹ γ² γ³ γ⁴`,-1)])):G.kind===`value`?(e(),o(`g`,D,[(e(),o(c,null,t(J,(e,t)=>a(`rect`,{key:t,x:8+t%3*28,y:8+Math.floor(t/3)*28,width:`28`,height:`28`,class:s(t===4?`dl-rlglyph__cell is-hole`:`dl-rlglyph__cell`),style:n(t===4?{}:{fillOpacity:.12+.88*e})},null,14,O)),64))])):G.kind===`qtable`?(e(),o(`g`,k,[(e(),o(c,null,t(3,n=>a(`g`,{key:n},[(e(),o(c,null,t(4,e=>a(`rect`,{key:e,x:6+(e-1)*22,y:10+(n-1)*20,width:`22`,height:`20`,class:`dl-rlglyph__tcell`},null,8,A)),64))])),64)),l[10]||=a(`rect`,{x:`50`,y:`30`,width:`22`,height:`20`,class:`dl-rlglyph__tcell is-hot`},null,-1),a(`path`,{d:`M61 92 V58`,class:`dl-rlglyph__arrow is-good`,"marker-end":`url(#rgk-${f(K)})`},null,8,j),l[11]||=a(`text`,{x:`40`,y:`84`,"text-anchor":`end`,class:`dl-rlglyph__t is-good`},`r+γ max`,-1)])):G.kind===`dqn`?(e(),o(`g`,M,[(e(),o(c,null,t(4,e=>a(`rect`,{key:e,x:`4`,y:18+(e-1)*14,width:`22`,height:`10`,rx:`2`,class:`dl-rlglyph__tcell`},null,8,N)),64)),a(`path`,{d:`M30 50 H38`,class:`dl-rlglyph__arrow is-thin`,"marker-end":`url(#rg-${f(K)})`},null,8,P),l[12]||=a(`polygon`,{points:`42,24 72,36 72,64 42,76`,class:`dl-rlglyph__net`},null,-1),(e(),o(c,null,t(4,e=>a(`path`,{key:`o${e}`,d:`M74 ${32+(e-1)*12} H90`,class:s([`dl-rlglyph__arrow is-thin`,{"is-good":e===2}])},null,10,F)),64)),(e(),o(c,null,t(4,e=>a(`circle`,{key:`d${e}`,cx:`93`,cy:32+(e-1)*12,r:`3.5`,class:s(e===2?`dl-rlglyph__dot is-good`:`dl-rlglyph__dot`)},null,10,I)),64))])):G.kind===`robot`?(e(),o(`g`,L,[...l[13]||=[u(``,6)]])):d(`v-if`,!0)],8,h)),r.$slots.default?(e(),o(`figcaption`,R,[i(r.$slots,`default`,{},void 0,!0)])):d(`v-if`,!0)],4))}}),[[`__scopeId`,`data-v-4b66796b`]]);export{z as t}; \ No newline at end of file diff --git a/lecture-08/assets/SlideWrapper-BDw_Ew7k.js b/lecture-08/assets/SlideWrapper-BDw_Ew7k.js new file mode 100644 index 0000000000000000000000000000000000000000..6ef428bbc24725b5a14103adfbfd0c83d434307d --- /dev/null +++ b/lecture-08/assets/SlideWrapper-BDw_Ew7k.js @@ -0,0 +1,2 @@ +import{$ as e,B as t,C as n,K as r,O as i,Q as a,R as o,St as s,T as c,U as l,Z as ee,_ as u,b as d,bt as f,dt as p,f as m,g as h,gt as g,i as _,lt as v,m as te,v as y,y as b,yt as x,z as ne}from"./modules/shiki-CJZsCeMT.js";import{A as S,Q as C,X as w,Z as T,t as E,tt as D,z as O}from"./useNav-B0kQsolV.js";import{t as k}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{N as A,p as re}from"./modules/vue-Dnfgf7Ad.js";import{_ as ie,d as j,f as M,g as N,h as P,m as F,n as I,p as L,v as R}from"./slidev/context-DB-9afGB.js";import{n as z,r as B,t as V}from"./syncState-3Tc2ZArb.js";import{a as H,p as U}from"./index-CvCioxNn.js";import"./slidev/client-beF_Q0xG.js";import{t as W}from"./useDrawings-B2TJYfiB.js";var G=[`innerHTML`],K=c({__name:`DrawingPreview`,props:{page:{}},setup(e){let{drawingState:n}=W();return(r,i)=>x(n)[e.page]?(t(),d(`svg`,{key:0,class:`w-full h-full absolute top-0 pointer-events-none`,innerHTML:x(n)[e.page]},null,8,G)):b(`v-if`,!0)}}),q=v({}),J=[],Y=[];z(q,`$syncUp`,!0),z(q,`$syncDown`,!0),z(q,`$paused`,!1),z(q,`$onSet`,e=>J.push(e)),z(q,`$onPatch`,e=>Y.push(e)),B(),z(q,`$patch`,async()=>!1);var ae=V(q,q,!0),X=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];X&&Number(X);var Z=window.navigator.userAgent.match(/Chrome\/(\d+)/)?.[1];Z&&Number(Z);var oe=new class{_screenshotSession=null;getSnapshot(e,t){let n=e+(t?`-dark`:`-light`),r=ae.state[n];if(!r)return;let i=O(e);if(i&&r?.revision===i?.meta.slide.revision)return r.image}async saveSnapshot(e,t,n){return!1}async startCapturing(e){return!1}},se=[`id`],ce=[`id`],le={class:`slidev-slide-container w-full h-full relative`},ue=[`src`],Q=p(null),de=k(c({__name:`SlideContainer`,props:{width:{type:Number},meta:{default:()=>({})},isMain:{type:Boolean,default:!1},no:{type:Number,required:!1},useSnapshot:{type:Boolean,default:!1},contentStyle:{type:Object,default:()=>({})}},setup(n){let r=n,{isPrintMode:i}=E(),c=p(null),f=re(c),m=p(null),g=h(()=>r.width??f.width.value),v=h(()=>r.width?r.width/w.value:f.height.value),y=h(()=>S.value&&!i.value?+S.value:Math.min(g.value/C.value,v.value/T.value)),x=h(()=>({...r.contentStyle,height:`${T.value}px`,width:`${C.value}px`,"--slidev-slide-scale":y.value})),D=h(()=>r.width?{width:`${r.width}px`,height:`${r.width/w.value}px`}:{});if(r.isMain){let e=document.documentElement.style;a(()=>e.setProperty(`--slidev-slide-scale`,y.value.toString())),ne(()=>e.removeProperty(`--slidev-slide-scale`))}A(ie,y),A(N,m),e(()=>{r.isMain&&(Q.value=m.value)}),o(()=>{ee(()=>r.isMain&&y.value,()=>{_()})});let O=h(()=>{if(!(r.no==null||!r.useSnapshot))return oe.getSnapshot(r.no,U.value)});return(e,r)=>O.value?(t(),d(te,{key:1},[b(` Image Snapshot `),u(`div`,le,[u(`img`,{src:O.value,class:`w-full h-full object-cover`,style:s(D.value)},null,12,ue),r[0]||=u(`div`,{absolute:``,"bottom-1":``,"right-1":``,"p0.5":``,"text-cyan:75":``,"bg-cyan:10":``,rounded:``,title:`Snapshot`},[u(`div`,{class:`i-carbon-camera`})],-1)])],2112)):(t(),d(`div`,{key:0,id:n.isMain?`slide-container`:void 0,ref_key:`container`,ref:c,class:`slidev-slide-container`,style:s(D.value)},[u(`div`,{id:n.isMain?`slide-content`:void 0,ref_key:`slideElement`,ref:m,class:`slidev-slide-content`,style:s(x.value)},[l(e.$slots,`default`,{},void 0,!0)],12,ce),l(e.$slots,`controls`,{},void 0,!0)],12,se))}}),[[`__scopeId`,`data-v-0167a76e`]]),fe=Object.assign({}),pe=Object.assign({}),me=Object.assign({}),he=Object.assign({}),ge=Object.assign({}),_e=Object.assign({}),ve={course:{code:`PGR207`,year:2026,title:`Deep Learning`,instructor:`Vajira Thambawita (PhD)`,email:`vajira@simula.no`},space:`DeepLearning-VT/DeepLearning_2026`,repo:`vlbthambawita/DeepLearning`,decks:[{id:`lecture-01`,title:`Introduction to Deep Learning`,subtitle:`Course overview, what deep learning is, and where it is used`,week:1,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025- Lecture 01.pdf`},{id:`lecture-02`,title:`Basics of Neural Networks`,subtitle:`Artificial neurons, the perceptron, Adaline and gradient descent`,week:2,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 02 .pdf`},{id:`lecture-03`,title:`PyTorch for Deep Learning`,subtitle:`Tensors, autograd, and a fully-connected network on MNIST`,week:3,published:!0,notebook:null,source:null},{id:`lecture-04`,title:`Deep Convolutional Neural Networks`,subtitle:`Locality and weight sharing, the convolution operation, and CNNs in PyTorch`,week:4,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 03.pdf`},{id:`lecture-05`,title:`Recurrent Neural Networks`,subtitle:`Sequence data, the recurrent layer, LSTM and GRU, and an RNN in PyTorch`,week:6,published:!0,publicNotes:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 5_6.pdf`},{id:`lecture-06`,title:`Transformers`,subtitle:`Query, key and value; the original architecture, and what modern transformers changed`,week:7,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 5_6.pdf`},{id:`transformer-v2`,title:`Transformer v2: The Illustrated Transformer`,subtitle:`Self-attention by hand, many heads, the decoder and training — after Jay Alammar’s The Illustrated Transformer`,week:7,published:!0,notebook:null,source:`https://jalammar.github.io/illustrated-transformer/`},{id:`lecture-07`,title:`Generative Models and GANs`,subtitle:`Autoencoders, VAEs, the adversarial game — and how diffusion took over`,week:9,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025 - Lecture 07.pdf`},{id:`lecture-08`,title:`Deep Reinforcement Learning`,subtitle:`Learning to act from a score: returns, values, Q-learning and deep Q-networks`,week:11,published:!0,notebook:null,source:`old_slides/2025/Teaching - Deep Leaning - 2025- week 11.pptx`}]},ye=[`href`],be=Object.assign({"../../../../../packages/slidev-theme-dl2026/slide-top.vue":k(c({__name:`slide-top`,setup(e){let{$slidev:n,$page:r,$renderContext:i}=I(),a=h(()=>i.value===`slide`&&!n.nav.isPrintMode),o=h(()=>n.themeConfigs?.lecture??``),s=h(()=>n.themeConfigs?.lectureTitle??``),c=h(()=>{let e=r.value,t=`[${o.value?`Lecture ${o.value}, slide ${e}`:`Slide ${e}`}] `,n=[`**Lecture:** ${o.value}${s.value?` — ${s.value}`:``}`,`**Slide:** ${e}`,`**Link:** ${typeof window<`u`?`${window.location.origin}${window.location.pathname}#/${e}`:``}`,``,`**What is wrong?**`,``,``].join(` +`),i=new URLSearchParams({title:t,body:n,labels:`slides`});return`https://github.com/${ve.repo}/issues/new?${i}`});return(e,n)=>a.value?(t(),d(`a`,{key:0,class:`dl-report`,href:c.value,target:`_blank`,rel:`noopener`,title:`Report a problem with this slide on GitHub`,onClick:n[0]||=m(()=>{},[`stop`])},`Report issue`,8,ye)):b(`v-if`,!0)}}),[[`__scopeId`,`data-v-6b2267dc`]])}),xe=Object.assign({}),Se=Object.assign({}),Ce=Object.assign({}),we=Object.assign({}),Te=Object.assign({}),Ee=[Object.values(fe)[0],Object.values(pe)[0],Object.values(me)[0]].filter(Boolean),De={render:()=>Ee.map(e=>i(e))},$=[Object.values(he)[0],Object.values(ge)[0],Object.values(_e)[0]].filter(Boolean),Oe={render:()=>$.map(e=>i(e))},ke=[Object.values(be)[0],Object.values(xe)[0],Object.values(Se)[0]].filter(Boolean),Ae={render:()=>ke.map(e=>i(e))},je=[Object.values(Ce)[0],Object.values(we)[0],Object.values(Te)[0]].filter(Boolean),Me={render:()=>je.map(e=>i(e))},Ne=[`data-slidev-no`,`lang`],Pe=k(c({__name:`SlideWrapper`,props:{clicksContext:{type:Object,required:!0},renderContext:{type:String,default:`slide`},route:{type:Object,required:!0}},setup(e){let i=e,a=h(()=>i.route.meta?.slide?.frontmatter.zoom??1);A(P,i.route),A(L,i.route.meta.slide.frontmatter),A(M,p(i.route.no)),A(F,p(i.renderContext)),A(j,g(i,`clicksContext`)),A(R,a);let o=h(()=>({"user-select":D.selectable?void 0:`none`,"--slidev-slide-zoom-scale":a.value===1?void 0:a.value}));return(a,c)=>(t(),d(`div`,{"data-slidev-no":i.route.no,class:f(x(H)(e.route,[`slide`,`presenter`].includes(i.renderContext)?``:`disable-view-transition`)),style:s(o.value),lang:i.route.meta.slide.frontmatter.lang},[n(x(Me)),(t(),y(r(i.route.component))),n(x(Ae))],14,Ne))}}),[[`__scopeId`,`data-v-a7136532`]]);export{Q as a,de as i,Oe as n,K as o,De as r,Pe as t}; \ No newline at end of file diff --git a/lecture-08/assets/SlideWrapper-DBNQYNtZ.css b/lecture-08/assets/SlideWrapper-DBNQYNtZ.css new file mode 100644 index 0000000000000000000000000000000000000000..c356c9b2e1a7db70c412549d55971154ace47d6a --- /dev/null +++ b/lecture-08/assets/SlideWrapper-DBNQYNtZ.css @@ -0,0 +1 @@ +.slidev-slide-container[data-v-0167a76e]{width:100%;height:100%;position:relative;overflow:hidden}.slidev-slide-content[data-v-0167a76e]{--slidev-slide-container-scale:var(--slidev-slide-scale);transform:translate(-50%, -50%) scale(var(--slidev-slide-scale));--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));position:absolute;top:50%;left:50%;overflow:hidden}.dark .slidev-slide-content[data-v-0167a76e]{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.dl-report[data-v-6b2267dc]{z-index:10;letter-spacing:.04em;color:var(--dl-muted);opacity:.55;font-size:.6rem;text-decoration:none;transition:opacity .15s,color .15s;position:absolute;bottom:.2rem;right:3rem}.dl-report[data-v-6b2267dc]:hover,.dl-report[data-v-6b2267dc]:focus-visible{opacity:1;color:var(--dl-accent);text-decoration:underline}.disable-view-transition[data-v-a7136532] *{view-transition-name:none!important}.slidev-page[data-v-a7136532]{--slidev-slide-zoom-scale:1;width:calc(100% / var(--slidev-slide-zoom-scale));height:calc(100% / var(--slidev-slide-zoom-scale));transform-origin:0 0;scale:var(--slidev-slide-zoom-scale);--slidev-slide-scale:calc(var(--slidev-slide-container-scale) * var(--slidev-slide-zoom-scale));position:absolute;inset:0} diff --git a/lecture-08/assets/Slider-BO0rW71G.css b/lecture-08/assets/Slider-BO0rW71G.css new file mode 100644 index 0000000000000000000000000000000000000000..6ac46df0c928ac6d67cf095ecd0f4a83647a6d9f --- /dev/null +++ b/lecture-08/assets/Slider-BO0rW71G.css @@ -0,0 +1 @@ +.dl-slider[data-v-b8762282]{color:var(--dl-body);grid-template-columns:1fr auto;align-items:center;gap:.15rem .6rem;font-size:.82rem;display:grid}.dl-slider.is-disabled[data-v-b8762282]{opacity:.45}.dl-slider__label[data-v-b8762282]{grid-column:1}.dl-slider__value[data-v-b8762282]{text-align:right;font-variant-numeric:tabular-nums;min-width:3.6rem;color:var(--dl-accent);grid-area:1/2/span 2;align-self:center;font-weight:600}.dl-slider__unit[data-v-b8762282]{color:var(--dl-muted);margin-left:.1rem;font-weight:400}.dl-slider input[data-v-b8762282]{width:100%;accent-color:var(--dl-accent);cursor:pointer;grid-column:1}.dl-slider input[data-v-b8762282]:disabled{cursor:not-allowed} diff --git a/lecture-08/assets/Slider-C2M0Z0oG.js b/lecture-08/assets/Slider-C2M0Z0oG.js new file mode 100644 index 0000000000000000000000000000000000000000..1ea8f07e2f498211f62dd5acd4debeae70f5f3bc --- /dev/null +++ b/lecture-08/assets/Slider-C2M0Z0oG.js @@ -0,0 +1 @@ +import{B as e,Ct as t,J as n,M as r,S as i,T as a,_ as o,b as s,bt as c,g as l,l as u,tt as d,y as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m}from"./slidev/context-DB-9afGB.js";var h={key:0,class:`dl-slider__label`},g=[`min`,`max`,`step`,`disabled`],_={class:`dl-slider__value`},v={key:0,class:`dl-slider__unit`},y=p(a({__name:`Slider`,props:r({label:{},min:{default:0},max:{default:1},step:{default:.01},precision:{default:2},unit:{},format:{},disabled:{type:Boolean,default:!1}},{modelValue:{required:!0},modelModifiers:{}}),emits:[`update:modelValue`],setup(r){let{$slidev:a,$nav:p,$clicksContext:y,$clicks:b,$page:x,$renderContext:S,$frontmatter:C}=m(),w=r,T=n(r,`modelValue`),E=l(()=>w.format?w.format(T.value):T.value.toFixed(w.precision)),D=new Set([`ArrowLeft`,`ArrowRight`,`ArrowUp`,`ArrowDown`,`Home`,`End`,`PageUp`,`PageDown`,` `]);function O(e){D.has(e.key)&&e.stopPropagation()}return(n,r)=>(e(),s(`label`,{class:c([`dl-slider`,{"is-disabled":w.disabled}])},[w.label?(e(),s(`span`,h,t(w.label),1)):f(`v-if`,!0),d(o(`input`,{"onUpdate:modelValue":r[0]||=e=>T.value=e,type:`range`,min:w.min,max:w.max,step:w.step,disabled:w.disabled,onKeydown:O},null,40,g),[[u,T.value,void 0,{number:!0}]]),o(`output`,_,[i(t(E.value),1),w.unit?(e(),s(`span`,v,t(w.unit),1)):f(`v-if`,!0)])],2))}}),[[`__scopeId`,`data-v-b8762282`]]);export{y as t}; \ No newline at end of file diff --git a/lecture-08/assets/StepButton-C1ItLUkw.css b/lecture-08/assets/StepButton-C1ItLUkw.css new file mode 100644 index 0000000000000000000000000000000000000000..ad680d266470a823054f3dd6aa91ee48be253492 --- /dev/null +++ b/lecture-08/assets/StepButton-C1ItLUkw.css @@ -0,0 +1 @@ +.dl-btn[data-v-f82500e8]{font:inherit;cursor:pointer;border:1px solid #0000;border-radius:6px;align-items:center;gap:.35rem;padding:.32rem .75rem;font-size:.82rem;font-weight:600;transition:background .12s,border-color .12s;display:inline-flex}.dl-btn[data-v-f82500e8]:disabled{opacity:.4;cursor:not-allowed}.dl-btn[data-v-f82500e8]:focus-visible{outline:2px solid var(--dl-accent);outline-offset:2px}.is-primary[data-v-f82500e8]{background:var(--dl-accent);color:#fff}.is-primary[data-v-f82500e8]:not(:disabled):hover{background:var(--dl-accent-strong)}.is-ghost[data-v-f82500e8]{border-color:var(--dl-border);color:var(--dl-body);background:0 0}.is-ghost[data-v-f82500e8]:not(:disabled):hover{border-color:var(--dl-accent);color:var(--dl-accent)}.dl-btn__glyph[data-v-f82500e8]{font-family:Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,sans-serif;font-size:.9em} diff --git a/lecture-08/assets/StepButton-DD4XxENU.js b/lecture-08/assets/StepButton-DD4XxENU.js new file mode 100644 index 0000000000000000000000000000000000000000..5c5ea6475893d71b31969665717f677d28f075ab --- /dev/null +++ b/lecture-08/assets/StepButton-DD4XxENU.js @@ -0,0 +1 @@ +import{B as e,Ct as t,S as n,T as r,b as i,bt as a,y as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-DB-9afGB.js";var l=[`disabled`],u={key:0,class:`dl-btn__glyph`,"aria-hidden":`true`},d=s(r({__name:`StepButton`,props:{label:{},variant:{default:`primary`},disabled:{type:Boolean,default:!1},glyph:{}},emits:[`click`],setup(r,{emit:s}){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=c(),v=r,y=s;return(r,s)=>(e(),i(`button`,{type:`button`,class:a([`dl-btn`,`is-${v.variant}`]),disabled:v.disabled,onClick:s[0]||=e=>y(`click`)},[v.glyph?(e(),i(`span`,u,t(v.glyph),1)):o(`v-if`,!0),n(` `+t(v.label),1)],10,l))}}),[[`__scopeId`,`data-v-f82500e8`]]);export{d as t}; \ No newline at end of file diff --git a/lecture-08/assets/WidgetFrame-Czwyd28V.css b/lecture-08/assets/WidgetFrame-Czwyd28V.css new file mode 100644 index 0000000000000000000000000000000000000000..837cf58a05149991b75f39d2f2dfd56b3210f575 --- /dev/null +++ b/lecture-08/assets/WidgetFrame-Czwyd28V.css @@ -0,0 +1 @@ +.dl-widget[data-v-0f64089e]{flex-direction:column;gap:.6rem;width:100%;height:100%;min-height:0;display:flex}.dl-widget.is-controls-first[data-v-0f64089e]{flex-direction:column-reverse;justify-content:flex-end}.dl-widget__stage[data-v-0f64089e]{flex:auto;justify-content:center;align-items:center;min-height:0;display:flex}.dl-widget__controls[data-v-0f64089e]{flex-wrap:wrap;flex:none;align-items:center;gap:.5rem 1.2rem;display:flex}.dl-widget__controls[data-v-0f64089e]:empty,.dl-widget__readout[data-v-0f64089e]:empty{display:none}.dl-widget__readout[data-v-0f64089e]{color:var(--dl-muted);font-variant-numeric:tabular-nums;flex:none;font-size:.82rem} diff --git a/lecture-08/assets/WidgetFrame-DHgK6j2H.js b/lecture-08/assets/WidgetFrame-DHgK6j2H.js new file mode 100644 index 0000000000000000000000000000000000000000..62824ed2206c0252fd3db3643eb2445ee710018f --- /dev/null +++ b/lecture-08/assets/WidgetFrame-DHgK6j2H.js @@ -0,0 +1 @@ +import{B as e,St as t,T as n,U as r,_ as i,b as a,bt as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-DB-9afGB.js";var l={class:`dl-widget__stage`},u={class:`dl-widget__controls`},d={class:`dl-widget__readout`},f=s(n({__name:`WidgetFrame`,props:{maxWidth:{default:`100%`},controlsFirst:{type:Boolean}},setup(n){let{$slidev:s,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=c(),v=n;return(n,s)=>(e(),a(`div`,{class:o([`dl-widget`,{"is-controls-first":v.controlsFirst}]),style:t({maxWidth:v.maxWidth})},[i(`div`,l,[r(n.$slots,`default`,{},void 0,!0)]),i(`div`,u,[r(n.$slots,`controls`,{},void 0,!0)]),i(`div`,d,[r(n.$slots,`readout`,{},void 0,!0)])],6))}}),[[`__scopeId`,`data-v-0f64089e`]]);export{f as t}; \ No newline at end of file diff --git a/lecture-08/assets/_plugin-vue_export-helper-BDNMzG2s.js b/lecture-08/assets/_plugin-vue_export-helper-BDNMzG2s.js new file mode 100644 index 0000000000000000000000000000000000000000..4374bdd01753d5b081492c755ecac84c3c86cba5 --- /dev/null +++ b/lecture-08/assets/_plugin-vue_export-helper-BDNMzG2s.js @@ -0,0 +1 @@ +var e=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};export{e as t}; \ No newline at end of file diff --git a/lecture-08/assets/default-DFJXHcku.css b/lecture-08/assets/default-DFJXHcku.css new file mode 100644 index 0000000000000000000000000000000000000000..9701ce2820eb67acfeb00af0d66787fe99a56707 --- /dev/null +++ b/lecture-08/assets/default-DFJXHcku.css @@ -0,0 +1 @@ +.dl-default[data-v-3f3da7ce]{flex-direction:column;justify-content:flex-start;display:flex} diff --git a/lecture-08/assets/default-DMdSOhJT.js b/lecture-08/assets/default-DMdSOhJT.js new file mode 100644 index 0000000000000000000000000000000000000000..4948b27ffe131cd3247c0ae1021497942ecdb28d --- /dev/null +++ b/lecture-08/assets/default-DMdSOhJT.js @@ -0,0 +1 @@ +import{B as e,C as t,U as n,b as r}from"./modules/shiki-CJZsCeMT.js";import{t as i}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as a}from"./slidev/context-DB-9afGB.js";import{t as o}from"./DeckFooter-BmHxwiXu.js";var s={class:`slidev-layout dl-default`},c=i({__name:`default`,setup(i){let{$slidev:c,$nav:l,$clicksContext:u,$clicks:d,$page:f,$renderContext:p,$frontmatter:m}=a();return(i,a)=>{let c=o;return e(),r(`div`,s,[n(i.$slots,`default`,{},void 0,!0),t(c)])}}},[[`__scopeId`,`data-v-3f3da7ce`]]);export{c as t}; \ No newline at end of file diff --git a/lecture-08/assets/entry-Dba4BKje.css b/lecture-08/assets/entry-Dba4BKje.css new file mode 100644 index 0000000000000000000000000000000000000000..d28c41041ebb17c7aba14498b0d27b5100083a75 --- /dev/null +++ b/lecture-08/assets/entry-Dba4BKje.css @@ -0,0 +1 @@ +.page-link[data-v-966650ef]{background-color:#9ca3af1a;border-radius:.25rem;flex-direction:column;justify-content:center;align-items:center;gap:.5rem;min-width:10rem;height:10rem;padding:1rem;display:flex}.page-link[data-v-966650ef]:hover{background-color:#9ca3af33}.page-link>svg[data-v-966650ef]{opacity:.5;font-size:3em} diff --git a/lecture-08/assets/index-CSMQn_X0.css b/lecture-08/assets/index-CSMQn_X0.css new file mode 100644 index 0000000000000000000000000000000000000000..687a9ca5f113fe4729a3267344891b9ec0c8e063 --- /dev/null +++ b/lecture-08/assets/index-CSMQn_X0.css @@ -0,0 +1 @@ +*,:before,:after{box-sizing:border-box;border-style:solid;border-width:0;border-color:var(--un-default-border-color,#e5e7eb)}:before,:after{--un-content:""}html,:host{-webkit-text-size-adjust:100%;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}body{line-height:inherit;margin:0}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-feature-settings:normal;font-variation-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-feature-settings:inherit;font-variation-settings:inherit;font-family:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:#0000;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{margin:0;padding:0;list-style:none}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}*,:before,:after,::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 #0000;--un-ring-shadow:0 0 #0000;--un-shadow-inset: ;--un-shadow:0 0 #0000;--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:#93c5fd80;--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }.prose,[prose=""]{color:var(--un-prose-body);max-width:65ch}.prose :where(p):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(p):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where([class~=lead]):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-lead);margin-top:1.2em;margin-bottom:1.2em;font-size:1.25em;line-height:1.6}.prose :where(a):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-links);font-weight:500;text-decoration:underline}.prose :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-bold);font-weight:600}.prose :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote strong):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:decimal}.prose :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=A]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=a]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=A s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-alpha}.prose :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=a s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-alpha}.prose :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=I]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=i]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=I s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:upper-roman}.prose :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type=i s]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:lower-roman}.prose :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol[type="1"]):not(:where([class~=not-prose],[class~=not-prose] *)){list-style-type:decimal}.prose :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em;padding-inline-start:1.625em;list-style-type:disc}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-counters);font-weight:400}[prose=""] :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-counters);font-weight:400}.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-bullets)}[prose=""] :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *))::marker{color:var(--un-prose-bullets)}.prose :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dt):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.25em;font-weight:600}.prose :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(hr):not(:where([class~=not-prose],[class~=not-prose] *)){border-color:var(--un-prose-hr);border-top-width:1px;margin-top:3em;margin-bottom:3em}.prose :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-quotes);border-inline-start-width:.25rem;border-inline-start-color:var(--un-prose-quote-borders);quotes:"“""”""‘""’";margin-top:1.6em;margin-bottom:1.6em;padding-inline-start:1em;font-style:italic;font-weight:500}.prose :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(blockquote p:first-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):before{content:open-quote}.prose :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(blockquote p:last-of-type):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:close-quote}.prose :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:0;margin-bottom:.888889em;font-size:2.25em;font-weight:800;line-height:1.11111}.prose :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:900}.prose :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:2em;margin-bottom:1em;font-size:1.5em;font-weight:700;line-height:1.33333}.prose :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:800}.prose :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.6em;margin-bottom:.6em;font-size:1.25em;font-weight:600;line-height:1.6}.prose :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);margin-top:1.5em;margin-bottom:.5em;font-weight:600;line-height:1.5}.prose :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4 strong):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-weight:700}.prose :where(img):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(picture):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em;display:block}.prose :where(video):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(video):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(kbd):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-kbd);box-shadow:0 0 0 1px rgb(var(--un-prose-kbd-shadows) / 10%), 0 3px 0 rgb(var(--un-prose-kbd-shadows) / 10%);padding-top:.1875em;padding-inline-end:.375em;padding-bottom:.1875em;border-radius:.3125rem;padding-inline-start:.375em;font-family:inherit;font-size:.875em;font-weight:500}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-code);font-size:.875em;font-weight:600}.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:"`"}.prose :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(a code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h1 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.875em}.prose :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3 code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit;font-size:.9em}.prose :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4 code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(blockquote code):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th code):not(:where([class~=not-prose],[class~=not-prose] *)){color:inherit}.prose :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(pre):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-pre-code);background-color:var(--un-prose-pre-bg);padding-top:.857143em;padding-inline-end:1.14286em;padding-bottom:.857143em;border-radius:.375rem;margin-top:1.71429em;margin-bottom:1.71429em;padding-inline-start:1.14286em;font-size:.875em;font-weight:400;line-height:1.71429;overflow-x:auto}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)){font-weight:inherit;color:inherit;font-size:inherit;font-family:inherit;line-height:inherit;background-color:#0000;border-width:0;border-radius:0;padding:0}.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):before,.prose :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after,[prose=""] :where(pre code):not(:where([class~=not-prose],[class~=not-prose] *)):after{content:none}.prose :where(table):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(table):not(:where([class~=not-prose],[class~=not-prose] *)){table-layout:auto;width:100%;margin-top:2em;margin-bottom:2em;font-size:.875em;line-height:1.71429}.prose :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--un-prose-th-borders)}.prose :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-headings);vertical-align:bottom;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em;font-weight:600}.prose :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody tr):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:1px;border-bottom-color:var(--un-prose-td-borders)}.prose :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody tr:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){border-bottom-width:0}.prose :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:baseline}.prose :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tfoot):not(:where([class~=not-prose],[class~=not-prose] *)){border-top-width:1px;border-top-color:var(--un-prose-th-borders)}.prose :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){vertical-align:top}.prose :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(th,td):not(:where([class~=not-prose],[class~=not-prose] *)){text-align:start}.prose :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figure>*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figcaption):not(:where([class~=not-prose],[class~=not-prose] *)){color:var(--un-prose-captions);margin-top:.857143em;font-size:.875em;line-height:1.42857}.prose,[prose=""]{font-size:1rem;line-height:1.75}.prose :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(picture>img):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose :where(li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(li):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;margin-bottom:.5em}.prose :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ol>li):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul>li):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:.375em}.prose :where():not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where():not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(ul ul,ul ol,ol ul,ol ol):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.75em;margin-bottom:.75em}.prose :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dl):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:1.25em;margin-bottom:1.25em}.prose :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(dd):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:.5em;padding-inline-start:1.625em}.prose :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(hr+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h2+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h3+*):not(:where([class~=not-prose],[class~=not-prose] *)),.prose :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(h4+*):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0}.prose :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(thead th:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td,tfoot td):not(:where([class~=not-prose],[class~=not-prose] *)){padding-top:.571429em;padding-inline-end:.571429em;padding-bottom:.571429em;padding-inline-start:.571429em}.prose :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td:first-child,tfoot td:first-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-start:0}.prose :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(tbody td:last-child,tfoot td:last-child):not(:where([class~=not-prose],[class~=not-prose] *)){padding-inline-end:0}.prose :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where(figure):not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:2em;margin-bottom:2em}.prose :where():not(:where([class~=not-prose],[class~=not-prose] *)),[prose=""] :where():not(:where([class~=not-prose],[class~=not-prose] *)){margin-top:0;margin-bottom:0}.prose,[prose=""]{--un-prose-body:#374151;--un-prose-invert-body:#d1d5db;--un-prose-headings:#111827;--un-prose-invert-headings:white;--un-prose-lead:#4b5563;--un-prose-invert-lead:#9ca3af;--un-prose-links:#111827;--un-prose-invert-links:white;--un-prose-bold:#111827;--un-prose-invert-bold:white;--un-prose-counters:#6b7280;--un-prose-invert-counters:#9ca3af;--un-prose-bullets:#d1d5db;--un-prose-invert-bullets:#4b5563;--un-prose-hr:#e5e7eb;--un-prose-invert-hr:#374151;--un-prose-quotes:#111827;--un-prose-invert-quotes:#f3f4f6;--un-prose-quote-borders:#e5e7eb;--un-prose-invert-quote-borders:#374151;--un-prose-captions:#6b7280;--un-prose-invert-captions:#9ca3af;--un-prose-kbd:#111827;--un-prose-invert-kbd:white;--un-prose-kbd-shadows:#111827;--un-prose-invert-kbd-shadows:white;--un-prose-code:#111827;--un-prose-invert-code:white;--un-prose-pre-code:#e5e7eb;--un-prose-invert-pre-code:#d1d5db;--un-prose-pre-bg:#1f2937;--un-prose-invert-pre-bg:#00000080;--un-prose-th-borders:#d1d5db;--un-prose-invert-th-borders:#4b5563;--un-prose-td-borders:#e5e7eb;--un-prose-invert-td-borders:#374151}.dark .dark\:prose-invert{--un-prose-body:var(--un-prose-invert-body);--un-prose-headings:var(--un-prose-invert-headings);--un-prose-lead:var(--un-prose-invert-lead);--un-prose-links:var(--un-prose-invert-links);--un-prose-bold:var(--un-prose-invert-bold);--un-prose-counters:var(--un-prose-invert-counters);--un-prose-bullets:var(--un-prose-invert-bullets);--un-prose-hr:var(--un-prose-invert-hr);--un-prose-quotes:var(--un-prose-invert-quotes);--un-prose-quote-borders:var(--un-prose-invert-quote-borders);--un-prose-captions:var(--un-prose-invert-captions);--un-prose-kbd:var(--un-prose-invert-kbd);--un-prose-kbd-shadows:var(--un-prose-invert-kbd-shadows);--un-prose-code:var(--un-prose-invert-code);--un-prose-pre-code:var(--un-prose-invert-pre-code);--un-prose-pre-bg:var(--un-prose-invert-pre-bg);--un-prose-th-borders:var(--un-prose-invert-th-borders);--un-prose-td-borders:var(--un-prose-invert-td-borders)}.container{width:100%}.z-context-menu{z-index:60}.z-label{z-index:40}.z-menu{z-index:20}.z-modal{z-index:70}.z-nav{z-index:50}.slidev-glass-effect{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));--un-shadow:var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow);--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);border-width:1px;border-color:#9ca3af33;--un-bg-opacity:.75!important}.border-main,.dark [border~=dark\:main],.dark [dark\:border~=main],[border-main=""],[border~=main]{border-color:#9ca3af33}.border-primary,.hover\:border-primary:hover{border-color:var(--slidev-theme-primary)}.bg-active{background-color:#9ca3af1a}.bg-main{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .bg-main,.dark .slidev-glass-effect{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.bg-primary,[bg-primary=""]{background-color:var(--slidev-theme-primary)}.hover\:bg-active:hover,[hover\:bg-active=""]:hover{background-color:#9ca3af1a}.dark .text-main{--un-text-opacity:1;color:rgb(221 221 221/var(--un-text-opacity))}.text-main{--un-text-opacity:1;color:rgb(24 24 24/var(--un-text-opacity))}.text-primary,[text-primary=""]{color:var(--slidev-theme-primary)}@media (width>=640px){.container{max-width:640px}}@media (width>=768px){.container{max-width:768px}}@media (width>=1024px){.container{max-width:1024px}}@media (width>=1280px){.container{max-width:1280px}}@media (width>=1536px){.container{max-width:1536px}}:root{--color-note:#0969da;--color-tip:#1a7f37;--color-warning:#9a6700;--color-severe:#bc4c00;--color-caution:#d1242f;--color-important:#8250df}@media (prefers-color-scheme:dark){:root{--color-note:#2f81f7;--color-tip:#3fb950;--color-warning:#d29922;--color-severe:#db6d28;--color-caution:#f85149;--color-important:#a371f7}}.markdown-alert{color:inherit;border-left:.25em solid #888;margin-bottom:16px;padding:.5rem 1rem}.markdown-alert>:first-child{margin-top:0}.markdown-alert>:last-child{margin-bottom:0}.markdown-alert .markdown-alert-title{align-items:center;font-weight:500;line-height:1;display:flex}.markdown-alert .markdown-alert-title .octicon{vertical-align:text-bottom;fill:currentColor;margin-right:.5rem;display:inline-block;overflow:visible!important}.markdown-alert.markdown-alert-note{border-left-color:var(--color-note)}.markdown-alert.markdown-alert-note .markdown-alert-title{color:var(--color-note)}.markdown-alert.markdown-alert-important{border-left-color:var(--color-important)}.markdown-alert.markdown-alert-important .markdown-alert-title{color:var(--color-important)}.markdown-alert.markdown-alert-warning{border-left-color:var(--color-warning)}.markdown-alert.markdown-alert-warning .markdown-alert-title{color:var(--color-warning)}.markdown-alert.markdown-alert-tip{border-left-color:var(--color-tip)}.markdown-alert.markdown-alert-tip .markdown-alert-title{color:var(--color-tip)}.markdown-alert.markdown-alert-caution{border-left-color:var(--color-caution)}.markdown-alert.markdown-alert-caution .markdown-alert-title{color:var(--color-caution)}:root{--slidev-code-background:#f5f5f5;--slidev-code-foreground:#1b1b1b;--slidev-code-font-family:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--slidev-code-padding:8px;--slidev-code-font-size:12px;--slidev-code-line-height:18px;--slidev-code-radius:4px;--slidev-code-margin:4px 0;--slidev-theme-primary:#3ab9d5;--slidev-transition-duration:.5s;--slidev-slide-container-background:black;--slidev-controls-foreground:white;--slidev-code-tab-divider:#e5e5e5;--slidev-code-tab-text-color:#67676c;--slidev-code-tab-font-size:12px;--slidev-code-tab-active-text-color:#3c3c43}html.dark{--slidev-code-background:#1b1b1b;--slidev-code-foreground:#eee;--slidev-code-tab-divider:#222;--slidev-code-tab-text-color:#98989f;--slidev-code-tab-active-text-color:#dfdfd6}html,body,#app,#page-root{width:100%;height:100vh;height:calc(var(--vh,1vh) * 100);-webkit-print-color-adjust:exact;print-color-adjust:exact;--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));margin:0;padding:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;overflow:hidden}.dark html,.dark body,.dark #app,.dark #page-root{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}html{background:0 0}.slidev-icon-btn{aspect-ratio:1;-webkit-user-select:none;user-select:none;cursor:pointer;vertical-align:middle;opacity:.75;border-radius:.25rem;outline:none;justify-content:center;align-items:center;padding:.25rem;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.2s;transition-timing-function:cubic-bezier(.4,0,.2,1);display:inline-flex;position:relative}@media (width>=768px){.slidev-icon-btn{padding:.5rem}}.slidev-icon-btn:hover{--un-bg-opacity:.1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.slidev-icon-btn:focus-visible{opacity:1;--un-outline-color-opacity:1;outline-width:2px;outline-color:rgb(0 0 0/var(--un-outline-color-opacity));outline-offset:2px;outline-style:solid}.dark .slidev-icon-btn:focus-visible{--un-outline-color-opacity:1;outline-color:rgb(255 255 255/var(--un-outline-color-opacity))}.slidev-icon-btn.shallow{opacity:.3}.slidev-icon-btn.active{opacity:1}.slidev-icon-btn.disabled{opacity:.25;pointer-events:none}.slidev-layout a.slidev-icon-btn{border-style:none}.slidev-layout a.slidev-icon-btn:hover{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity));border-style:none}.slidev-icon{vertical-align:sub;line-height:1em;display:inline-block}.slidev-page{width:100%;position:relative;top:0;left:0;right:0}.slidev-note-with-clicks .slidev-note-fade{color:#888c}.dark .slidev-note-with-clicks .slidev-note-fade{color:#a1a1a1cc}.slidev-note-click-mark{-webkit-user-select:none;user-select:none;--un-text-opacity:1;color:rgb(167 139 250/var(--un-text-opacity));background-color:#a78bfa1a;border-width:1px;border-color:#0000;border-radius:.25rem;align-items:center;padding-left:.25rem;padding-right:.25rem;font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:.7em;display:inline-flex}.slidev-note-click-mark.slidev-note-click-mark-active{--un-border-opacity:1;border-width:1px;border-color:rgb(167 139 250/var(--un-border-opacity))}.slidev-note-click-mark.slidev-note-click-mark-past{filter:saturate(0);opacity:.5}.slidev-note-click-mark.slidev-note-click-mark-future{opacity:.5}.slidev-note-click-mark:before{content:"";--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1.2em' height='1.2em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M23 28a1 1 0 0 1-.71-.29l-6.13-6.14l-3.33 5a1 1 0 0 1-1 .44a1 1 0 0 1-.81-.7l-6-20A1 1 0 0 1 6.29 5l20 6a1 1 0 0 1 .7.81a1 1 0 0 1-.44 1l-5 3.33l6.14 6.13a1 1 0 0 1 0 1.42l-4 4A1 1 0 0 1 23 28m0-2.41L25.59 23l-7.16-7.15l5.25-3.5L7.49 7.49l4.86 16.19l3.5-5.25Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;opacity:.8;background-color:currentColor;width:1.2em;height:1.2em;display:inline-block;-webkit-mask-size:100% 100%;mask-size:100% 100%}.slidev-note-click-mark:after{content:attr(data-clicks);display:inline-block;transform:translateY(.1em)}.slidev-form-button{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity));--un-border-opacity:1;border-bottom-width:2px;border-color:rgb(55 65 81/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(107 114 128/var(--un-bg-opacity));border-radius:.25rem;padding:.25rem 1rem}.slidev-form-button:hover{--un-border-opacity:1;border-color:rgb(75 85 99/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.slidev-form-button.primary{--un-border-opacity:1;border-color:rgb(17 94 89/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(13 148 136/var(--un-bg-opacity))}.slidev-form-button.primary:hover{--un-border-opacity:1;border-color:rgb(15 118 110/var(--un-border-opacity));--un-bg-opacity:1;background-color:rgb(20 184 166/var(--un-bg-opacity))}.rough-annotation{transform:scale(calc(1 / var(--slidev-slide-scale)))}#twoslash-container{position:fixed}#twoslash-container .v-popper__wrapper:not(.no-slide-scale>*){zoom:var(--slidev-slide-scale)}#twoslash-container .v-popper__popper:not(.no-slide-scale>*){translate:calc(10px * (1 - var(--slidev-slide-scale))) 0;width:max-content}.slidev-note ul{margin:0}html.dark:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}html.dark .shiki{color:var(--shiki-dark,inherit);--twoslash-popup-bg:var(--shiki-dark-bg,inherit)}html.dark .shiki span{color:var(--shiki-dark)}html:not(.dark) .shiki{color:var(--shiki-light,inherit);--twoslash-popup-bg:var(--shiki-light-bg,inherit)}html:not(.dark) .shiki span{color:var(--shiki-light)}.twoslash-meta-line.twoslash-popover-line{margin-top:-10px}.slidev-code-wrapper{scroll-padding:var(--slidev-code-padding);margin:var(--slidev-code-margin)!important}.slidev-code-wrapper:-webkit-scrollbar{width:0}.slidev-code{background:var(--slidev-code-background);overflow:auto;font-family:var(--slidev-code-font-family)!important;padding:var(--slidev-code-padding)!important;font-size:var(--slidev-code-font-size)!important;line-height:var(--slidev-code-line-height)!important;border-radius:var(--slidev-code-radius)!important}.slidev-code-block-title,.slidev-code-group-tabs{background:var(--slidev-code-background);color:var(--slidev-code-tab-text-color);padding-left:var(--slidev-code-padding);padding-right:var(--slidev-code-padding);font-size:var(--slidev-code-tab-font-size);border-radius:var(--slidev-code-radius) var(--slidev-code-radius) 0 0;box-shadow:inset 0 -1px var(--slidev-code-tab-divider);align-items:center;gap:8px;display:flex}.slidev-code-block-title{padding:var(--slidev-code-padding)}.slidev-code-tab{font-size:var(--slidev-code-tab-font-size);white-space:nowrap;cursor:pointer;padding:var(--slidev-code-padding);color:var(--slidev-code-tab-text-color);border-bottom:2px solid #0000;align-items:center;gap:8px;transition:color .25s;display:flex;position:relative}.slidev-code-tab:hover{color:var(--slidev-code-tab-active-text-color)!important}.slidev-code-group-blocks .slidev-code-wrapper{margin:0!important}.slidev-code-group-blocks .slidev-code{border-radius:0 0 var(--slidev-code-radius) var(--slidev-code-radius)!important}.slidev-code-group-blocks .slidev-code-wrapper.active{display:block}.slidev-code-group-blocks .slidev-code-wrapper{display:none}.slidev-code-block-title+.slidev-code,.slidev-code-group-tabs+.slidev-code{border-top-left-radius:0!important;border-top-right-radius:0!important}.slidev-code .slidev-code-dishonored{opacity:.3;pointer-events:none}.slidev-code-line-numbers .slidev-code code{counter-reset:step;counter-increment:step calc(var(--start,1) - 1)}.slidev-code-line-numbers .slidev-code code .line:before{content:counter(step);counter-increment:step;text-align:right;--un-text-opacity:1;width:1rem;color:rgb(156 163 175/var(--un-text-opacity));margin-right:1.5rem;display:inline-block}.dark .slidev-code-line-numbers .slidev-code code .line:before{--un-text-opacity:1;color:rgb(75 85 99/var(--un-text-opacity))}.slidev-note :not(pre)>code,.slidev-layout :not(pre)>code{background:var(--slidev-code-background);border-radius:var(--slidev-code-radius);padding:.125rem .375rem;font-size:.9em;font-weight:300}.slidev-note :not(pre)>code:after,.slidev-note :not(pre)>code:before{content:""}.slidev-layout :not(pre)>code:before{margin-right:-.08em}.katex,.katex :after,.katex :before{border-color:currentColor}.slidev-katex-wrapper .mord.dishonored{opacity:.3}.slide-left-enter-active,.slide-left-leave-active,.slide-right-enter-active,.slide-right-leave-active,.slide-up-enter-active,.slide-up-leave-active,.slide-down-enter-active,.slide-down-leave-active{transition:all var(--slidev-transition-duration) ease}.slide-left-enter-from,.slide-right-leave-to{translate:100%}.slide-left-leave-to,.slide-right-enter-from{translate:-100%}.slide-up-enter-from,.slide-down-leave-to{translate:0 100%}.slide-up-leave-to,.slide-down-enter-from{translate:0 -100%}.fade-enter-active,.fade-leave-active{transition:opacity var(--slidev-transition-duration) ease}.fade-enter-from,.fade-leave-to{opacity:0}.fade-out-leave-active{transition:opacity calc(var(--slidev-transition-duration) * .6) ease-out}.fade-out-enter-active{transition:opacity calc(var(--slidev-transition-duration) * .8) ease-in;transition-delay:calc(var(--slidev-transition-duration) * .6)}.fade-out-enter-from,.fade-out-leave-to{opacity:0}:root{--twoslash-popup-bg:var(--slidev-code-background);--twoslash-popup-color:var(--slidev-code-foreground);--twoslash-docs-color:inherit;--twoslash-docs-font:inherit;--twoslash-code-font:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--twoslash-underline-color:#8888;--twoslash-border-color:#8888;--twoslash-cursor-color:var(--slidev-theme-primary);--twoslash-matched-color:var(--slidev-theme-primary)}.twoslash-popup-container{font-size:13px}.twoslash-popup-container .twoslash-popup-code{font-size:.85em}.twoslash-floating .twoslash-popup-docs-tags .twoslash-popup-docs-tag-name{color:inherit;opacity:.5}.slidev-vclick-target{transition:all .1s}.slidev-vclick-target.slidev-vclick-anim-none{transition:none}.slidev-vclick-target.slidev-vclick-anim-fade-in{transition:all .3s}.slidev-vclick-hidden{opacity:0!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important}.slidev-vclick-hidden.slidev-vclick-anim-fade{opacity:.5!important}.slidev-vclick-hidden.slidev-vclick-anim-fade-in{opacity:0!important}.slidev-vclick-hidden.slidev-vclick-anim-up{translate:0 20px}.slidev-vclick-hidden.slidev-vclick-anim-down{translate:0 -20px}.slidev-vclick-hidden.slidev-vclick-anim-left{translate:20px}.slidev-vclick-hidden.slidev-vclick-anim-right{translate:-20px}.slidev-vclick-hidden.slidev-vclick-anim-scale{scale:.9}.slidev-vclick-display-none{display:none!important}.slidev-vclick-fade{opacity:.5}:root{--dl-bg:#fff;--dl-surface:#f7f9fa;--dl-border:#e3e8ea;--dl-heading:#111;--dl-body:#595959;--dl-muted:#8a8a8a;--dl-accent:#0097a7;--dl-accent-soft:#e0f4f6;--dl-accent-strong:#00707c;--dl-danger:#d32f2f;--dl-table-header:#eee;--dl-code-bg:#f6f8fa;--dl-fs-title:4.4rem;--dl-fs-section:3rem;--dl-fs-heading:2.1rem;--dl-fs-body:1.5rem;--dl-fs-secondary:1.17rem;--dl-fs-citation:.85rem;--dl-q:#6a3fd6;--dl-k:#c25a00;--dl-v:#1565c0;--dl-enc:#2e7d32;--dl-dec:#ad1457;--dl-pos:#8a6100}html.dark{--dl-bg:#0d1117;--dl-surface:#161b22;--dl-border:#2a323d;--dl-heading:#f2f5f7;--dl-body:#c2cad2;--dl-muted:#8b949e;--dl-accent:#2ec9d8;--dl-accent-soft:#123236;--dl-accent-strong:#7fe3ee;--dl-danger:#ff7b72;--dl-table-header:#1c2530;--dl-code-bg:#161b22;--dl-q:#b69cff;--dl-k:#ffab5e;--dl-v:#74b0ff;--dl-enc:#6fd59a;--dl-dec:#f584b5;--dl-pos:#f2c94c}.slidev-layout{--slidev-code-background:var(--dl-code-bg);background:var(--dl-bg);height:100%;color:var(--dl-body);font-size:var(--dl-fs-body);padding:2.6rem 3rem 3.2rem;line-height:1.5;position:relative}.slidev-layout h1,.slidev-layout h2,.slidev-layout h3,.slidev-layout h4{color:var(--dl-heading);letter-spacing:-.01em;font-weight:600}.slidev-layout h1{font-size:var(--dl-fs-heading);margin-bottom:1.2rem}.slidev-layout h2{margin-bottom:.8rem;font-size:1.7rem}.slidev-layout h3{margin-bottom:.6rem;font-size:1.35rem}.slidev-layout p{margin:.5rem 0}.slidev-layout ul{margin:.4rem 0;padding-left:1.35rem;list-style:outside}.slidev-layout ol{margin:.4rem 0;padding-left:1.6rem;list-style:decimal}.slidev-layout ul ul{list-style:circle}.slidev-layout li{margin:.42rem 0}.slidev-layout li::marker{color:var(--dl-accent)}.slidev-layout a{color:var(--dl-accent);border-bottom:1px solid color-mix(in srgb, var(--dl-accent) 40%, transparent);text-decoration:none;transition:border-color .15s}.slidev-layout a:hover{border-bottom-color:var(--dl-accent)}.slidev-layout strong{color:var(--dl-heading);font-weight:600}.dl-wrong{color:var(--dl-danger);font-weight:600}.dl-secondary{font-size:var(--dl-fs-secondary);color:var(--dl-muted)}.slidev-layout table{border-collapse:collapse;font-size:var(--dl-fs-secondary);width:100%}.slidev-layout table th{background:var(--dl-table-header);color:var(--dl-heading);text-align:left;font-weight:600}.slidev-layout table th,.slidev-layout table td{border:1px solid var(--dl-border);padding:.4rem .7rem}.slidev-layout blockquote{border-left:3px solid var(--dl-accent);background:var(--dl-accent-soft);color:var(--dl-body);margin:.8rem 0;padding:.6rem 1rem}.dl-rule{background:var(--dl-accent);border-radius:2px;width:4.5rem;height:3px}.dl-callout{border-left:3px solid var(--dl-accent);background:var(--dl-accent-soft);border-radius:0 6px 6px 0;padding:.7rem 1rem;font-size:1.05rem}.dl-card{border:1px solid var(--dl-border);background:var(--dl-surface);border-radius:8px;overflow:hidden}.dl-card img{object-fit:cover;width:100%;height:6.2rem;display:block}.dl-card.is-contain img{object-fit:contain;background:var(--dl-bg);padding:.5rem}.dl-card__cap{color:var(--dl-body);padding:.35rem .55rem;font-size:.78rem}.dl-tight{font-size:1.06rem;line-height:1.45}.dl-tight li{margin:.34rem 0}.dl-tight .dl-callout{font-size:1rem}.dl-describe{max-width:52rem;font-size:1.15rem;line-height:1.45}.dl-describe p{margin:.4rem 0}.dl-describe li{margin:.22rem 0}.dl-ledger table{font-size:1.02rem}.dl-ledger table th,.dl-ledger table td{padding:.24rem .6rem}.dl-eq-legend table{font-size:.86rem}.dl-eq-legend table th,.dl-eq-legend table td{padding:.16rem .45rem}.dl-eq-legend table td:first-child{white-space:nowrap}.dl-prompt{color:var(--dl-heading);border-left:3px solid var(--dl-accent);padding-left:.8rem;font-size:1.05rem;font-style:italic}.dl-reveal{color:var(--dl-accent);font-size:1.8rem;font-weight:700}.slidev-layout .katex{color:var(--dl-heading)}.slidev-layout .katex-display>.katex{font-size:1em}.dl-math-sm .katex{font-size:.84em}.dl-math-xs .katex{font-size:.72em}.slidev-code-wrapper{border:1px solid var(--dl-border);border-radius:6px;flex-shrink:0;overflow:hidden}.dl-diagram{width:100%;max-width:41rem;height:auto;font-family:inherit}.dl-dg-box{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.5px}.dl-dg-box.is-accent{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-dg-box.is-bad{fill:none;stroke:var(--dl-danger);stroke-dasharray:4 3}.dl-dg-net{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1.6px}.dl-dg-net.is-critic{fill:var(--dl-surface);stroke:var(--dl-body)}.dl-dg-op{fill:var(--dl-bg);stroke:var(--dl-heading);stroke-width:1.6px}.dl-dg-lab{fill:var(--dl-heading);font-size:17px;font-style:italic;font-weight:600}.dl-dg-lab.is-sm{font-size:13px;font-style:normal}.dl-dg-in{fill:var(--dl-accent-strong);font-size:13px;font-weight:700}.dl-dg-net.is-critic+.dl-dg-in,.dl-dg-in.is-critic{fill:var(--dl-body)}.dl-dg-small{fill:var(--dl-muted);font-size:11px}.dl-dg-small.is-bad{fill:var(--dl-danger)}.dl-dg-small.is-good{fill:var(--dl-accent-strong)}.dl-dg-arrow{fill:none;stroke:var(--dl-body);stroke-width:1.8px}.dl-dg-head{fill:var(--dl-body)}.dl-dg-loss,.dl-dg-grad{fill:none;stroke:var(--dl-muted);stroke-width:1.4px;stroke-dasharray:3 3}.dl-dg-grad.is-bad{stroke:var(--dl-danger)}.dl-dg-grad.is-good{stroke:var(--dl-accent);stroke-dasharray:none}.dl-dg-split{stroke:var(--dl-border);stroke-width:1px}.dl-diagram.is-sm{max-width:26rem}.dl-diagram.is-xs{max-width:18rem}.dl-dg-bar{fill:var(--dl-muted)}.dl-dg-bar.is-q{fill:var(--dl-accent)}.dl-dg-bar.is-bad{fill:var(--dl-danger)}.dl-dg-fill{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1.4px}.dl-dg-fill.is-muted{fill:var(--dl-surface);stroke:var(--dl-muted)}.dl-dg-fill.is-dashed{stroke-dasharray:4 3}.dl-dg-dot{fill:var(--dl-body)}.dl-dg-dot.is-accent{fill:var(--dl-accent)}.dl-dg-dot.is-bad{fill:var(--dl-danger)}.dl-dg-line{fill:none;stroke:var(--dl-accent);stroke-width:2.2px}.dl-dg-line.is-muted{stroke:var(--dl-muted)}.dl-dg-line.is-bad{stroke:var(--dl-danger)}.dl-dg-emoji{font-size:30px}.dl-dg-lab.is-bad-text{fill:var(--dl-danger)}.dl-diagram.is-sm-h{max-height:11.5rem}.dl-dg-box.is-q,.dl-dg-fill.is-q{fill:color-mix(in srgb, var(--dl-q) 14%, var(--dl-bg));stroke:var(--dl-q)}.dl-dg-box.is-k,.dl-dg-fill.is-k{fill:color-mix(in srgb, var(--dl-k) 14%, var(--dl-bg));stroke:var(--dl-k)}.dl-dg-box.is-v,.dl-dg-fill.is-v{fill:color-mix(in srgb, var(--dl-v) 14%, var(--dl-bg));stroke:var(--dl-v)}.dl-dg-box.is-enc,.dl-dg-fill.is-enc{fill:color-mix(in srgb, var(--dl-enc) 14%, var(--dl-bg));stroke:var(--dl-enc)}.dl-dg-box.is-dec,.dl-dg-fill.is-dec{fill:color-mix(in srgb, var(--dl-dec) 14%, var(--dl-bg));stroke:var(--dl-dec)}.dl-dg-box.is-pos,.dl-dg-fill.is-pos{fill:color-mix(in srgb, var(--dl-pos) 16%, var(--dl-bg));stroke:var(--dl-pos)}.dl-dg-line.is-q,.dl-dg-arrow.is-q{stroke:var(--dl-q)}.dl-dg-line.is-k,.dl-dg-arrow.is-k{stroke:var(--dl-k)}.dl-dg-line.is-v,.dl-dg-arrow.is-v{stroke:var(--dl-v)}.dl-dg-line.is-enc,.dl-dg-arrow.is-enc{stroke:var(--dl-enc)}.dl-dg-line.is-dec,.dl-dg-arrow.is-dec{stroke:var(--dl-dec)}.dl-dg-line.is-pos,.dl-dg-arrow.is-pos{stroke:var(--dl-pos)}.dl-dg-arrow.is-accent{stroke:var(--dl-accent)}.dl-dg-head.is-q{fill:var(--dl-q)}.dl-dg-head.is-k{fill:var(--dl-k)}.dl-dg-head.is-v{fill:var(--dl-v)}.dl-dg-head.is-enc{fill:var(--dl-enc)}.dl-dg-head.is-dec{fill:var(--dl-dec)}.dl-dg-head.is-pos{fill:var(--dl-pos)}.dl-dg-head.is-accent{fill:var(--dl-accent)}.dl-dg-lab.is-q,.dl-dg-in.is-q,.dl-dg-small.is-q{fill:var(--dl-q)}.dl-dg-lab.is-k,.dl-dg-in.is-k,.dl-dg-small.is-k{fill:var(--dl-k)}.dl-dg-lab.is-v,.dl-dg-in.is-v,.dl-dg-small.is-v{fill:var(--dl-v)}.dl-dg-lab.is-enc,.dl-dg-in.is-enc,.dl-dg-small.is-enc{fill:var(--dl-enc)}.dl-dg-lab.is-dec,.dl-dg-in.is-dec,.dl-dg-small.is-dec{fill:var(--dl-dec)}.dl-dg-lab.is-pos,.dl-dg-in.is-pos,.dl-dg-small.is-pos{fill:var(--dl-pos)}.dl-dg-bar.is-v{fill:var(--dl-v)}.dl-dg-bar.is-k{fill:var(--dl-k)}.dl-dg-bar.is-pos{fill:var(--dl-pos)}.dl-c-q{color:var(--dl-q);font-weight:600}.dl-c-k{color:var(--dl-k);font-weight:600}.dl-c-v{color:var(--dl-v);font-weight:600}.dl-c-enc{color:var(--dl-enc);font-weight:600}.dl-c-dec{color:var(--dl-dec);font-weight:600}.dl-c-pos{color:var(--dl-pos);font-weight:600}.dl-dg-flow{stroke-dasharray:7 5}@media (prefers-reduced-motion:no-preference){.dl-dg-flow{animation:.8s linear infinite dl-dg-march}.dl-dg-flow.is-slow{animation-duration:1.6s}.dl-dg-pulse{animation:1.8s ease-in-out infinite dl-dg-pulse}}@keyframes dl-dg-march{to{stroke-dashoffset:-12px}}@keyframes dl-dg-pulse{50%{stroke-width:3.2px}}.slidev-layout pre.shiki{font-size:.76rem;line-height:1.38}.dl-tight :not(pre)>code{white-space:nowrap}.dl-side-glyph{position:absolute;top:50%;right:4.5rem;transform:translateY(-50%)}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(./KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(./KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(./KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(./KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(./KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(./KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(./KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(./KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(./KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(./KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(./KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(./KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(./KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(./KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(./KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(./KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(./KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(./KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(./KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(./KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(./KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(./KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(./KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(./KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(./KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(./KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(./KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(./KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(./KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(./KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(./KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(./KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(./KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(./KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(./KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(./KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(./KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(./KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(./KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(./KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(./KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(./KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(./KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(./KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(./KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(./KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(./KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(./KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(./KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(./KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(./KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(./KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(./KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(./KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(./KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(./KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(./KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(./KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(./KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.18.4"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.katex-newline{display:block}.katex .katex-base{white-space:nowrap;width:min-content;position:relative}.katex .katex-base,.katex .katex-strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .katex-vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .katex-thinbox{flex-direction:row;width:0;max-width:0;display:inline-flex}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .katex-hdashline,.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-rule,.katex .katex-underline .underline-line,.katex .mfrac .frac-line{min-height:1px}.katex .mspace{display:inline-block}.katex .katex-smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.katex-inner,.katex .llap>.katex-inner,.katex .rlap>.katex-inner{position:absolute}.katex .clap>.katex-fix,.katex .llap>.katex-fix,.katex .rlap>.katex-fix{display:inline-block}.katex .llap>.katex-inner{right:0}.katex .clap>.katex-inner,.katex .rlap>.katex-inner{left:0}.katex .clap>.katex-inner>span{margin-left:-50%;margin-right:50%}.katex .katex-rule{border:0 solid;display:inline-block;position:relative}.katex .katex-hline,.katex .katex-overline .overline-line,.katex .katex-underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .katex-hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.katex-root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .katex-sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .katex-sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .katex-sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .katex-sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .katex-sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .katex-sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .katex-sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .katex-sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .katex-sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .katex-sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .katex-sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .katex-sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .katex-sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .katex-sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .katex-sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .katex-sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .katex-sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .katex-sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .katex-sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .katex-sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .katex-sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .katex-sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .katex-sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .katex-sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .katex-sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .katex-sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .katex-sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .katex-sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .katex-sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .katex-sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .katex-sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .katex-sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .katex-sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .katex-sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .katex-sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .katex-sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .katex-sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .katex-sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .katex-sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .katex-sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .katex-sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .katex-sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .katex-sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .katex-sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .katex-sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .katex-sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .katex-sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .katex-sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .katex-sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .katex-sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .katex-sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .katex-sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .katex-sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .katex-sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .katex-sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .katex-sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .katex-sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .katex-sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .katex-sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .katex-sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .katex-sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .katex-sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .katex-sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .katex-sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .katex-sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .katex-sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .katex-sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .katex-sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .katex-sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .katex-sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .katex-sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .katex-sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .katex-sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .katex-sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .katex-sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .katex-sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .katex-sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .katex-sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .katex-sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .katex-sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .katex-sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .katex-sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .katex-sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .katex-sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .katex-sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .katex-sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .katex-sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .katex-sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .katex-sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .katex-sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .katex-sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .katex-sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .katex-sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .katex-sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .katex-sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .katex-sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .katex-sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .katex-sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .katex-sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .katex-sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .katex-sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .katex-sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .katex-sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .katex-sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .katex-sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .katex-sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .katex-sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .katex-sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .katex-sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .katex-sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .katex-sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .katex-sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .katex-sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .katex-sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .katex-sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .katex-sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .katex-sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .katex-sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .katex-sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .katex-sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .katex-sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .katex-accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .katex-accent .accent-body{position:relative}.katex .katex-accent .accent-body:not(.accent-full){width:0}.katex .katex-overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .katex-stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .katex-stretchy:after,.katex .katex-stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .katex-sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.katex-tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.katex-tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}.i-carbon-camera{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29 26H3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h6.46l1.71-2.55A1 1 0 0 1 12 4h8a1 1 0 0 1 .83.45L22.54 7H29a1 1 0 0 1 1 1v17a1 1 0 0 1-1 1M4 24h24V9h-6a1 1 0 0 1-.83-.45L19.46 6h-6.92l-1.71 2.55A1 1 0 0 1 10 9H4Z'/%3E%3Cpath fill='currentColor' d='M16 22a6 6 0 1 1 6-6a6 6 0 0 1-6 6m0-10a4 4 0 1 0 4 4a4 4 0 0 0-4-4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-magic-wand{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.414 24L12 6.586a2.05 2.05 0 0 0-2.828 0L6.586 9.172a2 2 0 0 0 0 2.828l17.413 17.414a2 2 0 0 0 2.828 0l2.587-2.586a2 2 0 0 0 0-2.828M8 10.586L10.586 8l5 5l-2.587 2.587zM25.413 28l-11-10.999L17 14.414l11 11ZM2 16l2-2l2 2l-2 2zM14 4l2-2l2 2l-2 2zM2 4l2-2l2 2l-2 2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-magic-wand-filled{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.414 24L12 6.586a2.05 2.05 0 0 0-2.828 0L6.586 9.172a2 2 0 0 0 0 2.828l17.413 17.414a2 2 0 0 0 2.828 0l2.587-2.586a2 2 0 0 0 0-2.828M8 10.586L10.586 8l5 5l-2.587 2.587zM2 16l2-2l2 2l-2 2zM14 4l2-2l2 2l-2 2zM2 4l2-2l2 2l-2 2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-moon{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon-sun{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:apps{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 4v4H4V4Zm2-2H2v8h8Zm8 2v4h-4V4Zm2-2h-8v8h8Zm8 2v4h-4V4Zm2-2h-8v8h8ZM8 14v4H4v-4Zm2-2H2v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8ZM8 24v4H4v-4Zm2-2H2v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Zm8 2v4h-4v-4Zm2-2h-8v8h8Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-down{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M24.59 16.59L17 24.17V4h-2v20.17l-7.59-7.58L6 18l10 10l10-10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-left{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m14 26l1.41-1.41L7.83 17H28v-2H7.83l7.58-7.59L14 6L4 16z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m18 6l-1.43 1.393L24.15 15H4v2h20.15l-7.58 7.573L18 26l10-10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 4L6 14l1.41 1.41L15 7.83V28h2V7.83l7.59 7.58L26 14z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:arrow-up-right{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M10 6v2h12.59L6 24.59L7.41 26L24 9.41V22h2V6z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:catalog{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 2H8a2 2 0 0 0-2 2v4H4v2h2v5H4v2h2v5H4v2h2v4a2 2 0 0 0 2 2h18a2 2 0 0 0 2-2V4a2 2 0 0 0-2-2m0 26H8v-4h2v-2H8v-5h2v-2H8v-5h2V8H8V4h18Z'/%3E%3Cpath fill='currentColor' d='M14 8h8v2h-8zm0 7h8v2h-8zm0 7h8v2h-8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:checkbox{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 4H6a2 2 0 0 0-2 2v20a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M6 26V6h20v20Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:checkmark{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m13 24l-9-9l1.414-1.414L13 21.171L26.586 7.586L28 9z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:close{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17.414 16L24 9.414L22.586 8L16 14.586L9.414 8L8 9.414L14.586 16L8 22.586L9.414 24L16 17.414L22.586 24L24 22.586z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:close-outline{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2C8.2 2 2 8.2 2 16s6.2 14 14 14s14-6.2 14-14S23.8 2 16 2m0 26C9.4 28 4 22.6 4 16S9.4 4 16 4s12 5.4 12 12s-5.4 12-12 12'/%3E%3Cpath fill='currentColor' d='M21.4 23L16 17.6L10.6 23L9 21.4l5.4-5.4L9 10.6L10.6 9l5.4 5.4L21.4 9l1.6 1.6l-5.4 5.4l5.4 5.4z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:cursor-1,[i-carbon\:cursor-1=""]{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M23 28a1 1 0 0 1-.71-.29l-6.13-6.14l-3.33 5a1 1 0 0 1-1 .44a1 1 0 0 1-.81-.7l-6-20A1 1 0 0 1 6.29 5l20 6a1 1 0 0 1 .7.81a1 1 0 0 1-.44 1l-5 3.33l6.14 6.13a1 1 0 0 1 0 1.42l-4 4A1 1 0 0 1 23 28m0-2.41L25.59 23l-7.16-7.15l5.25-3.5L7.49 7.49l4.86 16.19l3.5-5.25Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:document-pdf{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30 18v-2h-6v10h2v-4h3v-2h-3v-2zm-11 8h-4V16h4a3.003 3.003 0 0 1 3 3v4a3.003 3.003 0 0 1-3 3m-2-2h2a1 1 0 0 0 1-1v-4a1 1 0 0 0-1-1h-2Zm-6-8H6v10h2v-3h3a2.003 2.003 0 0 0 2-2v-3a2 2 0 0 0-2-2m-3 5v-3h3l.001 3Z'/%3E%3Cpath fill='currentColor' d='M22 14v-4a.91.91 0 0 0-.3-.7l-7-7A.9.9 0 0 0 14 2H4a2.006 2.006 0 0 0-2 2v24a2 2 0 0 0 2 2h16v-2H4V4h8v6a2.006 2.006 0 0 0 2 2h6v2Zm-8-4V4.4l5.6 5.6Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:download{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 24v4H6v-4H4v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2v-4Zm0-10l-1.41-1.41L17 20.17V2h-2v18.17l-7.59-7.58L6 14l10 10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:drop-photo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M19 26a4 4 0 1 1 4-4a4.005 4.005 0 0 1-4 4m0-6a2 2 0 1 0 2 2a2 2 0 0 0-2-2'/%3E%3Cpath fill='currentColor' d='M27 29H11a2 2 0 0 1-2-2v-9a2 2 0 0 1 2-2h3.28l.543-1.632A2 2 0 0 1 16.721 13h4.558a2 2 0 0 1 1.898 1.368L23.72 16H27a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2m-16-2h16v-9h-4.72l-1-3h-4.56l-1 3H11Zm16-16h2v2h-2zm0-4h2v2h-2zm0-4h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zm-4 0h2v2h-2zM7 3h2v2H7zM3 3h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3zm0 4h2v2H3z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:edit{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 26h28v2H2zM25.4 9c.8-.8.8-2 0-2.8l-3.6-3.6c-.8-.8-2-.8-2.8 0l-15 15V24h6.4zm-5-5L24 7.6l-3 3L17.4 7zM6 22v-3.6l10-10l3.6 3.6l-10 10z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:erase{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7 27h23v2H7zm20.38-16.49l-7.93-7.92a2 2 0 0 0-2.83 0l-14 14a2 2 0 0 0 0 2.83L7.13 24h9.59l10.66-10.66a2 2 0 0 0 0-2.83M15.89 22H8l-4-4l6.31-6.31l7.93 7.92Zm3.76-3.76l-7.92-7.93L18 4l8 7.93Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:error{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M2 16A14 14 0 1 0 16 2A14 14 0 0 0 2 16m23.15 7.75L8.25 6.85a12 12 0 0 1 16.9 16.9M8.24 25.16a12 12 0 0 1-1.4-16.89l16.89 16.89a12 12 0 0 1-15.49 0'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:help{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3Ccircle cx='16' cy='23.5' r='1.5' fill='currentColor'/%3E%3Cpath fill='currentColor' d='M17 8h-1.5a4.49 4.49 0 0 0-4.5 4.5v.5h2v-.5a2.5 2.5 0 0 1 2.5-2.5H17a2.5 2.5 0 0 1 0 5h-2v4.5h2V17a4.5 4.5 0 0 0 0-9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:information{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M17 22v-8h-4v2h2v6h-3v2h8v-2zM16 8a1.5 1.5 0 1 0 1.5 1.5A1.5 1.5 0 0 0 16 8'/%3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:list-boxes{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 8h14v2H16zm0 14h14v2H16zm-6-8H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2M4 6v6h6.001L10 6Zm6 22H4a2 2 0 0 1-2-2v-6a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2m-6-8v6h6.001L10 20Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:maximize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 2v2h6.586L18 12.582L19.414 14L28 5.414V12h2V2zm-6 17.416L12.592 18L4 26.586V20H2v10h10v-2H5.414z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:minimize{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M4 18v2h6.586L2 28.582L3.414 30L12 21.414V28h2V18zM30 3.416L28.592 2L20 10.586V4h-2v10h10v-2h-6.586z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pause{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 8v16H8V8zm0-2H8a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2m12 2v16h-4V8zm0-2h-4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pen{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M27.307 6.107L30 3.414L28.586 2l-2.693 2.693L24.8 3.6a1.933 1.933 0 0 0-2.8 0l-18 18V28h6.4l18-18a1.933 1.933 0 0 0 0-2.8ZM9.6 26H6v-3.6L23.4 5L27 8.6ZM9 11.586L16.586 4L18 5.414L10.414 13z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pin{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M28.59 13.31L30 11.9L20 2l-1.31 1.42l1.18 1.18l-11.49 9.72l-1.72-1.71L5.25 14l5.66 5.68L2 28.58L3.41 30l8.91-8.91L18 26.75l1.39-1.42l-1.71-1.71l9.72-11.49ZM16.26 22.2L9.8 15.74L21.29 6L26 10.71Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:pin-filled{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M28.586 13.314L30 11.9L20 2l-1.314 1.415l1.186 1.186L8.38 14.322l-1.716-1.715L5.25 14l5.657 5.677L2 28.583L3.41 30l8.911-8.909L18 26.748l1.393-1.414l-1.716-1.716l9.724-11.49Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:play{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M7 28a1 1 0 0 1-1-1V5a1 1 0 0 1 1.482-.876l20 11a1 1 0 0 1 0 1.752l-20 11A1 1 0 0 1 7 28M8 6.69v18.62L24.925 16Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:presentation-file{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M15 10h2v8h-2zm5 4h2v4h-2zm-10-2h2v6h-2z'/%3E%3Cpath fill='currentColor' d='M25 4h-8V2h-2v2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8v6h-4v2h10v-2h-4v-6h8a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2m0 16H7V6h18Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:radio-button{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 2a14 14 0 1 0 14 14A14 14 0 0 0 16 2m0 26a12 12 0 1 1 12-12a12 12 0 0 1-12 12'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:redo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 10h12.185l-3.587-3.586L22 5l6 6l-6 6l-1.402-1.415L24.182 12H12a6 6 0 0 0 0 12h8v2h-8a8 8 0 0 1 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:renew{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 10H6.78A11 11 0 0 1 27 16h2A13 13 0 0 0 6 7.68V4H4v8h8Zm8 12h5.22A11 11 0 0 1 5 16H3a13 13 0 0 0 23 8.32V28h2v-8h-8Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:settings-adjust{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M30 8h-4.1c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2v2h14.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30zm-9 4c-1.7 0-3-1.3-3-3s1.3-3 3-3s3 1.3 3 3s-1.3 3-3 3M2 24h4.1c.5 2.3 2.5 4 4.9 4s4.4-1.7 4.9-4H30v-2H15.9c-.5-2.3-2.5-4-4.9-4s-4.4 1.7-4.9 4H2zm9-4c1.7 0 3 1.3 3 3s-1.3 3-3 3s-3-1.3-3-3s1.3-3 3-3'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:template{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M26 6v4H6V6zm0-2H6a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h20a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2M10 16v10H6V16zm0-2H6a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h4a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2m16 2v10H16V16zm0-2H16a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2V16a2 2 0 0 0-2-2'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:text-annotation-toggle{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath d='M29.537 13.76l-3.297-3.297a1.586 1.586 0 0 0-2.24 0L10 24.467V30h5.533l14.004-14a1.586 1.586 0 0 0 0-2.24zM14.704 28H12v-2.704l9.44-9.441l2.705 2.704zM25.56 17.145l-2.704-2.704l2.267-2.267l2.704 2.704z' fill='currentColor'/%3E%3Cpath d='M11 17h2v-7h3V8H8v2h3v7z' fill='currentColor'/%3E%3Cpath d='M8 20H4V4h16v4h2V4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h4z' fill='currentColor'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:time{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M16 30a14 14 0 1 1 14-14a14 14 0 0 1-14 14m0-26a12 12 0 1 0 12 12A12 12 0 0 0 16 4'/%3E%3Cpath fill='currentColor' d='M20.59 22L15 16.41V7h2v8.58l5 5.01z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:timer{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M15 11h2v9h-2zm-2-9h6v2h-6z'/%3E%3Cpath fill='currentColor' d='m28 9l-1.42-1.41l-2.25 2.25a10.94 10.94 0 1 0 1.18 1.65ZM16 26a9 9 0 1 1 9-9a9 9 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:trash-can{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12 12h2v12h-2zm6 0h2v12h-2z'/%3E%3Cpath fill='currentColor' d='M4 6v2h2v20a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8h2V6Zm4 22V8h16v20Zm4-26h8v2h-8z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:undo{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M20 10H7.815l3.587-3.586L10 5l-6 6l6 6l1.402-1.415L7.818 12H20a6 6 0 0 1 0 12h-8v2h8a8 8 0 0 0 0-16'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:user-speaker{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M29.415 19L27.7 17.285A3 3 0 0 0 28 16a3 3 0 1 0-3 3a3 3 0 0 0 1.286-.3L28 20.414V28h-6v-3a7.01 7.01 0 0 0-7-7H9a7.01 7.01 0 0 0-7 7v5h28v-9.586A2 2 0 0 0 29.415 19M4 25a5.006 5.006 0 0 1 5-5h6a5.006 5.006 0 0 1 5 5v3H4Z'/%3E%3Cpath fill='currentColor' d='M12 4a5 5 0 1 1-5 5a5 5 0 0 1 5-5m0-2a7 7 0 1 0 7 7a7 7 0 0 0-7-7'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:zoom-in{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M18 12h-4V8h-2v4H8v2h4v4h2v-4h4z'/%3E%3Cpath fill='currentColor' d='M21.448 20A10.86 10.86 0 0 0 24 13a11 11 0 1 0-11 11a10.86 10.86 0 0 0 7-2.552L27.586 29L29 27.586ZM13 22a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-carbon\:zoom-out{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 32 32' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M8 12h10v2H8z'/%3E%3Cpath fill='currentColor' d='M21.448 20A10.86 10.86 0 0 0 24 13a11 11 0 1 0-11 11a10.86 10.86 0 0 0 7-2.552L27.586 29L29 27.586ZM13 22a9 9 0 1 1 9-9a9.01 9.01 0 0 1-9 9'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph-cursor-duotone{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cg fill='currentColor'%3E%3Cpath d='M213.66 201L201 213.66a8 8 0 0 1-11.31 0l-51.31-51.31a8 8 0 0 0-13 2.46l-17.82 46.41a8 8 0 0 1-14.85-.71L40.41 50.44a8 8 0 0 1 10-10l160.1 52.24a8 8 0 0 1 .71 14.85l-46.41 17.82a8 8 0 0 0-2.46 13l51.31 51.31a8 8 0 0 1 0 11.34' opacity='.2'/%3E%3Cpath d='M168 132.69L214.08 115l.33-.13a16 16 0 0 0-1.41-29.8L52.92 32.8A15.95 15.95 0 0 0 32.8 52.92L85.07 213a15.82 15.82 0 0 0 14.41 11h.78a15.84 15.84 0 0 0 14.61-9.59l.13-.33L132.69 168L184 219.31a16 16 0 0 0 22.63 0l12.68-12.68a16 16 0 0 0 0-22.63ZM195.31 208L144 156.69a16 16 0 0 0-26 4.93c0 .11-.09.22-.13.32l-17.65 46L48 48l159.85 52.2l-45.95 17.64l-.32.13a16 16 0 0 0-4.93 26L208 195.31Z'/%3E%3C/g%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph-cursor-fill{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m220.49 207.8l-12.69 12.69a12 12 0 0 1-17 0l-56.57-56.57L115 214.08l-.13.33a15.84 15.84 0 0 1-14.61 9.59h-.78a15.82 15.82 0 0 1-14.41-11L32.8 52.92A15.95 15.95 0 0 1 52.92 32.8L213 85.07a16 16 0 0 1 1.41 29.8l-.33.13l-50.16 19.27l56.57 56.56a12 12 0 0 1 0 16.97'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph\:arrow-down-bold{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='m208.49 152.49l-72 72a12 12 0 0 1-17 0l-72-72a12 12 0 0 1 17-17L116 187V40a12 12 0 0 1 24 0v147l51.51-51.52a12 12 0 0 1 17 17Z'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-ph\:arrow-up-bold{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 256 256' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M208.49 120.49a12 12 0 0 1-17 0L140 69v147a12 12 0 0 1-24 0V69l-51.51 51.49a12 12 0 0 1-17-17l72-72a12 12 0 0 1 17 0l72 72a12 12 0 0 1 0 17'/%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.i-svg-spinners-90-ring-with-bg{--un-icon:url("data:image/svg+xml;utf8,%3Csvg viewBox='0 0 24 24' width='1em' height='1em' xmlns='http://www.w3.org/2000/svg' %3E%3Cpath fill='currentColor' d='M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z' opacity='.25'/%3E%3Cpath fill='currentColor' d='M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z'%3E%3CanimateTransform attributeName='transform' dur='0.75s' repeatCount='indefinite' type='rotate' values='0 12 12;360 12 12'/%3E%3C/path%3E%3C/svg%3E");-webkit-mask:var(--un-icon) no-repeat;-webkit-mask:var(--un-icon) no-repeat;mask:var(--un-icon) no-repeat;color:inherit;background-color:currentColor;width:1em;height:1em;-webkit-mask-size:100% 100%;mask-size:100% 100%}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.pointer-events-none,[pointer-events-none=""]{pointer-events:none}.visible,[visible=""]{visibility:visible}.absolute,[absolute=""]{position:absolute}.fixed,[fixed=""]{position:fixed}.relative,[relative=""]{position:relative}.inset-0,[inset-0=""]{inset:0}[marker-end~="128"] ::marker{inset-inline-end:32rem}[marker-end~="128"]::marker{inset-inline-end:32rem}[marker-end~="8"] ::marker{inset-inline-end:2rem}[marker-end~="8"]::marker{inset-inline-end:2rem}.inset-y-0,[inset-y-0=""]{top:0;bottom:0}.-top-15px{top:-15px}.-top-20{top:-5rem}.bottom-\[-6px\]{bottom:-6px}.bottom-0,[bottom-0=""]{bottom:0}.bottom-1,[bottom-1=""]{bottom:.25rem}.bottom-10{bottom:2.5rem}.bottom-5{bottom:1.25rem}.left-0,[left-0=""]{left:0}.left-1{left:.25rem}.left-1\/2{left:50%}.left-110\%{left:110%}.right--2,[right--2=""]{right:-.5rem}.right-\[-6px\]{right:-6px}.right-0,[right-0=""]{right:0}.right-0\.5,[right-0\.5=""]{right:.125rem}.right-1,[right-1=""]{right:.25rem}.right-4{right:1rem}.right-5,[right-5=""]{right:1.25rem}.top-\[-6px\]{top:-6px}.top-0,[top-0=""]{top:0}.top-0\.5,[top-0\.5=""]{top:.125rem}.top-1\/2,.top-50\%{top:50%}.top-10{top:2.5rem}.top-4{top:1rem}.top-5{top:1.25rem}.-z-1{z-index:-1}.z-1,[z-1=""]{z-index:1}.z-10,[z-10=""]{z-index:10}.z-2{z-index:2}.grid{display:grid}.grid-cols-\[1\.25fr_1fr\]{grid-template-columns:1.25fr 1fr}.grid-cols-\[1\.2fr_1fr\]{grid-template-columns:1.2fr 1fr}.grid-cols-\[1\.35fr_1fr\]{grid-template-columns:1.35fr 1fr}.grid-cols-\[1\.3fr_1fr\]{grid-template-columns:1.3fr 1fr}.grid-cols-\[1\.45fr_1fr\]{grid-template-columns:1.45fr 1fr}.grid-cols-\[1\.4fr_1fr\]{grid-template-columns:1.4fr 1fr}.grid-cols-\[1\.5fr_1fr\]{grid-template-columns:1.5fr 1fr}.grid-cols-\[1\.75fr_1fr\]{grid-template-columns:1.75fr 1fr}.grid-cols-\[1\.7fr_1fr\]{grid-template-columns:1.7fr 1fr}.grid-cols-\[1\.9fr_1fr\]{grid-template-columns:1.9fr 1fr}.grid-cols-\[1fr_1\.15fr\]{grid-template-columns:1fr 1.15fr}.grid-cols-\[1fr_1\.25fr\]{grid-template-columns:1fr 1.25fr}.grid-cols-\[1fr_1\.2fr\]{grid-template-columns:1fr 1.2fr}.grid-cols-\[1fr_1\.3fr\]{grid-template-columns:1fr 1.3fr}.grid-cols-\[1fr_1\.4fr\]{grid-template-columns:1fr 1.4fr}.grid-cols-\[1fr_1\.5fr\]{grid-template-columns:1fr 1.5fr}.grid-cols-\[1fr_max-content\]{grid-template-columns:1fr max-content}.grid-cols-\[2\.4fr_1fr\]{grid-template-columns:2.4fr 1fr}.grid-cols-\[35px_1fr\]{grid-template-columns:35px 1fr}.grid-rows-\[1fr_max-content\]{grid-template-rows:1fr max-content}.grid-rows-\[1fr_min-content\]{grid-template-rows:1fr min-content}.grid-rows-\[auto_max-content\]{grid-template-rows:auto max-content}.grid-rows-\[max-content_1fr\]{grid-template-rows:max-content 1fr}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.m--1,[m--1=""]{margin:-.25rem}.m-1{margin:.25rem}.m-auto,.ma{margin:auto}.m\[0\],.m0,[m0=""]{margin:0}.m\[1\]{margin:1px}.m\[2\]{margin:2px}.children\:my-auto>*,.my-auto,.mya{margin-top:auto;margin-bottom:auto}.mx--1\.2{margin-left:-.3rem;margin-right:-.3rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1,.my1{margin-top:.25rem;margin-bottom:.25rem}.my2{margin-top:.5rem;margin-bottom:.5rem}.my5{margin-top:1.25rem;margin-bottom:1.25rem}.-mt-0\.5{margin-top:-.125rem}.mb-4{margin-bottom:1rem}.mb2{margin-bottom:.5rem}.ml-1{margin-left:.25rem}.ml-auto{margin-left:auto}.mr--14px{margin-right:-14px}.mr--4{margin-right:-1rem}.mr-2{margin-right:.5rem}.mr0{margin-right:0}.mr1{margin-right:.25rem}.ms{margin-inline-start:1rem}.mt-1,.mt1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-px{margin-top:1px}.block{display:block}.inline-block,[inline-block=""]{display:inline-block}.hidden,.group:hover .group-hover\:hidden,.group:not(:hover) .group-not-hover\:hidden{display:none}.aspect-ratio-initial{aspect-ratio:initial}[size~="100"]{width:25rem;height:25rem}[size~="110"]{width:27.5rem;height:27.5rem}[size~="120"]{width:30rem;height:30rem}[size~="150"]{width:37.5rem;height:37.5rem}[size~="170"]{width:42.5rem;height:42.5rem}[size~="190"]{width:47.5rem;height:47.5rem}[size~="64"]{width:16rem;height:16rem}[size~="80"]{width:20rem;height:20rem}.h-\[22px\],.h-22px,[h-22px=""]{height:22px}.h-\[40px\]{height:40px}.h-\[calc\(var\(--vh\,1vh\)\*100\)\]{height:calc(var(--vh,1vh) * 100)}.h-0\.7{height:.175rem}.h-1\.5,[h-1\.5=""]{height:.375rem}.h-1px{height:1px}.h-2,[h-2=""]{height:.5rem}.h-3\.5{height:.875rem}.h-40{height:10rem}.h-4px{height:4px}.h-5,.h5,[h-5=""]{height:1.25rem}.h-6{height:1.5rem}.h-8,[h-8=""]{height:2rem}.h-full,[h-full=""]{height:100%}.h-max{height:max-content}.h-screen{height:100vh}.h1,[h1=""]{height:.25rem}.max-h-full{max-height:100%}.max-h-full\!{max-height:100%!important}.max-w-\[calc\(100\%-3rem\)\]{max-width:calc(100% - 3rem)}.max-w-150{max-width:37.5rem}.max-w-250{max-width:62.5rem}.max-w-90,[max-w-90=""]{max-width:22.5rem}.max-w-full{max-width:100%}.max-w-full\!{max-width:100%!important}.max-w-xs{max-width:20rem}.min-h-50{min-height:12.5rem}.min-h-full\!{min-height:100%!important}.min-w-\[70\%\]{min-width:70%}.min-w-0{min-width:0}.min-w-16{min-width:4rem}.min-w-30,[min-w-30=""]{min-width:7.5rem}.min-w-40{min-width:10rem}.min-w-90,[min-w-90=""]{min-width:22.5rem}.min-w-full\!{min-width:100%!important}.w-\[40px\]{width:40px}.w-\[calc\(100\%-0\.25rem\)\]{width:calc(100% - .25rem)}.w-0{width:0}.w-0\.5,[w-0\.5=""]{width:.125rem}.w-1\.5,[w-1\.5=""]{width:.375rem}.w-13{width:3.25rem}.w-1px,[w-1px=""]{width:1px}.w-2,[w-2=""]{width:.5rem}.w-20,[w-20=""]{width:5rem}.w-200{width:50rem}.w-22px{width:22px}.w-250{width:62.5rem}.w-3\.5{width:.875rem}.w-30,[w-30=""]{width:7.5rem}.w-5,[w-5=""]{width:1.25rem}.w-6{width:1.5rem}.w-60,[w-60=""]{width:15rem}.w-7{width:1.75rem}.w-8{width:2rem}.w-88{width:22rem}.w-9{width:2.25rem}.w-90,[w-90=""]{width:22.5rem}.w-full,[w-full=""]{width:100%}.w-full\!{width:100%!important}.w-screen{width:100vw}.w1,[w1=""]{width:.25rem}.w3{width:.75rem}.flex,[flex=""],[flex~=\~]{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1}.flex-auto,[flex-auto=""]{flex:auto}.flex-none{flex:none}.flex-shrink{flex-shrink:1}.flex-grow,.grow{flex-grow:1}[flex~=row]{flex-direction:row}.flex-col,[flex~=col]{flex-direction:column}.flex-wrap{flex-wrap:wrap}.flex-wrap-reverse{flex-wrap:wrap-reverse}.table,[table=""]{display:table}.table-cell,[table-cell=""]{display:table-cell}.table-row,[table-row=""]{display:table-row}.border-collapse,[border-collapse=""]{border-collapse:collapse}.translate-y--50\%{--un-translate-y:-50%;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.-rotate-45{--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-rotate:-45deg;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-102{--un-scale-x:1.02;--un-scale-y:1.02;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-85{--un-scale-x:.85;--un-scale-y:.85;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.scale-x-80{--un-scale-x:.8;transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}.transform{transform:translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z)) rotate(var(--un-rotate)) rotateX(var(--un-rotate-x)) rotateY(var(--un-rotate-y)) rotateZ(var(--un-rotate-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z))}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:1s linear fade-in}.animate-duration-100{animation-duration:.1s}.cursor-default{cursor:default}.cursor-pointer,[cursor-pointer=""]{cursor:pointer}.touch-none,[touch-none=""]{touch-action:none}.important\:\[\&_\*\]\:select-none *{-webkit-user-select:none!important;user-select:none!important}.select-none,[select-none=""]{-webkit-user-select:none;user-select:none}.resize{resize:both}.resize-none{resize:none}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center,[flex~=items-center],[items-center=""]{align-items:center}.self-center{align-self:center}.justify-center,[flex~=justify-center],[justify-center=""]{justify-content:center}.justify-between{justify-content:space-between}.justify-items-start{justify-items:start}.gap-0{gap:0}.gap-0\.2{gap:.05rem}.gap-0\.5{gap:.125rem}.gap-1,[flex~=gap-1],[gap-1=""]{gap:.25rem}.gap-2,[flex~=gap-2]{gap:.5rem}.gap-4,[flex~=gap-4]{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-8{gap:2rem}.gap-px{gap:1px}.gap-x-4{column-gap:1rem}.gap-x-8{column-gap:2rem}.gap-y-3{row-gap:.75rem}.gap-y-4{row-gap:1rem}.of-auto,.overflow-auto{overflow:auto}.of-hidden,.overflow-hidden,[of-hidden=""]{overflow:hidden}.of-x-visible{overflow-x:visible}.of-y-auto,.overflow-y-auto{overflow-y:auto}.whitespace-nowrap,.ws-nowrap,[ws-nowrap=""]{white-space:nowrap}.b,.border,.dark .dark\:border,.dark [dark\:border~=\~],[b=""],[b~="1"],[border=""],[border~=\~]{border-width:1px}.border-2,[b~="2"]{border-width:2px}[b~="0"],[border~="0"]{border-width:0}[b~="100%"]{border-width:100%}[b~="16"]{border-width:16px}[b~="50%"]{border-width:50%}[b~="64"]{border-width:64px}[b~=default\:]:default{border-width:1px}.border-x,[b~=x]{border-left-width:1px;border-right-width:1px}[b~=y],[border~=y]{border-top-width:1px;border-bottom-width:1px}.border-b,[b~=b],[border~=b]{border-bottom-width:1px}.border-b-0{border-bottom-width:0}.border-l{border-left-width:1px}.border-r,[border~=r]{border-right-width:1px}.border-r-2{border-right-width:2px}.border-t,[border-t=""],[border~=t]{border-top-width:1px}.b-dark{--un-border-opacity:1;border-color:rgb(34 34 34/var(--un-border-opacity))}.border-gray,.dark .dark\:b-gray-400,[border-gray=""]{--un-border-opacity:1;border-color:rgb(156 163 175/var(--un-border-opacity))}.border-gray-300\/50{border-color:#d1d5db80}.border-transparent,[border~=transparent]{border-color:#0000}.border-white{--un-border-opacity:1;border-color:rgb(255 255 255/var(--un-border-opacity))}.dark .dark\:border-gray-500,.dark [dark\:border-gray-500=""]{--un-border-opacity:1;border-color:rgb(107 114 128/var(--un-border-opacity))}[b-dark~="1"]{--un-border-opacity:1;border-color:rgb(60 60 60/var(--un-border-opacity))}.dark [b~=dark\:b-gray-400]{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(156 163 175/var(--un-border-bottom-opacity))}[b~=b-dark]{--un-border-opacity:1;--un-border-bottom-opacity:var(--un-border-opacity);border-bottom-color:rgb(34 34 34/var(--un-border-bottom-opacity))}.rounded,[border~=rounded],[rounded=""]{border-radius:.25rem}.rounded-1\/2{border-radius:50%}.rounded-full,[rounded-full=""]{border-radius:9999px}.rounded-md,[border~=rounded-md]{border-radius:.375rem}.rounded-l{border-top-left-radius:.25rem;border-bottom-left-radius:.25rem}.rounded-r{border-top-right-radius:.25rem;border-bottom-right-radius:.25rem}.rounded-lb{border-bottom-left-radius:.25rem}.rounded-tl{border-top-left-radius:.25rem}.rounded-tr{border-top-right-radius:.25rem}.rounded-tr-0{border-top-right-radius:0}.\!border-none{border-style:none!important}.b-dashed{border-style:dashed}[b~=b-dashed]{border-bottom-style:dashed}.bg-blue{--un-bg-opacity:1;background-color:rgb(96 165 250/var(--un-bg-opacity))}.bg-current{background-color:currentColor}.bg-cyan\:10,[bg-cyan\:10=""]{background-color:#22d3ee1a}.bg-gray,[bg-gray=""]{--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.bg-gray\:10,.bg-gray\/10{background-color:#9ca3af1a}.bg-gray\:4,[bg-gray\:4=""]{background-color:#9ca3af0a}.bg-gray\:5,.bg-gray\/5,[bg-gray\:5=""]{background-color:#9ca3af0d}.bg-gray\/20{background-color:#9ca3af33}.bg-green{--un-bg-opacity:1;background-color:rgb(74 222 128/var(--un-bg-opacity))}.bg-red{--un-bg-opacity:1;background-color:rgb(248 113 113/var(--un-bg-opacity))}.bg-transparent{background-color:#0000}.bg-yellow{--un-bg-opacity:1;background-color:rgb(250 204 21/var(--un-bg-opacity))}.dark .dark\:bg-gray-800,.dark [dark\:bg-gray-800=""]{--un-bg-opacity:1;background-color:rgb(31 41 55/var(--un-bg-opacity))}[bg~=black]{--un-bg-opacity:1;background-color:rgb(0 0 0/var(--un-bg-opacity))}.hover\:bg-gray-400:hover{--un-bg-opacity:1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.hover\:bg-gray\/20:hover{background-color:#9ca3af33}[bg-transparent~=placeholder\:]::placeholder{background-color:#0000}.\!bg-opacity-75{--un-bg-opacity:.75!important}.bg-opacity-30,[bg-opacity-30=""]{--un-bg-opacity:.3}[bg~=opacity-80]{--un-bg-opacity:.8}.hover\:bg-opacity-10:hover{--un-bg-opacity:.1}[stroke-width~="1"]{stroke-width:1px}[stroke-width~="2"]{stroke-width:2px}[stroke-width~="3"]{stroke-width:3px}.dark .dark\:stroke-black{--un-stroke-opacity:1;stroke:rgb(0 0 0/var(--un-stroke-opacity))}.stroke-white{--un-stroke-opacity:1;stroke:rgb(255 255 255/var(--un-stroke-opacity))}.object-cover{object-fit:cover}.object-contain{object-fit:contain}.\!p-4{padding:1rem!important}.p-1,.p1,[p1=""]{padding:.25rem}.p-16{padding:4rem}.p-2,.p2,[p2=""]{padding:.5rem}.p-6px{padding:6px}.p0\.5,[p0\.5=""]{padding:.125rem}.p3{padding:.75rem}.p4{padding:1rem}.p5{padding:1.25rem}.px,.px-4,.px4,[p~=x-4],[px=""],[px4=""]{padding-left:1rem;padding-right:1rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2,.px2,[px2=""]{padding-left:.5rem;padding-right:.5rem}.px-3,.px3,[px3=""]{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px1{padding-left:.25rem;padding-right:.25rem}.py-1,.py1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2,.py2,[p~=y-2],[py-2=""],[py2=""]{padding-top:.5rem;padding-bottom:.5rem}.py-20{padding-top:5rem;padding-bottom:5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4,[py=""]{padding-top:1rem;padding-bottom:1rem}.py0\.5{padding-top:.125rem;padding-bottom:.125rem}.py1\.5{padding-top:.375rem;padding-bottom:.375rem}.pb2{padding-bottom:.5rem}.pl-0{padding-left:0}.pl-1,.pl1{padding-left:.25rem}.pl-4,[pl-4=""]{padding-left:1rem}.pl2,[pl2=""]{padding-left:.5rem}.pr-3,[pr-3=""]{padding-right:.75rem}.pr-4,[pr-4=""]{padding-right:1rem}.pt-\.5{padding-top:.125rem}.pt-15\%{padding-top:15%}.pt2{padding-top:.5rem}[pt=""]{padding-top:1rem}.text-center{text-align:center}.text-right,[text-right=""]{text-align:right}.text-nowrap{text-wrap:nowrap}.align-top,[align-top=""]{vertical-align:top}.vertical-middle,[vertical-middle=""]{vertical-align:middle}.text-1\.2em{font-size:1.2em}.text-11px{font-size:11px}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3em{font-size:3em}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-9xl,[text-9xl=""]{font-size:8rem;line-height:1}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm,[text-sm=""]{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs,[text-xs=""]{font-size:.75rem;line-height:1rem}[text~="40"]{font-size:10rem}[text~="93"]{font-size:23.25rem}[text~="94"]{font-size:23.5rem}.\!text-current{color:currentColor!important}.dark .dark\:text-blue3{--un-text-opacity:1;color:rgb(147 197 253/var(--un-text-opacity))}.dark .dark\:text-green,.text-green{--un-text-opacity:1;color:rgb(74 222 128/var(--un-text-opacity))}.dark .dark\:text-green3{--un-text-opacity:1;color:rgb(134 239 172/var(--un-text-opacity))}.dark .dark\:text-red-500{--un-text-opacity:1;color:rgb(239 68 68/var(--un-text-opacity))}.dark .dark\:text-red3{--un-text-opacity:1;color:rgb(252 165 165/var(--un-text-opacity))}.dark .dark\:text-yellow3{--un-text-opacity:1;color:rgb(253 224 71/var(--un-text-opacity))}.text-\$slidev-controls-foreground{color:var(--slidev-controls-foreground)}.text-black{--un-text-opacity:1;color:rgb(0 0 0/var(--un-text-opacity))}.text-blue{--un-text-opacity:1;color:rgb(96 165 250/var(--un-text-opacity))}.text-blue6{--un-text-opacity:1;color:rgb(37 99 235/var(--un-text-opacity))}.text-cyan{--un-text-opacity:1;color:rgb(34 211 238/var(--un-text-opacity))}.text-cyan\:75,[text-cyan\:75=""]{color:#22d3eebf}.text-gray,.text-gray-400{--un-text-opacity:1;color:rgb(156 163 175/var(--un-text-opacity))}.text-gray-500{--un-text-opacity:1;color:rgb(107 114 128/var(--un-text-opacity))}.text-green-500{--un-text-opacity:1;color:rgb(34 197 94/var(--un-text-opacity))}.text-green6{--un-text-opacity:1;color:rgb(22 163 74/var(--un-text-opacity))}.text-indigo{--un-text-opacity:1;color:rgb(129 140 248/var(--un-text-opacity))}.text-lime{--un-text-opacity:1;color:rgb(163 230 53/var(--un-text-opacity))}.text-orange{--un-text-opacity:1;color:rgb(251 146 60/var(--un-text-opacity))}.text-pink{--un-text-opacity:1;color:rgb(244 114 182/var(--un-text-opacity))}.text-purple{--un-text-opacity:1;color:rgb(192 132 252/var(--un-text-opacity))}.dark .dark\:color-red-400,.text-red,.text-red-400{--un-text-opacity:1;color:rgb(248 113 113/var(--un-text-opacity))}.text-red-700{--un-text-opacity:1;color:rgb(185 28 28/var(--un-text-opacity))}.color-red-600,.text-red6{--un-text-opacity:1;color:rgb(220 38 38/var(--un-text-opacity))}.text-teal{--un-text-opacity:1;color:rgb(45 212 191/var(--un-text-opacity))}.text-white{--un-text-opacity:1;color:rgb(255 255 255/var(--un-text-opacity))}.text-yellow{--un-text-opacity:1;color:rgb(250 204 21/var(--un-text-opacity))}.text-yellow6{--un-text-opacity:1;color:rgb(202 138 4/var(--un-text-opacity))}.important-text-op-50,.text-opacity-50\!{--un-text-opacity:.5!important}.font-bold,[font-bold=""]{font-weight:700}.font-light{font-weight:300}.leading-1\.6em{line-height:1.6em}.leading-1em{line-height:1em}.leading-tight{line-height:1.25}.font-mono,[font-mono=""]{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--un-numeric-spacing:tabular-nums;font-variant-numeric:var(--un-ordinal) var(--un-slashed-zero) var(--un-numeric-figure) var(--un-numeric-spacing) var(--un-numeric-fraction)}.line-through{text-decoration-line:line-through}.underline,.hover\:underline:hover{text-decoration-line:underline}.underline-offset-2{text-underline-offset:2px}.tab{tab-size:4}.\!opacity-0{opacity:0!important}.\!opacity-100{opacity:1!important}.op-60,.op60{opacity:.6}.op-80,.op80,.opacity-80{opacity:.8}.op0,.opacity-0{opacity:0}.op100,.group:hover .group-hover\:op100{opacity:1}.op15{opacity:.15}.op20,.group:hover .group-hover\:opacity-20{opacity:.2}.op25,.opacity-25,[op25=""]{opacity:.25}.op30{opacity:.3}.op35{opacity:.35}.op40,.opacity-40,[op40=""]{opacity:.4}.op50,.opacity-50,[op50=""]{opacity:.5}.op75,[op75=""]{opacity:.75}.opacity-10,[opacity-10=""]{opacity:.1}.opacity-5{opacity:.05}.focus-within\:opacity-100:focus-within{opacity:1}.hover\:\!opacity-100:hover{opacity:1!important}.hover\:op-100:hover,.hover\:op100:hover{opacity:1}.hover\:op90:hover{opacity:.9}.hover\:opacity-100:hover{opacity:1}.hover\:opacity-90:hover{opacity:.9}[hover~=op100]:hover,.focus-visible\:opacity-100:focus-visible{opacity:1}.placeholder\:op25::placeholder{opacity:.25}.shadow,[shadow~=\~]{--un-shadow:var(--un-shadow-inset) 0 1px 3px 0 var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 1px 2px -1px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.shadow-xl{--un-shadow:var(--un-shadow-inset) 0 20px 25px -5px var(--un-shadow-color,#0000001a),var(--un-shadow-inset) 0 8px 10px -6px var(--un-shadow-color,#0000001a);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.outline,[outline=""]{outline-style:solid}.outline-none,[outline-none=""]{outline-offset:2px;outline:2px solid #0000}.ring{--un-ring-width:3px;--un-ring-offset-shadow:var(--un-ring-inset) 0 0 0 var(--un-ring-offset-width) var(--un-ring-offset-color);--un-ring-shadow:var(--un-ring-inset) 0 0 0 calc(var(--un-ring-width) + var(--un-ring-offset-width)) var(--un-ring-color);box-shadow:var(--un-ring-offset-shadow), var(--un-ring-shadow), var(--un-shadow)}.\!backdrop-blur-0px{--un-backdrop-blur:blur(0px)!important;-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)!important;backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)!important}.backdrop-blur{--un-backdrop-blur:blur(8px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.backdrop-blur-5px{--un-backdrop-blur:blur(5px);-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.filter{filter:var(--un-blur) var(--un-brightness) var(--un-contrast) var(--un-drop-shadow) var(--un-grayscale) var(--un-hue-rotate) var(--un-invert) var(--un-saturate) var(--un-sepia)}.backdrop-filter{-webkit-backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia);backdrop-filter:var(--un-backdrop-blur) var(--un-backdrop-brightness) var(--un-backdrop-contrast) var(--un-backdrop-grayscale) var(--un-backdrop-hue-rotate) var(--un-backdrop-invert) var(--un-backdrop-opacity) var(--un-backdrop-saturate) var(--un-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-all{transition-property:all;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-property:opacity;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition-all~="0"]{transition-property:all;transition-duration:0s;transition-timing-function:cubic-bezier(.4,0,.2,1)}[transition-all~="4"]{transition-property:all;transition-duration:4ms;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-400{transition-duration:.4s}.ease{transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in{transition-timing-function:cubic-bezier(.4,0,1,1)}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.view-transition-name{view-transition-name:name}@media (width<=767.9px){.lt-md\:hidden{display:none}.lt-md\:flex-col{flex-direction:column}}@media (width>=768px){.md\:p-10px{padding:10px}}@media (width>=1024px){.lg\:m-2{margin:.5rem}.lg\:p-2{padding:.5rem}.lg\:p-4{padding:1rem}} diff --git a/lecture-08/assets/index-CvCioxNn.js b/lecture-08/assets/index-CvCioxNn.js new file mode 100644 index 0000000000000000000000000000000000000000..f3b000945040e22cf7032c7b41c51d6eaf39bc24 --- /dev/null +++ b/lecture-08/assets/index-CvCioxNn.js @@ -0,0 +1,46 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./modules/file-saver-BpWusTEB.js","./rolldown-runtime-hePW80VL.js","./slidev/entry-C7SFAt6v.js","./modules/shiki-CJZsCeMT.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./entry-Dba4BKje.css","./slidev/overview-BMK6AjPZ.js","./useNav-B0kQsolV.js","./modules/vue-Dnfgf7Ad.js","./slidev/context-DB-9afGB.js","./modules/unplugin-icons-CStvVwzQ.js","./slidev/IconButton-BwA4p7Ax.js","./slidev/NoteDisplay-7gBbyxSS.js","./NoteDisplay-DCBzjb4F.css","./SlideWrapper-BDw_Ew7k.js","./syncState-3Tc2ZArb.js","./slidev/client-beF_Q0xG.js","./useDrawings-B2TJYfiB.js","./SlideWrapper-DBNQYNtZ.css","./slidev/NoteEditable-qR7skroz.js","./overview-BIQ10iVu.css","./slidev/notes-DR2PUT4o.js","./slidev/Modal-PBdP8Aqp.js","./slidev/TimerBar-DXDQLXL9.js","./slidev/notes-edit-BJF3Fcbc.js","./slidev/presenter-BxnNsbIJ.js","./slidev/DrawingControls-DzQSGyTT.js","./slidev/VerticalDivider-Bvc1MZzH.js","./DrawingControls-Dhbx0szf.css","./slidev/shortcuts-Bt08PVJK.js","./shortcuts-nRB69a7e.css","./presenter-J5ibmAMh.css","./slidev/play-CBQP4AOb.js","./play-D_7yfuao.css","./slidev/404-DZ1RXj5D.js","./404-bkedjYjP.css"])))=>i.map(i=>d[i]); +import{r as e}from"./rolldown-runtime-hePW80VL.js";import{A as t,B as n,C as r,E as i,F as a,I as o,L as s,Q as c,T as l,W as u,Z as d,b as f,dt as p,g as m,it as h,k as g,lt as _,m as v,mt as y,ot as b,s as x,t as S,vt as C,y as w,yt as T}from"./modules/shiki-CJZsCeMT.js";import{$ as E,A as ee,B as te,G as ne,H as re,Q as D,R as ie,Z as ae,c as oe,et as O,h as se,j as k,l as ce,n as le,p as A,q as j,t as ue,tt as M,w as de,z as fe}from"./useNav-B0kQsolV.js";import{A as pe,L as me,R as he,S as ge,T as _e,V as ve,f as ye,g as be,i as xe,j as Se,o as Ce,x as we,z as Te}from"./modules/vue-Dnfgf7Ad.js";import{a as Ee,c as De,d as Oe,f as ke,g as Ae,i as je,m as Me,o as Ne,p as Pe,r as Fe,s as Ie,u as Le,y as Re}from"./slidev/context-DB-9afGB.js";import{n as N,r as ze,t as Be}from"./syncState-3Tc2ZArb.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})(),p(!1),p(!1);var Ve=new Set([`link`,`style`,`script`,`noscript`]),He=new Set([`title`,`titleTemplate`,`script`,`style`,`noscript`]),Ue=new Set([`base`,`meta`,`link`,`style`,`script`,`noscript`]),We=new Set([`title`,`base`,`htmlAttrs`,`bodyAttrs`,`meta`,`link`,`style`,`script`,`noscript`]),Ge=new Set([`base`,`title`,`titleTemplate`,`bodyAttrs`,`htmlAttrs`,`templateParams`]),Ke=new Set([`key`,`tagPosition`,`tagPriority`,`tagDuplicateStrategy`,`innerHTML`,`textContent`,`processTemplateParams`]),qe=new Set([`templateParams`,`htmlAttrs`,`bodyAttrs`]),Je=new Set([`theme-color`,`google-site-verification`,`author`,`og:locale:alternate`,`og:image`,`og:video`,`og:audio`,`article:author`,`article:tag`,`book:author`,`book:tag`,`twitter:image`]),Ye={critical:-8,high:-1,low:2},Xe=e=>typeof e==`number`?Number.isFinite(e):e;function Ze(e){return e===`__proto__`||e===`constructor`||e===`prototype`}function Qe(e,t,n,r){for(let i=n;ie[i](...t)):e[i](...t);if(n&&typeof n.then==`function`)return Promise.resolve(n).then(()=>Qe(e,t,i+1,r))}catch(e){return Promise.reject(e)}}var $e=class{_hooks;constructor(){this._hooks={}}hook(e,t){return!e||typeof t!=`function`?()=>{}:(this._hooks[e]=this._hooks[e]||[],this._hooks[e].push(t),()=>{t&&=(this.removeHook(e,t),void 0)})}removeHook(e,t){let n=this._hooks[e];if(n){let r=n.indexOf(t);r!==-1&&n.splice(r,1),n.length===0&&(this._hooks[e]=void 0)}}callHook(e,...t){let n=this._hooks[e];if(!(!n||n.length===0))return Qe(n,t,0)}};function et(e){let t=new $e;for(let n in e||{})t.hook(n,e[n]);return t}function tt(e,t,n){if(e.hooks?._hooks?.[t]?.length)return e.hooks?.callHook(t,n)}var nt=/^(?:viewport|description|keywords|robots)$/,rt=[`name`,`property`,`http-equiv`];function it(e){let t=e.indexOf(`:`);if(t===-1)return!1;let n=e.slice(t+1);return Je.has(n)||n.startsWith(`og:image:`)||n.startsWith(`og:video:`)||n.startsWith(`og:audio:`)||n.startsWith(`twitter:image:`)}function at(e){let{props:t,tag:n,key:r}=e;if(Ge.has(n))return n;if(n===`link`){if(t.rel===`canonical`)return`canonical`;if(t.rel===`alternate`&&t.hreflang)return`alternate:${t.hreflang}`}if(t.charset)return`charset`;if(n===`meta`)for(let e of rt){let n=t[e];if(n!==void 0)return`meta:${n}${(typeof n!=`string`||!n.includes(`:`))&&!nt.test(n)&&r?`:key:${r}`:``}`}return r?`${n}:key:${r}`:t.id?`${n}:id:${t.id}`:n===`link`&&t.rel&&t.href?`link:${t.rel}:${t.href}`:He.has(n)&&(e.textContent||e.innerHTML)?`${n}:content:${e.textContent||e.innerHTML}`:void 0}function ot(e){let t=e._h||e._d||e.textContent||e.innerHTML;if(t)return t;let n=Object.keys(e.props).sort(),r=`${e.tag}:`,i=``;for(let t of n)r+=`${i}${t}:${String(e.props[t])}`,i=`,`;return r}function st(e,t,n){if(n===`_resolver`)return e;typeof e==`function`&&(!n||n!==`titleTemplate`&&!n.startsWith(`on`))&&(e=e());let r=t?t(n,e):e;if(Array.isArray(r)){let e;for(let n=0;n/=\x00-\x1F\x7F]/;function lt(e,t){let n=e===`style`,r=n?new Map:new Set,i=e=>{if(e){if(n){let t=e.indexOf(`:`);t>0&&r.set(e.slice(0,t).trim(),e.slice(t+1).trim())}else e.split(` `).forEach(e=>e&&r.add(e))}};if(typeof t==`string`)(n?t.split(`;`):[t]).forEach(i);else if(Array.isArray(t))t.forEach(i);else if(t&&typeof t==`object`)for(let e in t){let a=t[e];a&&a!==`false`&&(n?r.set(e.trim(),String(a)):i(e))}return r}function ut(e,t){if(e.props=e.props||{},!t)return e;if(e.tag===`templateParams`)return e.props=t,e;let n=Ue.has(e.tag)||e.tag===`htmlAttrs`||e.tag===`bodyAttrs`;for(let r in t){if(Ze(r))continue;let i=r.startsWith(`data-`),a=n&&!Ke.has(r),o=a&&!i?r.toLowerCase():r;if(a&&(!o||ct.test(o)))continue;let s=t[r];if(s===null)e.props[o]=null;else if(r===`class`||r===`style`)e.props[r]=lt(r,s);else if(Ke.has(r)){if((r===`textContent`||r===`innerHTML`)&&typeof s==`object`){let n=t.type||`application/json`;(n.endsWith(`json`)||n===`speculationrules`||n===`importmap`)&&(e.props.type=t.type=n,e[r]=JSON.stringify(s))}else e[r]=s}else if(s!==void 0){let t=String(s),n=e.tag===`meta`&&o===`content`;e.props[o]=t===`true`||t===``?i||n?t:!0:!s&&i&&t===`false`?`false`:s}}return e}function dt(e,t){let n;return t.length&&(n=(e,n)=>{for(let r=0;re._w===t._w?e._p-t._p:e._w-t._w,vt=()=>100;function yt(e){for(let t in e)return!1;return!0}var bt=/^tags:|:render/;function xt(e,t){let n=(t[`entries:resolve`]?.length||0)+(t[`entries:normalize`]?.length||0);if(e._h!==n){e._h=n;for(let t of e.entries.values())delete t._tags}}function St(e){for(let t=0;t>10==i._p>>10&&n.tag===`meta`&&it(r)?(e.tagMap.set(r,Object.assign([...Array.isArray(i)?i:[i],n],n)),t=!0):(n._w===i._w?n._p>i._p:n._wt?(typeof e==`string`?e:JSON.stringify(e)).replace(ht,`\\u003C`):typeof e==`string`?e.replace(gt,`<\\/script`):e;n={...n},r&&(n.innerHTML=i(r)),n.textContent&&(n.textContent=i(n.textContent)),n._d=at(n)}e[t++]=n}}return e.length=t,e}function Dt(e,t){let n=t?.tagWeight??e.resolvedOptions._tagWeight??vt,r={tagMap:new Map,tags:[]},i=e.hooks?._hooks||{};xt(e,i);for(let t of e.entries.values())t._pending!==void 0&&(t.input=t._pending,delete t._pending,delete t._tags,delete t._precomputedTags);let a;(i[`entries:resolve`]?.length||i[`entries:normalize`]?.length)&&(a=[...e.entries.values()],i[`entries:resolve`]?.length&&tt(e,`entries:resolve`,{entries:a,...r})),xt(e,i);for(let t of a||e.entries.values()){let a=t._tags;if(!a){if(t._precomputedTags&&n===e.resolvedOptions._tagWeight&&!i[`entries:normalize`]?.length&&!i[`entries:resolve`]?.length&&(!t.options||yt(t.options)))a=t._precomputedTags;else{if(a=mt(t.input,e.resolvedOptions.propResolvers||[]),t.options&&!yt(t.options))for(let e of a)Object.assign(e,t.options);if(i[`entries:normalize`]?.length){let n={tags:a,entry:t};tt(e,`entries:normalize`,n),a=n.tags}for(let e=0;eb(t)?C(t):t,{_static:!0});function Mt(e,t={}){let n=t.head||kt();return n.ssr?n.push(e||{},t):Nt(n,e,t)}function Nt(e,t,n={}){let r=h();if(r&&!r.active)return{patch(){},dispose(){},_i:-1};let l=p(!1);if(n.onRendered&&r){let e=n.onRendered;n={...n,onRendered:t=>r.run(()=>e(t))}}let u;return c(()=>{let r=l.value?{}:st(t,jt);u?u.patch(r):u=e.push(r,n)}),i()&&(o(()=>{u.dispose()}),s(()=>{l.value=!0}),a(()=>{l.value=!1})),u}function Pt(e,t){if(typeof t==`function`&&t.key&&e.plugins.has(t.key))return;let n=typeof t==`function`?t(e):t,r=n.key||String(e.plugins.size+1);if(!e.plugins.get(r)){e.plugins.set(r,n);for(let t in n.hooks||{})e.hooks?.hook(t,n.hooks[t])}}function Ft(e,t={}){let n=!t.document,r=new Map,i={_entryCount:1,_h:0,plugins:new Map,resolvedOptions:t,ssr:n,entries:r,hooks:void 0,render:()=>e(i),use:e=>Pt(i,e),push(e,t){let a=t?._index??i._entryCount++,o=t?{...t}:{};delete o.head,delete o.onRendered,delete o._index;let s={_i:a,input:e,options:o};return r.set(a,s),{_i:a,dispose(){r.delete(a)},patch(e){n?(s.input=e,delete s._tags):s._pending=e,r.has(a)||r.set(a,s)}}}};return t.init?.forEach(e=>e&&i.push(e)),i}var It=Object.assign({}),Lt=Object.assign({}),Rt=Object.assign({}),zt=[Object.values(It)[0],Object.values(Lt)[0],Object.values(Rt)[0]].filter(Boolean),Bt=we(),Vt=be(`slidev-color-schema`,`auto`),Ht=m(()=>M.colorSchema!==`auto`),Ut=m({get(){return Ht.value?M.colorSchema===`dark`:Vt.value===`auto`?Bt.value:Vt.value===`dark`},set(e){Ht.value||(Vt.value=e===Bt.value?`auto`:e?`dark`:`light`)}}),Wt=me(Ut);Se&&d(Ut,e=>{let t=window.document.createElement(`style`);t.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`)),window.document.head.appendChild(t);let n=document.querySelector(`html`);n.classList.toggle(`dark`,e),n.classList.toggle(`light`,!e),window.getComputedStyle(t).opacity,document.head.removeChild(t)},{immediate:!0});function Gt(){let{isPrintMode:e}=ue();ge(m(()=>e.value?` +@page { + size: ${D.value}px ${ae.value}px; + margin: 0px; +} + +* { + transition: none !important; + transition-duration: 0s !important; +}`:``))}var Kt=Symbol.for(`yaml.alias`),qt=Symbol.for(`yaml.document`),Jt=Symbol.for(`yaml.map`),Yt=Symbol.for(`yaml.pair`),Xt=Symbol.for(`yaml.scalar`),Zt=Symbol.for(`yaml.seq`),P=Symbol.for(`yaml.node.type`),Qt=e=>!!e&&typeof e==`object`&&e[P]===Kt,$t=e=>!!e&&typeof e==`object`&&e[P]===qt,en=e=>!!e&&typeof e==`object`&&e[P]===Jt,F=e=>!!e&&typeof e==`object`&&e[P]===Yt,I=e=>!!e&&typeof e==`object`&&e[P]===Xt,tn=e=>!!e&&typeof e==`object`&&e[P]===Zt;function L(e){if(e&&typeof e==`object`)switch(e[P]){case Jt:case Zt:return!0}return!1}function R(e){if(e&&typeof e==`object`)switch(e[P]){case Kt:case Jt:case Xt:case Zt:return!0}return!1}var nn=e=>(I(e)||L(e))&&!!e.anchor,z=Symbol(`break visit`),rn=Symbol(`skip children`),an=Symbol(`remove node`);function on(e,t){let n=cn(t);$t(e)?sn(null,e.contents,n,Object.freeze([e]))===an&&(e.contents=null):sn(null,e,n,Object.freeze([]))}on.BREAK=z,on.SKIP=rn,on.REMOVE=an;function sn(e,t,n,r){let i=ln(e,t,n,r);if(R(i)||F(i))return un(e,r,i),sn(e,i,n,r);if(typeof i!=`symbol`){if(L(t)){r=Object.freeze(r.concat(t));for(let e=0;eB(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!nn(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var pn=class{constructor(e){Object.defineProperty(this,P,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!$t(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=B(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?fn(i,{"":o},``,o):o}},mn=class extends pn{constructor(e){super(Kt),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],on(e,{Node:(e,t)=>{(Qt(t)||nn(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}return r}toJSON(e,t){if(!t)return{source:this.source};let{anchors:n,doc:r,maxAliasCount:i}=t,a=this.resolve(r,t);if(!a){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}let o=n.get(a);if(o||=(B(a,null,t),n.get(a)),o?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(o.count+=1,o.aliasCount===0&&(o.aliasCount=hn(r,a,n)),o.count*o.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`);return o.res}toString(e,t,n){let r=`*${this.source}`;if(e){if(dn(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function hn(e,t,n){if(Qt(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(L(t)){let r=0;for(let i of t.items){let t=hn(e,i,n);t>r&&(r=t)}return r}if(F(t)){let r=hn(e,t.key,n),i=hn(e,t.value,n);return Math.max(r,i)}return 1}var gn=e=>!e||typeof e!=`function`&&typeof e!=`object`,V=class extends pn{constructor(e){super(Xt),this.value=e}toJSON(e,t){return t?.keep?this.value:B(this.value,e,t)}toString(){return String(this.value)}};V.BLOCK_FOLDED=`BLOCK_FOLDED`,V.BLOCK_LITERAL=`BLOCK_LITERAL`,V.PLAIN=`PLAIN`,V.QUOTE_DOUBLE=`QUOTE_DOUBLE`,V.QUOTE_SINGLE=`QUOTE_SINGLE`;var _n=`tag:yaml.org,2002:`;function vn(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function yn(e,t,n){if($t(e)&&(e=e.contents),R(e))return e;if(F(e)){let t=n.schema[Jt].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:s}=n,c;if(r&&e&&typeof e==`object`){if(c=s.get(e),c)return c.anchor??(c.anchor=i(e)),new mn(c.anchor);c={anchor:null,node:null},s.set(e,c)}t?.startsWith(`!!`)&&(t=_n+t.slice(2));let l=vn(e,t,o.tags);if(!l){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new V(e);return c&&(c.node=t),t}l=e instanceof Map?o[Jt]:Symbol.iterator in Object(e)?o[Zt]:o[Jt]}a&&(a(l),delete n.onTagObj);let u=l?.createNode?l.createNode(n.schema,e,n):typeof l?.nodeClass?.from==`function`?l.nodeClass.from(n.schema,e,n):new V(e);return t?u.tag=t:l.default||(u.tag=l.tag),c&&(c.node=u),u}function bn(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return yn(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var xn=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,Sn=class extends pn{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>R(t)||F(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(xn(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(L(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(L(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&I(i)?i.value:i:L(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!F(t))return!1;let n=t.value;return n==null||e&&I(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return L(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(L(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,bn(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},Cn=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function wn(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var Tn=(e,t,n)=>e.endsWith(` +`)?wn(n,t):n.includes(` +`)?` +`+wn(n,t):(e.endsWith(` `)?``:` `)+n,En=`flow`,Dn=`block`,On=`quoted`;function kn(e,t,n=`flow`,{indentAtStart:r,lineWidth:i=80,minContentWidth:a=20,onFold:o,onOverflow:s}={}){if(!i||i<0)return e;ii-Math.max(2,a)?l.push(0):d=i-r);let f,p,m=!1,h=-1,g=-1,_=-1;n===`block`&&(h=An(e,h,t.length),h!==-1&&(d=h+c));for(let r;r=e[h+=1];){if(n===`quoted`&&r===`\\`){switch(g=h,e[h+1]){case`x`:h+=3;break;case`u`:h+=5;break;case`U`:h+=9;break;default:h+=1}_=h}if(r===` +`)n===`block`&&(h=An(e,h,t.length)),d=h+t.length+c,f=void 0;else{if(r===` `&&p&&p!==` `&&p!==` +`&&p!==` `){let t=e[h+1];t&&t!==` `&&t!==` +`&&t!==` `&&(f=h)}if(h>=d){if(f)l.push(f),d=f+c,f=void 0;else if(n===`quoted`){for(;p===` `||p===` `;)p=r,r=e[h+=1],m=!0;let t=h>_+1?h-2:g-1;if(u[t])return e;l.push(t),u[t]=!0,d=t+c,f=void 0}else m=!0}}p=r}if(m&&s&&s(),l.length===0)return e;o&&o();let v=e.slice(0,l[0]);for(let r=0;r({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Mn=e=>/^(%|---|\.\.\.)/m.test(e);function Nn(e,t,n){if(!t||t<0)return!1;let r=t-n,i=e.length;if(i<=r)return!1;for(let t=0,n=0;tr)return!0;if(n=t+1,i-n<=r)return!1}return!0}function Pn(e,t){let n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;let{implicitKey:r}=t,i=t.options.doubleQuotedMinMultiLineLength,a=t.indent||(Mn(e)?` `:``),o=``,s=0;for(let e=0,t=n[e];t;t=n[++e])if(t===` `&&n[e+1]===`\\`&&n[e+2]===`n`&&(o+=n.slice(s,e)+`\\ `,e+=1,s=e,t=`\\`),t===`\\`)switch(n[e+1]){case`u`:{o+=n.slice(s,e);let t=n.substr(e+2,4);switch(t){case`0000`:o+=`\\0`;break;case`0007`:o+=`\\a`;break;case`000b`:o+=`\\v`;break;case`001b`:o+=`\\e`;break;case`0085`:o+=`\\N`;break;case`00a0`:o+=`\\_`;break;case`2028`:o+=`\\L`;break;case`2029`:o+=`\\P`;break;default:t.substr(0,2)===`00`?o+=`\\x`+t.substr(2):o+=n.substr(e,6)}e+=5,s=e+1}break;case`n`:if(r||n[e+2]===`"`||n.length +`;let d,f;for(f=n.length;f>0;--f){let e=n[f-1];if(e!==` +`&&e!==` `&&e!==` `)break}let p=n.substring(f),m=p.indexOf(` +`);m===-1?d=`-`:n===p||m!==p.length-1?(d=`+`,a&&a()):d=``,p&&=(n=n.slice(0,-p.length),p[p.length-1]===` +`&&(p=p.slice(0,-1)),p.replace(Ln,`$&${l}`));let h=!1,g,_=-1;for(g=0;g{i=!0});let s=kn(`${v}${e}${p}`,l,Dn,a);if(!i)return`>${y}\n${l}${s}`}return n=n.replace(/\n+/g,`$&${l}`),`|${y}\n${l}${v}${n}${p}`}function zn(e,t,n,r){let{type:i,value:a}=e,{actualString:o,implicitKey:s,indent:c,indentStep:l,inFlow:u}=t;if(s&&a.includes(` +`)||u&&/[[\]{},]/.test(a))return In(a,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(a))return s||u||!a.includes(` +`)?In(a,t):Rn(e,t,n,r);if(!s&&!u&&i!==V.PLAIN&&a.includes(` +`))return Rn(e,t,n,r);if(Mn(a)){if(c===``)return t.forceBlockIndent=!0,Rn(e,t,n,r);if(s&&c===l)return In(a,t)}let d=a.replace(/\n+/g,`$&\n${c}`);if(o){let e=e=>e.default&&e.tag!==`tag:yaml.org,2002:str`&&e.test?.test(d),{compat:n,tags:r}=t.doc.schema;if(r.some(e)||n?.some(e))return In(a,t)}return s?d:kn(d,c,En,jn(t,!1))}function Bn(e,t,n,r){let{implicitKey:i,inFlow:a}=t,o=typeof e.value==`string`?e:Object.assign({},e,{value:String(e.value)}),{type:s}=e;s!==V.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(o.value)&&(s=V.QUOTE_DOUBLE);let c=e=>{switch(e){case V.BLOCK_FOLDED:case V.BLOCK_LITERAL:return i||a?In(o.value,t):Rn(o,t,n,r);case V.QUOTE_DOUBLE:return Pn(o.value,t);case V.QUOTE_SINGLE:return Fn(o.value,t);case V.PLAIN:return zn(o,t,n,r);default:return null}},l=c(s);if(l===null){let{defaultKeyType:e,defaultStringType:n}=t.options,r=i&&e||n;if(l=c(r),l===null)throw Error(`Unsupported default string type ${r}`)}return l}function Vn(e,t){let n=Object.assign({blockQuote:!0,commentString:Cn,defaultKeyType:null,defaultStringType:`PLAIN`,directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:`false`,flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:`null`,simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:`true`,verifyAliasOrder:!0},e.schema.toStringOptions,t),r;switch(n.collectionStyle){case`block`:r=!1;break;case`flow`:r=!0;break;default:r=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?` `:``,indent:``,indentStep:typeof n.indent==`number`?` `.repeat(n.indent):` `,inFlow:r,options:n}}function Hn(e,t){if(t.tag){let n=e.filter(e=>e.tag===t.tag);if(n.length>0)return n.find(e=>e.format===t.format)??n[0]}let n,r;if(I(t)){r=t.value;let i=e.filter(e=>e.identify?.(r));if(i.length>1){let e=i.filter(e=>e.test);e.length>0&&(i=e)}n=i.find(e=>e.format===t.format)??i.find(e=>!e.format)}else r=t,n=e.find(e=>e.nodeClass&&r instanceof e.nodeClass);if(!n){let e=r?.constructor?.name??(r===null?`null`:typeof r);throw Error(`Tag not resolved for ${e} value`)}return n}function Un(e,t,{anchors:n,doc:r}){if(!r.directives)return``;let i=[],a=(I(e)||L(e))&&e.anchor;a&&dn(a)&&(n.add(a),i.push(`&${a}`));let o=e.tag??(t.default?null:t.tag);return o&&i.push(r.directives.tagString(o)),i.join(` `)}function Wn(e,t,n,r){if(F(e))return e.toString(t,n,r);if(Qt(e)){if(t.doc.directives)return e.toString(t);if(t.resolvedAliases?.has(e))throw TypeError(`Cannot stringify circular structure without alias nodes`);t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let i,a=R(e)?e:t.doc.createNode(e,{onTagObj:e=>i=e});i??=Hn(t.doc.schema.tags,a);let o=Un(a,i,t);o.length>0&&(t.indentAtStart=(t.indentAtStart??0)+o.length+1);let s=typeof i.stringify==`function`?i.stringify(a,t,n,r):I(a)?Bn(a,t,n,r):a.toString(t,n,r);return o?I(a)||s[0]===`{`||s[0]===`[`?`${o} ${s}`:`${o}\n${t.indent}${s}`:s}function Gn({key:e,value:t},n,r,i){let{allNullValues:a,doc:o,indent:s,indentStep:c,options:{commentString:l,indentSeq:u,simpleKeys:d}}=n,f=R(e)&&e.comment||null;if(d){if(f)throw Error(`With simple keys, key nodes cannot have comments`);if(L(e)||!R(e)&&typeof e==`object`)throw Error(`With simple keys, collection cannot be used as a key value`)}let p=!d&&(!e||f&&t==null&&!n.inFlow||L(e)||(I(e)?e.type===V.BLOCK_FOLDED||e.type===V.BLOCK_LITERAL:typeof e==`object`));n=Object.assign({},n,{allNullValues:!1,implicitKey:!p&&(d||!a),indent:s+c});let m=!1,h=!1,g=Wn(e,n,()=>m=!0,()=>h=!0);if(!p&&!n.inFlow&&g.length>1024){if(d)throw Error(`With simple keys, single line scalar must not span more than 1024 characters`);p=!0}if(n.inFlow){if(a||t==null)return m&&r&&r(),g===``?`?`:p?`? ${g}`:g}else if(a&&!d||t==null&&p)return g=`? ${g}`,f&&!m?g+=Tn(g,n.indent,l(f)):h&&i&&i(),g;m&&(f=null),p?(f&&(g+=Tn(g,n.indent,l(f))),g=`? ${g}\n${s}:`):(g=`${g}:`,f&&(g+=Tn(g,n.indent,l(f))));let _,v,y;R(t)?(_=!!t.spaceBefore,v=t.commentBefore,y=t.comment):(_=!1,v=null,y=null,t&&typeof t==`object`&&(t=o.createNode(t))),n.implicitKey=!1,!p&&!f&&I(t)&&(n.indentAtStart=g.length+1),h=!1,!u&&c.length>=2&&!n.inFlow&&!p&&tn(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let b=!1,x=Wn(t,n,()=>b=!0,()=>h=!0),S=` `;if(f||_||v){if(S=_?` +`:``,v){let e=l(v);S+=`\n${wn(e,n.indent)}`}x===``&&!n.inFlow?S===` +`&&y&&(S=` + +`):S+=`\n${n.indent}`}else if(!p&&L(t)){let e=x[0],r=x.indexOf(` +`),i=r!==-1,a=n.inFlow??t.flow??t.items.length===0;if(i||!a){let t=!1;if(i&&(e===`&`||e===`!`)){let n=x.indexOf(` `);e===`&`&&n!==-1&&ne===qn||typeof e==`symbol`&&e.description===qn,default:`key`,tag:`tag:yaml.org,2002:merge`,test:/^<<$/,resolve:()=>Object.assign(new V(Symbol(qn)),{addToJSMap:Xn}),stringify:()=>qn},Yn=(e,t)=>(Jn.identify(t)||I(t)&&(!t.type||t.type===V.PLAIN)&&Jn.identify(t.value))&&e?.doc.schema.tags.some(e=>e.tag===Jn.tag&&e.default);function Xn(e,t,n){let r=Qn(e,n);if(tn(r))for(let n of r.items)Zn(e,t,n);else if(Array.isArray(r))for(let n of r)Zn(e,t,n);else Zn(e,t,r)}function Zn(e,t,n){let r=Qn(e,n);if(!en(r))throw Error(`Merge sources must be maps or map aliases`);let i=r.toJSON(null,e,Map);for(let[e,n]of i)t instanceof Map?t.has(e)||t.set(e,n):t instanceof Set?t.add(e):Object.prototype.hasOwnProperty.call(t,e)||Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0});return t}function Qn(e,t){return e&&Qt(t)?t.resolve(e.doc,e):t}function $n(e,t,{key:n,value:r}){if(R(n)&&n.addToJSMap)n.addToJSMap(e,t,r);else if(Yn(e,n))Xn(e,t,r);else{let i=B(n,``,e);if(t instanceof Map)t.set(i,B(r,i,e));else if(t instanceof Set)t.add(i);else{let a=er(n,i,e),o=B(r,a,e);a in t?Object.defineProperty(t,a,{value:o,writable:!0,enumerable:!0,configurable:!0}):t[a]=o}}return t}function er(e,t,n){if(t===null)return``;if(typeof t!=`object`)return String(t);if(R(e)&&n?.doc){let t=Vn(n.doc,{});t.anchors=new Set;for(let e of n.anchors.keys())t.anchors.add(e.anchor);t.inFlow=!0,t.inStringifyKey=!0;let r=e.toString(t);if(!n.mapKeyWarned){let e=JSON.stringify(r);e.length>40&&(e=e.substring(0,36)+`..."`),Kn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${e}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return r}return JSON.stringify(t)}function tr(e,t,n){return new H(yn(e,void 0,n),yn(t,void 0,n))}var H=class e{constructor(e,t=null){Object.defineProperty(this,P,{value:Yt}),this.key=e,this.value=t}clone(t){let{key:n,value:r}=this;return R(n)&&(n=n.clone(t)),R(r)&&(r=r.clone(t)),new e(n,r)}toJSON(e,t){return $n(t,t?.mapAsMap?new Map:{},this)}toString(e,t,n){return e?.doc?Gn(this,e,t,n):JSON.stringify(this)}};function nr(e,t,n){return(t.inFlow??e.flow?ir:rr)(e,t,n)}function rr({comment:e,items:t},n,{blockItemPrefix:r,flowChars:i,itemIndent:a,onChompKeep:o,onComment:s}){let{indent:c,options:{commentString:l}}=n,u=Object.assign({},n,{indent:a,type:null}),d=!1,f=[];for(let e=0;eo=null,()=>d=!0);o&&(s+=Tn(s,a,l(o))),d&&o&&(d=!1),f.push(r+s)}let p;if(f.length===0)p=i.start+i.end;else{p=f[0];for(let e=1;ea=null);l||=d.length>u||o.includes(` +`),n0&&(l||=d.reduce((e,t)=>e+t.length+2,2)+(o.length+2)>t.options.lineWidth),l&&(o+=`,`)),a&&(o+=Tn(o,r,s(a))),d.push(o),u=d.length}let{start:f,end:p}=n;if(d.length===0)return f+p;if(!l){let e=d.reduce((e,t)=>e+t.length+2,2);l=t.options.lineWidth>0&&e>t.options.lineWidth}if(l){let e=f;for(let t of d)e+=t?`\n${a}${i}${t}`:` +`;return`${e}\n${i}${p}`}return`${f}${o}${d.join(` `)}${o}${p}`}function ar({indent:e,options:{commentString:t}},n,r,i){if(r&&i&&(r=r.replace(/^\n+/,``)),r){let i=wn(t(r),e);n.push(i.trimStart())}}function U(e,t){let n=I(t)?t.value:t;for(let r of e)if(F(r)&&(r.key===t||r.key===n||I(r.key)&&r.key.value===n))return r}var W=class extends Sn{static get tagName(){return`tag:yaml.org,2002:map`}constructor(e){super(Jt,e),this.items=[]}static from(e,t,n){let{keepUndefined:r,replacer:i}=n,a=new this(e),o=(e,o)=>{if(typeof i==`function`)o=i.call(t,e,o);else if(Array.isArray(i)&&!i.includes(e))return;(o!==void 0||r)&&a.items.push(tr(e,o,n))};if(t instanceof Map)for(let[e,n]of t)o(e,n);else if(t&&typeof t==`object`)for(let e of Object.keys(t))o(e,t[e]);return typeof e.sortMapEntries==`function`&&a.items.sort(e.sortMapEntries),a}add(e,t){let n;n=F(e)?e:!e||typeof e!=`object`||!(`key`in e)?new H(e,e?.value):new H(e.key,e.value);let r=U(this.items,n.key),i=this.schema?.sortMapEntries;if(r){if(!t)throw Error(`Key ${n.key} already set`);I(r.value)&&gn(n.value)?r.value.value=n.value:r.value=n.value}else if(i){let e=this.items.findIndex(e=>i(n,e)<0);e===-1?this.items.push(n):this.items.splice(e,0,n)}else this.items.push(n)}delete(e){let t=U(this.items,e);return t?this.items.splice(this.items.indexOf(t),1).length>0:!1}get(e,t){let n=U(this.items,e)?.value;return(!t&&I(n)?n.value:n)??void 0}has(e){return!!U(this.items,e)}set(e,t){this.add(new H(e,t),!0)}toJSON(e,t,n){let r=n?new n:t?.mapAsMap?new Map:{};t?.onCreate&&t.onCreate(r);for(let e of this.items)$n(t,r,e);return r}toString(e,t,n){if(!e)return JSON.stringify(this);for(let e of this.items)if(!F(e))throw Error(`Map items must all be pairs; found ${JSON.stringify(e)} instead`);return!e.allNullValues&&this.hasAllNullValues(!1)&&(e=Object.assign({},e,{allNullValues:!0})),nr(this,e,{blockItemPrefix:``,flowChars:{start:`{`,end:`}`},itemIndent:e.indent||``,onChompKeep:n,onComment:t})}},or={collection:`map`,default:!0,nodeClass:W,tag:`tag:yaml.org,2002:map`,resolve(e,t){return en(e)||t(`Expected a mapping for this tag`),e},createNode:(e,t,n)=>W.from(e,t,n)},sr=class extends Sn{static get tagName(){return`tag:yaml.org,2002:seq`}constructor(e){super(Zt,e),this.items=[]}add(e){this.items.push(e)}delete(e){let t=cr(e);return typeof t==`number`&&this.items.splice(t,1).length>0}get(e,t){let n=cr(e);if(typeof n!=`number`)return;let r=this.items[n];return!t&&I(r)?r.value:r}has(e){let t=cr(e);return typeof t==`number`&&t=0?t:null}var lr={collection:`seq`,default:!0,nodeClass:sr,tag:`tag:yaml.org,2002:seq`,resolve(e,t){return tn(e)||t(`Expected a sequence for this tag`),e},createNode:(e,t,n)=>sr.from(e,t,n)};function ur(e){return typeof e==`bigint`||Number.isInteger(e)}var dr=({value:e})=>JSON.stringify(e),fr=[{identify:e=>typeof e==`string`,default:!0,tag:`tag:yaml.org,2002:str`,resolve:e=>e,stringify:dr},{identify:e=>e==null,createNode:()=>new V(null),default:!0,tag:`tag:yaml.org,2002:null`,test:/^null$/,resolve:()=>null,stringify:dr},{identify:e=>typeof e==`boolean`,default:!0,tag:`tag:yaml.org,2002:bool`,test:/^true$|^false$/,resolve:e=>e===`true`,stringify:dr},{identify:ur,default:!0,tag:`tag:yaml.org,2002:int`,test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>ur(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e==`number`,default:!0,tag:`tag:yaml.org,2002:float`,test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:dr}];[or,lr].concat(fr,{default:!0,tag:``,test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}});function pr(e,t,n){let{replacer:r}=n,i=new sr(e);i.tag=`tag:yaml.org,2002:pairs`;let a=0;if(t&&Symbol.iterator in Object(t))for(let e of t){typeof r==`function`&&(e=r.call(t,String(a++),e));let o,s;if(Array.isArray(e)){if(e.length===2)o=e[0],s=e[1];else throw TypeError(`Expected [key, value] tuple: ${e}`)}else if(e&&e instanceof Object){let t=Object.keys(e);if(t.length===1)o=t[0],s=e[o];else throw TypeError(`Expected tuple with one key, not ${t.length} keys`)}else o=e;i.items.push(tr(o,s,n))}return i}var mr=class e extends sr{constructor(){super(),this.add=W.prototype.add.bind(this),this.delete=W.prototype.delete.bind(this),this.get=W.prototype.get.bind(this),this.has=W.prototype.has.bind(this),this.set=W.prototype.set.bind(this),this.tag=e.tag}toJSON(e,t){if(!t)return super.toJSON(e);let n=new Map;t?.onCreate&&t.onCreate(n);for(let e of this.items){let r,i;if(F(e)?(r=B(e.key,``,t),i=B(e.value,r,t)):r=B(e,``,t),n.has(r))throw Error(`Ordered maps must not include duplicate keys`);n.set(r,i)}return n}static from(e,t,n){let r=pr(e,t,n),i=new this;return i.items=r.items,i}};mr.tag=`tag:yaml.org,2002:omap`;var hr=class e extends W{constructor(t){super(t),this.tag=e.tag}add(e){let t;t=F(e)?e:e&&typeof e==`object`&&`key`in e&&`value`in e&&e.value===null?new H(e.key,null):new H(e,null),U(this.items,t.key)||this.items.push(t)}get(e,t){let n=U(this.items,e);return!t&&F(n)?I(n.key)?n.key.value:n.key:n}set(e,t){if(typeof t!=`boolean`)throw Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof t}`);let n=U(this.items,e);n&&!t?this.items.splice(this.items.indexOf(n),1):!n&&t&&this.items.push(new H(e))}toJSON(e,t){return super.toJSON(e,t,Set)}toString(e,t,n){if(!e)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},e,{allNullValues:!0}),t,n);throw Error(`Set items must all have null values`)}static from(e,t,n){let{replacer:r}=n,i=new this(e);if(t&&Symbol.iterator in Object(t))for(let e of t)typeof r==`function`&&(e=r.call(t,e,e)),i.items.push(tr(e,null,n));return i}};hr.tag=`tag:yaml.org,2002:set`;var gr=Symbol(`break visit`),_r=Symbol(`skip children`),vr=Symbol(`remove item`);function yr(e,t){`type`in e&&e.type===`document`&&(e={start:e.start,value:e.value}),br(Object.freeze([]),e,t)}yr.BREAK=gr,yr.SKIP=_r,yr.REMOVE=vr,yr.itemAtPath=(e,t)=>{let n=e;for(let[e,r]of t){let t=n?.[e];if(t&&`items`in t)n=t.items[r];else return}return n},yr.parentCollection=(e,t)=>{let n=yr.itemAtPath(e,t.slice(0,-1)),r=t[t.length-1][0],i=n?.[r];if(i&&`items`in i)return i;throw Error(`Parent collection not found`)};function br(e,t,n){let r=n(t,e);if(typeof r==`symbol`)return r;for(let i of[`key`,`value`]){let a=t[i];if(a&&`items`in a){for(let t=0;tCr.push(e)),N(G,`$onPatch`,e=>wr.push(e)),ze(),N(G,`$patch`,async()=>!1);var{init:Tr,onPatch:Er,onUpdate:Dr,patch:Or,state:kr}=Be(G,G,!1),K=_({page:0,clicks:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}}),Ar=[],jr=[];N(K,`$syncUp`,!0),N(K,`$syncDown`,!0),N(K,`$paused`,!1),N(K,`$onSet`,e=>Ar.push(e)),N(K,`$onPatch`,e=>jr.push(e)),ze(),N(K,`$patch`,async()=>!1);var{init:Mr,onPatch:Nr,onUpdate:Pr,patch:Fr,state:Ir}=Be(K,{page:1,clicks:0,clicksTotal:0,timer:{status:`stopped`,slides:{},startedAt:0,pausedAt:0}});function Lr(){let e=i().appContext.app,t=_({nav:ue(),configs:M,themeConfigs:m(()=>M.themeConfig)});e.provide(Me,p(`none`)),e.provide(Re,t),e.provide(ke,m(()=>t.nav.currentSlideNo)),e.provide(Oe,y(ne()));for(let e of zt)e();let{clicksContext:n,currentSlideNo:r,hasPrimarySlide:a,isNotesViewer:o,isPresenter:s,isPrintMode:c}=ue();Mt({title:E,htmlAttrs:M.htmlAttrs}),Gt(),Mr(`${E} - shared`),Tr(`${E} - drawings`);let l=`${location.origin}_${xr()}`,u=m(()=>s.value?`presenter`:`viewer`);function f(){(s.value?k.value.presenterSend:k.value.viewerSend)&&(o.value||c.value||!s.value&&!Le.includes(location.host.split(`:`)[0])||(Fr(`page`,+r.value),Fr(`clicks`,n.value.current),Fr(`clicksTotal`,n.value.total),Fr(`lastUpdate`,{id:l,type:u.value,time:Date.now()})))}let h=ve();h.afterEach(f),d(n,f),Nr(e=>{(s.value?k.value.presenterReceive:k.value.viewerReceive)&&(!a.value||c.value||e.lastUpdate?.type!==u.value&&(+e.page!=+r.value||+n.value.current!=+e.clicks)&&(A.value=!1,h.replace({path:te(e.page,s.value),query:{...h.currentRoute.value.query,clicks:e.clicks||0}})))})}var Rr=l({__name:`App`,setup(e){return Lr(),c(()=>{for(let[e,t]of Object.entries(O.value))document.body.style.setProperty(e,t.toString())}),(e,t)=>{let i=u(`RouterView`);return n(),f(v,null,[r(i),w(`v-if`,!0)],64)}}});function zr(e,t,n){let r=e.push,i=e;return i.ssr=!1,i.hooks=t,i.dirty=!!i.dirty,i.use=e=>Pt(i,e),i.render=()=>n(i),i.invalidate=()=>{for(let e of i.entries.values())delete e._tags;i.dirty=!0,t.callHook(`entries:updated`,i)},i.push=(n,a)=>{let o=a?.onRendered?t.hook(`dom:rendered`,a.onRendered):void 0,s=r(n,a),c=e.entries.get(s._i);return c&&(c._o=n),i.dirty=!0,t.callHook(`entries:updated`,i),{_i:s._i,patch(e){s.patch(e),i.dirty=!0,t.callHook(`entries:updated`,i)},dispose(){o?.(),e.entries.has(s._i)&&(s.dispose(),i.invalidate())}}},t.hook(`entries:updated`,()=>{i.render()}),i}var Br=/\s+/;function Vr(e={}){return t=>Wr(t,e)}function Hr(e){for(let t of e.entries.values())if(t._pending!==void 0)return!0;return!1}function Ur(e,t){let n={_d:t,_t:t.title,_e:new Map([[`htmlAttrs`,t.documentElement],[`bodyAttrs`,t.body]]),_p:{},_s:{},_l:new Map};for(let e of[...t.body.children,...t.head.children]){let t=e.tagName.toLowerCase();if(!Ue.has(t))continue;let r={innerHTML:e.innerHTML};for(let t of e.getAttributeNames())r[t]=e.getAttribute(t);let i=ut({tag:t,props:{}},r);i.key=e.getAttribute(`data-hid`)||void 0;let a=at(i)||ot(i),o=a,s=1;for(;n._e.has(o);)o=`${a}:${s++}`;n._e.set(o,e)}for(let t of e.entries.values())if(t._o!==void 0){let e=t._o;for(let t of[`bodyAttrs`,`htmlAttrs`]){let r=e[t]?.class;if(typeof r==`string`){let e=n._e.get(t);for(let i of r.split(Br))i&&(n._p[`${t}:attr:class:${i}`]=()=>e.classList.remove(i))}}}return n}function Wr(e,t={}){let n=t.document||e.resolvedOptions.document,r=e._dom,i=!!r&&r._d!==n;if(!n||r&&!i&&!e.dirty&&!Hr(e)||e._du)return!1;let a=n.defaultView;e._du=!0;let o=!1;try{let i=function(e,t,n){d._s[e]=!n&&f[e]||t,delete f[e]},s=function(e,t,n,r,a,o){let s=`${e}:event:${t}`,c=d._l.get(s);if(c&&c[0]===o&&c[1]===n&&c[2]===r){i(s,c[4]);return}c?.[4]();let l=`data-${t}`,u=(e=>r.call(a,e)),f=()=>{o.removeEventListener(n,u),a.getAttribute(l)===``&&a.removeAttribute(l),d._l.get(s)?.[3]===u&&d._l.delete(s)};o.addEventListener(n,u),d._l.set(s,[o,n,r,u,f]),a.setAttribute(l,``),i(s,f,!0)},c=function({id:e,$el:t,tag:n}){let r=n.tag.endsWith(`Attrs`);if(d._e.set(e,t),!r){let r=n.textContent;r!=null&&r!==``&&(r!==t.textContent&&(t.textContent=r),i(`${e}:text`,()=>{t.textContent===r&&(t.textContent=``)},!0));let a=n.innerHTML;a!=null&&a!==``&&(a!==t.innerHTML&&(t.innerHTML=a),i(`${e}:html`,()=>{t.innerHTML===a&&(t.innerHTML=``)},!0));let o=`${e}:el`;i(o,f[o]||(()=>{t?.remove(),d._e.delete(e)}))}for(let r in n.props){let o=n.props[r];if(r[0]===`o`&&r[1]===`n`&&typeof o==`function`){let i=r.slice(2);t?.dataset?.[`${r}fired`]&&o.call(t,new((a?.Event)||Event)(i)),s(e,r,i,o,t,n.tag===`bodyAttrs`&&a?a:t);continue}let c=`${e}:attr:${r}`;if(r===`class`&&o)for(let e of o){let n=`${c}:${e}`;i(n,f[n]||(()=>t.classList.remove(e))),t.classList.contains(e)||t.classList.add(e)}else if(r===`style`&&o)for(let[e,n]of o){let r=`${c}:${e}`;i(r,f[r]||(()=>t.style.removeProperty(e))),t.style.setProperty(e,n)}else o!==!1&&o!==null&&(t.getAttribute(r)!==o&&t.setAttribute(r,o===!0?``:String(o)),i(c,f[c]||(()=>t.removeAttribute(r))))}},l={shouldRender:!0,tags:[]};if(tt(e,`dom:beforeRender`,l),!l.shouldRender)return!1;let u=r;if(u?._d!==n){if(u){for(let e in u._s)u._s[e]();for(let e in u._p)u._p[e]();u._s=u._p={},u._e.clear(),u._l.clear()}u=void 0}u?u._p=u._s:u=Ur(e,n),u._s={};let d=u,f=d._p,p=[],m={};e.dirty=!1;let h=Dt(e,t.tagWeight?{tagWeight:t.tagWeight}:void 0),g=[],_={};for(let e of h){let t=_[e._d]||0,r=(t?`${e._d}:${t}`:e._d)||e._h,a={tag:e,id:r,shouldRender:!0};if(e.tag===`meta`&&e._d&&it(e._d)&&(_[e._d]=t+1),g.push(a),e.tag===`title`){n.title=e.textContent,i(`title:`,()=>n.title=d._t);continue}a.$el=d._e.get(r),a.$el?c(a):Ue.has(e.tag)&&p.push(a)}for(let e of p)e.$el=n.createElement(e.tag.tag),c(e),(m[e.tag.tagPosition||`head`]??=n.createDocumentFragment()).appendChild(e.$el);m.head&&n.head.appendChild(m.head),m.bodyOpen&&n.body.insertBefore(m.bodyOpen,n.body.firstChild),m.bodyClose&&n.body.appendChild(m.bodyClose);for(let e in f)f[e]();e._dom=d,o=!0,tt(e,`dom:rendered`,{renders:g})}catch(t){throw e.dirty=!0,t}finally{e._du=!1}return o&&(e.dirty||Hr(e))&&Wr(e,t),o}var Gr=e=>typeof e.tagPriority==`number`?e.tagPriority:100+(Ye[e.tagPriority]||0);function Kr(e={}){e.document=e.document||(typeof window<`u`?document:void 0);let t=e.render||Vr({document:e.document}),n=zr(Ft(t,{document:e.document,propResolvers:e.propResolvers,_tagWeight:Gr,init:[]}),et(e.hooks),t);return e.plugins?.forEach(e=>n.use(e)),e.init?.forEach(e=>e&&n.push(e)),n}function qr(e={}){let t=Vr(),n,r=0;return n=Kr({render:()=>{let e=++r;setTimeout(()=>{e===r&&t(n)},0)},...e}),n.install=At(n),n}var Jr=Object.assign({}),Yr=Object.assign({}),Xr=Object.assign({}),Zr=[Object.values(Jr)[0],Object.values(Yr)[0],Object.values(Xr)[0]].filter(Boolean);function Qr(e,t=``){let n=[`slidev-page`,t],r=e?.meta?.slide?.no;return r!=null&&n.push(`slidev-page-${r}`),n.filter(Boolean).join(` `)}async function $r(){let{saveAs:t}=await j(async()=>{let{saveAs:t}=await import(`./modules/file-saver-BpWusTEB.js`).then(t=>e(t.t(),1));return{saveAs:t}},__vite__mapDeps([0,1]),import.meta.url);t(typeof M.download==`string`?M.download:M.exportFilename?`${M.exportFilename}.pdf`:`./slidev-exported.pdf`,`${M.title}.pdf`)}function ei(e,t,n){return(e.instance?.$).provides[t]??n}var ti=/[\s,]+/;function ni(e,t){let n=t.map(e=>`${Fe}${e}`);e.classList.forEach(t=>{t.startsWith(`slidev-vclick-anim-`)&&!n.includes(t)&&e.classList.remove(t)}),n.forEach(t=>e.classList.add(t))}function ri(){return{install(e){e.directive(`click`,{name:`v-click`,mounted(e,t){let n=ai(e,t,t.value);n!=null&&(e.classList.toggle(De,!0),e.dataset.slidevClicksStart=String(n.start),Number.isFinite(n.end)&&(e.dataset.slidevClicksEnd=String(n.end)),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`after`,{name:`v-after`,mounted(e,t){let n=ai(e,t,`+0`);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;n.flagHide?(e.classList.toggle(Ee,t),e.classList.toggle(Ne,t)):e.classList.toggle(Ee,!t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi}),e.directive(`click-hide`,{name:`v-click-hide`,mounted(e,t){let n=ai(e,t,t.value,!0);n!=null&&(e.classList.toggle(De,!0),e.watchStopHandle=c(()=>{let t=n.isActive.value,r=n.isCurrent.value,i=t&&!r;e.classList.toggle(Ee,t),e.classList.toggle(Ne,t),ni(e,n.flagAnimations.value),e.classList.toggle(je,r),e.classList.toggle(Ie,i)}))},unmounted:oi})}}}var ii=new Map;function ai(e,t,n,r=!1){let i=ei(t,Oe)?.value,a=ei(t,Pe);if(!e||!i)return null;let o=r||t.modifiers.hide!==!1&&t.modifiers.hide!=null,s=Object.keys({...t.modifiers}).filter(e=>e!==`hide`),c=m(()=>{if(s.length>0)return s;let e=a?.clickAnimation||M.clickAnimation;return e?e.split(ti).filter(Boolean):[]}),l=i.calculate(n);if(!l)return null;i.register(e,l);let u=m(()=>o?!l.isActive.value:l.isActive.value),d=m(()=>u.value?`shown`:Number.isFinite(l.end)?i.current{setTimeout(n.update,300)},{flush:`post`,immediate:!0});return{...n,stop:r}}function ci(e){return{info:p(fe(e)?.meta.slide??null),update:async()=>{}}}var li={};function ui(e){function t(e){return li[e]??=ci(e)}return{info:m({get(){return t(T(e)).info.value},set(n){t(T(e)).info.value=n}}),update:async(n,r)=>{let i=t(r??T(e)),a=await i.update(n);return a&&(i.info.value=a),a}}}function di(e){return()=>{}}function fi(e,t,n,r=!1){function i(t){return e?ei(e,t):pe(t)}let a=i(Me),o=i(`$$slidev-fontmatter`)??{},s=i(ke),c=m(()=>di(s.value)),l=i(`$$slidev-slide-scale`)??p(1),u=i(`$$slidev-slide-zoom`)??p(1),{left:f,top:h,stop:g}=si(i(`$$slidev-slide-element`)??p()),{isPrintMode:_}=ue(),v=[`slide`,`presenter`].includes(a.value)&&!_.value,y=e?`directive`:`prop`,b=xr(),x;if(Array.isArray(t)?x=t:typeof t==`string`&&t.includes(`,`)?x=t.split(`,`).map(Number):t!=null&&(y=`frontmatter`,b=`${t}`,t=o?.dragPos?.[b],x=t?.split(`,`).map(Number)),y!==`frontmatter`&&!n)throw Error("[Slidev] Can not identify the source position of the v-drag element, please provide an explicit `id` prop.");let S=[g],C=!r&&t!=null&&!Number.isFinite(x?.[3]);x??=[NaN,NaN,0];let w=p(x[2]),T=p(x[0]+x[2]/2),E=p(r?0:x[4]??0),ee=m(()=>E.value*Math.PI/180),te=m(()=>Math.sin(ee.value)),ne=m(()=>Math.cos(ee.value)),re=p(),D=p({left:0,top:0,width:0,height:0}),ie=p(0);function ae(){if(!re.value)return;let e=re.value.getBoundingClientRect();D.value={left:e.left/u.value,top:e.top/u.value,width:e.width/u.value,height:e.height/u.value},ie.value=(D.value.width+D.value.height)/l.value/(Math.abs(te.value)+Math.abs(ne.value))-w.value}S.push(d(w,ae,{flush:`post`}));let oe=p(x[3]??0),O=C?m({get:()=>(C?ie.value:oe.value)||0,set:e=>!C&&(oe.value=e)}):oe,se=p(C?x[1]:x[1]+x[3]/2),k=C?m({get:()=>se.value+O.value/2,set:e=>se.value=e-O.value/2}):se,ce=m(()=>Number.isFinite(T.value)?{position:`absolute`,zIndex:100,left:`${T.value-w.value/2}px`,top:`${k.value-O.value/2}px`,width:`${w.value}px`,height:C?void 0:`${O.value}px`,transformOrigin:`center center`,transform:`rotate(${E.value}deg)`}:{position:`absolute`,zIndex:100});S.push(d([T,k,w,O,E],([e,t,r,i,a])=>{let o=[e-r/2,t-i/2,r].map(Math.round).join();o+=C?y===`directive`?`,NaN`:`,_`:`,${Math.round(i)}`,Math.round(a)!==0&&(o+=`,${Math.round(a)}`),y===`directive`&&(o=`[${o}]`),c.value(b,o,y,n)}));let A={dragId:b,dataSource:y,markdownSource:n,isArrow:r,zoom:u,autoHeight:C,x0:T,y0:k,width:w,height:O,rotate:E,container:re,containerStyle:ce,watchStopHandles:S,dragging:m(()=>le.value===A),mounted(){v&&(ae(),t||setTimeout(()=>{ae(),T.value=(D.value.left+D.value.width/2-f.value)/l.value,k.value=(D.value.top-h.value)/l.value,w.value=D.value.width/l.value,O.value=D.value.height/l.value},100))},unmounted(){v&&A.stopDragging()},startDragging(){v&&(ae(),le.value=A)},stopDragging(){v&&le.value===A&&(le.value=null)}};return S.push(Ce(re,e=>{let t=document.querySelector(`#drag-control-container`);t&&e.target&&t.contains(e.target)||A.stopDragging()}),d(_e(),e=>{e||A.stopDragging()})),A}function pi(){return{install(e){e.directive(`drag`,{name:`v-drag`,created(e,t,n){let r=fi(t,t.value,n.props?.markdownSource);n.props&&(n.props={...n.props},delete n.props.markdownSource),r.container.value=e,e.draggingState=r,e.dataset.dragId=r.dragId,r.watchStopHandles.push(d(r.containerStyle,t=>{for(let[n,r]of Object.entries(t))r&&(e.style[n]=r)},{immediate:!0})),e.addEventListener(`dblclick`,r.startDragging)},mounted(e){e.draggingState.mounted()},unmounted(e){let t=e.draggingState;t.unmounted(),e.removeEventListener(`dblclick`,t.startDragging),t.watchStopHandles.forEach(e=>e())}})}}}function mi(){return Math.floor(Math.random()*2**31)}var hi=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}};function gi(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function _i(e,t,n){let r=[];e.forEach(e=>r.push(...e)),gi(r,t,n)}function vi(e,t){return e[0]===t[0]&&e[1]===t[1]}function yi(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)gi(e,s,i);let c=bi(o,a,r);if(i){for(let e of o)gi(e,s,-i);_i(c,s,-i)}return c}function bi(e,t,n){let r=[];for(let t of e){let e=[...t];vi(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;te.ymint.ymin?1:e.xt.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax)),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;ts);t++)e=t;a.splice(0,e+1).forEach(e=>{o.push({s,edge:e})})}if(o=o.filter(e=>!(e.edge.ymax<=s)),o.sort((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x)),(n!==1||c%t===0)&&o.length>1)for(let e=0;e=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach(e=>{e.edge.x=e.edge.x+n*e.edge.islope}),c++}return i}function xi(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),yi(e,r,n,i||1)}var Si=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=xi(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function Ci(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var wi=class extends Si{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=t.strokeWidth*4),n=Math.max(n,.1);let r=xi(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=n*.5*Math.cos(i),s=n*.5*Math.sin(i);for(let[e,t]of r)Ci([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Ti=class extends Si{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Ei=class{constructor(e){this.helper=e}fillPolygons(e,t){t=Object.assign({},t,{hachureAngle:0});let n=xi(e,t);return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=t.strokeWidth*4),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=Ci(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e{let a=Ci(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e{let i=Ci(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;er%2?e+n:e+t);a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map((e,r)=>r%2?e+n:e+t);a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function Ri(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(Vi(r,i,c,l,e,n,a,o,s).forEach(function(e){t.push({key:`C`,data:e})}),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function zi(e){return Math.PI*e/180}function Bi(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function Vi(e,t,n,r,i,a,o,s,c,l){let u=zi(o),d=[],f=0,p=0,m=0,h=0;if(l)[f,p,m,h]=l;else{[e,t]=Bi(e,t,-u),[n,r]=Bi(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i=d*i,a=d*a);let g=s===c?-1:1,_=i*i,v=a*a,y=_*v-_*l*l-v*o*o,b=_*l*l+v*o*o,x=g*Math.sqrt(Math.abs(y/b));m=x*i*l/a+(e+n)/2,h=x*-a*o/i+(t+r)/2,f=Math.asin(parseFloat(((t-h)/a).toFixed(9))),p=Math.asin(parseFloat(((r-h)/a).toFixed(9))),ep&&(f-=Math.PI*2),!c&&p>f&&(p-=Math.PI*2)}let g=p-f;if(Math.abs(g)>Math.PI*120/180){let e=p,t=n,s=r;p=c&&p>f?f+Math.PI*120/180*1:f+Math.PI*120/180*-1,n=m+i*Math.cos(p),r=h+a*Math.sin(p),d=Vi(n,r,t,s,i,a,o,0,c,[p,e,m,h])}g=p-f;let _=Math.cos(f),v=Math.sin(f),y=Math.cos(p),b=Math.sin(p),x=Math.tan(g/4),S=4/3*i*x,C=4/3*a*x,w=[e,t],T=[e+S*v,t-C*_],E=[n+S*b,r-C*y],ee=[n,r];if(T[0]=2*w[0]-T[0],T[1]=2*w[1]-T[1],l)return[T,E,ee].concat(d);{d=[T,E,ee].concat(d);let e=[];for(let t=0;t2){let i=[];for(let t=0;tMath.PI*2&&(p=0,m=Math.PI*2);let h=Math.PI*2/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=da(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=da(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(...X(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),...X(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function Zi(e,t){let n=Ri(Li(Ii(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(...X(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...fa(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(...X(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function Qi(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+Y(e,t),r[0][1]+Y(e,t)]});for(let a=1;aMath.PI*2&&(d=0,f=Math.PI*2);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),$i([m],o)}function ta(e,t){return Y(e,t)}function na(e,t,n){return oa(e,t,n)}function ra(e,t,n,r,i){return X(e,t,n,r,i,!0)}function ia(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function aa(e){return e.randomizer||=new hi(e.seed||0),e.randomizer.next()}function oa(e,t,n,r=1){return n.roughness*r*(aa(n)*(t-e)+e)}function Y(e,t,n=1){return oa(-e,e,t,n)}function X(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=sa(e,t,n,r,i,!0,!1);if(o)return s;let c=sa(e,t,n,r,i,!0,!0);return s.concat(c)}function sa(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+aa(i)*.2,p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=Y(p,i,l),m=Y(m,i,l);let h=[],g=()=>Y(d,i,l),_=()=>Y(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:Y(u,i,l)),t+(v?0:Y(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function ca(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]),r.push([e[0][0]+Y(t,n),e[0][1]+Y(t,n)]);for(let i=1;i3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+21&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=va(a,o,r),u=va(o,s,r),d=va(s,c,r),f=va(l,u,r),p=va(u,d,r),m=va(f,p,r);ba([a,l,f,m],0,n,i),ba([m,p,d,c],0,n,i)}return i}function xa(e,t){return Sa(e,0,e.length,t)}function Sa(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;rc&&(c=t,l=r)}return Math.sqrt(c)>r?(Sa(e,t,l+1,r,a),Sa(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Ca(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n0?Sa(r,0,r.length,n):r}function wa(e,t,n){let r=Ri(Li(Ii(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...Ca(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=xa(e,n);t.length&&u.push(t)}return u}var Z=`none`,Ta=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return mi()}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[J(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=Gi(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(Qi([i],a)):o.push($i([i],a))}return a.stroke!==Z&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=Ji(n,r,a),c=Yi(e,t,a,s);if(a.fill){if(a.fillStyle===`solid`){let n=Yi(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push($i([c.estimatedPoints],a))}return a.stroke!==Z&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[Ui(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=Xi(e,t,n,r,i,a,o,!0,c);if(o&&c.fill){if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=Xi(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(ea(e,t,n,r,i,a,c))}return c.stroke!==Z&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=Ki(e,n);if(n.fill&&n.fill!==Z){if(n.fillStyle===`solid`){let t=Ki(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Ca(ma([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Ca(ma(r),10,(1+n.roughness)/2))}t.length&&r.push($i([t],n))}}return n.stroke!==Z&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=Ui(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(Qi([e],n)):r.push($i([e],n))),n.stroke!==Z&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Z,a=n.stroke!==Z,o=!!(n.simplification&&n.simplification<1),s=o?4-4*(n.simplification||1):(1+n.roughness)/2,c=wa(e,1,s),l=Zi(e,n);if(i){if(n.fillStyle===`solid`){if(c.length===1){let t=Zi(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(Qi(c,n))}else r.push($i(c,n))}return a&&(o?c.forEach(e=>{r.push(Ui(e,!1,n))}):r.push(l)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map(e=>+e.toFixed(t)):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Z};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Z,strokeWidth:0,fill:n.fill||Z};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Z,strokeWidth:n,fill:Z}}_mergedShape(e){return e.filter((e,t)=>t===0||e.op!==`move`)}},Ea=`http://www.w3.org/2000/svg`,Da=800,Oa=null;function ka(){return Oa||=new Ta().defaultOptions,Oa}function Aa(e,t,n){return{...ka(),maxRandomnessOffset:2,roughness:e===`highlight`?3:1.5,bowing:1,stroke:`#000`,strokeWidth:1.5,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,disableMultiStroke:e!==`double`,disableMultiStrokeFill:!1,seed:t,...n}}function ja(e){let t=e.padding;if(t||t===0){if(typeof t==`number`)return[t,t,t,t];if(Array.isArray(t)){let e=t;if(e.length)switch(e.length){case 4:return[...e];case 1:return[e[0],e[0],e[0],e[0]];case 2:return[...e,...e];case 3:return[...e,e[1]];default:return[e[0],e[1],e[2],e[3]]}}}return[5,5,5,5]}function Ma(e,t,n,r,i,a){let o=[],s=n.strokeWidth||2,c=ja(n),l=n.animate===void 0||!!n.animate,u=n.iterations||2,d=+!!n.rtl,f=Aa(`single`,a,n);switch(n.type){case`underline`:{let e=t.y+t.h+c[2];for(let n=d;ne.setAttribute(t,n);for(let r of t){let t=document.createElementNS(Ea,`path`);if(d(t,`d`,r),d(t,`fill`,`none`),d(t,`stroke`,n.color||`currentColor`),d(t,`stroke-width`,`${s}`),n.opacity!==void 0&&d(t,`style`,`opacity:${n.opacity}`),l){let e=t.getTotalLength();a.push(e),u+=e}e.appendChild(t),c.push(t)}if(l){let e=0;for(let t=0;tsetTimeout(t,e))}function Pa(e){let t=[];for(let n of e){let e=``;for(let r of n.ops){let n=r.data;switch(r.op){case`move`:e.trim()&&t.push(e.trim()),e=`M${n[0]} ${n[1]} `;break;case`bcurveTo`:e+=`C${n[0]} ${n[1]}, ${n[2]} ${n[3]}, ${n[4]} ${n[5]} `;break;case`lineTo`:e+=`L${n[0]} ${n[1]} `}}e.trim()&&t.push(e.trim())}return t}function Fa(){if(!window.__rno_kf_s){let e=window.__rno_kf_s=document.createElement(`style`);e.textContent=`@keyframes rough-notation-dash { to { stroke-dashoffset: 0; } }`,document.head.appendChild(e)}}var Ia=Object.defineProperty,La=(e,t,n)=>t in e?Ia(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Q=(e,t,n)=>(La(e,typeof t==`symbol`?t:t+``,n),n),Ra=class{constructor(e,t){Q(this,`_state`,`unattached`),Q(this,`_config`),Q(this,`_resizing`,!1),Q(this,`_ro`),Q(this,`_seed`,mi()),Q(this,`_e`),Q(this,`_svg`),Q(this,`_lastSizes`,[]),Q(this,`_animationDelay`,0),Q(this,`_resizeListener`,()=>{this._resizing||(this._resizing=!0,setTimeout(()=>{this._resizing=!1,this._state===`showing`&&this.haveRectsChanged()&&this.show()},400))}),Q(this,`pendingRefresh`),this._e=e,this._config=JSON.parse(JSON.stringify(t)),this.attach()}getConfig(e){return this._config[e]}setConfig(e,t){this._config[e]!==t&&(this._config[e]=t,this.refresh())}get animate(){return this._config.animate}set animate(e){this._config.animate=e}get animationDuration(){return this._config.animationDuration}set animationDuration(e){this._config.animationDuration=e}get iterations(){return this._config.iterations}set iterations(e){this._config.iterations=e}get color(){return this._config.color}set color(e){this._config.color!==e&&(this._config.color=e,this.refresh())}get class(){return this._config.class}set class(e){this._config.class!==e&&(this._config.class=e,this._svg&&this._svg.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `)))}get strokeWidth(){return this._config.strokeWidth}set strokeWidth(e){this._config.strokeWidth!==e&&(this._config.strokeWidth=e,this.refresh())}get padding(){return this._config.padding}set padding(e){this._config.padding!==e&&(this._config.padding=e,this.refresh())}attach(){if(this._state===`unattached`&&this._e.parentElement){Fa();let e=this._svg=document.createElementNS(Ea,`svg`);e.setAttribute(`class`,[`rough-annotation`,this._config.class||``].filter(Boolean).join(` `));let t=e.style;t.position=`absolute`,t.top=`0`,t.left=`0`,t.overflow=`visible`,t.pointerEvents=`none`,t.width=`100px`,t.height=`100px`;let n=this._config.type===`highlight`;if(this._e.insertAdjacentElement(n?`beforebegin`:`afterend`,e),this._state=`not-showing`,n){let e=window.getComputedStyle(this._e).position;(!e||e===`static`)&&(this._e.style.position=`relative`)}this.attachListeners()}}detachListeners(){window.removeEventListener(`resize`,this._resizeListener),this._ro&&this._ro.unobserve(this._e)}attachListeners(){this.detachListeners(),window.addEventListener(`resize`,this._resizeListener,{passive:!0}),!this._ro&&`ResizeObserver`in window&&(this._ro=new window.ResizeObserver(e=>{for(let t of e)t.contentRect&&this._resizeListener()})),this._ro&&this._ro.observe(this._e)}haveRectsChanged(){if(this._lastSizes.length){let e=this.rects();if(e.length===this._lastSizes.length){for(let t=0;tMath.round(e)===Math.round(t);return n(e.x,t.x)&&n(e.y,t.y)&&n(e.w,t.w)&&n(e.h,t.h)}isShowing(){return this._state!==`not-showing`}refresh(){this.isShowing()&&!this.pendingRefresh&&(this.pendingRefresh=Promise.resolve().then(()=>{this.isShowing()&&this.show(),delete this.pendingRefresh}))}async show(){switch(this._state){case`unattached`:break;case`showing`:this.hide(),this._svg&&await this.render(this._svg,!0);break;case`not-showing`:this.attach(),this._svg&&await this.render(this._svg,!1)}}hide(){if(this._svg)for(;this._svg.lastChild;)this._svg.removeChild(this._svg.lastChild);this._state=`not-showing`}remove(){this._svg&&this._svg.parentElement&&this._svg.parentElement.removeChild(this._svg),this._svg=void 0,this._state=`unattached`,this.detachListeners()}async render(e,t){let n=this._config;t&&(n=JSON.parse(JSON.stringify(this._config)),n.animate=!1);let r=this.rects(),i=0;r.forEach(e=>i+=e.w);let a=n.animationDuration||Da,o=0,s=[];for(let t=0;tObject.assign(e,{type:`box`}),circle:e=>Object.assign(e,{type:`circle`}),underline:e=>Object.assign(e,{type:`underline`}),highlight:e=>Object.assign(e,{type:`highlight`}),"strike-through":e=>Object.assign(e,{type:`strike-through`}),"crossed-off":e=>Object.assign(e,{type:`crossed-off`}),bracket:e=>Object.assign(e,{type:`bracket`}),strike:e=>Object.assign(e,{type:`strike-through`}),cross:e=>Object.assign(e,{type:`crossed-off`}),crossed:e=>Object.assign(e,{type:`crossed-off`}),linethrough:e=>Object.assign(e,{type:`strike-through`}),"line-through":e=>Object.assign(e,{type:`strike-through`}),black:e=>$(e,`text-black`),blue:e=>$(e,`text-blue`),cyan:e=>$(e,`text-cyan`),gray:e=>$(e,`text-gray`),green:e=>$(e,`text-green`),indigo:e=>$(e,`text-indigo`),lime:e=>$(e,`text-lime`),orange:e=>$(e,`text-orange`),pink:e=>$(e,`text-pink`),purple:e=>$(e,`text-purple`),red:e=>$(e,`text-red`),teal:e=>$(e,`text-teal`),white:e=>$(e,`text-white`),yellow:e=>$(e,`text-yellow`)},Va=[[/^delay-?(\d+)?$/,(e,t,n)=>(t.delay=(e[1]?Number.parseInt(e[1]):n)||300,t)],[/^(?:op|opacity)-?(\d+)?$/,(e,t,n)=>(t.opacity=((e[1]?Number.parseInt(e[1]):n)||100)/100,t)]];function Ha(){return{install(e){e.directive(`mark`,{name:`v-mark`,mounted:(e,t)=>{let{isPrintMode:n}=ue(),r=m(()=>{let e=typeof t.value==`object`&&!Array.isArray(t.value)?{...t.value}:{at:t.value},r={at:e.at},i=Object.entries(t.modifiers).filter(([e,t])=>{if(Ba[e])return r=Ba[e](r,t),!1;for(let[n,i]of Va){let a=e.match(n);if(a)return r=i(a,r,t),!1}return!0});i.length&&console.warn(`[Slidev] Invalid modifiers for v-mark:`,i);let a={...r,...e};return a.type||=`underline`,n.value&&(a.animationDuration=1),a}),i=za(e,r.value),a=ai(e,t,r.value.at);if(!a){i.show();return}e.watchStopHandle=c(()=>{let e;r.value.class&&(i.class=r.value.class),r.value.color&&(i.color=r.value.color);let t=r.value.at;e=t===!0||t!==!1&&a.isActive.value,e!=null&&(e?i.show():i.hide())})},unmounted:e=>{e.watchStopHandle?.()}})}}}function Ua(){return{install(e){let t=xe();e.directive(`motion`,{name:`v-motion`,mounted(e,n,r,i){let a=ei(n,Oe),o=ei(n,ke),s=ei(n,Me),{currentPage:c,clicks:l,isPrintMode:u}=ue(),f=r.props={...r.props},p={...f.initial,...f.variants?.[`slidev-initial`]},m={...f.enter,...f.variants?.[`slidev-enter`]},h={...f.leave,...f.variants?.[`slidev-leave`]};delete f.initial,delete f.enter,delete f.leave;let g=`${xr()}-`,_=[];for(let e of Object.keys(f))if(e.startsWith(`click-`)){let t=e.slice(6),n=t.includes(`-`)?t.split(`-`).map(Number):+t,r=g+t;_.push({id:r,at:n,variant:{...f[e]},info:a?.value.calculate(n)}),delete f[e]}_.sort((e,t)=>(Array.isArray(e.at)?e.at[0]:e.at)-(Array.isArray(t.at)?t.at[0]:t.at)),t.created(e,n,r,i),t.mounted(e,n,r,i);let v=e.motionInstance;v.clickIds=_.map(e=>e.id),v.set(p),v.watchStopHandle=d([o,c,l].filter(Boolean),()=>{let t=ii.get(e)?.visibilityState.value??`shown`;if(!a?.value||![`slide`,`presenter`].includes(s?.value??``)){let e={...p,...m};for(let{variant:t}of _)Object.assign(e,t);v.set(e)}else if(u.value||o?.value===c.value){if(t===`shown`){let e={...p,...m};for(let{variant:t,info:n}of _)(!n||n.isActive.value)&&Object.assign(e,t);u.value?v.set(e):v.apply(e)}else v.apply(t===`before`?p:h)}else v.apply((o?.value??-1)>c.value?p:h)},{immediate:!0})},unmounted(e){e.motionInstance.watchStopHandle()}})}}}var Wa=Object.assign({}),Ga=Object.assign({}),Ka=Object.assign({}),qa=[Object.values(Wa)[0],Object.values(Ga)[0],Object.values(Ka)[0]].filter(Boolean);function Ja(){let e=[];function t(e){if(!M.remote||M.remote===e.query.password)return!0;if(M.remote&&e.query.password===void 0){let e=prompt(`Enter password`);if(M.remote===e)return!0}return e.params.no?{path:`/${e.params.no}`}:{path:``}}return e.push({name:`entry`,path:`/entry`,component:()=>j(()=>import(`./slidev/entry-C7SFAt6v.js`),__vite__mapDeps([2,3,1,4,5,6]),import.meta.url),beforeEnter:t},{name:`overview`,path:`/overview`,component:()=>j(()=>import(`./slidev/overview-BMK6AjPZ.js`),__vite__mapDeps([7,3,1,4,8,5,9,10,11,12,13,14,15,16,17,18,19,20,21]),import.meta.url),beforeEnter:t},{name:`notes`,path:`/notes`,component:()=>j(()=>import(`./slidev/notes-DR2PUT4o.js`),__vite__mapDeps([22,3,1,4,8,5,9,10,12,23,13,14,24]),import.meta.url),beforeEnter:t},{name:`notes-edit`,path:`/notes-edit`,component:()=>j(()=>import(`./slidev/notes-edit-BJF3Fcbc.js`),__vite__mapDeps([25,3,1,4,8,5,9,10,12,23]),import.meta.url),beforeEnter:t},{name:`presenter`,path:`/presenter/:no`,component:()=>j(()=>import(`./slidev/presenter-BxnNsbIJ.js`),__vite__mapDeps([26,3,1,4,8,5,9,10,18,27,12,28,29,13,14,24,15,16,17,19,20,30,31,32]),import.meta.url),beforeEnter:t},{path:`/presenter`,redirect:{path:`/presenter/1`}}),e.push({name:`play`,path:`/:no`,component:()=>j(()=>import(`./slidev/play-CBQP4AOb.js`),__vite__mapDeps([33,3,1,4,8,5,9,10,18,11,23,15,16,17,19,30,12,28,31,34]),import.meta.url)},{path:``,redirect:{path:`/1`}},{path:`/:pathMatch(.*)*`,name:`NotFound`,component:()=>j(()=>import(`./slidev/404-DZ1RXj5D.js`),__vite__mapDeps([35,3,1,4,8,5,9,10,36]),import.meta.url)}),qa.reduce((e,t)=>t(e),e)}async function Ya(e){function t(){document.documentElement.style.setProperty(`--vh`,`${window.innerHeight*.01}px`)}t(),window.addEventListener(`resize`,t);let n=he({history:Te(`./`),routes:Ja()});e.use(n),e.use(qr()),e.use(ri()),e.use(Ha()),e.use(pi()),e.use(Ua()),e.use(S,{container:`#twoslash-container`});let r={app:e,router:n};for(let e of Zr)await e(r)}async function Xa(){let e=x(Rr);await Ya(e),e.mount(`#app`)}Xa();export{Qr as a,Er as c,Sr as d,Ht as f,Mt as h,$r as i,Or as l,Wt as m,ci as n,Ir as o,Ut as p,si as r,kr as s,ui as t,xr as u}; \ No newline at end of file diff --git a/lecture-08/assets/interactive-D_LX0oud.css b/lecture-08/assets/interactive-D_LX0oud.css new file mode 100644 index 0000000000000000000000000000000000000000..a4eed7fee12ae099d6a367e7a22fac5070cd9430 --- /dev/null +++ b/lecture-08/assets/interactive-D_LX0oud.css @@ -0,0 +1 @@ +.dl-interactive[data-v-0c449bbd]{flex-direction:column;display:flex}.dl-interactive__title[data-v-0c449bbd]{margin-bottom:.7rem}.dl-interactive__grid[data-v-0c449bbd]{flex:auto;align-items:stretch;gap:1.6rem;min-height:0;display:flex}.dl-interactive__grid.is-aside-left[data-v-0c449bbd]{flex-direction:row-reverse}.dl-interactive__stage[data-v-0c449bbd]{flex:auto;justify-content:center;align-items:center;min-width:0;display:flex}.dl-interactive__aside[data-v-0c449bbd]{font-size:var(--dl-fs-secondary);flex-grow:0;flex-shrink:0;overflow-y:auto}.dl-interactive__aside[data-v-0c449bbd]:empty{display:none} diff --git a/lecture-08/assets/interactive-LBJsATV-.js b/lecture-08/assets/interactive-LBJsATV-.js new file mode 100644 index 0000000000000000000000000000000000000000..c5d4afab4f0deca9cbea1c3582130d921dd3ff30 --- /dev/null +++ b/lecture-08/assets/interactive-LBJsATV-.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,St as r,T as i,U as a,_ as o,b as s,bt as c,y as l}from"./modules/shiki-CJZsCeMT.js";import{t as u}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as d}from"./slidev/context-DB-9afGB.js";import{t as f}from"./DeckFooter-BmHxwiXu.js";var p={class:`slidev-layout dl-interactive`},m={key:0,class:`dl-interactive__title`},h={class:`dl-interactive__stage`},g=u(i({__name:`interactive`,props:{heading:{},asideWidth:{},asideLeft:{type:Boolean}},setup(i){let{$slidev:u,$nav:g,$clicksContext:_,$clicks:v,$page:y,$renderContext:b,$frontmatter:x}=d(),S=i;return(i,u)=>{let d=f;return e(),s(`div`,p,[S.heading?(e(),s(`h1`,m,n(S.heading),1)):l(`v-if`,!0),o(`div`,{class:c([`dl-interactive__grid`,{"is-aside-left":S.asideLeft}])},[o(`div`,h,[a(i.$slots,`default`,{},void 0,!0)]),o(`div`,{class:`dl-interactive__aside`,style:r({flexBasis:S.asideWidth??`17rem`})},[a(i.$slots,`aside`,{},void 0,!0)],4)],2),t(d)])}}}),[[`__scopeId`,`data-v-0c449bbd`]]);export{g as t}; \ No newline at end of file diff --git a/lecture-08/assets/logo-BYkHSa_O.png b/lecture-08/assets/logo-BYkHSa_O.png new file mode 100644 index 0000000000000000000000000000000000000000..f5b8660126125a3c1b259857293439f9959a3688 Binary files /dev/null and b/lecture-08/assets/logo-BYkHSa_O.png differ diff --git a/lecture-08/assets/md-0nitP_As.js b/lecture-08/assets/md-0nitP_As.js new file mode 100644 index 0000000000000000000000000000000000000000..9e51fd918474c107261fcf1e0de71340bd75ac2f --- /dev/null +++ b/lecture-08/assets/md-0nitP_As.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,H as i,S as a,_ as o,b as s,et as c,m as l,tt as u,v as d,xt as f,y as p,yt as m}from"./modules/shiki-CJZsCeMT.js";import{n as h,t as g}from"./slidev/context-DB-9afGB.js";import{t as _}from"./GridWorld-D5i5gg4u.js";import{t as v}from"./default-DMdSOhJT.js";var y={class:`grid grid-cols-2 gap-8 items-center mt-2`},b={class:`flex flex-col items-center gap-2`},x={class:`flex flex-col items-center gap-2`},S={viewBox:`0 0 230 230`,class:`dl-diagram`,style:{"max-width":`14.4rem`},role:`img`,"aria-label":`The robot's view: every cell is unknown except its own`},C=[`x`,`y`],w=[`x`,`y`],T={class:`mt-3 dl-callout`},E={__name:`slides.md__slidev_48`,setup(E){let{$slidev:D,$nav:O,$clicksContext:k,$clicks:A,$page:j,$renderContext:M,$frontmatter:N}=h();return k.setup(),(h,E)=>{let D=_,O=r(`click`);return e(),d(v,f(n(m(g)(m(N),47))),{default:c(()=>[E[4]||=o(`h1`,null,`The catch: value iteration needs the map`,-1),o(`div`,y,[o(`div`,b,[t(D,{values:[4.5,5,0,4.05,0,5,3.645,4.05,4.5],robot:null,cell:70,precision:4}),E[0]||=o(`div`,{class:`dl-secondary text-center`},[o(`p`,null,[a(`we computed this from `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`p`),o(`mo`,{stretchy:`false`},`(`),o(`msup`,null,[o(`mi`,null,`s`),o(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),o(`mo`,{separator:`true`},`,`),o(`mi`,null,`r`),o(`mo`,null,`∣`),o(`mi`,null,`s`),o(`mo`,{separator:`true`},`,`),o(`mi`,null,`a`),o(`mo`,{stretchy:`false`},`)`)]),o(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),o(`span`,{class:`mord mathnormal`},`p`),o(`span`,{class:`mopen`},`(`),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathnormal`},`s`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.7519em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mord mtight`},`′`)])])])])])])])]),o(`span`,{class:`mpunct`},`,`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`∣`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),o(`span`,{class:`mord mathnormal`},`s`),o(`span`,{class:`mpunct`},`,`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathnormal`},`a`),o(`span`,{class:`mclose`},`)`)])])])])],-1)]),u((e(),s(`div`,x,[(e(),s(`svg`,S,[(e(),s(l,null,i(9,t=>o(`g`,{key:t},[o(`rect`,{class:`dl-dg-box`,x:4+(t-1)%3*74,y:4+Math.floor((t-1)/3)*74,width:`74`,height:`74`},null,8,C),t===8?p(`v-if`,!0):(e(),s(`text`,{key:0,class:`dl-dg-lab`,x:41+(t-1)%3*74,y:50+Math.floor((t-1)/3)*74,"text-anchor":`middle`,style:{fill:`var(--dl-muted)`}},`?`,8,w))])),64)),E[1]||=o(`g`,{transform:`translate(115 192)`},[o(`rect`,{x:`-14`,y:`-14`,width:`28`,height:`22`,rx:`6`,style:{fill:`var(--dl-accent)`}}),o(`circle`,{cx:`-5.5`,cy:`-4`,r:`3`,style:{fill:`var(--dl-bg)`}}),o(`circle`,{cx:`5.5`,cy:`-4`,r:`3`,style:{fill:`var(--dl-bg)`}})],-1)])),E[2]||=o(`div`,{class:`dl-secondary text-center`},`what the robot actually knows`,-1)])),[[O]])]),u((e(),s(`div`,T,[...E[3]||=[o(`p`,null,[a(`Every sweep asked "where does this move land, and what reward does it give?" The robot `),o(`strong`,null,`cannot ask`),a(`. It has to `),o(`strong`,null,`try`),a(`.`)],-1)]])),[[O]])]),_:1},16)}}};export{E as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-3KgA1lqP.js b/lecture-08/assets/md-3KgA1lqP.js new file mode 100644 index 0000000000000000000000000000000000000000..81b80b12f885ecd915a0f65e4910fe537076e844 --- /dev/null +++ b/lecture-08/assets/md-3KgA1lqP.js @@ -0,0 +1,19 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";import{t as y}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var b={class:`grid grid-cols-[1.3fr_1fr] gap-6 items-center`},x={class:`flex justify-center`},S={viewBox:`0 0 400 170`,class:`dl-diagram`,role:`img`,"aria-label":`From (3,3) the four moves lead to (2,3), the wall twice, and START; up is best with 4.5`},C=[`d`],w=[`cx`],T=[`x`],E=[`x`],D={__name:`slides.md__slidev_43`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=g();return A.setup(),(g,D)=>{let O=y,k=i(`click`);return e(),p(v,m(r(h(_)(h(P),42))),{default:u(()=>[D[6]||=s(`h1`,null,`The Bellman equation`,-1),D[7]||=s(`p`,null,[o(`The value of a cell = the best of (reward now + `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`γ`)]),s(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),o(` × value of where you land).`)],-1),t(O,{ranges:[]},{default:u(()=>[...D[0]||=[s(`p`,null,[s(`span`,{class:`katex-display`},[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`v`),s(`mo`,null,`∗`)]),s(`mo`,{stretchy:`false`},`(`),s(`mi`,null,`s`),s(`mo`,{stretchy:`false`},`)`),s(`mo`,null,`=`),s(`munder`,null,[s(`mrow`,null,[s(`mi`,null,`max`),s(`mo`,null,`⁡`)]),s(`mi`,null,`a`)]),s(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`[`),s(`mtext`,null,` `),s(`munder`,null,[s(`munder`,null,[s(`mi`,null,`r`),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`reward\xA0now`)]),s(`mo`,null,`+`),s(`mi`,null,`γ`),s(`mtext`,null,` `),s(`munder`,null,[s(`munder`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`v`),s(`mo`,null,`∗`)]),s(`mo`,{stretchy:`false`},`(`),s(`msup`,null,[s(`mi`,null,`s`),s(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),s(`mo`,{stretchy:`false`},`)`)]),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`value\xA0of\xA0where\xA0you\xA0land`)]),s(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`]`)]),s(`annotation`,{encoding:`application/x-tex`},`v_*(s) = \\max_a \\Big[\\, \\underbrace{r}_{\\text{reward now}} + \\gamma\\, \\underbrace{v_*(s')}_{\\text{value of where you land}} \\Big] `)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.1757em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mbin mtight`},`∗`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord mathnormal`},`s`),s(`span`,{class:`mclose`},`)`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`2.4841em`,"vertical-align":`-1.3341em`}}),s(`span`,{class:`mop op-limits`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.4306em`}},[s(`span`,{style:{top:`-2.4em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`a`)])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,null,[s(`span`,{class:`mop`},`max`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.7em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`delimsizing size2`},`[`)]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.4306em`}},[s(`span`,{style:{top:`-1.6659em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`reward\xA0now`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.4306em`}},[s(`span`,{class:`svg-align`,style:{top:`-2.352em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.648em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.3341em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`2.8702em`,"vertical-align":`-1.7202em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8019em`}},[s(`span`,{style:{top:`-1.4159em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`value\xA0of\xA0where\xA0you\xA0land`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8019em`}},[s(`span`,{class:`svg-align`,style:{top:`-2.102em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.1757em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mbin mtight`},`∗`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`s`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8019em`}},[s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`′`)])])])])])])])]),s(`span`,{class:`mclose`},`)`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.898em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.7202em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`delimsizing size2`},`]`)])])])])])],-1)]]),_:1}),s(`div`,b,[s(`div`,x,[(e(),c(`svg`,S,[D[2]||=s(`defs`,null,[s(`marker`,{id:`l8-bell-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[s(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),D[3]||=s(`circle`,{class:`dl-dg-op`,cx:`200`,cy:`26`,r:`20`},null,-1),D[4]||=s(`text`,{class:`dl-dg-small`,x:`200`,y:`30`,"text-anchor":`middle`},`(3,3)`,-1),(e(),c(d,null,a([[`up`,`(2,3)`,`0 + 0.9 × 5 = 4.5`],[`down`,`wall`,`0 + 0.9 × 4.5 = 4.05`],[`left`,`START`,`0 + 0.9 × 4.05 = 3.645`],[`right`,`wall`,`0 + 0.9 × 4.5 = 4.05`]],(t,r)=>s(`g`,{key:r},[s(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-bell-h)`,d:`M200 46 L${50+r*100} 82`},null,8,C),s(`circle`,{class:l([`dl-dg-dot`,r===0?`is-accent`:``]),cx:50+r*100,cy:`88`,r:`6`},null,10,w),s(`text`,{class:`dl-dg-small`,x:50+r*100,y:`110`,"text-anchor":`middle`},n(t[0])+` → `+n(t[1]),9,T),f((e(),c(`g`,null,[s(`text`,{class:l([`dl-dg-small`,r===0?`is-good`:``]),x:50+r*100,y:`130`,"text-anchor":`middle`},n(t[2]),11,E)])),[[k,r+1]])])),64)),f((e(),c(`g`,null,[...D[1]||=[s(`text`,{class:`dl-dg-lab is-sm`,x:`200`,y:`160`,"text-anchor":`middle`},`v*(3,3) = max = 4.5 (up)`,-1)]])),[[k,5]])]))]),D[5]||=s(`div`,{class:`dl-ledger dl-tight`},[s(`table`,null,[s(`thead`,null,[s(`tr`,null,[s(`th`,null,`symbol`),s(`th`,null,`means`)])]),s(`tbody`,null,[s(`tr`,null,[s(`td`,null,[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`v`),s(`mo`,null,`∗`)])]),s(`annotation`,{encoding:`application/x-tex`},`v_*`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.1757em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mbin mtight`},`∗`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])])])])])]),s(`td`,null,[o(`value under the `),s(`strong`,null,`best`),o(` policy`)])]),s(`tr`,null,[s(`td`,null,[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`r`)]),s(`annotation`,{encoding:`application/x-tex`},`r`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])])]),s(`td`,null,`reward of the move`)]),s(`tr`,null,[s(`td`,null,[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msup`,null,[s(`mi`,null,`s`),s(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),s(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`s`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.7519em`}},[s(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),s(`td`,null,`the cell you land in`)]),s(`tr`,null,[s(`td`,null,[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mrow`,null,[s(`mi`,null,`max`),s(`mo`,null,`⁡`)]),s(`mi`,null,`a`)])]),s(`annotation`,{encoding:`application/x-tex`},`\\max_a`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mop`},[s(`span`,{class:`mop`},`max`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.1514em`}},[s(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`a`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])])])])])]),s(`td`,null,`try all four, keep the best`)])])])],-1)])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-6UsQlhb2.js b/lecture-08/assets/md-6UsQlhb2.js new file mode 100644 index 0000000000000000000000000000000000000000..f5971835d605be2af69d0b55b4544f49ea9da45d --- /dev/null +++ b/lecture-08/assets/md-6UsQlhb2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_56`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),55))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Explore or exploit?`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The floor shows the robot’s guesses at START after a few episodes: up −5, down 0, left 0, right 0.5. The arrow points at the best guess, right.`),r(`li`,null,[n(`To `),r(`strong`,null,`exploit`),n(` is to take the best-looking move. Left would never be tried, even though it might be better than its 0 suggests.`)]),r(`li`,null,[n(`To `),r(`strong`,null,`explore`),n(` is to try another move on purpose, to learn more about it.`)]),r(`li`,null,`Only exploiting can keep a wrong early guess forever. Only exploring never uses what was learned.`)]),r(`p`,null,`A learning agent must mostly exploit, and sometimes explore.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-6ZLa4d3p.js b/lecture-08/assets/md-6ZLa4d3p.js new file mode 100644 index 0000000000000000000000000000000000000000..45136ca9fade2c6c94fbe42f78565aeb43f94452 --- /dev/null +++ b/lecture-08/assets/md-6ZLa4d3p.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_63`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),62))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The Q-learning update`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,[n(`The `),r(`strong`,null,`Q-learning update`),n(` moves a guess `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` a fraction `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`α`)]),r(`annotation`,{encoding:`application/x-tex`},`\\alpha`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`)])])]),n(` of the way toward its target.`)]),r(`ol`,null,[r(`li`,null,[n(`The old guess is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`3`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\text{up}) = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`((`),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(` (orange dot).`)]),r(`li`,null,[n(`The target is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`2.5`),r(`mo`,null,`=`),r(`mn`,null,`2.25`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 2.5 = 2.25`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.25`)])])]),n(` (purple dot).`)]),r(`li`,null,[n(`The gap, target minus guess, is the `),r(`strong`,null,`TD (temporal-difference) error`),n(`: 2.25.`)]),r(`li`,null,[n(`With learning rate `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`α`),r(`mo`,null,`=`),r(`mn`,null,`0.5`)]),r(`annotation`,{encoding:`application/x-tex`},`\\alpha = 0.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.5`)])])]),n(` the guess moves halfway: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.5`),r(`mo`,null,`×`),r(`mn`,null,`2.25`),r(`mo`,null,`=`),r(`mn`,null,`1.125`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.5 \\times 2.25 = 1.125`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.25`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`1.125`)])])]),n(`.`)])]),r(`p`,null,[n(`The Q-values are learned. `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`α`)]),r(`annotation`,{encoding:`application/x-tex`},`\\alpha`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`)])])]),n(`, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(` and `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`ε`)]),r(`annotation`,{encoding:`application/x-tex`},`\\varepsilon`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`ε`)])])]),n(` are set by hand. The state, action, reward and next state are data from the robot’s own moves.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-B1kgcJx92.js b/lecture-08/assets/md-B1kgcJx92.js new file mode 100644 index 0000000000000000000000000000000000000000..c3cfa7ceaeb90f86e1c4376c315f84d80ffa5c35 --- /dev/null +++ b/lecture-08/assets/md-B1kgcJx92.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,G as r,H as i,S as a,_ as o,b as s,et as c,m as l,tt as u,v as d,xt as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./default-DMdSOhJT.js";var _={class:`grid grid-cols-2 gap-8 mt-2`},v={viewBox:`0 0 300 140`,class:`dl-diagram`,style:{"max-width":`17rem`},role:`img`,"aria-label":`Five consecutive moves along the same path look almost the same`},y=[`x`],b=[`cx`],x=[`x`],S={viewBox:`0 0 300 140`,class:`dl-diagram`,style:{"max-width":`17rem`},role:`img`,"aria-label":`The prediction and the target come from the same network, so the target moves when the weights move`},C={class:`mt-2 dl-callout`},w={__name:`slides.md__slidev_79`,setup(w){let{$slidev:T,$nav:E,$clicksContext:D,$clicks:O,$page:k,$renderContext:A,$frontmatter:j}=m();return D.setup(),(m,w)=>{let T=r(`click`);return e(),d(g,f(n(p(h)(p(j),78))),{default:c(()=>[w[5]||=o(`h1`,null,`Two problems when a network learns from its own moves`,-1),o(`div`,_,[o(`div`,null,[(e(),s(`svg`,v,[(e(),s(l,null,i(5,e=>o(`g`,{key:e},[o(`rect`,{class:`dl-dg-box`,x:6+(e-1)*58,y:`20`,width:`52`,height:`52`,rx:`4`},null,8,y),o(`circle`,{cx:20+(e-1)*58+e*3,cy:`46`,r:`7`,style:{fill:`var(--dl-accent)`}},null,8,b),o(`text`,{class:`dl-dg-small`,x:32+(e-1)*58,y:`90`,"text-anchor":`middle`},`t = `+t(e),9,x)])),64)),w[0]||=o(`text`,{class:`dl-dg-small is-bad`,x:`150`,y:`122`,"text-anchor":`middle`},`five near-copies of one example`,-1)])),w[1]||=o(`p`,null,[o(`strong`,null,`1 · Moves in a row are near-copies.`)],-1)]),u((e(),s(`div`,null,[(e(),s(`svg`,S,[...w[2]||=[o(`defs`,null,[o(`marker`,{id:`l8-chase-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head is-k`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),o(`circle`,{cx:`40`,cy:`60`,r:`10`,style:{fill:`var(--dl-k)`}},null,-1),o(`text`,{class:`dl-dg-small`,x:`40`,y:`92`,"text-anchor":`middle`},`predicted`,-1),o(`circle`,{cx:`200`,cy:`60`,r:`10`,style:{fill:`var(--dl-q)`}},null,-1),o(`circle`,{cx:`250`,cy:`60`,r:`10`,class:`dl-dg-fill is-dashed`},null,-1),o(`text`,{class:`dl-dg-small`,x:`200`,y:`92`,"text-anchor":`middle`},`target`,-1),o(`path`,{class:`dl-dg-arrow is-k`,"marker-end":`url(#l8-chase-h)`,d:`M54 52 C100 30, 150 30, 186 52`},null,-1),o(`path`,{class:`dl-dg-line is-muted`,d:`M212 60 H236`},null,-1),o(`text`,{class:`dl-dg-small`,x:`150`,y:`122`,"text-anchor":`middle`},`same w: both move together`,-1)]])),w[3]||=o(`p`,null,[o(`strong`,null,`2 · The target moves with the weights.`)],-1)])),[[T]])]),u((e(),s(`div`,C,[...w[4]||=[o(`p`,null,[a(`Fix 1: `),o(`strong`,null,`experience replay`),a(`. Fix 2: a `),o(`strong`,null,`target network`),a(`. Together they make a deep Q-network (DQN) train.`)],-1)]])),[[T]])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-B2pb5v7i.js b/lecture-08/assets/md-B2pb5v7i.js new file mode 100644 index 0000000000000000000000000000000000000000..2233c94b2e884b6b33795572f781f8e75a333000 --- /dev/null +++ b/lecture-08/assets/md-B2pb5v7i.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_58`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),57))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: ε-greedy: mostly the best, sometimes random`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`ε-greedy`),n(` picks a random action with probability `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`ε`)]),r(`annotation`,{encoding:`application/x-tex`},`\\varepsilon`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`ε`)])])]),n(`, and the best-looking action otherwise.`)]),r(`li`,null,[n(`The bars show the four actions at START, with `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`ε`),r(`mo`,null,`=`),r(`mn`,null,`0.2`)]),r(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 0.2`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`ε`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.2`)])])]),n(`. Right has the largest Q-value (4.05).`)]),r(`li`,null,[n(`Right is chosen with probability `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`1`),r(`mo`,null,`−`),r(`mn`,null,`0.2`),r(`mo`,null,`+`),r(`mn`,null,`0.2`),r(`mi`,{mathvariant:`normal`},`/`),r(`mn`,null,`4`),r(`mo`,null,`=`),r(`mn`,null,`0.85`)]),r(`annotation`,{encoding:`application/x-tex`},`1 - 0.2 + 0.2/4 = 0.85`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`1`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`−`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.2`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`0.2/4`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.85`)])])]),n(`. It can be picked by the greedy branch or by the random one.`)]),r(`li`,null,[n(`Each other action is chosen with probability `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.2`),r(`mi`,{mathvariant:`normal`},`/`),r(`mn`,null,`4`),r(`mo`,null,`=`),r(`mn`,null,`0.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0.2/4 = 0.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`0.2/4`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.05`)])])]),n(`.`)]),r(`li`,null,`The strip shows 20 draws: orange squares were random picks.`)]),r(`p`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`ε`),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`ε`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(` never explores; `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`ε`),r(`mo`,null,`=`),r(`mn`,null,`1`)]),r(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 1`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`ε`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`1`)])])]),n(` always picks at random.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-B4imawcw.js b/lecture-08/assets/md-B4imawcw.js new file mode 100644 index 0000000000000000000000000000000000000000..197d77d83088e46144e3ef6b6f7c778591722bcc --- /dev/null +++ b/lecture-08/assets/md-B4imawcw.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_99`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),98))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: What DQN achieved, and where it stops`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The picture is a brick-breaking Atari game, one of the 49 games DQN learned.`),r(`li`,null,`In 2015 one DQN design, with the same settings, was trained on each of 49 Atari games. It saw only the screen pixels and the score.`),r(`li`,null,`It reached at least 75 % of a human tester’s score in 29 of the 49 games.`),r(`li`,null,`It needed a lot of experience: 50 million frames per game.`),r(`li`,null,[n(`Its main limit: the `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mrow`,null,[r(`mi`,null,`max`),r(`mo`,null,`⁡`)]),r(`mi`,null,`a`)])]),r(`annotation`,{encoding:`application/x-tex`},`\\max_a`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mop`},[r(`span`,{class:`mop`},`max`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1514em`}},[r(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`a`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` in the target needs a short list of actions. When actions are continuous, such as a robot arm’s joint angles, other methods that learn the policy directly are used.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-B9C145sD2.js b/lecture-08/assets/md-B9C145sD2.js new file mode 100644 index 0000000000000000000000000000000000000000..de3bcbdf053cff527e8ecf4974f773b75adde404 --- /dev/null +++ b/lecture-08/assets/md-B9C145sD2.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,m,tt as h,v as g,xt as _,yt as v}from"./modules/shiki-CJZsCeMT.js";import{t as y}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b,t as x}from"./slidev/context-DB-9afGB.js";import{h as S,i as C,r as w,s as T}from"./useReinforcement-11RE6Te1.js";import{t as E}from"./slidev/VClicks-lrjw2pb1.js";import{t as D}from"./WidgetFrame-DHgK6j2H.js";import{t as O}from"./Slider-C2M0Z0oG.js";import{t as k}from"./interactive-LBJsATV-.js";var A=[`viewBox`],j=[`x`,`y`,`height`],M=[`x`,`y`],N=[`x`],P=[`y`],F=[`y`],I=[`x`,`y`,`width`],L=[`x`,`y`],R={key:0},z={key:1},B=460,V=230,H=36,U=y(s({__name:`DiscountLab`,props:{gamma:{default:C}},setup(r){let{$slidev:i,$nav:s,$clicksContext:h,$clicks:_,$page:v,$renderContext:y,$frontmatter:x}=b(),C=d(r.gamma),E=p(()=>[0,1,2,3,4,5].map(e=>C.value**e)),k=p(()=>w.map(e=>{let t=S(e.actions);return{name:e.name,moves:t.rewards.length,g:T(t.rewards,C.value)}})),U=e=>Number(e.toFixed(4)).toString().replace(`-`,`−`);return(r,i)=>{let s=O,d=D;return e(),g(d,{"max-width":`34rem`},{controls:f(()=>[t(s,{modelValue:C.value,"onUpdate:modelValue":i[0]||=e=>C.value=e,label:`discount γ`,min:0,max:1,step:.05,precision:2},null,8,[`modelValue`])]),readout:f(()=>[i[4]||=o(` short way − long way = `,-1),c(`b`,null,n(U(k.value[0].g-k.value[1].g)),1),Math.abs(k.value[0].g-k.value[1].g)<1e-9?(e(),l(`span`,R,` — the two ways are worth the same`)):(e(),l(`span`,z,` — the shorter way is worth more`)),i[5]||=c(`span`,{class:`dl-disc__note`},` (the hole bar is drawn at 30 % scale)`,-1)]),default:f(()=>[(e(),l(`svg`,{viewBox:`0 0 ${B} 258`,class:`dl-disc`,role:`img`,"aria-label":`Weights gamma to the k, and the return of three episodes`},[i[1]||=c(`text`,{x:`4`,y:`14`,class:`dl-disc__cap`},`weight γᵏ on a reward k moves away`,-1),(e(!0),l(m,null,a(E.value,(t,r)=>(e(),l(`g`,{key:r},[c(`rect`,{x:20+r*70,y:100-t*60,width:`40`,height:t*60,rx:`3`,class:`dl-disc__w`},null,8,j),c(`text`,{x:40+r*70,y:94-t*60,"text-anchor":`middle`,class:`dl-disc__num`},n(t.toFixed(2)),9,M),c(`text`,{x:40+r*70,y:`116`,"text-anchor":`middle`,class:`dl-disc__cap`},`k = `+n(r),9,N)]))),128)),i[2]||=c(`line`,{x1:`10`,y1:`100`,x2:`440`,y2:`100`,class:`dl-disc__axis`},null,-1),i[3]||=c(`text`,{x:`4`,y:`142`,class:`dl-disc__cap`},`return G₀ of each episode`,-1),c(`line`,{x1:V,y1:`148`,x2:V,y2:`254`,class:`dl-disc__axis`}),(e(!0),l(m,null,a(k.value,(t,r)=>(e(),l(`g`,{key:t.name},[c(`text`,{x:`4`,y:168+r*32,class:`dl-disc__lab`},n(t.name),9,P),c(`text`,{x:`4`,y:181+r*32,class:`dl-disc__cap`},n(t.moves)+` move`+n(t.moves>1?`s`:``),9,F),c(`rect`,{x:t.g>=0?V:Math.max(110,V+t.g*H*.3),y:158+r*32,height:20,rx:`3`,width:t.g>=0?t.g*H:Math.min(120,-t.g*H*.3),class:u(t.g>=0?`dl-disc__g`:`dl-disc__g is-bad`)},null,10,I),c(`text`,{x:t.g>=0?V+t.g*H+6:236,y:173+r*32,class:`dl-disc__num`},n(U(t.g)),9,L)]))),128))],8,A))]),_:1})}}}),[[`__scopeId`,`data-v-f97bf95b`]]),W={class:`mt-2 dl-callout`},G={__name:`slides.md__slidev_29`,setup(n){let{$slidev:a,$nav:s,$clicksContext:u,$clicks:d,$page:p,$renderContext:m,$frontmatter:y}=b();return u.setup(),(n,a)=>{let s=U,u=E,d=i(`click`);return e(),g(k,_(r(v(x)(v(y),28))),{aside:f(n=>[a[2]||=c(`p`,null,[o(`Three episodes from START, `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`γ`),c(`mo`,null,`=`),c(`mn`,null,`0.9`)]),c(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),c(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`0.9`)])])]),o(`:`)],-1),t(u,null,{default:f(()=>[...a[0]||=[c(`ul`,null,[c(`li`,null,[c(`strong`,null,`Short way`),o(` (3 moves): `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`msup`,null,[c(`mn`,null,`0.9`),c(`mn`,null,`2`)]),c(`mo`,null,`×`),c(`mn`,null,`5`),c(`mo`,null,`=`),c(`mn`,null,`4.05`)]),c(`annotation`,{encoding:`application/x-tex`},`0.9^2 \\times 5 = 4.05`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),c(`span`,{class:`mord`},`0.`),c(`span`,{class:`mord`},[c(`span`,{class:`mord`},`9`),c(`span`,{class:`msupsub`},[c(`span`,{class:`vlist-t`},[c(`span`,{class:`vlist-r`},[c(`span`,{class:`vlist`,style:{height:`0.8141em`}},[c(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[c(`span`,{class:`pstrut`,style:{height:`2.7em`}}),c(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[c(`span`,{class:`mord mtight`},`2`)])])])])])])]),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),c(`span`,{class:`mbin`},`×`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`5`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`4.05`)])])])]),c(`li`,null,[c(`strong`,null,`Long way`),o(` (5 moves): `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`msup`,null,[c(`mn`,null,`0.9`),c(`mn`,null,`4`)]),c(`mo`,null,`×`),c(`mn`,null,`5`),c(`mo`,null,`=`),c(`mn`,null,`3.2805`)]),c(`annotation`,{encoding:`application/x-tex`},`0.9^4 \\times 5 = 3.2805`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),c(`span`,{class:`mord`},`0.`),c(`span`,{class:`mord`},[c(`span`,{class:`mord`},`9`),c(`span`,{class:`msupsub`},[c(`span`,{class:`vlist-t`},[c(`span`,{class:`vlist-r`},[c(`span`,{class:`vlist`,style:{height:`0.8141em`}},[c(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[c(`span`,{class:`pstrut`,style:{height:`2.7em`}}),c(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[c(`span`,{class:`mord mtight`},`4`)])])])])])])]),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),c(`span`,{class:`mbin`},`×`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`5`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`3.2805`)])])])]),c(`li`,null,[c(`strong`,null,`Hole`),o(` (1 move): `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mo`,null,`−`),c(`mn`,null,`10`)]),c(`annotation`,{encoding:`application/x-tex`},`-10`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),c(`span`,{class:`mord`},`−`),c(`span`,{class:`mord`},`10`)])])])])],-1)]]),_:1}),h((e(),l(`div`,W,[...a[1]||=[c(`p`,null,[o(`Drag `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`γ`)]),c(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),c(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),o(` to 1: the two ways tie at 5. The discount is what makes `),c(`strong`,null,`shorter`),o(` better.`)],-1)]])),[[d]])]),default:f(()=>[t(s)]),_:1},16)}}};export{G as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BDiz7f2n2.js b/lecture-08/assets/md-BDiz7f2n2.js new file mode 100644 index 0000000000000000000000000000000000000000..d442dd853bdbfbdba98dbb65eb6f1942dcca5e58 --- /dev/null +++ b/lecture-08/assets/md-BDiz7f2n2.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,St as s,_ as c,b as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";import{t as y}from"./slidev/VClicks-lrjw2pb1.js";var b={class:`grid grid-cols-[1.3fr_1fr] gap-6 items-center`},x={viewBox:`0 0 380 240`,class:`dl-diagram`,role:`img`,"aria-label":`New moves enter the replay buffer at the top, the oldest drop out at the bottom, and a random batch is drawn from anywhere`},S=[`y`],C=[`y`],w={class:`dl-tight`},T={class:`mt-1 dl-callout`},E={__name:`slides.md__slidev_81`,setup(E){let{$slidev:D,$nav:O,$clicksContext:k,$clicks:A,$page:j,$renderContext:M,$frontmatter:N}=g();return k.setup(),(g,E)=>{let D=y,O=i(`click`);return e(),p(v,m(r(h(_)(h(N),80))),{default:u(()=>[E[8]||=c(`h1`,null,`Fix 1: experience replay`,-1),c(`div`,b,[c(`div`,null,[(e(),l(`svg`,x,[E[1]||=c(`defs`,null,[c(`marker`,{id:`l8-rep-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[c(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),E[2]||=c(`text`,{class:`dl-dg-small`,x:`10`,y:`20`},`new move`,-1),E[3]||=c(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-rep-h)`,d:`M40 28 V44`},null,-1),E[4]||=c(`rect`,{class:`dl-dg-box`,x:`10`,y:`48`,width:`200`,height:`160`,rx:`6`},null,-1),(e(),l(d,null,a([`(3,3), up, 0, (2,3)`,`START, right, 0, (3,3)`,`(2,3), up, +5, charger`,`START, up, −10, hole`,`(3,3), left, 0, START`,`(2,1), up, 0, (1,1)`,`START, down, 0, START`,`(1,2), right, +5, charger`],(e,t)=>c(`g`,{key:t},[c(`rect`,{class:`dl-dg-row`,x:`18`,y:54+t*19,width:`184`,height:`16`,rx:`2`,style:s({fill:[1,3,6].includes(t)&&h(A)>=1?`var(--dl-accent-soft)`:`var(--dl-bg)`,stroke:[1,3,6].includes(t)&&h(A)>=1?`var(--dl-accent)`:`var(--dl-border)`})},null,12,S),c(`text`,{class:`dl-dg-small`,x:`26`,y:66+t*19},n(e),9,C)])),64)),E[5]||=c(`text`,{class:`dl-dg-small`,x:`10`,y:`226`},`oldest drop out when full`,-1),f((e(),l(`g`,null,[...E[0]||=[c(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-rep-h)`,d:`M214 120 H262`},null,-1),c(`rect`,{class:`dl-dg-box is-accent`,x:`268`,y:`88`,width:`104`,height:`64`,rx:`6`},null,-1),c(`text`,{class:`dl-dg-small`,x:`320`,y:`108`,"text-anchor":`middle`},`random batch`,-1),c(`text`,{class:`dl-dg-small`,x:`320`,y:`124`,"text-anchor":`middle`},`rows 2, 4, 7`,-1),c(`text`,{class:`dl-dg-small`,x:`320`,y:`140`,"text-anchor":`middle`},`→ train`,-1)]])),[[O,1]])]))]),c(`div`,w,[t(D,{at:`2`},{default:u(()=>[...E[6]||=[c(`ul`,null,[c(`li`,null,[c(`strong`,null,`Store`),o(` every move `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mo`,{stretchy:`false`},`(`),c(`mi`,null,`s`),c(`mo`,{separator:`true`},`,`),c(`mi`,null,`a`),c(`mo`,{separator:`true`},`,`),c(`mi`,null,`r`),c(`mo`,{separator:`true`},`,`),c(`msup`,null,[c(`mi`,null,`s`),c(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),c(`mo`,{stretchy:`false`},`)`)]),c(`annotation`,{encoding:`application/x-tex`},`(s, a, r, s')`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),c(`span`,{class:`mopen`},`(`),c(`span`,{class:`mord mathnormal`},`s`),c(`span`,{class:`mpunct`},`,`),c(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),c(`span`,{class:`mord mathnormal`},`a`),c(`span`,{class:`mpunct`},`,`),c(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),c(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),c(`span`,{class:`mpunct`},`,`),c(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),c(`span`,{class:`mord`},[c(`span`,{class:`mord mathnormal`},`s`),c(`span`,{class:`msupsub`},[c(`span`,{class:`vlist-t`},[c(`span`,{class:`vlist-r`},[c(`span`,{class:`vlist`,style:{height:`0.7519em`}},[c(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[c(`span`,{class:`pstrut`,style:{height:`2.7em`}}),c(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[c(`span`,{class:`mord mtight`},[c(`span`,{class:`mord mtight`},`′`)])])])])])])])]),c(`span`,{class:`mclose`},`)`)])])]),o(` in a buffer`)]),c(`li`,null,[c(`strong`,null,`Train`),o(` on a `),c(`strong`,null,`random`),o(` batch from it`)]),c(`li`,null,`Batches mix old and new moves, so they are not near-copies`),c(`li`,null,`Each move is reused many times`)],-1)]]),_:1})])]),f((e(),l(`div`,T,[...E[7]||=[c(`p`,null,[o(`Old moves are fine: the target uses the `),c(`strong`,null,`max`),o(`, not the action the old network chose. Q-learning is `),c(`strong`,null,`off-policy`),o(`.`)],-1)]])),[[O,6]])]),_:1},16)}}};export{E as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BEVP4TeY.js b/lecture-08/assets/md-BEVP4TeY.js new file mode 100644 index 0000000000000000000000000000000000000000..cf02c60b77cd12a6680b695ec53613286cf37f25 --- /dev/null +++ b/lecture-08/assets/md-BEVP4TeY.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_71`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),70))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Going deeper: why Q-learning is called off-policy`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The robot has just moved right from START to (3,3). The orange ring is the value being updated.`),r(`li`,null,`The target uses the best guess in (3,3), the purple ring. It does so even if the robot’s next move is a random one.`),r(`li`,null,[n(`So the robot `),r(`strong`,null,`acts`),n(` with ε-greedy but `),r(`strong`,null,`learns`),n(` the values of the best policy.`)]),r(`li`,null,[n(`Learning about one policy while following another is called `),r(`strong`,null,`off-policy`),n(`.`)]),r(`li`,null,[n(`SARSA (state, action, reward, state, action) uses the action it really takes next instead of the max. It learns the values of the policy it follows: `),r(`strong`,null,`on-policy`),n(`.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BIV2xOUh.js b/lecture-08/assets/md-BIV2xOUh.js new file mode 100644 index 0000000000000000000000000000000000000000..73ace5f5e4e2b5a4db3d64c91509293675eee0fe --- /dev/null +++ b/lecture-08/assets/md-BIV2xOUh.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_60`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),59))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The target: Bellman, with a real move`,-1),r(`div`,{class:`dl-describe`},[r(`ol`,null,[r(`li`,null,[n(`The robot is in (3,3). Its guess `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`3`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\text{up})`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`((`),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`)])])]),n(` is 0 (orange ring).`)]),r(`li`,null,[n(`It moves up, lands in (2,3), and gets reward `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`r = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(`.`)]),r(`li`,null,`In (2,3) its best guess is 2.5, for up (purple ring).`),r(`li`,null,[n(`The `),r(`strong`,null,`target`),n(` is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`msub`,null,[r(`mrow`,null,[r(`mi`,null,`max`),r(`mo`,null,`⁡`)]),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`2.5`),r(`mo`,null,`=`),r(`mn`,null,`2.25`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max_{a'} Q(s', a') = 0 + 0.9 \\times 2.5 = 2.25`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mop`},[r(`span`,{class:`mop`},`max`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.328em`}},[r(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.6828em`}},[r(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[r(`span`,{class:`pstrut`,style:{height:`2.5em`}}),r(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.25`)])])]),n(`.`)])]),r(`p`,null,`The target is the Bellman look-ahead. The difference: Bellman looked up where a move lands in the map. Q-learning uses the move the robot really made, and its own current guesses for the next cell.`),r(`p`,null,`Orange always marks the value being updated; purple marks the best next value.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BIjZR-bS2.js b/lecture-08/assets/md-BIjZR-bS2.js new file mode 100644 index 0000000000000000000000000000000000000000..1b7d69b5e3d87ff226a70ff7cb8bbf2106bb339e --- /dev/null +++ b/lecture-08/assets/md-BIjZR-bS2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_76`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),75))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: A network instead of a table`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Top.`),n(` A Q-table takes a state and an action and returns one Q-value.`)]),r(`li`,null,[r(`strong`,null,`Bottom.`),n(` A network takes only the state and returns a Q-value for every action at once.`)]),r(`li`,null,[n(`For the robot, the state (3,3) is a `),r(`strong`,null,`one-hot`),n(` vector of 9 numbers: a 1 at the robot’s cell, 0 elsewhere.`)]),r(`li`,null,[n(`It goes through Linear 9 → 32, ReLU, Linear 32 → 4. The weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(` are learned.`)]),r(`li`,null,[n(`The four outputs are `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`3`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,{separator:`true`},`,`),r(`mo`,null,`⋅`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\cdot)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`((`),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`⋅`),r(`span`,{class:`mclose`},`)`)])])]),n(`, here 1.2, 0.3, 0.6 and 0.4.`)])]),r(`p`,null,`To act, take the largest output (or explore). To learn, train the weights.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BTt_dRtv2.js b/lecture-08/assets/md-BTt_dRtv2.js new file mode 100644 index 0000000000000000000000000000000000000000..7b068b1205359de61ba226e16b96c8886139d839 --- /dev/null +++ b/lecture-08/assets/md-BTt_dRtv2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_8`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),7))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The agent–environment loop`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The picture shows the two parties in every RL problem and the signals between them.`),r(`ol`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`agent`),n(` (the robot, left box) looks at the current `),r(`strong`,null,`state`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mi`,null,`t`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_t`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` and picks an `),r(`strong`,null,`action`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mi`,null,`t`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_t`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` (orange arrow).`)]),r(`li`,null,[n(`The `),r(`strong`,null,`environment`),n(` (right ellipse) answers with a `),r(`strong`,null,`reward`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`R`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])])]),r(`annotation`,{encoding:`application/x-tex`},`R_{t+1}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])])])])]),n(`, a single number (green arrow).`)]),r(`li`,null,[n(`It also gives the `),r(`strong`,null,`next state`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])])]),r(`annotation`,{encoding:`application/x-tex`},`S_{t+1}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])])])])]),n(`, and the loop repeats.`)])]),r(`p`,null,[n(`One run from a start state to an end is called an `),r(`strong`,null,`episode`),n(`. The agent’s goal is the largest `),r(`strong`,null,`total`),n(` reward over the episode, not the largest next reward.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BX1wWMGz.js b/lecture-08/assets/md-BX1wWMGz.js new file mode 100644 index 0000000000000000000000000000000000000000..9942d226d60525e4b8adacaffd3c8a0b68c337e5 --- /dev/null +++ b/lecture-08/assets/md-BX1wWMGz.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_47`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),46))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Value iteration: sweep until nothing changes`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,[r(`strong`,null,`Value iteration`),n(` turns the Bellman equation into an algorithm.`)]),r(`ol`,null,[r(`li`,null,`Start with every value at 0.`),r(`li`,null,[n(`In one `),r(`strong`,null,`sweep`),n(`, give every cell the value of its best move, using the values from the sweep before.`)]),r(`li`,null,`Repeat until nothing changes.`)]),r(`p`,null,`On the floor: sweep 1 gives 5 to the two cells next to the charger. Sweep 2 gives 4.5 one ring further out. Sweep 3 gives 4.05 to START and (2,1). Sweep 4 gives 3.645 to (3,1). After that nothing changes.`),r(`p`,null,`The value spreads out from the reward one ring per sweep. The arrows at the end are the best policy.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BY5B4RFF2.js b/lecture-08/assets/md-BY5B4RFF2.js new file mode 100644 index 0000000000000000000000000000000000000000..87cb213645ef12abf07b94115669dc7502772c80 --- /dev/null +++ b/lecture-08/assets/md-BY5B4RFF2.js @@ -0,0 +1,19 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";import{t as y}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var b={class:`flex justify-center mt-1`},x={viewBox:`0 0 600 130`,class:`dl-diagram`,role:`img`,"aria-label":`Working backwards along the short way: G2 = 5, G1 = 4.5, G0 = 4.05`},S=[`x`],C=[`x`],w={class:`dl-callout`},T={__name:`slides.md__slidev_33`,setup(T){let{$slidev:E,$nav:D,$clicksContext:O,$clicks:k,$page:A,$renderContext:j,$frontmatter:M}=g();return O.setup(),(g,T)=>{let E=y,D=i(`click`);return e(),p(v,m(r(h(_)(h(M),32))),{default:u(()=>[T[9]||=s(`h1`,null,`The return, one step at a time`,-1),T[10]||=s(`p`,null,[o(`The return at step `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`t`)]),s(`annotation`,{encoding:`application/x-tex`},`t`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),s(`span`,{class:`mord mathnormal`},`t`)])])]),o(` = the next reward + `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`γ`)]),s(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),o(` × the return from step `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`1`)]),s(`annotation`,{encoding:`application/x-tex`},`t + 1`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6984em`,"vertical-align":`-0.0833em`}}),s(`span`,{class:`mord mathnormal`},`t`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`1`)])])]),o(`.`)],-1),t(E,{ranges:[]},{default:u(()=>[...T[0]||=[s(`p`,null,[s(`span`,{class:`katex-display`},[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`G`),s(`mi`,null,`t`)]),s(`mo`,null,`=`),s(`munder`,null,[s(`munder`,null,[s(`msub`,null,[s(`mi`,null,`R`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`1`)])]),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`next\xA0reward`)]),s(`mo`,null,`+`),s(`mi`,null,`γ`),s(`munder`,null,[s(`munder`,null,[s(`msub`,null,[s(`mi`,null,`G`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`1`)])]),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`return\xA0from\xA0the\xA0next\xA0step`)])]),s(`annotation`,{encoding:`application/x-tex`},`G_t = \\underbrace{R_{t+1}}_{\\text{next reward}} + \\gamma \\underbrace{G_{t+1}}_{\\text{return from the next step}} `)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`G`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2806em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`2.2258em`,"vertical-align":`-1.5424em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.6833em`}},[s(`span`,{style:{top:`-1.4576em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`next\xA0reward`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.6833em`}},[s(`span`,{class:`svg-align`,style:{top:`-2.1437em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3011em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`1`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8563em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.5424em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`2.3619em`,"vertical-align":`-1.6785em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.6833em`}},[s(`span`,{style:{top:`-1.4576em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`return\xA0from\xA0the\xA0next\xA0step`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.6833em`}},[s(`span`,{class:`svg-align`,style:{top:`-2.1437em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`G`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3011em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`1`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8563em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.6785em`}},[s(`span`)])])])])])])])])],-1)]]),_:1}),s(`div`,b,[(e(),c(`svg`,x,[T[4]||=s(`defs`,null,[s(`marker`,{id:`l8-back-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[s(`path`,{class:`dl-dg-head is-k`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),(e(),c(d,null,a([[`START`,`G₀`],[`(3,3)`,`G₁`],[`(2,3)`,`G₂`],[`charger`,``]],(e,t)=>s(`g`,{key:t},[s(`rect`,{class:l([`dl-dg-box`,t===3?`is-accent`:``]),x:20+t*150,y:`14`,width:`100`,height:`36`,rx:`6`},null,10,S),s(`text`,{class:`dl-dg-lab is-sm`,x:70+t*150,y:`37`,"text-anchor":`middle`},n(e[0]),9,C)])),64)),T[5]||=s(`text`,{class:`dl-dg-small`,x:`135`,y:`30`,"text-anchor":`middle`},`R = 0`,-1),T[6]||=s(`text`,{class:`dl-dg-small`,x:`285`,y:`30`,"text-anchor":`middle`},`R = 0`,-1),T[7]||=s(`text`,{class:`dl-dg-small is-good`,x:`435`,y:`30`,"text-anchor":`middle`},`R = +5`,-1),f((e(),c(`g`,null,[...T[1]||=[s(`text`,{class:`dl-dg-lab is-sm`,x:`370`,y:`80`,"text-anchor":`middle`},`G₂ = 5 + 0.9 × 0 = 5`,-1)]])),[[D,1]]),f((e(),c(`g`,null,[...T[2]||=[s(`path`,{class:`dl-dg-arrow is-k`,"marker-end":`url(#l8-back-h)`,d:`M330 92 H250`},null,-1),s(`text`,{class:`dl-dg-lab is-sm`,x:`220`,y:`112`,"text-anchor":`middle`},`G₁ = 0 + 0.9 × 5 = 4.5`,-1)]])),[[D,2]]),f((e(),c(`g`,null,[...T[3]||=[s(`path`,{class:`dl-dg-arrow is-k`,"marker-end":`url(#l8-back-h)`,d:`M180 92 H100`},null,-1),s(`text`,{class:`dl-dg-lab is-sm`,x:`70`,y:`80`,"text-anchor":`middle`},`G₀ = 0 + 0.9 × 4.5`,-1),s(`text`,{class:`dl-dg-lab is-sm`,x:`70`,y:`126`,"text-anchor":`middle`},`= 4.05`,-1)]])),[[D,3]])]))]),f((e(),c(`div`,w,[...T[8]||=[s(`p`,null,[o(`Same 4.05 as before, computed `),s(`strong`,null,`backwards`),o(`, one step at a time. This one-step idea is the base of everything that follows.`)],-1)]])),[[D,4]])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-B_GRqzbq.js b/lecture-08/assets/md-B_GRqzbq.js new file mode 100644 index 0000000000000000000000000000000000000000..0f845c656a9d3f6b14b331b9447e12444f0e16f4 --- /dev/null +++ b/lecture-08/assets/md-B_GRqzbq.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";var _={class:`grid grid-cols-[1fr_1.25fr] gap-8 items-center`},v={class:`flex justify-center`},y={class:`mt-2 dl-callout`},b={__name:`slides.md__slidev_59`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=g,C=r(`click`);return e(),l(h,u(n(d(p)(d(D),58))),{default:s(()=>[b[2]||=a(`h1`,null,`The target: Bellman, with a real move`,-1),a(`div`,_,[a(`div`,v,[t(x,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2.5,0,0,0],[0,0,0,0],[-5,0,0,0],[0,0,0,0]],marks:[{s:8,a:0,tone:`current`},...d(w)>=2?[{s:5,a:0,tone:`target`}]:[]],robot:d(w)>=1?5:8,cell:92},null,8,[`marks`,`robot`])]),a(`div`,null,[t(S,null,{default:s(()=>[...b[0]||=[a(`ul`,null,[a(`li`,null,[i(`In (3,3) the robot tries `),a(`span`,{style:{color:`var(--dl-k)`}},[a(`strong`,null,`up`)]),i(`. It lands in (2,3), reward `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`=`),a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`r = 0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])])]),a(`li`,null,[i(`In (2,3), its best guess is `),a(`span`,{style:{color:`var(--dl-q)`}},[a(`strong`,null,`2.5`)]),i(` (up)`)]),a(`li`,null,[a(`strong`,null,`Target`),i(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mi`,null,`r`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`= r + \\gamma \\max_{a'} Q(s', a')`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.328em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])]),i(`, here `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`2.5`),a(`mo`,null,`=`),a(`mn`,null,`2.25`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 2.5 = 2.25`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.25`)])])])])],-1)]]),_:1}),c((e(),o(`div`,y,[...b[1]||=[a(`p`,null,[i(`Bellman looked up `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`)]),a(`annotation`,{encoding:`application/x-tex`},`r`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),i(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),i(` in the map. Q-learning `),a(`strong`,null,`uses the move it just made`),i(` instead.`)],-1)]])),[[C]])])])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BaRMbteD.css b/lecture-08/assets/md-BaRMbteD.css new file mode 100644 index 0000000000000000000000000000000000000000..75cee695e234318e20729167da90af967f864843 --- /dev/null +++ b/lecture-08/assets/md-BaRMbteD.css @@ -0,0 +1 @@ +.dl-eps[data-v-807ba612]{width:100%;max-width:30rem;height:auto}.dl-eps__bar[data-v-807ba612]{fill:var(--dl-muted)}.dl-eps__bar.is-best[data-v-807ba612]{fill:var(--dl-accent)}.dl-eps__axis[data-v-807ba612]{stroke:var(--dl-body);stroke-width:1.4px}.dl-eps__q[data-v-807ba612]{fill:var(--dl-muted);font-variant-numeric:tabular-nums;font-size:11px}.dl-eps__p[data-v-807ba612]{fill:var(--dl-heading);font-variant-numeric:tabular-nums;font-size:12px;font-weight:700}.dl-eps__a[data-v-807ba612]{fill:var(--dl-heading);font-size:13px;font-weight:600}.dl-eps__cap[data-v-807ba612]{fill:var(--dl-muted);font-size:11px}.dl-eps__draw[data-v-807ba612]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1px}.dl-eps__draw.is-explore[data-v-807ba612]{fill:color-mix(in srgb, var(--dl-k) 22%, var(--dl-bg));stroke:var(--dl-k)}.dl-eps__arrow[data-v-807ba612]{fill:var(--dl-heading);font-size:11px;font-weight:700}b[data-v-807ba612]{color:var(--dl-accent)} diff --git a/lecture-08/assets/md-BhP8iVpu2.js b/lecture-08/assets/md-BhP8iVpu2.js new file mode 100644 index 0000000000000000000000000000000000000000..47d3d5d56f80daf6a1e5e09185367ab8e7e8134b --- /dev/null +++ b/lecture-08/assets/md-BhP8iVpu2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./RlGlyph-i3WvlmEb.js";var g={class:`grid grid-cols-[1.5fr_1fr] gap-6 items-start`},_={class:`mt-2 dl-callout dl-tight`},v={__name:`slides.md__slidev_86`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=h,b=r(`click`);return e(),l(m,u(n(d(p)(d(T),85))),{default:s(()=>[v[2]||=a(`h1`,null,`Reading the equation: the DQN loss`,-1),a(`div`,g,[v[1]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`L`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`L(\\mathbf{w})`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`L`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`loss`),a(`td`,null,`batch MSE`),a(`td`,null,`2.96`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`N`)]),a(`annotation`,{encoding:`application/x-tex`},`N`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.109em`}},`N`)])])])]),a(`td`,null,`batch size`),a(`td`,null,`set by hand`),a(`td`,null,`2 (often 32)`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`i`)]),a(`annotation`,{encoding:`application/x-tex`},`i`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6595em`}}),a(`span`,{class:`mord mathnormal`},`i`)])])])]),a(`td`,null,`index`),a(`td`,null,[i(`1 to `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`N`)]),a(`annotation`,{encoding:`application/x-tex`},`N`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.109em`}},`N`)])])])]),a(`td`,null,`1, 2`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`s`),a(`mi`,null,`i`)]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`a`),a(`mi`,null,`i`)]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`r`),a(`mi`,null,`i`)]),a(`mo`,{separator:`true`},`,`),a(`msubsup`,null,[a(`mi`,null,`s`),a(`mi`,null,`i`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s_i, a_i, r_i, s'_i`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0106em`,"vertical-align":`-0.2587em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0278em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-2.4413em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2587em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`stored move`),a(`td`,null,`from the buffer`),a(`td`,null,`(3,3), up, 0, (2,3)`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msub`,null,[a(`mi`,null,`s`),a(`mi`,null,`i`)]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`a`),a(`mi`,null,`i`)]),a(`mo`,{separator:`true`},`;`),a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s_i, a_i; \\mathbf{w})`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3117em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`;`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`prediction`),a(`td`,null,`output for the action taken`),a(`td`,null,`1.2`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`bold`},`w`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])])]),a(`td`,null,`Q-network weights`),a(`td`,null,`learned`),a(`td`,null,`—`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`−`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}^-`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7713em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])])]),a(`td`,null,`target weights`),a(`td`,null,`frozen copy`),a(`td`,null,`—`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msubsup`,null,[a(`mi`,null,`s`),a(`mi`,null,`i`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`;`),a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`−`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\max_{a'} Q(s'_i, a'; \\mathbf{w}^-)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.03em`,"vertical-align":`-0.2587em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.328em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-2.4413em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`i`)])]),a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2587em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`;`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7713em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`−`)])])])])])])]),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`best next value`),a(`td`,null,`0 if the episode ended`),a(`td`,null,`4.0`)])])])],-1),a(`div`,null,[t(y,{kind:`dqn`,size:100}),c((e(),o(`div`,_,[...v[0]||=[a(`p`,null,[i(`Same as the Q-learning target, with a network for the table and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,{mathvariant:`bold`},`w`),a(`mo`,null,`−`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}^-`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7713em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])]),i(` for the next state.`)],-1)]])),[[b]])])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BisM1Pr82.js b/lecture-08/assets/md-BisM1Pr82.js new file mode 100644 index 0000000000000000000000000000000000000000..4c11471edbcad33448c2d7609cb379d3d70aea20 --- /dev/null +++ b/lecture-08/assets/md-BisM1Pr82.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_80`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),79))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Two problems when a network learns from its own moves`,-1),r(`div`,{class:`dl-describe`},[r(`ol`,null,[r(`li`,null,[r(`strong`,null,`Left: consecutive moves are too similar.`),n(` Five moves in a row show almost the same state. Training on them in order is like training on one example five times. The network then forgets other states.`)]),r(`li`,null,[r(`strong`,null,`Right: the target moves.`),n(` The prediction (orange) is pulled toward the target (purple). The target is computed with the same weights. So every update that moves the prediction also moves the target (dashed circle). Training can swing back and forth or blow up.`)])]),r(`p`,null,[n(`DQN fixes the first problem with `),r(`strong`,null,`experience replay`),n(` and the second with a `),r(`strong`,null,`target network`),n(`.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BjLiGZe7.js b/lecture-08/assets/md-BjLiGZe7.js new file mode 100644 index 0000000000000000000000000000000000000000..4d29508b601d1d6150a2253d36c3fcbbf5c136ea --- /dev/null +++ b/lecture-08/assets/md-BjLiGZe7.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";var _={class:`grid grid-cols-[1fr_1.15fr] gap-8 items-center mt-2`},v={class:`flex justify-center`},y={class:`dl-tight`},b={class:`mt-3 dl-callout`},x={__name:`slides.md__slidev_11`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=g,w=r(`click`);return e(),l(h,u(n(d(p)(d(O),10))),{default:s(()=>[x[2]||=a(`h1`,null,`The robot and its charger`,-1),a(`div`,_,[a(`div`,v,[t(S,{cell:88,coords:``})]),a(`div`,y,[t(C,null,{default:s(()=>[...x[0]||=[a(`ul`,null,[a(`li`,null,[a(`strong`,null,`9 states`),i(`: the cells, named (row, column)`)]),a(`li`,null,[a(`strong`,null,`4 actions`),i(`: up, down, left, right`)]),a(`li`,null,[a(`strong`,null,`Rewards`),i(`: charger `),a(`strong`,null,`+5`),i(`, hole `),a(`strong`,null,`−10`),i(`, every other move `),a(`strong`,null,`0`)]),a(`li`,null,[i(`A move into a wall: the robot `),a(`strong`,null,`stays put`)]),a(`li`,null,[i(`Charger or hole: the `),a(`strong`,null,`episode ends`)])],-1)]]),_:1}),c((e(),o(`div`,b,[...x[1]||=[a(`p`,null,[i(`The robot does `),a(`strong`,null,`not`),i(` know this map. It only sees its cell and the reward after each move.`)],-1)]])),[[w]])])])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Bnu9_G7n.js b/lecture-08/assets/md-Bnu9_G7n.js new file mode 100644 index 0000000000000000000000000000000000000000..563fbb8fc6dab19550bb58294867a1cfe4dbb7d9 --- /dev/null +++ b/lecture-08/assets/md-Bnu9_G7n.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_54`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),53))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Start with a table of guesses`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The floor shows a `),r(`strong`,null,`Q-table`),n(`: four numbers in every cell, one per action. Each number is a guess of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(`. At the start, all of them are 0.`)]),r(`li`,null,[n(`The loop on the right is how the guesses improve: `),r(`ol`,null,[r(`li`,null,`Start with every guess at 0.`),r(`li`,null,`In the current cell, pick a move.`),r(`li`,null,[n(`See the reward `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`)]),r(`annotation`,{encoding:`application/x-tex`},`r`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),n(` and the next cell `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),r(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),n(`.`)]),r(`li`,null,[n(`Use them to improve the one guess `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` for the move just made.`)])])]),r(`li`,null,`Repeat over many moves and many episodes.`)]),r(`p`,null,`The table has 9 × 4 = 36 numbers. Learning fills them in.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BoUgDoJP.js b/lecture-08/assets/md-BoUgDoJP.js new file mode 100644 index 0000000000000000000000000000000000000000..058b250f2205b1189921f915cf6b970e6bf6bdfa --- /dev/null +++ b/lecture-08/assets/md-BoUgDoJP.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_12`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),11))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The robot and its charger`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`This floor is the example used for the whole lecture.`),r(`ul`,null,[r(`li`,null,`The floor has 3 × 3 cells, named (row, column) from the top left.`),r(`li`,null,`The robot starts at (3,2), bottom middle. It can move up, down, left or right.`),r(`li`,null,[n(`The `),r(`strong`,null,`charger`),n(` (green, top right) gives a reward of `),r(`strong`,null,`+5`),n(`. The `),r(`strong`,null,`hole`),n(` (red, middle) gives `),r(`strong`,null,`−10`),n(`. Every other move gives `),r(`strong`,null,`0`),n(`.`)]),r(`li`,null,`Moving into a wall leaves the robot where it is.`),r(`li`,null,`Reaching the charger or the hole ends the episode.`),r(`li`,null,`The robot does not know any of this. It only sees which cell it is in and the reward after each move.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Bp475Uqt.js b/lecture-08/assets/md-Bp475Uqt.js new file mode 100644 index 0000000000000000000000000000000000000000..6d10a3e91521c53ed7c4b06bdf65dace0f4eb78a --- /dev/null +++ b/lecture-08/assets/md-Bp475Uqt.js @@ -0,0 +1,15 @@ +import{B as e,C as t,D as n,N as r,S as i,_ as a,b as o,et as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-DB-9afGB.js";import{t as p}from"./default-DMdSOhJT.js";import{t as m}from"./slidev/CodeBlockWrapper-CIZDS6En.js";var h={class:`grid grid-cols-[1.9fr_1fr] gap-4 items-start`},g={class:`flex flex-col items-center gap-2 mt-4`},_={viewBox:`0 0 180 150`,class:`dl-diagram`,style:{"max-width":`11.2rem`},role:`img`,"aria-label":`CartPole: a cart on a track with a pole balanced on top; push left or right`},v={__name:`slides.md__slidev_96`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=d();return x.setup(),(d,v)=>{let y=m;return e(),c(p,l(n(u(f)(u(T),95))),{default:s(()=>[v[3]||=a(`h1`,null,`Going deeper: the whole loop, on CartPole`,-1),a(`div`,h,[a(`div`,null,[t(y,r({lines:!0},{title:``,ranges:[`all`,`1-3`,`6-8`,`9-13`,`14`,`all`]}),{default:s(()=>[...v[0]||=[a(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[a(`code`,{class:`language-python`},[a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` gymnasium `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`as`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` gym`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`env `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` gym`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`make`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#C98A7D`,"--shiki-light":`#B56959`}},`CartPole-v1`),a(`span`,{style:{"--shiki-dark":`#C98A7D77`,"--shiki-light":`#B5695977`}},`"`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # state: 4 numbers, 2 actions`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},`# build qnet, target, opt as before, with QNet(4, 2)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`step `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`for`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` episode `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`in`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` range`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`300`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` _ `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` env`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`reset`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},`seed`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`episode`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`tensor`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` False`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` while`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` not`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eps `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` max`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`0.05`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 1`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` -`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` step `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`/`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 5000`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # explore less over time`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` act`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eps`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},` n_actions`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`2`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` terminated`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` truncated`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` _ `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` env`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`a`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`tensor`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` terminated `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`or`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` truncated`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` store`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` terminated`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # time-out is not an end`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` if`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` len`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`buffer`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` >=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 1000`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` train_step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # wait for some moves`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` step `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` step `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`+`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 1`)])])],-1)]]),_:1},16)]),a(`div`,g,[(e(),o(`svg`,_,[...v[1]||=[a(`line`,{class:`dl-dg-line`,x1:`10`,y1:`120`,x2:`170`,y2:`120`},null,-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`64`,y:`98`,width:`52`,height:`20`,rx:`3`},null,-1),a(`line`,{x1:`90`,y1:`98`,x2:`110`,y2:`30`,style:{stroke:`var(--dl-k)`,"stroke-width":`5`,"stroke-linecap":`round`}},null,-1),a(`text`,{class:`dl-dg-small`,x:`30`,y:`112`,"text-anchor":`middle`},`← push`,-1),a(`text`,{class:`dl-dg-small`,x:`150`,y:`112`,"text-anchor":`middle`},`push →`,-1),a(`text`,{class:`dl-dg-small`,x:`90`,y:`142`,"text-anchor":`middle`},`+1 per step upright`,-1)]])),v[2]||=a(`div`,{class:`dl-secondary text-center`},`state: cart position and speed, pole angle and speed`,-1)])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BsteAPDC.js b/lecture-08/assets/md-BsteAPDC.js new file mode 100644 index 0000000000000000000000000000000000000000..9c41e0f40165328a7ed4cb67f8dcfbb5dcf85720 --- /dev/null +++ b/lecture-08/assets/md-BsteAPDC.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./GridWorld-D5i5gg4u.js";import{t as y}from"./default-DMdSOhJT.js";var b={class:`grid grid-cols-[1fr_1.15fr] gap-6 items-center`},x={class:`flex justify-center`},S={viewBox:`0 0 330 230`,class:`dl-diagram`,role:`img`,"aria-label":`The learning loop: guess, act, see the reward, improve the guess`},C=[`x`,`y`],w=[`x`,`y`],T={class:`mt-1 dl-callout`},E={__name:`slides.md__slidev_53`,setup(E){let{$slidev:D,$nav:O,$clicksContext:k,$clicks:A,$page:j,$renderContext:M,$frontmatter:N}=g();return k.setup(),(g,E)=>{let D=v,O=i(`click`);return e(),p(y,m(r(h(_)(h(N),52))),{default:u(()=>[E[3]||=s(`h1`,null,`Start with a table of guesses`,-1),s(`div`,b,[s(`div`,x,[t(D,{q:Array.from({length:9},()=>[0,0,0,0]),cell:92},null,8,[`q`])]),s(`div`,null,[(e(),c(`svg`,S,[E[1]||=s(`defs`,null,[s(`marker`,{id:`l8-tab-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[s(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),(e(),c(d,null,a([[`1`,`start: every Q = 0`,110,20],[`2`,`pick a move`,240,100],[`3`,`see r and s′`,110,190],[`4`,`improve one Q`,-10,100]],(t,r)=>s(`g`,{key:r},[f((e(),c(`g`,null,[s(`rect`,{class:l([`dl-dg-box`,r===3?`is-accent`:``]),x:t[2]+10,y:t[3],width:`128`,height:`34`,rx:`6`},null,10,C),s(`text`,{class:`dl-dg-small`,x:t[2]+74,y:t[3]+21,"text-anchor":`middle`},n(t[0])+` · `+n(t[1]),9,w)])),[[O,r+1]])])),64)),f((e(),c(`g`,null,[...E[0]||=[s(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tab-h)`,d:`M250 46 C285 60, 300 80, 305 98`},null,-1),s(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tab-h)`,d:`M300 136 C290 170, 270 190, 252 200`},null,-1),s(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tab-h)`,d:`M116 206 C70 200, 60 170, 60 138`},null,-1),s(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tab-h)`,d:`M60 98 C70 60, 90 44, 116 40`},null,-1)]])),[[O,5]])]))])]),f((e(),c(`div`,T,[...E[2]||=[s(`p`,null,[o(`A `),s(`strong`,null,`Q-table`),o(`: 9 cells × 4 actions = 36 numbers, all 0 at the start. Learning fills them in.`)],-1)]])),[[O,6]])]),_:1},16)}}};export{E as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Btp4CswY2.js b/lecture-08/assets/md-Btp4CswY2.js new file mode 100644 index 0000000000000000000000000000000000000000..cf9c4687730e841092752cb081f19350fdc3939b --- /dev/null +++ b/lecture-08/assets/md-Btp4CswY2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,S as r,_ as i,et as a,v as o,xt as s,yt as c}from"./modules/shiki-CJZsCeMT.js";import{n as l,t as u}from"./slidev/context-DB-9afGB.js";import{t as d}from"./interactive-LBJsATV-.js";import{t as f}from"./DqnFlow-DlxgPWo3.js";var p={__name:`slides.md__slidev_88`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=l();return g.setup(),(l,p)=>{let m=f;return e(),o(d,s(n(c(u)(c(b),87))),{aside:a(e=>[...p[0]||=[i(`p`,null,`Each click lights one stage.`,-1),i(`div`,{class:`dl-ledger dl-tight`},[i(`table`,null,[i(`thead`,null,[i(`tr`,null,[i(`th`,null,`click`),i(`th`,null,`stage`)])]),i(`tbody`,null,[i(`tr`,null,[i(`td`,null,`1–2`),i(`td`,null,`act, store`)]),i(`tr`,null,[i(`td`,null,`3`),i(`td`,null,`sample`)]),i(`tr`,null,[i(`td`,null,`4–6`),i(`td`,null,`predict, target, loss`)]),i(`tr`,null,[i(`td`,null,`7`),i(`td`,null,[r(`update `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,{mathvariant:`bold`},`w`)]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])])])]),i(`tr`,null,[i(`td`,null,`8`),i(`td`,null,[r(`copy to `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msup`,null,[i(`mi`,{mathvariant:`bold`},`w`),i(`mo`,null,`−`)])]),i(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}^-`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.7713em`}},[i(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])])])])])])],-1),i(`p`,null,[r(`Acting and learning run `),i(`strong`,null,`side by side`),r(`.`)],-1)]]),default:a(()=>[t(m,{step:c(_)},null,8,[`step`])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Bu3XUXeA.js b/lecture-08/assets/md-Bu3XUXeA.js new file mode 100644 index 0000000000000000000000000000000000000000..2635444c1895b78809bbfbc6a582109075f2cfd7 --- /dev/null +++ b/lecture-08/assets/md-Bu3XUXeA.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_20`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),19))),{default:i(()=>[...d[0]||=[r(`h1`,null,[n(`In words: The rule of the world: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`p`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`r`),r(`mo`,null,`∣`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`p`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`∣`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])])],-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`p`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`r`),r(`mo`,null,`∣`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`p`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`∣`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` is the probability of next state `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),r(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),n(` and reward `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`)]),r(`annotation`,{encoding:`application/x-tex`},`r`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),n(`, `),r(`strong`,null,`given`),n(` state `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`s`)]),r(`annotation`,{encoding:`application/x-tex`},`s`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`s`)])])]),n(` and action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`a`)]),r(`annotation`,{encoding:`application/x-tex`},`a`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`a`)])])]),n(`. It is the rule of the world.`)]),r(`li`,null,`On the slippery floor, "up" from (2,3) has three outcomes. It reaches the charger (+5) with probability 0.8. It slips into the hole (−10) with 0.1, or stays in (2,3) with reward 0 and probability 0.1.`),r(`li`,null,[n(`For one `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`s`)]),r(`annotation`,{encoding:`application/x-tex`},`s`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`s`)])])]),n(` and `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`a`)]),r(`annotation`,{encoding:`application/x-tex`},`a`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`a`)])])]),n(`, the probabilities add up to 1.`)]),r(`li`,null,[n(`Adding over the rewards gives `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`p`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,null,`∣`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`p(s' \\mid s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`p`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`∣`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(`, the chance of each next state.`)]),r(`li`,null,`On the normal floor each move has one outcome, with probability 1.`)]),r(`p`,null,`The robot never sees this rule. It only sees what actually happens.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-BuPoDN-Y2.js b/lecture-08/assets/md-BuPoDN-Y2.js new file mode 100644 index 0000000000000000000000000000000000000000..1120a587c02261f2e9def2bc26deabb7b3cd4224 --- /dev/null +++ b/lecture-08/assets/md-BuPoDN-Y2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";import{t as _}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var v={class:`grid grid-cols-[1fr_1.4fr] gap-6 items-center`},y={class:`flex justify-center`},b={class:`dl-tight`},x={class:`mt-2 dl-callout`},S={__name:`slides.md__slidev_36`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=f();return T.setup(),(f,S)=>{let C=m,w=_,T=g,E=r(`click`);return e(),l(h,u(n(d(p)(d(k),35))),{default:s(()=>[S[4]||=a(`h1`,null,`A policy: what to do in each cell`,-1),a(`div`,v,[a(`div`,y,[t(C,{arrows:[3,3,null,0,null,0,0,3,0],robot:null,cell:80})]),a(`div`,b,[S[3]||=a(`p`,null,[i(`A `),a(`strong`,null,`policy`),i(),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),i(` gives the action to take in each state.`)],-1),t(w,{ranges:[]},{default:s(()=>[...S[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`a`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mi`,null,`P`),a(`mo`,{stretchy:`false`},`(`),a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`a`),a(`mo`,null,`∣`),a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi(a \\mid s) = P(A_t = a \\mid S_t = s) `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1}),t(T,null,{default:s(()=>[...S[1]||=[a(`ul`,null,[a(`li`,null,[a(`strong`,null,`Deterministic`),i(`: one action per cell, like the arrows`)]),a(`li`,null,[a(`strong`,null,`Stochastic`),i(`: a probability per action, e.g. right 0.85, each other 0.05`)]),a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),i(` ("pi") is the policy, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`P`)]),a(`annotation`,{encoding:`application/x-tex`},`P`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`)])])]),i(` a probability. `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`a`)]),a(`annotation`,{encoding:`application/x-tex`},`a`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`a`)])])]),i(` and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])]),i(` are an action and a state; `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`A_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`S_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(` are those at step `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])])])],-1)]]),_:1}),c((e(),o(`div`,x,[...S[2]||=[a(`p`,null,[i(`Learning in RL = finding a `),a(`strong`,null,`good policy`),i(`.`)],-1)]])),[[E]])])])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Bx6ObLYd2.js b/lecture-08/assets/md-Bx6ObLYd2.js new file mode 100644 index 0000000000000000000000000000000000000000..29363978609af75e64421508588259996c9d3c70 --- /dev/null +++ b/lecture-08/assets/md-Bx6ObLYd2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_30`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),29))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Why discount? So the robot hurries`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The top bars are the weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mi`,null,`γ`),r(`mi`,null,`k`)])]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma^k`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0435em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8491em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])])])])])])])])]),n(`. With `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`),r(`mo`,null,`=`),r(`mn`,null,`0.9`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.9`)])])]),n(` they are 1, 0.9, 0.81, 0.73, …`)]),r(`li`,null,[n(`The bottom bars are the returns of three runs from START. `),r(`ul`,null,[r(`li`,null,[n(`Short way, 3 moves: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mn`,null,`0.9`),r(`mn`,null,`2`)]),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9^2 \\times 5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.`),r(`span`,{class:`mord`},[r(`span`,{class:`mord`},`9`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8141em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`.`)]),r(`li`,null,[n(`Long way, 5 moves: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mn`,null,`0.9`),r(`mn`,null,`4`)]),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`3.2805`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9^4 \\times 5 = 3.2805`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.`),r(`span`,{class:`mord`},[r(`span`,{class:`mord`},`9`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8141em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`4`)])])])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.2805`)])])]),n(`.`)]),r(`li`,null,[n(`Into the hole: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mo`,null,`−`),r(`mn`,null,`10`)]),r(`annotation`,{encoding:`application/x-tex`},`-10`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`)])])]),n(`.`)])])]),r(`li`,null,`Both ways reach the same +5, but the short way is worth more.`),r(`li`,null,[n(`With `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`),r(`mo`,null,`=`),r(`mn`,null,`1`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma = 1`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`1`)])])]),n(` the two ways tie at 5, so the robot has no reason to hurry.`)])]),r(`p`,null,`The discount makes a reward that comes sooner worth more.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Bz5Zd8AS.js b/lecture-08/assets/md-Bz5Zd8AS.js new file mode 100644 index 0000000000000000000000000000000000000000..2d15fe3667049a9c39f2b7d1e8b1c4d92d1d8eb1 --- /dev/null +++ b/lecture-08/assets/md-Bz5Zd8AS.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_15`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),14))),{default:i(()=>[p[0]||=r(`h1`,null,`The world as an MDP`,-1),r(`div`,f,[t(m,{kind:`mdp`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C0YOeXvT.js b/lecture-08/assets/md-C0YOeXvT.js new file mode 100644 index 0000000000000000000000000000000000000000..a60f5ddba17960867f1eac414dd1fa9c621b359b --- /dev/null +++ b/lecture-08/assets/md-C0YOeXvT.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_52`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),51))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Plan with a map, or learn from experience`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Left, model-based.`),n(` From state `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`s`)]),r(`annotation`,{encoding:`application/x-tex`},`s`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`s`)])])]),n(`, each action leads to known next states with known probabilities `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`p`)]),r(`annotation`,{encoding:`application/x-tex`},`p`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`},`p`)])])]),n(` and rewards `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`)]),r(`annotation`,{encoding:`application/x-tex`},`r`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),n(`. With that map, values can be worked out by hand, as value iteration does.`)]),r(`li`,null,[r(`strong`,null,`Right, model-free.`),n(` The same choices, but where each action lands and what it pays are hidden. The only way to find out is to try.`)]),r(`li`,null,[n(`A `),r(`strong`,null,`model-free`),n(` method learns values from the moves the agent actually makes. `),r(`strong`,null,`Q-learning`),n(` is the best-known model-free method.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C0kU9PLe2.js b/lecture-08/assets/md-C0kU9PLe2.js new file mode 100644 index 0000000000000000000000000000000000000000..45fe439df8522d6d1c111a7456e20a1779719585 --- /dev/null +++ b/lecture-08/assets/md-C0kU9PLe2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_37`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),36))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: A policy: what to do in each cell`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`A `),r(`strong`,null,`policy`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`π`)]),r(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),n(` says what the agent does in each state.`)]),r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`π`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`a`),r(`mo`,null,`∣`),r(`mi`,null,`s`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`\\pi(a \\mid s)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`∣`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mclose`},`)`)])])]),n(` is the probability of taking action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`a`)]),r(`annotation`,{encoding:`application/x-tex`},`a`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`a`)])])]),n(` in state `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`s`)]),r(`annotation`,{encoding:`application/x-tex`},`s`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`s`)])])]),n(`.`)]),r(`li`,null,[n(`The arrows on the floor are a `),r(`strong`,null,`deterministic`),n(` policy: one action per cell, with probability 1. From START it says right, then up, then up.`)]),r(`li`,null,[n(`A `),r(`strong`,null,`stochastic`),n(` policy gives each action a probability, for example right 0.85 and each other action 0.05.`)]),r(`li`,null,`In RL, learning means finding a good policy.`)]),r(`p`,null,`The arrows shown are the best policy for this floor.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C4XXUyXo2.js b/lecture-08/assets/md-C4XXUyXo2.js new file mode 100644 index 0000000000000000000000000000000000000000..606a1eda8f85661367cd00395e91249c1cf14007 --- /dev/null +++ b/lecture-08/assets/md-C4XXUyXo2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_28`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),27))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The return: add up what is still to come`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`return`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mi`,null,`t`)])]),r(`annotation`,{encoding:`application/x-tex`},`G_t`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` is the total reward collected from step `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`t`)]),r(`annotation`,{encoding:`application/x-tex`},`t`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),r(`span`,{class:`mord mathnormal`},`t`)])])]),n(` to the end.`)]),r(`li`,null,[n(`Each reward is multiplied by the `),r(`strong`,null,`discount factor`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(` once per step of distance. The weights are 1, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(`, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mi`,null,`γ`),r(`mn`,null,`2`)])]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma^2`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0085em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8141em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])])])])])])])])]),n(`, and so on.`)]),r(`li`,null,[n(`The boxes on the picture are the short way’s rewards: 0, 0 and +5. With `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`),r(`mo`,null,`=`),r(`mn`,null,`0.9`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.9`)])])]),n(` their weights are 1, 0.9 and 0.81.`)]),r(`li`,null,[n(`So `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mn`,null,`0`)]),r(`mo`,null,`=`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.81`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`G_0 = 0 + 0 + 0.81 \\times 5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.81`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`.`)]),r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(` is set by hand. After the episode ends, all rewards are 0.`)])]),r(`p`,null,`The return is the number the agent tries to make as large as possible.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C76Txys_.js b/lecture-08/assets/md-C76Txys_.js new file mode 100644 index 0000000000000000000000000000000000000000..542582d41a9581fa06af87839e48068330415d09 --- /dev/null +++ b/lecture-08/assets/md-C76Txys_.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_42`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),41))),{default:i(()=>[...d[0]||=[r(`h1`,null,[n(`In words: The value of a move: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])])],-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`action value`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`q`),r(`mi`,null,`π`)]),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`q_\\pi(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1514em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` is the return to expect after taking action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`a`)]),r(`annotation`,{encoding:`application/x-tex`},`a`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`a`)])])]),n(` in cell `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`s`)]),r(`annotation`,{encoding:`application/x-tex`},`s`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`},`s`)])])]),n(` and then following the policy.`)]),r(`li`,null,[n(`The four numbers in START are its four action values, one by each edge. `),r(`ul`,null,[r(`li`,null,[r(`strong`,null,`up`),n(`: into the hole, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mo`,null,`−`),r(`mn`,null,`10`)]),r(`annotation`,{encoding:`application/x-tex`},`-10`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`)])])]),n(`.`)]),r(`li`,null,[r(`strong`,null,`down`),n(`: into the wall, stays: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.05`),r(`mo`,null,`=`),r(`mn`,null,`3.645`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9 \\times 4.05 = 3.645`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.645`)])])]),n(`.`)]),r(`li`,null,[r(`strong`,null,`left`),n(`: to (3,1): `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`3.645`),r(`mo`,null,`=`),r(`mn`,null,`3.2805`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9 \\times 3.645 = 3.2805`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.645`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.2805`)])])]),n(`.`)]),r(`li`,null,[r(`strong`,null,`right`),n(`: to (3,3): `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9 \\times 4.5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`.`)])])]),r(`li`,null,[n(`The largest is right, ringed in purple. The best action is the one with the largest `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`q`)]),r(`annotation`,{encoding:`application/x-tex`},`q`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`)])])]),n(`, and the cell’s value is that largest `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`q`)]),r(`annotation`,{encoding:`application/x-tex`},`q`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`)])])]),n(`.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C9dA0XC0.js b/lecture-08/assets/md-C9dA0XC0.js new file mode 100644 index 0000000000000000000000000000000000000000..23daf404def50699a11115069b8b3ea16dd505c3 --- /dev/null +++ b/lecture-08/assets/md-C9dA0XC0.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_22`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),21))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Refresher: an expected value is a weighted average`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The bar shows the three outcomes of "up" from (2,3) on the slippery floor. Each part is as wide as its probability.`),r(`li`,null,[n(`The `),r(`strong`,null,`expected value`),n(` multiplies each outcome by its probability and adds the results.`)]),r(`li`,null,[n(`Here: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.8`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4`)]),r(`annotation`,{encoding:`application/x-tex`},`0.8 \\times 5 = 4`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.8`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4`)])])]),n(`, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.1`),r(`mo`,null,`×`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,null,`−`),r(`mn`,null,`10`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mo`,null,`−`),r(`mn`,null,`1`)]),r(`annotation`,{encoding:`application/x-tex`},`0.1 \\times (-10) = -1`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.1`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`1`)])])]),n(` and `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.1`),r(`mo`,null,`×`),r(`mn`,null,`0`),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`0.1 \\times 0 = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.1`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(`. The sum is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`4`),r(`mo`,null,`−`),r(`mn`,null,`1`),r(`mo`,null,`+`),r(`mn`,null,`0`),r(`mo`,null,`=`),r(`mn`,null,`3`)]),r(`annotation`,{encoding:`application/x-tex`},`4 - 1 + 0 = 3`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`4`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`−`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`1`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3`)])])]),n(`.`)]),r(`li`,null,`So the expected reward of "up" from (2,3) is 3. It is the average over many tries, not the result of any single try.`)]),r(`p`,null,`The value of a state, later in the lecture, is an expected value of this kind.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CAqxjDRd.js b/lecture-08/assets/md-CAqxjDRd.js new file mode 100644 index 0000000000000000000000000000000000000000..fb9d7e6a7474b5e22bc62ce081e5a510475aefa6 --- /dev/null +++ b/lecture-08/assets/md-CAqxjDRd.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";var _={class:`grid grid-cols-[1fr_1.3fr] gap-8 items-center mt-1`},v={class:`flex justify-center`},y={class:`mt-2 dl-callout`},b={__name:`slides.md__slidev_70`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=m,S=g,C=r(`click`);return e(),l(h,u(n(d(p)(d(D),69))),{default:s(()=>[b[2]||=a(`h1`,null,`Going deeper: why Q-learning is called off-policy`,-1),a(`div`,_,[a(`div`,v,[t(x,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[3.75,0,0,0],[0,0,0,0],[-5,0,0,.506],[1.125,0,0,0]],marks:[{s:7,a:3,tone:`current`},{s:8,a:0,tone:`target`}],robot:8,cell:90,precision:3})]),a(`div`,null,[t(S,null,{default:s(()=>[...b[0]||=[a(`ul`,null,[a(`li`,null,[a(`strong`,null,`Learn`),i(` with the best next action: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\max_{a'} Q(s', a')`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.328em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])]),i(` — `),a(`span`,{style:{color:`var(--dl-q)`}},[a(`strong`,null,`purple`)])]),a(`li`,null,[a(`strong`,null,`Act`),i(` with ε-greedy: the next move may be a random one`)]),a(`li`,null,[i(`The values learned are those of the `),a(`strong`,null,`best`),i(` policy, not of the ε-greedy one the robot follows`)])],-1)]]),_:1}),c((e(),o(`div`,y,[...b[1]||=[a(`p`,null,[i(`Learning about one policy while following another: `),a(`strong`,null,`off-policy`),i(`. SARSA (named after state, action, reward, state, action) uses the move it really takes next: `),a(`strong`,null,`on-policy`),i(`.`)],-1)]])),[[C]])])])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CB5a4GuA.js b/lecture-08/assets/md-CB5a4GuA.js new file mode 100644 index 0000000000000000000000000000000000000000..c8b351b27fa197e8a5c0fd0e30c58794f1feefd1 --- /dev/null +++ b/lecture-08/assets/md-CB5a4GuA.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,G as r,H as i,S as a,_ as o,b as s,et as c,m as l,tt as u,v as d,xt as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./default-DMdSOhJT.js";var _={class:`mt-1 flex justify-center`},v={viewBox:`0 0 680 230`,class:`dl-diagram`,role:`img`,"aria-label":`Model-based: from S1 both actions' rewards and next states are known. Model-free: the same tree with every outcome hidden`},y=[`d`],b=[`cx`],x=[`x`],S=[`d`],C=[`cx`],w=[`x`],T=[`x`],E=[`d`],D=[`cx`],O=[`x`],k={class:`mt-2 dl-callout`},A={__name:`slides.md__slidev_51`,setup(A){let{$slidev:j,$nav:M,$clicksContext:N,$clicks:P,$page:F,$renderContext:I,$frontmatter:L}=m();return N.setup(),(m,A)=>{let j=r(`click`);return e(),d(g,f(n(p(h)(p(L),50))),{default:c(()=>[A[12]||=o(`h1`,null,`Plan with a map, or learn from experience`,-1),o(`div`,_,[(e(),s(`svg`,v,[A[6]||=o(`defs`,null,[o(`marker`,{id:`l8-mf-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),A[7]||=o(`text`,{class:`dl-dg-lab is-sm`,x:`170`,y:`16`,"text-anchor":`middle`},`model-based (planning)`,-1),A[8]||=o(`circle`,{class:`dl-dg-op`,cx:`170`,cy:`46`,r:`18`},null,-1),A[9]||=o(`text`,{class:`dl-dg-small`,x:`170`,y:`50`,"text-anchor":`middle`},`s`,-1),(e(),s(l,null,i([[90,`a₁`],[250,`a₂`]],(n,r)=>o(`g`,{key:r},[o(`path`,{class:`dl-dg-line`,d:`M170 64 L${n[0]} 96`},null,8,y),o(`circle`,{class:`dl-dg-dot`,cx:n[0],cy:`100`,r:`6`},null,8,b),o(`text`,{class:`dl-dg-small`,x:n[0]+(r?10:-22),y:`96`},t(n[1]),9,x),(e(),s(l,null,i([-40,40],(e,t)=>o(`g`,{key:t},[o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-mf-h)`,d:`M${n[0]} 106 L${n[0]+e} 146`},null,8,S),o(`circle`,{class:`dl-dg-op`,cx:n[0]+e,cy:`164`,r:`16`},null,8,C),o(`text`,{class:`dl-dg-small`,x:n[0]+e,y:`168`,"text-anchor":`middle`},`s′`,8,w),o(`text`,{class:`dl-dg-small is-good`,x:n[0]+e,y:`198`,"text-anchor":`middle`},`p, r known`,8,T)])),64))])),64)),A[10]||=o(`line`,{class:`dl-dg-split`,x1:`340`,y1:`6`,x2:`340`,y2:`224`},null,-1),u((e(),s(`g`,null,[A[0]||=o(`text`,{class:`dl-dg-lab is-sm`,x:`510`,y:`16`,"text-anchor":`middle`},`model-free (learning)`,-1),A[1]||=o(`circle`,{class:`dl-dg-op`,cx:`510`,cy:`46`,r:`18`},null,-1),A[2]||=o(`text`,{class:`dl-dg-small`,x:`510`,y:`50`,"text-anchor":`middle`},`s`,-1),(e(),s(l,null,i([[430,`a₁`],[590,`a₂`]],(e,n)=>o(`g`,{key:n},[o(`path`,{class:`dl-dg-line`,d:`M510 64 L${e[0]} 96`},null,8,E),o(`circle`,{class:`dl-dg-dot`,cx:e[0],cy:`100`,r:`6`},null,8,D),o(`text`,{class:`dl-dg-small`,x:e[0]+(n?10:-22),y:`96`},t(e[1]),9,O)])),64)),A[3]||=o(`rect`,{x:`374`,y:`136`,width:`272`,height:`56`,rx:`8`,style:{fill:`var(--dl-body)`}},null,-1),A[4]||=o(`text`,{x:`510`,y:`169`,"text-anchor":`middle`,style:{fill:`var(--dl-bg)`,"font-size":`13px`,"font-weight":`700`}},`? where it lands · ? what it pays`,-1),A[5]||=o(`text`,{class:`dl-dg-small is-bad`,x:`510`,y:`214`,"text-anchor":`middle`},`find out by trying`,-1)])),[[j]])]))]),u((e(),s(`div`,k,[...A[11]||=[o(`p`,null,[o(`strong`,null,`Model-free`),a(`: learn values from the moves you make. Q-learning is the best-known example.`)],-1)]])),[[j]])]),_:1},16)}}};export{A as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CBwC-ryo2.js b/lecture-08/assets/md-CBwC-ryo2.js new file mode 100644 index 0000000000000000000000000000000000000000..7bdab174cf5a1005afa5ca4afa70acf49d79bb17 --- /dev/null +++ b/lecture-08/assets/md-CBwC-ryo2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";var g={class:`grid grid-cols-[1.45fr_1fr] gap-6 items-start`},_={class:`mt-2 dl-callout`},v={__name:`slides.md__slidev_39`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=m,b=r(`click`);return e(),l(h,u(n(d(p)(d(T),38))),{default:s(()=>[v[2]||=a(`h1`,null,`Reading the equation: the value of a cell`,-1),a(`div`,g,[v[1]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mi`,null,`π`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`v_\\pi(s)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`state value`),a(`td`,null,[i(`expected return from cell `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])]),i(` under `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`v`),a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`START`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`4.05`)]),a(`annotation`,{encoding:`application/x-tex`},`v(\\text{START}) = 4.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`START`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mi`,null,`π`)]),a(`mo`,{stretchy:`false`},`[`),a(`mo`,null,`⋅`),a(`mo`,{stretchy:`false`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbb{E}_\\pi[\\cdot]`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},`⋅`),a(`span`,{class:`mclose`},`]`)])])])]),a(`td`,null,[i(`expected value under `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])])]),a(`td`,null,`average over what can happen`),a(`td`,null,`one path here`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`G_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`return`),a(`td`,null,[i(`discounted total from step `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])])]),a(`td`,null,`4.05`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`S_t = s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])])]),a(`td`,null,`condition`),a(`td`,null,[i(`"start the count in cell `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])]),i(`"`)]),a(`td`,null,`START`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])])]),a(`td`,null,`policy`),a(`td`,null,`the arrows`),a(`td`,null,`right, up, up`)])])])],-1),a(`div`,null,[t(y,{values:[4.5,5,0,4.05,0,5,3.645,4.05,4.5],robot:null,cell:58,precision:4}),c((e(),o(`div`,_,[...v[0]||=[a(`p`,null,[i(`(3,1): up, up, right, right → 4 moves → `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mn`,null,`0.9`),a(`mn`,null,`3`)]),a(`mo`,null,`×`),a(`mn`,null,`5`),a(`mo`,null,`=`),a(`mn`,null,`3.645`)]),a(`annotation`,{encoding:`application/x-tex`},`0.9^3 \\times 5 = 3.645`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.`),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`9`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8141em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`3`)])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.645`)])])])],-1)]])),[[b]])])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CChtMD7Z2.js b/lecture-08/assets/md-CChtMD7Z2.js new file mode 100644 index 0000000000000000000000000000000000000000..9a2c966ea7e31140730fe4c71a1e8ee0c25af8a6 --- /dev/null +++ b/lecture-08/assets/md-CChtMD7Z2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_34`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),33))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The return, one step at a time`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The equation `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mi`,null,`t`)]),r(`mo`,null,`=`),r(`msub`,null,[r(`mi`,null,`R`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])]),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`msub`,null,[r(`mi`,null,`G`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])])]),r(`annotation`,{encoding:`application/x-tex`},`G_t = R_{t+1} + \\gamma G_{t+1}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])])])])]),n(` says: the return now is the next reward plus `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(` times the return from the next step.`)]),r(`li`,null,`The boxes are the short way: START, (3,3), (2,3), charger.`),r(`li`,null,[n(`Work backwards from the end: `),r(`ol`,null,[r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mn`,null,`2`)]),r(`mo`,null,`=`),r(`mn`,null,`5`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`0`),r(`mo`,null,`=`),r(`mn`,null,`5`)]),r(`annotation`,{encoding:`application/x-tex`},`G_2 = 5 + 0.9 \\times 0 = 5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`)])])]),n(` (the episode then ends).`)]),r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mn`,null,`1`)]),r(`mo`,null,`=`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4.5`)]),r(`annotation`,{encoding:`application/x-tex`},`G_1 = 0 + 0.9 \\times 5 = 4.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`1`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`)])])]),n(`.`)]),r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mn`,null,`0`)]),r(`mo`,null,`=`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`G_0 = 0 + 0.9 \\times 4.5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`.`)])])]),r(`li`,null,`This gives the same 4.05 as the long sum.`)]),r(`p`,null,`Value flows backwards from the reward, one step at a time. The rest of the lecture uses this idea.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CF_gH_Jj.js b/lecture-08/assets/md-CF_gH_Jj.js new file mode 100644 index 0000000000000000000000000000000000000000..2997709bde2004c3dd5cf22cd9bc4998dac44e39 --- /dev/null +++ b/lecture-08/assets/md-CF_gH_Jj.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_49`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),48))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The catch: value iteration needs the map`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Left.`),n(` The values that value iteration found. Every sweep looked up where each move lands and what reward it gives. That information is the dynamics `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`p`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`r`),r(`mo`,null,`∣`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`p`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`∣`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(`, the map of the world.`)]),r(`li`,null,[r(`strong`,null,`Right.`),n(` What the robot really knows: its own cell. Everything else is a question mark.`)]),r(`li`,null,`The robot cannot look up what a move does. It has to try the move and see.`),r(`li`,null,[n(`A method that needs the dynamics is `),r(`strong`,null,`model-based`),n(`. A method that learns only from moves it actually makes is `),r(`strong`,null,`model-free`),n(`.`)])]),r(`p`,null,`The next section is a model-free method: Q-learning.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CO0h-U_E.js b/lecture-08/assets/md-CO0h-U_E.js new file mode 100644 index 0000000000000000000000000000000000000000..5217b6120f807f5bb14d632793c93856a75c9c63 --- /dev/null +++ b/lecture-08/assets/md-CO0h-U_E.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,y as h,yt as g}from"./modules/shiki-CJZsCeMT.js";import{n as _,t as v}from"./slidev/context-DB-9afGB.js";import{t as y}from"./GridWorld-D5i5gg4u.js";import{t as b}from"./default-DMdSOhJT.js";var x={class:`flex justify-center gap-8 items-center mt-1`},S={viewBox:`0 0 390 170`,class:`dl-diagram`,style:{"max-width":`25rem`},role:`img`,"aria-label":`The short way written as a trajectory: START, right, 0, (3,3), up, 0, (2,3), up, +5, charger`},C={key:0},w=[`cx`],T=[`x`],E=[`x`],D={key:0},O=[`d`],k=[`x`],A=[`x`],j={class:`mt-2 text-center`},M={class:`mt-2 dl-callout`},N={__name:`slides.md__slidev_16`,setup(N){let{$slidev:P,$nav:F,$clicksContext:I,$clicks:L,$page:R,$renderContext:z,$frontmatter:B}=_();return I.setup(),(_,N)=>{let P=y,F=i(`click`);return e(),p(b,m(r(g(v)(g(B),15))),{default:u(()=>[N[3]||=s(`h1`,null,`An episode is a chain of states, actions and rewards`,-1),s(`div`,x,[t(P,{path:[3,0,0],"path-step":g(L),cell:66},null,8,[`path-step`]),(e(),c(`svg`,S,[N[0]||=s(`defs`,null,[s(`marker`,{id:`l8-traj-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[s(`path`,{class:`dl-dg-head is-k`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),(e(),c(d,null,a([[`S₀`,`START`],[`S₁`,`(3,3)`],[`S₂`,`(2,3)`],[`S₃`,`charger`]],(t,r)=>s(`g`,{key:r},[r<=g(L)?(e(),c(`g`,C,[s(`circle`,{class:`dl-dg-op`,cx:30+r*110,cy:`60`,r:`24`},null,8,w),s(`text`,{class:`dl-dg-lab is-sm`,x:30+r*110,y:`65`,"text-anchor":`middle`},n(t[0]),9,T),s(`text`,{class:`dl-dg-small`,x:30+r*110,y:`104`,"text-anchor":`middle`},n(t[1]),9,E)])):h(`v-if`,!0)])),64)),(e(),c(d,null,a([[`A₀ = right`,`R₁ = 0`],[`A₁ = up`,`R₂ = 0`],[`A₂ = up`,`R₃ = +5`]],(t,r)=>s(`g`,{key:`a${r}`},[r{let v=m,y=p;return e(),s(f,c(n(l(d)(l(w),89))),{default:o(()=>[_[2]||=a(`h1`,null,`In PyTorch: the network and the action`,-1),a(`div`,h,[a(`div`,null,[t(v,r({lines:!0},{title:``,ranges:[`all`,`3-8`,`9-10`,`12-16`,`all`]}),{default:o(()=>[..._[0]||=[a(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[a(`code`,{class:`language-python`},[a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` random`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`nn `),a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`as`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`)]),i(` +`),a(`span`,{class:`line`}),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`class`),a(`span`,{style:{"--shiki-dark":`#5DA994`,"--shiki-light":`#2E8F82`}},` QNet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},`nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},`Module`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` def`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` __init__`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`self`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` state_dim`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`9`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` n_actions`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`4`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # robot: one-hot cell`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` super`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`().`),a(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},`__init__`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#C99076`,"--shiki-light":`#A65E2B`}},` self`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`net `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`Sequential`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`Linear`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`state_dim`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 32`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`ReLU`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(),`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`Linear`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`32`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` n_actions`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`))`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # one Q per action`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` forward`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`self`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # s: (B, 9)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#C99076`,"--shiki-light":`#A65E2B`}},` self`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`net`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # -> (B, 4)`)]),i(` +`),a(`span`,{class:`line`}),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` act`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eps`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` n_actions`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`4`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # s: (9,)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` if`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` random`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`random`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` <`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` eps`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # explore`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` random`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`randrange`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`n_actions`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` with`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`no_grad`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`():`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # exploit`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`unsqueeze`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`0`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`argmax`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`item`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (1, 4) -> index`)])])],-1)]]),_:1},16)]),a(`div`,g,[t(y,{kind:`dqn`,size:120}),_[1]||=a(`div`,{class:`dl-secondary text-center`},`9 numbers in, 4 Q-values out`,-1)])])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CPYeSP9D.js b/lecture-08/assets/md-CPYeSP9D.js new file mode 100644 index 0000000000000000000000000000000000000000..80a8847787c33544d0a76e50064d75dca85c970f --- /dev/null +++ b/lecture-08/assets/md-CPYeSP9D.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./RlGlyph-i3WvlmEb.js";var g={class:`grid grid-cols-[1.5fr_1fr] gap-6 items-start`},_={class:`mt-2 dl-callout dl-tight`},v={__name:`slides.md__slidev_62`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=f();return x.setup(),(f,v)=>{let y=h,b=r(`click`);return e(),l(m,u(n(d(p)(d(T),61))),{default:s(()=>[v[2]||=a(`h1`,null,`Reading the equation: the Q-learning update`,-1),a(`div`,g,[v[1]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`Q-value`),a(`td`,null,[i(`table entry for `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`a`)]),a(`annotation`,{encoding:`application/x-tex`},`a`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`a`)])])]),i(` in `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`3`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\text{up}) = 0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`((`),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`←`)]),a(`annotation`,{encoding:`application/x-tex`},`\\leftarrow`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`←`)])])])]),a(`td`,null,`assignment`),a(`td`,null,`replace the left side`),a(`td`,null,`—`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`α`)]),a(`annotation`,{encoding:`application/x-tex`},`\\alpha`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`)])])])]),a(`td`,null,`learning rate`),a(`td`,null,`step size, 0 to 1`),a(`td`,null,`0.5`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`)]),a(`annotation`,{encoding:`application/x-tex`},`r`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])])]),a(`td`,null,`reward`),a(`td`,null,`what the move paid`),a(`td`,null,`0`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])])]),a(`td`,null,`discount factor`),a(`td`,null,`weight per step`),a(`td`,null,`0.9`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`td`,null,`next state`),a(`td`,null,`where the move landed`),a(`td`,null,`(2,3)`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\max_{a'} Q(s', a')`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.328em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`best next value`),a(`td`,null,[i(`largest guess in `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`td`,null,`2.5`)]),a(`tr`,null,[a(`td`,null,[i(`target − `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`TD error`),a(`td`,null,`the surprise`),a(`td`,null,`2.25`)])])])],-1),a(`div`,null,[t(y,{kind:`qtable`,size:100}),c((e(),o(`div`,_,[...v[0]||=[a(`p`,null,[i(`Learned: the 36 entries `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),i(`. Set by hand: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`α`)]),a(`annotation`,{encoding:`application/x-tex`},`\\alpha`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`)])])]),i(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),i(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`ε`)]),a(`annotation`,{encoding:`application/x-tex`},`\\varepsilon`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`ε`)])])]),i(`. Data: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s, a, r, s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.9463em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),i(` from each move.`)],-1)]])),[[b]])])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CWs17cl1.css b/lecture-08/assets/md-CWs17cl1.css new file mode 100644 index 0000000000000000000000000000000000000000..3cb2530bc3f026c4cf002f7434bfb55b2d4195ef --- /dev/null +++ b/lecture-08/assets/md-CWs17cl1.css @@ -0,0 +1 @@ +.dl-ql[data-v-ad4cd42f]{align-items:center;gap:1.2rem;display:flex}.dl-ql__side[data-v-ad4cd42f]{font-variant-numeric:tabular-nums;min-width:15.5rem;font-size:.85rem}.dl-ql__count[data-v-ad4cd42f]{margin-bottom:.5rem;font-size:1rem}.dl-ql__move[data-v-ad4cd42f]{margin:.15rem 0}.dl-ql__tag[data-v-ad4cd42f]{border:1px solid var(--dl-k);color:var(--dl-k);border-radius:4px;margin-left:.3rem;padding:0 .35rem;font-size:.75rem}.dl-ql__work[data-v-ad4cd42f]{border-left:3px solid var(--dl-accent);background:var(--dl-surface);border-radius:4px;margin-top:.5rem;padding:.4rem .55rem}.dl-ql__res[data-v-ad4cd42f]{padding-left:1.2rem}b[data-v-ad4cd42f]{color:var(--dl-accent)}.is-current[data-v-ad4cd42f]{color:var(--dl-k);font-weight:700}.is-target[data-v-ad4cd42f]{color:var(--dl-q);font-weight:700} diff --git a/lecture-08/assets/md-CYCyDfm-.js b/lecture-08/assets/md-CYCyDfm-.js new file mode 100644 index 0000000000000000000000000000000000000000..8bce3460eac084ec9cea13bbedecff7b03e871fb --- /dev/null +++ b/lecture-08/assets/md-CYCyDfm-.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_67`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),66))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Watch the robot learn`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The floor shows all 36 Q-values and an arrow for the best guess in each cell.`),r(`li`,null,`The panel shows the last update: the move, the reward, and the arithmetic. Orange marks the value updated, purple the best next value.`),r(`li`,null,`The first updates repeat the hand-worked numbers: −5, 2.5 and 1.125.`),r(`li`,null,`With more updates the positive values spread backwards from the charger.`),r(`li`,null,[n(`By update 100, the arrow at START points right, and `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mtext`,null,`START`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`right`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(\\text{START}, \\text{right}) = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`START`)]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`right`)]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`. That is the value found by value iteration in section 03.`)])]),r(`p`,null,[n(`The robot learned the best way home `),r(`strong`,null,`without the map`),n(`, from its own moves.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CYXxUBJM.css b/lecture-08/assets/md-CYXxUBJM.css new file mode 100644 index 0000000000000000000000000000000000000000..61e9e4648f6d8b40762f4b0525b8efe486b5c232 --- /dev/null +++ b/lecture-08/assets/md-CYXxUBJM.css @@ -0,0 +1 @@ +.dl-title[data-v-dc59a472]{flex-direction:column;justify-content:center;padding-left:4rem;padding-right:4rem;display:flex}.dl-title__eyebrow[data-v-dc59a472]{font-size:var(--dl-fs-secondary);letter-spacing:.14em;text-transform:uppercase;align-items:center;gap:.9rem;margin-bottom:1.1rem;display:flex}.dl-title__code[data-v-dc59a472]{color:var(--dl-accent);font-weight:700}.dl-title__lecture[data-v-dc59a472]{color:var(--dl-muted)}.dl-title__body[data-v-dc59a472] h1{font-size:var(--dl-fs-title);margin:0;line-height:1.05}.dl-title__body[data-v-dc59a472] p{font-size:var(--dl-fs-body);color:var(--dl-muted);max-width:34ch;margin-top:.7rem}.dl-title__rule[data-v-dc59a472]{margin:1.6rem 0 1.2rem}.dl-title__meta[data-v-dc59a472]{font-size:var(--dl-fs-secondary);line-height:1.7}.dl-title__author[data-v-dc59a472]{color:var(--dl-heading);font-weight:600}.dl-title__email[data-v-dc59a472]{color:var(--dl-accent)}.dl-title__date[data-v-dc59a472]{color:var(--dl-muted)} diff --git a/lecture-08/assets/md-C_I7xfx4.js b/lecture-08/assets/md-C_I7xfx4.js new file mode 100644 index 0000000000000000000000000000000000000000..53e56e4eed8fe44e78b1ba56467397dd3b6fc7a7 --- /dev/null +++ b/lecture-08/assets/md-C_I7xfx4.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./RlGlyph-i3WvlmEb.js";var g={class:`grid grid-cols-4 gap-4 mt-4`},_={class:`flex flex-col items-center text-center gap-2`},v={class:`flex flex-col items-center text-center gap-2`},y={class:`flex flex-col items-center text-center gap-2`},b={class:`flex flex-col items-center text-center gap-2`},x={class:`mt-5 dl-callout`},S={__name:`slides.md__slidev_101`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=f();return T.setup(),(f,S)=>{let C=h,w=r(`click`);return e(),l(m,u(n(d(p)(d(k),100))),{default:s(()=>[S[9]||=a(`h1`,null,`Four ideas, one robot`,-1),a(`div`,g,[c((e(),o(`div`,_,[t(C,{kind:`return`,size:80}),S[0]||=a(`strong`,null,`Return`,-1),S[1]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`msub`,null,[a(`mi`,null,`R`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])]),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`msub`,null,[a(`mi`,null,`G`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])])]),a(`annotation`,{encoding:`application/x-tex`},`G_t = R_{t+1} + \\gamma G_{t+1}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])])])])]),i(` — sooner is worth more`)])],-1)])),[[w]]),c((e(),o(`div`,v,[t(C,{kind:`value`,size:80}),S[2]||=a(`strong`,null,`Value`,-1),S[3]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[i(`Bellman: best of `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`mi`,null,`v`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`r + \\gamma v(s')`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])]),i(` — needs the map`)])],-1)])),[[w]]),c((e(),o(`div`,y,[t(C,{kind:`qtable`,size:80}),S[4]||=a(`strong`,null,`Q-learning`,-1),S[5]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[i(`move `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s,a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),i(` toward `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`mi`,null,`max`),a(`mo`,null,`⁡`),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mo`,null,`⋅`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max Q(s', \\cdot)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop`},`max`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`⋅`),a(`span`,{class:`mclose`},`)`)])])]),i(` — no map`)])],-1)])),[[w]]),c((e(),o(`div`,b,[t(C,{kind:`dqn`,size:80}),S[6]||=a(`strong`,null,`DQN`,-1),S[7]||=a(`span`,{class:`dl-secondary`},`a network for the table, plus replay and a target network`,-1)])),[[w]])]),c((e(),o(`div`,x,[...S[8]||=[a(`p`,null,`The robot found the short way home, 4.05, from rewards alone. A network lets the same idea play Atari.`,-1)]])),[[w]])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-C_djKWOA2.js b/lecture-08/assets/md-C_djKWOA2.js new file mode 100644 index 0000000000000000000000000000000000000000..bd717085aed128448b6e30508df7d1efbdd59b06 --- /dev/null +++ b/lecture-08/assets/md-C_djKWOA2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_35`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),34))),{default:i(()=>[p[0]||=r(`h1`,null,`Policy and value`,-1),r(`div`,f,[t(m,{kind:`value`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CjjLEPPa.js b/lecture-08/assets/md-CjjLEPPa.js new file mode 100644 index 0000000000000000000000000000000000000000..e9afd83e6afe6a385cab842e2dfdfd0c647804bb --- /dev/null +++ b/lecture-08/assets/md-CjjLEPPa.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_95`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),94))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: In PyTorch: one training step`,-1),r(`div`,{class:`dl-describe`},[r(`ol`,null,[r(`li`,null,`Two networks of the same shape. The target starts as a copy.`),r(`li`,null,[n(`The `),r(`code`,null,`sample()`),n(` call draws a random batch from the replay buffer.`)]),r(`li`,null,[n(`The `),r(`code`,null,`gather`),n(` call picks the predicted Q-value of each action taken.`)]),r(`li`,null,[n(`Under `),r(`code`,null,`no_grad`),n(`, the target network gives the best next value.`)]),r(`li`,null,[n(`The target is `),r(`code`,null,`r + gamma * q_next * (1 - done)`),n(`. It is just `),r(`code`,null,`r`),n(` when the episode ended.`)]),r(`li`,null,[n(`The MSE loss and `),r(`code`,null,`backward`),n(` update the Q-network only.`)]),r(`li`,null,[n(`Every `),r(`code`,null,`T`),n(` steps, its weights are copied into the target network.`)])]),r(`p`,null,`The picture lights the matching stage of the loop.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Ck5yC0i3.js b/lecture-08/assets/md-Ck5yC0i3.js new file mode 100644 index 0000000000000000000000000000000000000000..9a4e68fc27c825ec455d17bf104360b919477b90 --- /dev/null +++ b/lecture-08/assets/md-Ck5yC0i3.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_40`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),39))),{default:i(()=>[...d[0]||=[r(`h1`,null,[n(`In words: The value of a cell: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`v`),r(`mi`,null,`π`)]),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`v_\\pi(s)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1514em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mclose`},`)`)])])])],-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`value`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`v`),r(`mi`,null,`π`)]),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`v_\\pi(s)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1514em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mclose`},`)`)])])]),n(` of a cell is the return to expect from it under the policy `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`π`)]),r(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),n(`.`)]),r(`li`,null,`The numbers on the floor are these values for the best policy (the arrows).`),r(`li`,null,[n(`(2,3) is one move from the +5, so its value is 5. (3,3) is two moves away: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4.5`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9 \\times 5 = 4.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`)])])]),n(`. START is three moves away: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9 \\times 4.5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])]),n(`.`)]),r(`li`,null,[n(`The far corner (3,1) is four moves away: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mn`,null,`0.9`),r(`mn`,null,`3`)]),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`3.645`)]),r(`annotation`,{encoding:`application/x-tex`},`0.9^3 \\times 5 = 3.645`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8974em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.`),r(`span`,{class:`mord`},[r(`span`,{class:`mord`},`9`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8141em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`3`)])])])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.645`)])])]),n(`.`)]),r(`li`,null,`Values grow toward the charger.`)]),r(`p`,null,`Following the arrows means always moving to a cell with a higher value.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-ClcrnWUb.js b/lecture-08/assets/md-ClcrnWUb.js new file mode 100644 index 0000000000000000000000000000000000000000..822936961ede89b2ab2d2eddac261ac136ae5773 --- /dev/null +++ b/lecture-08/assets/md-ClcrnWUb.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_32`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),31))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Going deeper: a reward now beats a reward later`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The timeline shows 100 kr today and 100 kr one year later.`),r(`li`,null,[n(`If the later 100 kr is worth only 90 kr to you today, a one-year wait costs a factor of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`90`),r(`mi`,{mathvariant:`normal`},`/`),r(`mn`,null,`100`),r(`mo`,null,`=`),r(`mn`,null,`0.9`)]),r(`annotation`,{encoding:`application/x-tex`},`90 / 100 = 0.9`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`90/100`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.9`)])])]),n(`. That factor is the discount `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])]),n(`.`)]),r(`li`,null,`A promised reward may never come, and a reward now can be used now.`),r(`li`,null,[n(`In a continuing task, a reward of 1 every step adds up to `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`1`),r(`mi`,{mathvariant:`normal`},`/`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`1`),r(`mo`,null,`−`),r(`mi`,null,`γ`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`1/(1-\\gamma)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`1/`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},`1`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`−`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mclose`},`)`)])])]),n(`. For `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`),r(`mo`,null,`=`),r(`mn`,null,`0.9`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.9`)])])]),n(` that is 10, a finite number.`)])]),r(`p`,null,`So the discount also keeps the return finite when a task never ends.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CpVN8xTF2.js b/lecture-08/assets/md-CpVN8xTF2.js new file mode 100644 index 0000000000000000000000000000000000000000..8239fff46262a19e004572191e7dd467f8233764 --- /dev/null +++ b/lecture-08/assets/md-CpVN8xTF2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_89`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),88))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The DQN loop, stage by stage`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The picture is the full DQN training loop:`),r(`ol`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`Q-network`),n(` picks an action, ε-greedy. The `),r(`strong`,null,`environment`),n(` returns a reward and the next state.`)]),r(`li`,null,[n(`The move `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`r`),r(`mo`,{separator:`true`},`,`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`(s, a, r, s')`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mclose`},`)`)])])]),n(` is stored in the `),r(`strong`,null,`replay buffer`),n(`.`)]),r(`li`,null,[n(`A `),r(`strong`,null,`random batch`),n(` of moves is drawn from the buffer.`)]),r(`li`,null,[n(`The Q-network predicts `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` for each move (orange).`)]),r(`li`,null,[n(`The `),r(`strong`,null,`target network`),n(` gives `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`max`),r(`mo`,null,`⁡`),r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`mo`,null,`⋅`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`\\max Q(s', \\cdot)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mop`},`max`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`⋅`),r(`span`,{class:`mclose`},`)`)])])]),n(`; the target is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`mi`,null,`max`),r(`mo`,null,`⁡`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mop`},`max`)])])]),n(` (purple).`)]),r(`li`,null,`The loss is the mean squared gap.`),r(`li`,null,[n(`Backpropagation updates the Q-network’s weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(`.`)]),r(`li`,null,[n(`Every `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`T`)]),r(`annotation`,{encoding:`application/x-tex`},`T`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),n(` steps, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(` is copied into the target network.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Cpligg9D.js b/lecture-08/assets/md-Cpligg9D.js new file mode 100644 index 0000000000000000000000000000000000000000..e50c6bf57484c90c9efaf8b7c1426586c61cd9ef --- /dev/null +++ b/lecture-08/assets/md-Cpligg9D.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_10`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),9))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Not learning from labels`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The slide puts the two kinds of learning side by side.`),r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Left, with labels.`),n(` The model makes a prediction ("cat"). The label ("dog") is the right answer, and it arrives at once.`)]),r(`li`,null,[r(`strong`,null,`Right, from a score.`),n(` The agent moves through states `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`0`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` to `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`3`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_3`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`3`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` with actions `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mn`,null,`0`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` to `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mn`,null,`2`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_2`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(`. The rewards are 0, 0 and then +5. No action is ever marked as right, and the +5 arrives after three moves.`)]),r(`li`,null,[r(`strong`,null,`The grey band.`),n(` A labelled dataset is fixed before training. In RL the agent collects its own data, so what it learns depends on what it tries.`)])]),r(`p`,null,`RL learns how good a move was, never which move was right.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Crf0QqO82.js b/lecture-08/assets/md-Crf0QqO82.js new file mode 100644 index 0000000000000000000000000000000000000000..d2742042ebf1637ecd3bf9954582bb6f500609cd --- /dev/null +++ b/lecture-08/assets/md-Crf0QqO82.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./slidev/VClicks-lrjw2pb1.js";import{t as g}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var _={class:`flex justify-center mt-1`},v={viewBox:`0 0 600 170`,class:`dl-diagram`,role:`img`,"aria-label":`100 kroner today is worth 90 kroner a year from now, which is a discount factor of 0.9`},y={class:`dl-math-sm`},b={__name:`slides.md__slidev_31`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=h,S=g,C=r(`click`);return e(),l(m,u(n(d(p)(d(D),30))),{default:s(()=>[b[11]||=a(`h1`,null,`Going deeper: a reward now beats a reward later`,-1),a(`div`,_,[(e(),o(`svg`,v,[b[1]||=a(`defs`,null,[a(`marker`,{id:`l8-money-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),b[2]||=a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-money-h)`,d:`M30 120 H570`},null,-1),b[3]||=a(`line`,{class:`dl-dg-line`,x1:`80`,y1:`112`,x2:`80`,y2:`128`},null,-1),b[4]||=a(`line`,{class:`dl-dg-line`,x1:`440`,y1:`112`,x2:`440`,y2:`128`},null,-1),b[5]||=a(`text`,{class:`dl-dg-small`,x:`80`,y:`148`,"text-anchor":`middle`},`today`,-1),b[6]||=a(`text`,{class:`dl-dg-small`,x:`440`,y:`148`,"text-anchor":`middle`},`one year later`,-1),b[7]||=a(`rect`,{class:`dl-dg-box is-accent`,x:`40`,y:`40`,width:`80`,height:`44`,rx:`6`},null,-1),b[8]||=a(`text`,{class:`dl-dg-lab is-sm`,x:`80`,y:`67`,"text-anchor":`middle`},`100 kr`,-1),c((e(),o(`g`,null,[...b[0]||=[a(`rect`,{class:`dl-dg-box`,x:`400`,y:`40`,width:`80`,height:`44`,rx:`6`},null,-1),a(`text`,{class:`dl-dg-lab is-sm`,x:`440`,y:`67`,"text-anchor":`middle`},`100 kr`,-1),a(`text`,{class:`dl-dg-small`,x:`440`,y:`30`,"text-anchor":`middle`},`worth 90 kr to you today`,-1),a(`text`,{class:`dl-dg-small is-good`,x:`260`,y:`100`,"text-anchor":`middle`},`γ = 90 / 100 = 0.9`,-1)]])),[[C]])]))]),t(x,null,{default:s(()=>[...b[9]||=[a(`ul`,null,[a(`li`,null,[i(`A reward later is `),a(`strong`,null,`less certain`),i(` and `),a(`strong`,null,`less useful`),i(` than the same reward now`)]),a(`li`,null,[i(`For a continuing task, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`),a(`mo`,null,`<`),a(`mn`,null,`1`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma < 1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7335em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`<`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1`)])])]),i(` keeps the sum finite`)])],-1)]]),_:1}),c((e(),o(`div`,y,[t(S,{ranges:[]},{default:s(()=>[...b[10]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`1`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`mo`,null,`+`),a(`msup`,null,[a(`mi`,null,`γ`),a(`mn`,null,`2`)]),a(`mo`,null,`+`),a(`mo`,null,`⋯`),a(`mo`,null,`=`),a(`mfrac`,null,[a(`mn`,null,`1`),a(`mrow`,null,[a(`mn`,null,`1`),a(`mo`,null,`−`),a(`mi`,null,`γ`)])]),a(`mo`,null,`=`),a(`mn`,null,`10`),a(`mspace`,{width:`1em`}),a(`mtext`,null,`for\xA0`),a(`mi`,null,`γ`),a(`mo`,null,`=`),a(`mn`,null,`0.9`)]),a(`annotation`,{encoding:`application/x-tex`},`1 + \\gamma + \\gamma^2 + \\cdots = \\frac{1}{1-\\gamma} = 10 \\quad \\text{for } \\gamma = 0.9 `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0585em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8641em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`minner`},`⋯`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.2019em`,"vertical-align":`-0.8804em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mopen nulldelimiter`}),a(`span`,{class:`mfrac`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.3214em`}},[a(`span`,{style:{top:`-2.314em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])]),a(`span`,{style:{top:`-3.23em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),a(`span`,{style:{top:`-3.677em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`1`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8804em`}},[a(`span`)])])])]),a(`span`,{class:`mclose nulldelimiter`})]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8889em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},`10`),a(`span`,{class:`mspace`,style:{"margin-right":`1em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`for\xA0`)]),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.9`)])])])])],-1)]]),_:1})])),[[C,3]])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-CsoOjhyB.js b/lecture-08/assets/md-CsoOjhyB.js new file mode 100644 index 0000000000000000000000000000000000000000..61b8c7860951bad9eef51a32beae3bb7b44ba9ce --- /dev/null +++ b/lecture-08/assets/md-CsoOjhyB.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./PollSlide-CA6YXjEC.js";var _={class:`grid grid-cols-[1.7fr_1fr] gap-6 items-start`},v={class:`mt-6 flex justify-center`},y={class:`mt-2 dl-reveal`},b={class:`mt-1 dl-secondary`},x={__name:`slides.md__slidev_68`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=g,C=m,w=r(`click`);return e(),l(h,u(n(d(p)(d(O),67))),{default:s(()=>[a(`div`,_,[a(`div`,null,[t(S,{question:`Q(START, up) = −5 after one fall. With ε = 0.2, does the robot ever try up at START again?`,items:[`Never: −5 is the worst value`,`Yes, about 5 % of the time`,`Only once Q(START, up) is above 0`,`Only after trying every other move`]})]),a(`div`,v,[t(C,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[-5,0,0,0],[0,0,0,0]],highlight:[7],cell:62})])]),c((e(),o(`div`,y,[...x[0]||=[a(`p`,null,`Yes, about 5 % of the time`,-1)]])),[[w]]),c((e(),o(`div`,b,[...x[1]||=[a(`p`,null,[i(`The random branch picks any of the four moves: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0.2`),a(`mi`,{mathvariant:`normal`},`/`),a(`mn`,null,`4`),a(`mo`,null,`=`),a(`mn`,null,`0.05`)]),a(`annotation`,{encoding:`application/x-tex`},`0.2 / 4 = 0.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.2/4`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.05`)])])]),i(`. That keeps the estimate for up improving.`)],-1)]])),[[w]])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Czq6p3v9.js b/lecture-08/assets/md-Czq6p3v9.js new file mode 100644 index 0000000000000000000000000000000000000000..d88ecf3b530494732e9a1f33f319a61ad934662b --- /dev/null +++ b/lecture-08/assets/md-Czq6p3v9.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,T as i,_ as a,b as o,et as s,v as c,xt as l,y as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{t as f}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as p,t as m}from"./slidev/context-DB-9afGB.js";import{t as h}from"./GridWorld-D5i5gg4u.js";import{t as g}from"./default-DMdSOhJT.js";var _=[`href`],v={key:0,class:`dl-linkcard__icon`},y={class:`dl-linkcard__text`},b={class:`dl-linkcard__title`},x={key:0,class:`dl-linkcard__blurb`},S={class:`dl-linkcard__host`},C=f(i({__name:`LinkCard`,props:{href:{},title:{},blurb:{},icon:{}},setup(t){let{$slidev:r,$nav:i,$clicksContext:s,$clicks:c,$page:l,$renderContext:f,$frontmatter:m}=p(),h=t,g=h.href.replace(/^https?:\/\//,``).replace(/\/.*$/,``);return(t,r)=>(e(),o(`a`,{class:`dl-linkcard`,href:h.href,target:`_blank`,rel:`noopener`},[h.icon?(e(),o(`div`,v,n(h.icon),1)):u(`v-if`,!0),a(`div`,y,[a(`div`,b,n(h.title),1),h.blurb?(e(),o(`div`,x,n(h.blurb),1)):u(`v-if`,!0),a(`div`,S,n(d(g)),1)])],8,_))}}),[[`__scopeId`,`data-v-77ab5d10`]]),w={class:`grid grid-cols-[2.4fr_1fr] gap-5 items-start`},T={class:`grid grid-cols-2 gap-2`},E={class:`flex flex-col items-center gap-2 mt-2`},D={__name:`slides.md__slidev_103`,setup(n){let{$slidev:i,$nav:o,$clicksContext:u,$clicks:f,$page:_,$renderContext:v,$frontmatter:y}=p();return u.setup(),(n,i)=>{let o=C,u=h;return e(),c(g,l(r(d(m)(d(y),102))),{default:s(()=>[i[1]||=a(`h1`,null,`Reading and things to try`,-1),a(`div`,w,[a(`div`,T,[t(o,{href:`https://huggingface.co/learn/deep-rl-course/unit0/introduction`,title:`Hugging Face Deep RL course`,blurb:`Free and hands-on: Q-learning and DQN units with notebooks.`}),t(o,{href:`https://towardsdatascience.com/reinforcement-learning-explained-visually-part-5-deep-q-networks-step-by-step-5a5317197f4b`,title:`Reinforcement Learning Explained Visually`,blurb:`Ketan Doshi. Q-learning and DQN, step by step.`}),t(o,{href:`http://karpathy.github.io/2016/05/31/rl/`,title:`Deep Reinforcement Learning: Pong from Pixels`,blurb:`Andrej Karpathy, 2016. Learning the policy directly.`}),t(o,{href:`https://distill.pub/2020/understanding-rl-vision/`,title:`Understanding RL Vision`,blurb:`Hilton et al., Distill 2020. What an agent's CNN looks at.`})]),a(`div`,E,[t(u,{values:[4.5,5,0,4.05,0,5,3.645,4.05,4.5],arrows:[3,3,null,0,null,0,0,3,0],robot:null,cell:50,precision:4}),i[0]||=a(`div`,{class:`dl-secondary text-center`},`try it: code the floor as an environment and train QNet(9, 4)`,-1)])])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D0OYH0b_2.js b/lecture-08/assets/md-D0OYH0b_2.js new file mode 100644 index 0000000000000000000000000000000000000000..e2975d1de1d897777ee7203affc7a0a02ea6a88b --- /dev/null +++ b/lecture-08/assets/md-D0OYH0b_2.js @@ -0,0 +1,16 @@ +import{B as e,C as t,D as n,H as r,N as i,S as a,St as o,_ as s,b as c,et as l,m as u,v as d,xt as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./default-DMdSOhJT.js";import{t as _}from"./slidev/CodeBlockWrapper-CIZDS6En.js";var v={class:`grid grid-cols-[1.75fr_1fr] gap-4 items-start`},y={class:`flex flex-col items-center gap-1 mt-4`},b={viewBox:`0 0 150 150`,class:`dl-diagram`,style:{"max-width":`9.4rem`},role:`img`,"aria-label":`A buffer of rows with three random rows highlighted`},x=[`y`],S={__name:`slides.md__slidev_92`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=m();return T.setup(),(m,S)=>{let C=_;return e(),d(g,f(n(p(h)(p(k),91))),{default:l(()=>[S[3]||=s(`h1`,null,`In PyTorch: the replay buffer`,-1),s(`div`,v,[s(`div`,null,[t(C,i({lines:!0},{title:``,ranges:[`all`,`4`,`6-7`,`9-16`,`all`]}),{default:l(()=>[...S[0]||=[s(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[s(`code`,{class:`language-python`},[s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`from`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` collections `),s(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` deque`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},`import`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` random`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`)]),a(` +`),s(`span`,{class:`line`}),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`buffer `),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` deque`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},`maxlen`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`10_000`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # oldest moves drop out`)]),a(` +`),s(`span`,{class:`line`}),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),s(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` store`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` buffer`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`append`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`((`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`))`)]),a(` +`),s(`span`,{class:`line`}),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),s(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` sample`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`batch_size`),s(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`=`),s(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`32`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` batch `),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` random`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`sample`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`buffer`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` batch_size`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # random, not the latest`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done `),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#B8A965`,"--shiki-light":`#998418`}},` zip`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`batch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` return`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},` (`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`stack`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (32, 9)`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`tensor`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`a`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (32,)`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`tensor`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`r`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},` dtype`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`float32`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (32,)`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`stack`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s_next`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`),`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (32, 9)`)]),a(` +`),s(`span`,{class:`line`},[s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`tensor`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`done`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),s(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},` dtype`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`torch`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),s(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`float32`),s(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`))`),s(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # 1.0 = ended`)])])],-1)]]),_:1},16)]),s(`div`,y,[(e(),c(`svg`,b,[S[1]||=s(`rect`,{class:`dl-dg-box`,x:`10`,y:`6`,width:`130`,height:`138`,rx:`6`},null,-1),(e(),c(u,null,r(7,e=>s(`rect`,{key:e,x:`18`,y:14+(e-1)*18,width:`114`,height:`13`,rx:`2`,style:o({fill:[2,4,7].includes(e)?`var(--dl-accent-soft)`:`var(--dl-bg)`,stroke:[2,4,7].includes(e)?`var(--dl-accent)`:`var(--dl-border)`})},null,12,x)),64))])),S[2]||=s(`div`,{class:`dl-secondary text-center`},`store everything, sample at random`,-1)])])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D1KIzLUZ2.js b/lecture-08/assets/md-D1KIzLUZ2.js new file mode 100644 index 0000000000000000000000000000000000000000..5bc0d4f0a7aab82e09cc9e1dd4cf55d6187d9011 --- /dev/null +++ b/lecture-08/assets/md-D1KIzLUZ2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_91`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),90))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: In PyTorch: the network and the action`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`code`,null,`QNet`),n(` is a small fully connected network: Linear 9 → 32, ReLU, Linear 32 → 4.`)]),r(`li`,null,`Its input is a batch of states, shape (B, 9). Its output is one Q-value per action, shape (B, 4).`),r(`li`,null,[r(`code`,null,`act`),n(` is ε-greedy. With probability `),r(`code`,null,`eps`),n(` it returns a random action. Otherwise it runs the network on the state and returns the index of the largest output.`)]),r(`li`,null,[r(`code`,null,`unsqueeze(0)`),n(` turns one state of shape (9,) into a batch of one, (1, 9).`)]),r(`li`,null,[r(`code`,null,`torch.no_grad()`),n(` is used because choosing an action does not train anything.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D1L04-qD2.js b/lecture-08/assets/md-D1L04-qD2.js new file mode 100644 index 0000000000000000000000000000000000000000..883c3cad3c3cc86d8492d2659156f3beca75eefc --- /dev/null +++ b/lecture-08/assets/md-D1L04-qD2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_84`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),83))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Fix 2: a target network`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The chart shows one weight of each network over training.`),r(`li`,null,[n(`The teal curve is the `),r(`strong`,null,`Q-network`),n(`, with weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(`. Gradient descent changes it at every step.`)]),r(`li`,null,[n(`The purple staircase is the `),r(`strong`,null,`target network`),n(`, with weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mi`,{mathvariant:`bold`},`w`),r(`mo`,null,`−`)])]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}^-`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7713em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])]),n(`. It is a copy that is not trained. Every `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`T`)]),r(`annotation`,{encoding:`application/x-tex`},`T`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),n(` steps it is replaced by a fresh copy of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(`.`)]),r(`li`,null,[n(`The target `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`msub`,null,[r(`mrow`,null,[r(`mi`,null,`max`),r(`mo`,null,`⁡`)]),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`;`),r(`msup`,null,[r(`mi`,{mathvariant:`bold`},`w`),r(`mo`,null,`−`)]),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max_{a'} Q(s', a'; \\mathbf{w}^-)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0213em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mop`},[r(`span`,{class:`mop`},`max`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.328em`}},[r(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.6828em`}},[r(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[r(`span`,{class:`pstrut`,style:{height:`2.5em`}}),r(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`;`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7713em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mbin mtight`},`−`)])])])])])])]),r(`span`,{class:`mclose`},`)`)])])]),n(` is computed with the frozen copy.`)])]),r(`p`,null,[n(`For `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`T`)]),r(`annotation`,{encoding:`application/x-tex`},`T`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),n(` steps the targets stand still, so the Q-network has a fixed goal.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D5t4UeSE2.js b/lecture-08/assets/md-D5t4UeSE2.js new file mode 100644 index 0000000000000000000000000000000000000000..1956cd27bcfe3e88e6d26f6e9677d4507289c526 --- /dev/null +++ b/lecture-08/assets/md-D5t4UeSE2.js @@ -0,0 +1,19 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,et as l,m as u,tt as d,v as f,xt as p,yt as m}from"./modules/shiki-CJZsCeMT.js";import{n as h,t as g}from"./slidev/context-DB-9afGB.js";import{t as _}from"./default-DMdSOhJT.js";import{t as v}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var y={class:`dl-math-xs`},b={class:`grid grid-cols-[1.2fr_1fr] gap-6 items-center`},x={viewBox:`0 0 380 130`,class:`dl-diagram`,style:{"max-width":`21rem`},role:`img`,"aria-label":`Two moves: predicted 1.2 against target 3.6, and predicted 4.6 against target 5`},S=[`y`],C=[`y`,`width`],w=[`y`,`width`],T=[`x`,`y`],E=[`x`,`y`],D=[`y`],O={class:`dl-tight`},k={class:`mt-2 dl-callout`},A={__name:`slides.md__slidev_85`,setup(A){let{$slidev:j,$nav:M,$clicksContext:N,$clicks:P,$page:F,$renderContext:I,$frontmatter:L}=h();return N.setup(),(h,A)=>{let j=v,M=i(`click`);return e(),f(_,p(r(m(g)(m(L),84))),{default:l(()=>[A[4]||=s(`h1`,null,`The DQN loss`,-1),A[5]||=s(`p`,null,[o(`The mean squared gap between target and prediction, over `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`N`)]),s(`annotation`,{encoding:`application/x-tex`},`N`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.109em`}},`N`)])])]),o(` moves.`)],-1),s(`div`,y,[t(j,{ranges:[]},{default:l(()=>[...A[0]||=[s(`p`,null,[s(`span`,{class:`katex-display`},[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`L`),s(`mo`,{stretchy:`false`},`(`),s(`mi`,{mathvariant:`bold`},`w`),s(`mo`,{stretchy:`false`},`)`),s(`mo`,null,`=`),s(`mfrac`,null,[s(`mn`,null,`1`),s(`mi`,null,`N`)]),s(`munderover`,null,[s(`mo`,null,`∑`),s(`mrow`,null,[s(`mi`,null,`i`),s(`mo`,null,`=`),s(`mn`,null,`1`)]),s(`mi`,null,`N`)]),s(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`(`),s(`munder`,null,[s(`munder`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`r`),s(`mi`,null,`i`)]),s(`mo`,null,`+`),s(`mi`,null,`γ`),s(`munder`,null,[s(`mrow`,null,[s(`mi`,null,`max`),s(`mo`,null,`⁡`)]),s(`msup`,null,[s(`mi`,null,`a`),s(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),s(`mi`,null,`Q`),s(`mo`,{stretchy:`false`},`(`),s(`msubsup`,null,[s(`mi`,null,`s`),s(`mi`,null,`i`),s(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),s(`mo`,{separator:`true`},`,`),s(`msup`,null,[s(`mi`,null,`a`),s(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),s(`mo`,{separator:`true`},`;`),s(`msup`,null,[s(`mi`,{mathvariant:`bold`},`w`),s(`mo`,null,`−`)]),s(`mo`,{stretchy:`false`},`)`)]),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`target\xA0(frozen)`)]),s(`mo`,null,`−`),s(`munder`,null,[s(`munder`,null,[s(`mrow`,null,[s(`mi`,null,`Q`),s(`mo`,{stretchy:`false`},`(`),s(`msub`,null,[s(`mi`,null,`s`),s(`mi`,null,`i`)]),s(`mo`,{separator:`true`},`,`),s(`msub`,null,[s(`mi`,null,`a`),s(`mi`,null,`i`)]),s(`mo`,{separator:`true`},`;`),s(`mi`,{mathvariant:`bold`},`w`),s(`mo`,{stretchy:`false`},`)`)]),s(`mo`,{stretchy:`true`},`⏟`)]),s(`mtext`,null,`predicted`)]),s(`msup`,null,[s(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`)`),s(`mn`,null,`2`)])]),s(`annotation`,{encoding:`application/x-tex`},`L(\\mathbf{w}) = \\frac{1}{N} \\sum_{i=1}^{N} \\Big( \\underbrace{r_i + \\gamma \\max_{a'} Q(s'_i, a'; \\mathbf{w}^-)}_{\\text{target (frozen)}} - \\underbrace{Q(s_i, a_i; \\mathbf{w})}_{\\text{predicted}} \\Big)^2 `)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mord mathnormal`},`L`),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),s(`span`,{class:`mclose`},`)`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`4.1203em`,"vertical-align":`-2.292em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mopen nulldelimiter`}),s(`span`,{class:`mfrac`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.3214em`}},[s(`span`,{style:{top:`-2.314em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.109em`}},`N`)])]),s(`span`,{style:{top:`-3.23em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`frac-line`,style:{"border-bottom-width":`0.04em`}})]),s(`span`,{style:{top:`-3.677em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},`1`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.686em`}},[s(`span`)])])])]),s(`span`,{class:`mclose nulldelimiter`})]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mop op-limits`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.8283em`}},[s(`span`,{style:{top:`-1.8723em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`i`),s(`span`,{class:`mrel mtight`},`=`),s(`span`,{class:`mord mtight`},`1`)])])]),s(`span`,{style:{top:`-3.05em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,null,[s(`span`,{class:`mop op-symbol large-op`},`∑`)])]),s(`span`,{style:{top:`-4.3em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.109em`}},`N`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.2777em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`delimsizing size2`},`(`)]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8213em`}},[s(`span`,{style:{top:`-0.883em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`target\xA0(frozen)`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8213em`}},[s(`span`,{class:`svg-align`,style:{top:`-1.608em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3117em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0278em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`i`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mop op-limits`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.4306em`}},[s(`span`,{style:{top:`-2.356em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`a`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.6828em`}},[s(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[s(`span`,{class:`pstrut`,style:{height:`2.5em`}}),s(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,null,[s(`span`,{class:`mop`},`max`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.744em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord mathnormal`},`Q`),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`s`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8019em`}},[s(`span`,{style:{top:`-2.453em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`i`)])]),s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`′`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.247em`}},[s(`span`)])])])])]),s(`span`,{class:`mpunct`},`,`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`a`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8019em`}},[s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`′`)])])])])])])])]),s(`span`,{class:`mpunct`},`;`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8213em`}},[s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mbin mtight`},`−`)])])])])])])]),s(`span`,{class:`mclose`},`)`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.392em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`2.292em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`−`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`3.0742em`,"vertical-align":`-1.7202em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.75em`}},[s(`span`,{style:{top:`-1.4159em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord text mtight`},[s(`span`,{class:`mord mtight`},`predicted`)])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`minner munder`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.75em`}},[s(`span`,{class:`svg-align`,style:{top:`-2.102em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[s(`span`,{class:`brace-left`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[s(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),s(`span`,{class:`brace-center`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[s(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),s(`span`,{class:`brace-right`,style:{height:`0.548em`}},[s(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[s(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),s(`span`,{style:{top:`-3em`}},[s(`span`,{class:`pstrut`,style:{height:`3em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`Q`),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`s`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3117em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`i`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mpunct`},`,`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`a`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3117em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`i`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mpunct`},`;`),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),s(`span`,{class:`mclose`},`)`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.898em`}},[s(`span`)])])])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.7202em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord`},[s(`span`,{class:`delimsizing size2`},`)`)]),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.354em`}},[s(`span`,{style:{top:`-3.6029em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},`2`)])])])])])])])])])])])],-1)]]),_:1})]),s(`div`,b,[s(`div`,null,[(e(),c(`svg`,x,[(e(),c(u,null,a([[`(3,3), up, 0, (2,3)`,1.2,3.6,`5.76`],[`(2,3), up, +5, end`,4.6,5,`0.16`]],(t,r)=>s(`g`,{key:r},[s(`text`,{class:`dl-dg-small`,x:`4`,y:24+r*56},n(t[0]),9,S),s(`rect`,{x:150,y:10+r*56,width:t[1]*36,height:`14`,rx:`2`,style:{fill:`var(--dl-k)`}},null,8,C),s(`rect`,{x:150,y:27+r*56,width:t[2]*36,height:`14`,rx:`2`,style:{fill:`var(--dl-q)`}},null,8,w),s(`text`,{class:`dl-dg-small`,x:156+t[1]*36,y:22+r*56},n(t[1]),9,T),s(`text`,{class:`dl-dg-small`,x:156+t[2]*36,y:39+r*56},n(t[2]),9,E),d((e(),c(`g`,null,[s(`text`,{class:`dl-dg-small is-bad`,x:`4`,y:40+r*56},`gap² = `+n(t[3]),9,D)])),[[M,r+1]])])),64))]))]),s(`div`,O,[d((e(),c(`div`,null,[...A[1]||=[s(`p`,null,[o(`Target 1, `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`γ`),s(`mo`,null,`=`),s(`mn`,null,`0.9`)]),s(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`0.9`)])])]),o(`: `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mn`,null,`0`),s(`mo`,null,`+`),s(`mn`,null,`0.9`),s(`mo`,null,`×`),s(`mn`,null,`4.0`),s(`mo`,null,`=`),s(`mn`,null,`3.6`)]),s(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.0 = 3.6`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),s(`span`,{class:`mord`},`0`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),s(`span`,{class:`mord`},`0.9`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`×`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`4.0`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`3.6`)])])])],-1)]])),[[M,1]]),d((e(),c(`div`,null,[...A[2]||=[s(`p`,null,[o(`Target 2: just `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mn`,null,`5`)]),s(`annotation`,{encoding:`application/x-tex`},`5`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`5`)])])]),o(`, the episode ended`)],-1)]])),[[M,2]]),d((e(),c(`div`,k,[...A[3]||=[s(`p`,null,[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`L`),s(`mo`,null,`=`),s(`mo`,{stretchy:`false`},`(`),s(`mn`,null,`5.76`),s(`mo`,null,`+`),s(`mn`,null,`0.16`),s(`mo`,{stretchy:`false`},`)`),s(`mi`,{mathvariant:`normal`},`/`),s(`mn`,null,`2`),s(`mo`,null,`=`),s(`mn`,null,`2.96`)]),s(`annotation`,{encoding:`application/x-tex`},`L = (5.76 + 0.16) / 2 = 2.96`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),s(`span`,{class:`mord mathnormal`},`L`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mopen`},`(`),s(`span`,{class:`mord`},`5.76`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),s(`span`,{class:`mord`},`0.16`),s(`span`,{class:`mclose`},`)`),s(`span`,{class:`mord`},`/2`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),s(`span`,{class:`mord`},`2.96`)])])])],-1)]])),[[M,3]])])])]),_:1},16)}}};export{A as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D78P-CVF.js b/lecture-08/assets/md-D78P-CVF.js new file mode 100644 index 0000000000000000000000000000000000000000..90916906c6aaef691a0782366b1fba3adad59ee9 --- /dev/null +++ b/lecture-08/assets/md-D78P-CVF.js @@ -0,0 +1 @@ +import{B as e,D as t,G as n,S as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-DB-9afGB.js";import{t as p}from"./default-DMdSOhJT.js";var m={class:`grid grid-cols-[1.3fr_1fr] gap-6 items-center`},h={viewBox:`0 0 380 250`,class:`dl-diagram`,role:`img`,"aria-label":`The agent sends an action to the environment; the environment returns a reward and the next state`},g={class:`dl-tight`},_={class:`mt-2 dl-callout`},v={__name:`slides.md__slidev_7`,setup(v){let{$slidev:y,$nav:b,$clicksContext:x,$clicks:S,$page:C,$renderContext:w,$frontmatter:T}=d();return x.setup(),(d,v)=>{let y=n(`click`);return e(),c(p,l(t(u(f)(u(T),6))),{default:o(()=>[v[12]||=i(`h1`,null,`The agent–environment loop`,-1),i(`div`,m,[i(`div`,null,[(e(),a(`svg`,h,[v[3]||=i(`defs`,null,[i(`marker`,{id:`l8-loop-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})]),i(`marker`,{id:`l8-loop-k`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head is-k`,d:`M0 0 L7 3.5 L0 7 z`})]),i(`marker`,{id:`l8-loop-e`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[i(`path`,{class:`dl-dg-head is-enc`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),v[4]||=i(`rect`,{class:`dl-dg-box is-accent`,x:`14`,y:`88`,width:`104`,height:`74`,rx:`10`},null,-1),v[5]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`66`,y:`112`,"text-anchor":`middle`},`agent`,-1),v[6]||=i(`g`,{transform:`translate(66 138) scale(0.8)`},[i(`rect`,{x:`-14`,y:`-14`,width:`28`,height:`22`,rx:`6`,style:{fill:`var(--dl-accent)`}}),i(`circle`,{cx:`-5.5`,cy:`-4`,r:`3`,style:{fill:`var(--dl-bg)`}}),i(`circle`,{cx:`5.5`,cy:`-4`,r:`3`,style:{fill:`var(--dl-bg)`}})],-1),v[7]||=i(`ellipse`,{class:`dl-dg-fill is-enc`,cx:`300`,cy:`125`,rx:`66`,ry:`44`},null,-1),v[8]||=i(`text`,{class:`dl-dg-lab is-sm`,x:`300`,y:`122`,"text-anchor":`middle`},`environment`,-1),v[9]||=i(`text`,{class:`dl-dg-small`,x:`300`,y:`140`,"text-anchor":`middle`},`the floor`,-1),s((e(),a(`g`,null,[...v[0]||=[i(`path`,{class:`dl-dg-arrow is-k`,"marker-end":`url(#l8-loop-k)`,d:`M66 84 C80 20, 260 10, 292 76`},null,-1),i(`text`,{class:`dl-dg-lab is-sm is-k`,x:`180`,y:`30`,"text-anchor":`middle`},`1 · action Aₜ`,-1)]])),[[y]]),s((e(),a(`g`,null,[...v[1]||=[i(`path`,{class:`dl-dg-arrow is-enc`,"marker-end":`url(#l8-loop-e)`,d:`M300 172 C280 236, 90 236, 70 168`},null,-1),i(`text`,{class:`dl-dg-lab is-sm is-enc`,x:`185`,y:`222`,"text-anchor":`middle`},`2 · reward Rₜ₊₁`,-1)]])),[[y]]),s((e(),a(`g`,null,[...v[2]||=[i(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-loop-h)`,d:`M236 130 H124`},null,-1),i(`text`,{class:`dl-dg-small`,x:`180`,y:`122`,"text-anchor":`middle`},`3 · next state Sₜ₊₁`,-1)]])),[[y]])]))]),i(`div`,g,[v[11]||=i(`div`,{class:`dl-ledger`},[i(`table`,null,[i(`thead`,null,[i(`tr`,null,[i(`th`,null,`word`),i(`th`,null,`means`)])]),i(`tbody`,null,[i(`tr`,null,[i(`td`,null,[i(`strong`,null,`agent`)]),i(`td`,null,`the learner that acts (the robot)`)]),i(`tr`,null,[i(`td`,null,[i(`strong`,null,`environment`)]),i(`td`,null,`everything else (the floor)`)]),i(`tr`,null,[i(`td`,null,[i(`strong`,null,`state`),r(),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`S`),i(`mi`,null,`t`)])]),i(`annotation`,{encoding:`application/x-tex`},`S_t`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2806em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`t`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])])]),i(`td`,null,[r(`what the agent sees at step `),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`mi`,null,`t`)]),i(`annotation`,{encoding:`application/x-tex`},`t`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),i(`span`,{class:`mord mathnormal`},`t`)])])])])]),i(`tr`,null,[i(`td`,null,[i(`strong`,null,`action`),r(),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`A`),i(`mi`,null,`t`)])]),i(`annotation`,{encoding:`application/x-tex`},`A_t`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`},`A`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2806em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mathnormal mtight`},`t`)])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.15em`}},[i(`span`)])])])])])])])])]),i(`td`,null,`what it does`)]),i(`tr`,null,[i(`td`,null,[i(`strong`,null,`reward`),r(),i(`span`,{class:`katex`},[i(`span`,{class:`katex-mathml`},[i(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[i(`semantics`,null,[i(`mrow`,null,[i(`msub`,null,[i(`mi`,null,`R`),i(`mrow`,null,[i(`mi`,null,`t`),i(`mo`,null,`+`),i(`mn`,null,`1`)])])]),i(`annotation`,{encoding:`application/x-tex`},`R_{t+1}`)])])]),i(`span`,{class:`katex-html`,"aria-hidden":`true`},[i(`span`,{class:`katex-base`},[i(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),i(`span`,{class:`mord`},[i(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),i(`span`,{class:`msupsub`},[i(`span`,{class:`vlist-t vlist-t2`},[i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.3011em`}},[i(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[i(`span`,{class:`pstrut`,style:{height:`2.7em`}}),i(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[i(`span`,{class:`mord mtight`},[i(`span`,{class:`mord mathnormal mtight`},`t`),i(`span`,{class:`mbin mtight`},`+`),i(`span`,{class:`mord mtight`},`1`)])])])]),i(`span`,{class:`vlist-s`},`​`)]),i(`span`,{class:`vlist-r`},[i(`span`,{class:`vlist`,style:{height:`0.2083em`}},[i(`span`)])])])])])])])])]),i(`td`,null,`one number back`)])])])],-1),s((e(),a(`div`,_,[...v[10]||=[i(`p`,null,[r(`Goal: collect as much reward as possible `),i(`strong`,null,`in total`),r(`, not just the next one.`)],-1)]])),[[y]])])])]),_:1},16)}}};export{v as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-D7EmREcg2.js b/lecture-08/assets/md-D7EmREcg2.js new file mode 100644 index 0000000000000000000000000000000000000000..2ebd319882e2664b9fb9648115d80214546a6054 --- /dev/null +++ b/lecture-08/assets/md-D7EmREcg2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./RlGlyph-i3WvlmEb.js";var g={class:`grid grid-cols-[1.4fr_1fr] gap-6 items-start`},_={class:`mt-2 dl-callout`},v={class:`mt-2 dl-secondary`},y={__name:`slides.md__slidev_27`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(E),26))),{default:s(()=>[y[3]||=a(`h1`,null,`Reading the equation: the return`,-1),a(`div`,g,[y[2]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`G_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`return`),a(`td`,null,[i(`total discounted reward from step `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])]),i(` on`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mn`,null,`0`)]),a(`mo`,null,`=`),a(`mn`,null,`4.05`)]),a(`annotation`,{encoding:`application/x-tex`},`G_0 = 4.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`0`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`R`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mi`,null,`k`),a(`mo`,null,`+`),a(`mn`,null,`1`)])])]),a(`annotation`,{encoding:`application/x-tex`},`R_{t+k+1}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3361em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`reward`),a(`td`,null,[i(`the reward `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`k`)]),a(`annotation`,{encoding:`application/x-tex`},`k`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0315em`}},`k`)])])]),i(` steps after step `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`R`),a(`mn`,null,`3`)]),a(`mo`,null,`=`),a(`mn`,null,`5`)]),a(`annotation`,{encoding:`application/x-tex`},`R_3 = 5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`3`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])])]),a(`td`,null,`discount factor`),a(`td`,null,`set by hand, between 0 and 1`),a(`td`,null,`0.9`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`γ`),a(`mi`,null,`k`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma^k`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0435em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8491em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])])])])])])])])])]),a(`td`,null,`weight`),a(`td`,null,[i(`how much a reward `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`k`)]),a(`annotation`,{encoding:`application/x-tex`},`k`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0315em`}},`k`)])])]),i(` steps away counts`)]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mn`,null,`0.9`),a(`mn`,null,`2`)]),a(`mo`,null,`=`),a(`mn`,null,`0.81`)]),a(`annotation`,{encoding:`application/x-tex`},`0.9^2 = 0.81`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),a(`span`,{class:`mord`},`0.`),a(`span`,{class:`mord`},[a(`span`,{class:`mord`},`9`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8141em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`2`)])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.81`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`k`)]),a(`annotation`,{encoding:`application/x-tex`},`k`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0315em`}},`k`)])])])]),a(`td`,null,`steps ahead`),a(`td`,null,`runs 0, 1, 2, …`),a(`td`,null,`0 to 2`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msubsup`,null,[a(`mo`,null,`∑`),a(`mrow`,null,[a(`mi`,null,`k`),a(`mo`,null,`=`),a(`mn`,null,`0`)]),a(`mi`,{mathvariant:`normal`},`∞`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\sum_{k=0}^{\\infty}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.104em`,"vertical-align":`-0.2997em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop op-symbol small-op`,style:{position:`relative`,top:`0em`}},`∑`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8043em`}},[a(`span`,{style:{top:`-2.4003em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`),a(`span`,{class:`mrel mtight`},`=`),a(`span`,{class:`mord mtight`},`0`)])])]),a(`span`,{style:{top:`-3.2029em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`∞`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2997em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`sum`),a(`td`,null,`add up over all future steps`),a(`td`,null,`3 terms here`)])])])],-1),a(`div`,null,[t(b,{kind:`return`,size:110}),c((e(),o(`div`,_,[...y[0]||=[a(`p`,null,`Short way, from START:`,-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mn`,null,`0`)]),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.81`),a(`mo`,null,`×`),a(`mn`,null,`5`),a(`mo`,null,`=`),a(`mn`,null,`4.05`)]),a(`annotation`,{encoding:`application/x-tex`},`G_0 = 0 + 0.9 \\times 0 + 0.81 \\times 5 = 4.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},`0`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.81`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`)])])])],-1)]])),[[x]]),c((e(),o(`div`,v,[...y[1]||=[a(`p`,null,`After the episode ends, every reward is 0, so the sum stops.`,-1)]])),[[x]])])])]),_:1},16)}}};export{y as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DCerl4UZ.js b/lecture-08/assets/md-DCerl4UZ.js new file mode 100644 index 0000000000000000000000000000000000000000..b90749b23e30d0ee72d7cdbdc832f37dfd74369b --- /dev/null +++ b/lecture-08/assets/md-DCerl4UZ.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_69`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),68))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: one fall, and then?`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,[n(`The answer is `),r(`strong`,null,`yes, about 5 % of the time`),n(` the robot is at START.`)]),r(`ul`,null,[r(`li`,null,`The picture shows START’s guesses after one fall: up −5, the others 0.`),r(`li`,null,`The greedy branch (probability 0.8) never picks up, because −5 is the worst.`),r(`li`,null,[n(`The random branch (probability 0.2) picks any of the four moves equally, so it picks up with probability `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0.2`),r(`mi`,{mathvariant:`normal`},`/`),r(`mn`,null,`4`),r(`mo`,null,`=`),r(`mn`,null,`0.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0.2 / 4 = 0.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`0.2/4`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.05`)])])]),n(`.`)]),r(`li`,null,[n(`Every new fall moves `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mtext`,null,`START`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(\\text{START}, \\text{up})`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`START`)]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`)])])]),n(` closer to its true value, −10.`)])]),r(`p`,null,`ε-greedy never rules a move out. That is what keeps the estimates improving.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DE2QGCpb.css b/lecture-08/assets/md-DE2QGCpb.css new file mode 100644 index 0000000000000000000000000000000000000000..5cc79e1fa351b99f8fdea52a83ab73fdc12822e1 --- /dev/null +++ b/lecture-08/assets/md-DE2QGCpb.css @@ -0,0 +1 @@ +.dl-end[data-v-f8d31aa3]{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:1.2rem;display:flex}.dl-end__body[data-v-f8d31aa3] h1{font-size:var(--dl-fs-section);margin:0}.dl-end__meta[data-v-f8d31aa3]{font-size:var(--dl-fs-secondary);color:var(--dl-muted);gap:1.4rem;display:flex} diff --git a/lecture-08/assets/md-DF15gv0p2.js b/lecture-08/assets/md-DF15gv0p2.js new file mode 100644 index 0000000000000000000000000000000000000000..08e136cafe2365adfae143c35d52173f163e2ffc --- /dev/null +++ b/lecture-08/assets/md-DF15gv0p2.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,G as r,H as i,S as a,_ as o,b as s,bt as c,et as l,m as u,tt as d,v as f,xt as p,y as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";var y={class:`mt-1 flex justify-center`},b={viewBox:`0 0 680 220`,class:`dl-diagram`,role:`img`,"aria-label":`Supervised learning compares a prediction with a given label; reinforcement learning only receives a reward, sometimes much later`},x=[`x`],S=[`x`],C=[`d`],w=[`x`],T=[`x`],E={class:`mt-2 dl-callout`},D={__name:`slides.md__slidev_9`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=g();return A.setup(),(g,D)=>{let O=r(`click`);return e(),f(v,p(n(h(_)(h(P),8))),{default:l(()=>[D[16]||=o(`h1`,null,`Not learning from labels`,-1),o(`div`,y,[(e(),s(`svg`,b,[D[3]||=o(`defs`,null,[o(`marker`,{id:`l8-sup-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),D[4]||=o(`text`,{class:`dl-dg-lab is-sm`,x:`8`,y:`18`},`with labels (supervised)`,-1),D[5]||=o(`rect`,{class:`dl-dg-box`,x:`8`,y:`34`,width:`70`,height:`40`,rx:`5`},null,-1),D[6]||=o(`text`,{class:`dl-dg-small`,x:`43`,y:`58`,"text-anchor":`middle`},`input x`,-1),D[7]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-sup-h)`,d:`M80 54 H112`},null,-1),D[8]||=o(`polygon`,{class:`dl-dg-net`,points:`116,34 196,42 196,66 116,74`},null,-1),D[9]||=o(`text`,{class:`dl-dg-in`,x:`156`,y:`58`,"text-anchor":`middle`},`model`,-1),D[10]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-sup-h)`,d:`M198 54 H230`},null,-1),D[11]||=o(`rect`,{class:`dl-dg-box is-accent`,x:`234`,y:`34`,width:`70`,height:`40`,rx:`5`},null,-1),D[12]||=o(`text`,{class:`dl-dg-small`,x:`269`,y:`58`,"text-anchor":`middle`},`ŷ = "cat"`,-1),D[13]||=o(`text`,{class:`dl-dg-small is-good`,x:`269`,y:`96`,"text-anchor":`middle`},`label: "dog", at once`,-1),D[14]||=o(`line`,{class:`dl-dg-split`,x1:`340`,y1:`6`,x2:`340`,y2:`214`},null,-1),d((e(),s(`g`,null,[D[0]||=o(`text`,{class:`dl-dg-lab is-sm`,x:`356`,y:`18`},`from a score (RL)`,-1),(e(),s(u,null,i(4,n=>o(`g`,{key:n},[o(`rect`,{class:`dl-dg-box`,x:356+(n-1)*80,y:`34`,width:`44`,height:`40`,rx:`5`},null,8,x),o(`text`,{class:`dl-dg-small`,x:378+(n-1)*80,y:`58`,"text-anchor":`middle`},`S`+t(n-1),9,S),n<4?(e(),s(`path`,{key:0,class:`dl-dg-arrow`,"marker-end":`url(#l8-sup-h)`,d:`M${402+(n-1)*80} 54 H${432+(n-1)*80}`},null,8,C)):m(`v-if`,!0),n<4?(e(),s(`text`,{key:1,class:`dl-dg-small is-k`,x:417+(n-1)*80,y:`46`,"text-anchor":`middle`},`A`+t(n-1),9,w)):m(`v-if`,!0),n>1?(e(),s(`text`,{key:2,class:c([`dl-dg-small`,n===4?`is-good`:``]),x:378+(n-1)*80,y:`96`,"text-anchor":`middle`},`R`+t(n-1)+` = `+t(n===4?`+5`:`0`),11,T)):m(`v-if`,!0)])),64)),D[1]||=o(`text`,{class:`dl-dg-small`,x:`356`,y:`130`},`no right action given; +5 comes late`,-1)])),[[O]]),d((e(),s(`g`,null,[...D[2]||=[o(`rect`,{class:`dl-dg-fill is-muted`,x:`8`,y:`166`,width:`664`,height:`44`,rx:`6`},null,-1),o(`text`,{class:`dl-dg-small`,x:`20`,y:`194`},`a fixed dataset`,-1),o(`text`,{class:`dl-dg-small`,x:`356`,y:`194`},`data depends on its own actions`,-1)]])),[[O]])]))]),d((e(),s(`div`,E,[...D[15]||=[o(`p`,null,[a(`RL is told `),o(`strong`,null,`how good`),a(` a move was, never `),o(`strong`,null,`which move was right`),a(` — and often only much later.`)],-1)]])),[[O]])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DFkbKXSo.js b/lecture-08/assets/md-DFkbKXSo.js new file mode 100644 index 0000000000000000000000000000000000000000..f8808f7c4aa49d9d7578f16b499e40fb62bc05e6 --- /dev/null +++ b/lecture-08/assets/md-DFkbKXSo.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,T as i,U as a,_ as o,b as s,et as c,v as l,xt as u,y as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./GridWorld-D5i5gg4u.js";var _={class:`slidev-layout dl-title`},v={class:`dl-title__eyebrow`},y={key:0,class:`dl-title__code`},b={key:1,class:`dl-title__lecture`},x={class:`dl-title__body`},S={class:`dl-title__meta`},C={key:0,class:`dl-title__author`},w=[`href`],T={key:2,class:`dl-title__date`},E=p(i({__name:`title`,props:{courseCode:{},lecture:{},author:{},email:{},date:{}},setup(t){let{$slidev:r,$nav:i,$clicksContext:c,$clicks:l,$page:u,$renderContext:f,$frontmatter:p}=m(),h=t;return(t,r)=>(e(),s(`div`,_,[o(`div`,v,[h.courseCode?(e(),s(`span`,y,n(h.courseCode),1)):d(`v-if`,!0),h.lecture?(e(),s(`span`,b,`Lecture `+n(h.lecture),1)):d(`v-if`,!0)]),o(`div`,x,[a(t.$slots,`default`,{},void 0,!0)]),r[0]||=o(`div`,{class:`dl-rule dl-title__rule`},null,-1),o(`div`,S,[h.author?(e(),s(`div`,C,n(h.author),1)):d(`v-if`,!0),h.email?(e(),s(`a`,{key:1,href:`mailto:${h.email}`,class:`dl-title__email`},n(h.email),9,w)):d(`v-if`,!0),h.date?(e(),s(`div`,T,n(h.date),1)):d(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-dc59a472`]]),D={class:`dl-side-glyph`},O={__name:`slides.md__slidev_1`,setup(n){let{$slidev:i,$nav:a,$clicksContext:s,$clicks:d,$page:p,$renderContext:_,$frontmatter:v}=m();return s.setup(),(n,i)=>{let a=g;return e(),l(E,u(r(f(h)(f(v),0))),{default:c(()=>[i[0]||=o(`h1`,null,`Deep Reinforcement Learning`,-1),i[1]||=o(`p`,null,`Nobody tells the robot which way to go. It only gets a score after each move. Today it learns to find its charger from that score alone.`,-1),o(`div`,D,[t(a,{path:[3,0,0],cell:62})])]),_:1},16)}}};export{O as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DGATRVqO.js b/lecture-08/assets/md-DGATRVqO.js new file mode 100644 index 0000000000000000000000000000000000000000..18f223627fbb8a60dd47a7a1cd14092bc50b62a4 --- /dev/null +++ b/lecture-08/assets/md-DGATRVqO.js @@ -0,0 +1,3 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";import{t as _}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var v={class:`grid grid-cols-[1fr_1.3fr] gap-8 items-center mt-2`},y={class:`flex justify-center`},b={class:`mt-2 dl-callout`},x={__name:`slides.md__slidev_38`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=_,w=g,T=r(`click`);return e(),l(h,u(n(d(p)(d(O),37))),{default:s(()=>[x[3]||=a(`h1`,null,[i(`The value of a cell: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mi`,null,`π`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`v_\\pi(s)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`)])])])],-1),x[4]||=a(`p`,null,[i(`How much return to expect from cell `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])]),i(` if you follow policy `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),i(` from there.`)],-1),a(`div`,v,[a(`div`,y,[t(S,{values:[4.5,5,0,4.05,0,5,3.645,4.05,4.5],arrows:[3,3,null,0,null,0,0,3,0],robot:null,cell:84,precision:4})]),a(`div`,null,[t(C,{ranges:[]},{default:s(()=>[...x[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mi`,null,`π`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`msub`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mi`,null,`π`)]),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`[`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)]),a(`mtext`,null,`  `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`∣`),a(`mtext`,null,`  `),a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`s`),a(`mtext`,null,` `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`v_\\pi(s) = \\mathbb{E}_\\pi\\big[\\, G_t \\;\\big|\\; S_t = s \\,\\big] `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`[`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing mult`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.85em`}},[a(`span`,{style:{top:`-2.85em`}},[a(`span`,{class:`pstrut`,style:{height:`3.2em`}}),a(`span`,{style:{width:`0.333em`,height:`1.2em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.333em`,height:`1.2em`,viewBox:`0 0 333 1200`},[a(`path`,{d:`M145 15 v585 v0 v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v0 v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v0 v585 h43z`})])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.35em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`]`)])])])])])],-1)]]),_:1}),t(w,null,{default:s(()=>[...x[1]||=[a(`ul`,null,[a(`li`,null,[i(`(2,3): one move to +5 → `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`v`),a(`mo`,null,`=`),a(`mn`,null,`5`)]),a(`annotation`,{encoding:`application/x-tex`},`v = 5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`)])])])]),a(`li`,null,[i(`(3,3): two moves → `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`v`),a(`mo`,null,`=`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`5`),a(`mo`,null,`=`),a(`mn`,null,`4.5`)]),a(`annotation`,{encoding:`application/x-tex`},`v = 0.9 \\times 5 = 4.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.5`)])])])]),a(`li`,null,[i(`START: three moves → `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`v`),a(`mo`,null,`=`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`4.5`),a(`mo`,null,`=`),a(`mn`,null,`4.05`)]),a(`annotation`,{encoding:`application/x-tex`},`v = 0.9 \\times 4.5 = 4.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`)])])])])],-1)]]),_:1}),c((e(),o(`div`,b,[...x[2]||=[a(`p`,null,[i(`Values grow toward the charger. Following the arrows means: `),a(`strong`,null,`move to a better-valued cell`),i(`.`)],-1)]])),[[T]])])])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DHODWU9R.js b/lecture-08/assets/md-DHODWU9R.js new file mode 100644 index 0000000000000000000000000000000000000000..1fc7720e35d5f947df28706f5f3ec30fc6abc071 --- /dev/null +++ b/lecture-08/assets/md-DHODWU9R.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_3`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),2))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Today, in seven parts`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The slide is the map of the lecture. Each glyph stands for one section, and the same glyph returns on that section’s divider and on the recap.`),r(`ol`,null,[r(`li`,null,[r(`strong`,null,`00, a loop.`),n(` The robot acts, and a reward comes back.`)]),r(`li`,null,[r(`strong`,null,`01 and 02.`),n(` How to describe the world, and how to add up rewards.`)]),r(`li`,null,[r(`strong`,null,`03, a shaded floor.`),n(` A value for every cell: how good it is to be there.`)]),r(`li`,null,[r(`strong`,null,`04, a table.`),n(` Q-learning fills in a table of values from experience.`)]),r(`li`,null,[r(`strong`,null,`05, a network.`),n(` A neural network replaces the table when it gets too big.`)])]),r(`p`,null,`Section 04 is the core of the lecture.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DImml7fy2.js b/lecture-08/assets/md-DImml7fy2.js new file mode 100644 index 0000000000000000000000000000000000000000..893c598bd3ddf7a540fc7a329c911f2702201b30 --- /dev/null +++ b/lecture-08/assets/md-DImml7fy2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_24`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),23))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Some tasks end, some never do`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Left.`),n(` The robot’s run ends when it reaches the charger or the hole. A state where the run stops is a `),r(`strong`,null,`terminal state`),n(`. A task where every run ends is `),r(`strong`,null,`episodic`),n(`, and one run is an `),r(`strong`,null,`episode`),n(`.`)]),r(`li`,null,[r(`strong`,null,`Right.`),n(` A thermostat turns the heating on and off with no end. A task with no terminal state is `),r(`strong`,null,`continuing`),n(`.`)]),r(`li`,null,`In a continuing task the sum of all future rewards could grow without limit. The discount, in the next section, keeps it finite.`)]),r(`p`,null,`The robot’s task in this lecture is episodic.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DMlixF1K2.js b/lecture-08/assets/md-DMlixF1K2.js new file mode 100644 index 0000000000000000000000000000000000000000..be7876ac410ab58d570a1f02e83c152b6bdd47d6 --- /dev/null +++ b/lecture-08/assets/md-DMlixF1K2.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,S as a,_ as o,b as s,bt as c,et as l,m as u,v as d,xt as f,y as p,yt as m}from"./modules/shiki-CJZsCeMT.js";import{n as h,t as g}from"./slidev/context-DB-9afGB.js";import{t as _}from"./default-DMdSOhJT.js";import{t as v}from"./slidev/VClicks-lrjw2pb1.js";import{t as y}from"./Citation-CcKhBxpe.js";var b={class:`mt-1 flex justify-center`},x={viewBox:`0 0 680 190`,class:`dl-diagram`,role:`img`,"aria-label":`Four 84 by 84 frames pass through three convolution layers and a 512-unit layer to one Q-value per joystick action`},S=[`x`,`y`,`height`],C=[`x`],w=[`x`],T=[`d`],E={class:`mt-2`},D={__name:`slides.md__slidev_77`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=h();return A.setup(),(h,D)=>{let O=v,k=y;return e(),d(_,f(r(m(g)(m(P),76))),{default:l(()=>[D[3]||=o(`h1`,null,`Going deeper: the network that played Atari`,-1),o(`div`,b,[(e(),s(`svg`,x,[D[0]||=o(`defs`,null,[o(`marker`,{id:`l8-atari-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),(e(),s(u,null,i([[`84×84×4`,`input frames`,70],[`20×20×32`,`conv 8×8, stride 4`,56],[`9×9×64`,`conv 4×4, stride 2`,42],[`7×7×64`,`conv 3×3, stride 1`,36],[`512`,`fully connected`,20],[`4 to 18`,`one Q per action`,14]],(t,r)=>o(`g`,{key:r},[o(`rect`,{class:c([`dl-dg-box`,r===5?`is-accent`:``]),x:20+r*112,y:80-t[2]/2,width:`62`,height:t[2],rx:`4`},null,10,S),o(`text`,{class:`dl-dg-lab is-sm`,x:51+r*112,y:`140`,"text-anchor":`middle`},n(t[0]),9,C),o(`text`,{class:`dl-dg-small`,x:51+r*112,y:`158`,"text-anchor":`middle`},n(t[1]),9,w),r<5?(e(),s(`path`,{key:0,class:`dl-dg-arrow`,"marker-end":`url(#l8-atari-h)`,d:`M${84+r*112} 80 H${128+r*112}`},null,8,T)):p(`v-if`,!0)])),64)),D[1]||=o(`text`,{class:`dl-dg-small`,x:`340`,y:`184`,"text-anchor":`middle`},`ReLU after every layer except the last`,-1)]))]),t(O,null,{default:l(()=>[...D[2]||=[o(`ul`,null,[o(`li`,null,[a(`A `),o(`strong`,null,`CNN`),a(`: the input is pixels, so convolutions find the ball and the paddle`)]),o(`li`,null,[a(`The output is still `),o(`strong`,null,`one Q-value per action`),a(`, as for the robot`)])],-1)]]),_:1}),o(`div`,E,[t(k,{source:`Mnih et al., Human-level control through deep reinforcement learning, Nature 518 (2015)`,url:`https://www.nature.com/articles/nature14236`})])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DMm0v4Wk.js b/lecture-08/assets/md-DMm0v4Wk.js new file mode 100644 index 0000000000000000000000000000000000000000..b68b1a3d30cb9ec4f7d615bd4b394566789692f4 --- /dev/null +++ b/lecture-08/assets/md-DMm0v4Wk.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,H as i,S as a,_ as o,b as s,et as c,m as l,tt as u,v as d,xt as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./GridWorld-D5i5gg4u.js";import{t as _}from"./default-DMdSOhJT.js";var v={class:`grid grid-cols-2 gap-8 items-center mt-2`},y={class:`flex flex-col items-center gap-2`},b={class:`flex flex-col items-center gap-2`},x={viewBox:`0 0 240 200`,class:`dl-diagram`,style:{"max-width":`15.0rem`},role:`img`,"aria-label":`An Atari game screen: four stacked 84 by 84 grey frames`},S=[`x`],C=[`x`],w={class:`mt-3 dl-callout`},T={__name:`slides.md__slidev_73`,setup(T){let{$slidev:E,$nav:D,$clicksContext:O,$clicks:k,$page:A,$renderContext:j,$frontmatter:M}=m();return O.setup(),(m,T)=>{let E=g,D=r(`click`);return e(),d(_,f(n(p(h)(p(M),72))),{default:c(()=>[T[10]||=o(`h1`,null,`When the table gets too big`,-1),o(`div`,v,[o(`div`,y,[t(E,{q:Array.from({length:9},()=>[0,0,0,0]),cell:62},null,8,[`q`]),T[0]||=o(`div`,{class:`dl-secondary text-center`},[a(`robot: 9 cells × 4 actions = `),o(`b`,null,`36`),a(` numbers`)],-1)]),u((e(),s(`div`,b,[(e(),s(`svg`,x,[T[1]||=o(`rect`,{class:`dl-dg-fill is-muted`,x:`44`,y:`8`,width:`150`,height:`150`,rx:`3`},null,-1),T[2]||=o(`rect`,{class:`dl-dg-fill is-muted`,x:`36`,y:`16`,width:`150`,height:`150`,rx:`3`},null,-1),T[3]||=o(`rect`,{class:`dl-dg-fill is-muted`,x:`28`,y:`24`,width:`150`,height:`150`,rx:`3`},null,-1),T[4]||=o(`rect`,{class:`dl-dg-box`,x:`20`,y:`32`,width:`150`,height:`150`,rx:`3`},null,-1),(e(),s(l,null,i(8,e=>o(`g`,{key:e},[o(`rect`,{x:26+(e-1)*18,y:`46`,width:`16`,height:`7`,rx:`1`,style:{fill:`var(--dl-k)`}},null,8,S),o(`rect`,{x:26+(e-1)*18,y:`56`,width:`16`,height:`7`,rx:`1`,style:{fill:`var(--dl-q)`}},null,8,C)])),64)),T[5]||=o(`circle`,{cx:`110`,cy:`128`,r:`4`,style:{fill:`var(--dl-body)`}},null,-1),T[6]||=o(`rect`,{x:`80`,y:`166`,width:`40`,height:`6`,rx:`2`,style:{fill:`var(--dl-accent)`}},null,-1),T[7]||=o(`text`,{class:`dl-dg-small`,x:`95`,y:`196`,"text-anchor":`middle`},`4 frames × 84 × 84 pixels`,-1)])),T[8]||=o(`div`,{class:`dl-secondary text-center`},[o(`p`,null,[a(`Atari: `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`msup`,null,[o(`mn`,null,`256`),o(`mrow`,null,[o(`mtext`,null,` `),o(`mn`,null,`28`),o(`mtext`,null,` `),o(`mn`,null,`224`)])])]),o(`annotation`,{encoding:`application/x-tex`},`256^{\\,28\\,224}`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),o(`span`,{class:`mord`},`25`),o(`span`,{class:`mord`},[o(`span`,{class:`mord`},`6`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.8141em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mord mtight`},[o(`span`,{class:`mspace mtight`,style:{"margin-right":`0.1952em`}}),o(`span`,{class:`mord mtight`},`28`),o(`span`,{class:`mspace mtight`,style:{"margin-right":`0.1952em`}}),o(`span`,{class:`mord mtight`},`224`)])])])])])])])])])])]),a(` possible screens. No table fits.`)])],-1)])),[[D]])]),u((e(),s(`div`,w,[...T[9]||=[o(`p`,null,[a(`Replace the table by a `),o(`strong`,null,`function`),a(),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`Q`),o(`mo`,{stretchy:`false`},`(`),o(`mi`,null,`s`),o(`mo`,{separator:`true`},`,`),o(`mi`,null,`a`),o(`mo`,{separator:`true`},`;`),o(`mi`,{mathvariant:`bold`},`w`),o(`mo`,{stretchy:`false`},`)`)]),o(`annotation`,{encoding:`application/x-tex`},`Q(s, a; \\mathbf{w})`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),o(`span`,{class:`mord mathnormal`},`Q`),o(`span`,{class:`mopen`},`(`),o(`span`,{class:`mord mathnormal`},`s`),o(`span`,{class:`mpunct`},`,`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathnormal`},`a`),o(`span`,{class:`mpunct`},`;`),o(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),o(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),o(`span`,{class:`mclose`},`)`)])])]),a(` with weights `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,{mathvariant:`bold`},`w`)]),o(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),o(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),a(`: a neural network. Similar screens then get similar values.`)],-1)]])),[[D]])]),_:1},16)}}};export{T as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DN8ICbIE.js b/lecture-08/assets/md-DN8ICbIE.js new file mode 100644 index 0000000000000000000000000000000000000000..92d7f9eb29d6cd914a53d45983f8a326ba6ae3f5 --- /dev/null +++ b/lecture-08/assets/md-DN8ICbIE.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,H as i,S as a,T as o,Z as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,m,v as h,xt as g,yt as _}from"./modules/shiki-CJZsCeMT.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y,t as b}from"./slidev/context-DB-9afGB.js";import{a as x,d as ee,i as S,l as C,m as w,o as T,p as E,t as D,u as O}from"./useReinforcement-11RE6Te1.js";import{t as k}from"./GridWorld-D5i5gg4u.js";import{t as A}from"./slidev/VClicks-lrjw2pb1.js";import{t as j}from"./WidgetFrame-DHgK6j2H.js";import{t as M}from"./interactive-LBJsATV-.js";import{t as N}from"./StepButton-DD4XxENU.js";var P={class:`dl-vi`},F={class:`dl-vi__side`},I={class:`dl-vi__sweep`},L={key:0,class:`dl-vi__work`},R={class:`dl-vi__head`},z={class:`dl-vi__act`},B={class:`dl-vi__eq`},te={key:1,class:`dl-vi__work dl-vi__hint`},V={key:0},H={key:1},U=5,W=v(o({__name:`ValueIterationLab`,props:{step:{default:0},arrows:{type:Boolean,default:!0}},setup(r){let{$slidev:o,$nav:g,$clicksContext:v,$clicks:b,$page:A,$renderContext:M,$frontmatter:W}=y(),G=r,K=w(U),q=d(null),J=p(()=>Math.min(U,Math.max(0,q.value??G.step)));s(()=>G.step,()=>{q.value=null});let Y=p(()=>K[J.value]),X=p(()=>K[Math.max(0,J.value-1)]),Z=[5,8,7,6,1,0,3],Q=p(()=>{if(J.value===0)return null;let e=Array.from({length:9},(e,t)=>t).filter(e=>Math.abs(Y.value[e]-X.value[e])>1e-9);return Z.find(t=>e.includes(t))??null}),ne=p(()=>{if(Q.value===null)return[];let e=Q.value;return[0,1,2,3].map(t=>{let n=E(e,t);return{a:t,r:n.reward,done:n.done,vNext:n.done?0:X.value[n.next],total:O(X.value,e,t,S)}})}),re=p(()=>!G.arrows||J.value===0?null:ee(X.value).map((e,t)=>C(t)||Y.value[t]===0?null:x(e))),$=e=>Number(e.toFixed(4)).toString().replace(`-`,`−`),ie=p(()=>J.value>=4);function ae(){q.value=J.value>=U?0:J.value+1}return(r,o)=>{let s=k,d=N,p=j;return e(),h(p,{"max-width":`40rem`},{controls:f(()=>[t(d,{label:`one sweep`,glyph:`▸`,onClick:ae}),t(d,{label:`reset`,variant:`ghost`,onClick:o[0]||=e=>q.value=0})]),readout:f(()=>[ie.value?(e(),l(`span`,V,`Nothing changes any more: the values have converged.`)):(e(),l(`span`,H,`Each sweep: every cell takes its best one-step look-ahead, using the values from the sweep before.`))]),default:f(()=>[c(`div`,P,[t(s,{values:Y.value,arrows:re.value,highlight:Q.value===null?[]:[Q.value],robot:null,cell:78,precision:4},null,8,[`values`,`arrows`,`highlight`]),c(`div`,F,[c(`div`,I,[o[1]||=a(`sweep `,-1),c(`b`,null,n(J.value),1)]),Q.value===null?(e(),l(`div`,te,[...o[2]||=[a(`Every value starts at 0. Press `,-1),c(`b`,null,`one sweep`,-1),a(`.`,-1)]])):(e(),l(`div`,L,[c(`div`,R,`V(`+n(_(T)(Q.value))+`) = max over`,1),(e(!0),l(m,null,i(ne.value,t=>(e(),l(`div`,{key:t.a,class:u([`dl-vi__row`,{"is-best":Math.abs(t.total-Y.value[Q.value])<1e-9}])},[c(`span`,z,n(_(D)[t.a]),1),c(`span`,null,n($(t.r))+` + `+n(t.done?`0 (end)`:`0.9 × ${$(t.vNext)}`),1),c(`span`,B,`= `+n($(t.total)),1)],2))),128))]))])])]),_:1})}}}),[[`__scopeId`,`data-v-4c1cbbff`]]),G={__name:`slides.md__slidev_46`,setup(n){let{$slidev:i,$nav:o,$clicksContext:s,$clicks:l,$page:u,$renderContext:d,$frontmatter:p}=y();return s.setup(),(n,i)=>{let o=W,s=A;return e(),h(M,g(r(_(b)(_(p),45))),{aside:f(e=>[i[1]||=c(`p`,null,[a(`Start with every value at 0. Apply Bellman to `),c(`strong`,null,`every`),a(` cell. Repeat.`)],-1),t(s,null,{default:f(()=>[...i[0]||=[c(`ul`,null,[c(`li`,null,[a(`Sweep 1: next to the charger → `),c(`strong`,null,`5`)]),c(`li`,null,[a(`Sweep 2: one ring out → `),c(`strong`,null,`4.5`)]),c(`li`,null,[a(`Sweep 3: START → `),c(`strong`,null,`4.05`)]),c(`li`,null,[a(`Sweep 4: (3,1) → `),c(`strong`,null,`3.645`),a(`. Done.`)])],-1)]]),_:1})]),default:f(()=>[t(o,{step:_(l)},null,8,[`step`])]),_:1},16)}}};export{G as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DOVVkhja.js b/lecture-08/assets/md-DOVVkhja.js new file mode 100644 index 0000000000000000000000000000000000000000..dc7ce917cc7487e3f14b455cb8c1ceb5042ef8ac --- /dev/null +++ b/lecture-08/assets/md-DOVVkhja.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_6`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),5))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: A game with no instructions`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,`The picture is a game screen with a score in the corner.`),r(`li`,null,`The row of buttons under it is a sequence of presses. The number under each press is the change in score. It is +1 for the coin, −1 for the spike and 0 for most presses.`),r(`li`,null,`Nobody tells the player which press was right. They only see the score.`),r(`li`,null,`Even so, the player learns to play well, by trying things and keeping what raised the score.`),r(`li`,null,[n(`Learning to act from a score alone, by trial and error, is called `),r(`strong`,null,`reinforcement learning`),n(` (RL).`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DPJgeVRt2.js b/lecture-08/assets/md-DPJgeVRt2.js new file mode 100644 index 0000000000000000000000000000000000000000..76dae821c0846cdd65b7ae31eb072e3c46cd706a --- /dev/null +++ b/lecture-08/assets/md-DPJgeVRt2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_4`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),3))),{default:i(()=>[p[0]||=r(`h1`,null,`Learning from a score`,-1),r(`div`,f,[t(m,{kind:`loop`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DQyimKj3.js b/lecture-08/assets/md-DQyimKj3.js new file mode 100644 index 0000000000000000000000000000000000000000..69e6bd7af447f2ca486e5aebdfb3c77f6d23797f --- /dev/null +++ b/lecture-08/assets/md-DQyimKj3.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,H as i,S as a,St as o,_ as s,b as c,et as l,m as u,tt as d,v as f,xt as p,yt as m}from"./modules/shiki-CJZsCeMT.js";import{n as h,t as g}from"./slidev/context-DB-9afGB.js";import{t as _}from"./default-DMdSOhJT.js";import{t as v}from"./slidev/VClicks-lrjw2pb1.js";import{t as y}from"./Citation-CcKhBxpe.js";var b={class:`grid grid-cols-[1fr_1.2fr] gap-6 items-center mt-1`},x={class:`flex justify-center`},S={viewBox:`0 0 220 210`,class:`dl-diagram`,style:{"max-width":`13.8rem`},role:`img`,"aria-label":`A brick-breaking game screen: rows of bricks, a ball and a paddle`},C=[`x`,`y`],w={class:`dl-tight`},T={class:`mt-2 dl-callout`},E={class:`mt-1`},D={__name:`slides.md__slidev_98`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=h();return A.setup(),(h,D)=>{let O=v,k=y,A=r(`click`);return e(),f(_,p(n(m(g)(m(P),97))),{default:l(()=>[D[5]||=s(`h1`,null,`What DQN achieved, and where it stops`,-1),s(`div`,b,[s(`div`,x,[(e(),c(`svg`,S,[D[0]||=s(`rect`,{class:`dl-dg-box`,x:`10`,y:`10`,width:`200`,height:`190`,rx:`6`},null,-1),(e(),c(u,null,i(3,t=>s(`g`,{key:t},[(e(),c(u,null,i(8,e=>s(`rect`,{key:e,x:18+(e-1)*23.5,y:22+(t-1)*12,width:`21`,height:`9`,rx:`1`,style:o({fill:[`var(--dl-danger)`,`var(--dl-k)`,`var(--dl-pos)`][t-1]})},null,12,C)),64))])),64)),D[1]||=s(`circle`,{cx:`132`,cy:`122`,r:`5`,style:{fill:`var(--dl-body)`}},null,-1),D[2]||=s(`rect`,{x:`94`,y:`178`,width:`44`,height:`7`,rx:`2`,style:{fill:`var(--dl-accent)`}},null,-1)]))]),s(`div`,w,[t(O,null,{default:l(()=>[...D[3]||=[s(`ul`,null,[s(`li`,null,[s(`strong`,null,`2015`),a(`: one network, `),s(`strong`,null,`49 Atari games`),a(`, the same settings for all`)]),s(`li`,null,`Learned from pixels and the score alone`),s(`li`,null,[a(`At least 75 % of a human tester’s score in `),s(`strong`,null,`29 of 49`),a(` games`)]),s(`li`,null,[a(`Needs `),s(`strong`,null,`many`),a(` moves: 50 million frames per game`)])],-1)]]),_:1}),d((e(),c(`div`,T,[...D[4]||=[s(`p`,null,[a(`Its limit: `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mrow`,null,[s(`mi`,null,`max`),s(`mo`,null,`⁡`)]),s(`mi`,null,`a`)])]),s(`annotation`,{encoding:`application/x-tex`},`\\max_a`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mop`},[s(`span`,{class:`mop`},`max`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.1514em`}},[s(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`a`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])])])])]),a(` needs a short list of actions. A robot arm with continuous joint angles needs other methods.`)],-1)]])),[[A]])])]),s(`div`,E,[t(k,{source:`Mnih et al., Human-level control through deep reinforcement learning, Nature 518 (2015)`,url:`https://www.nature.com/articles/nature14236`})])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DS5J4mOQ2.js b/lecture-08/assets/md-DS5J4mOQ2.js new file mode 100644 index 0000000000000000000000000000000000000000..5a66b5da3e057b11c85ff89efbcd48c5db50cf09 --- /dev/null +++ b/lecture-08/assets/md-DS5J4mOQ2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_82`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),81))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Fix 1: experience replay`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The tall box is the `),r(`strong`,null,`replay buffer`),n(`: a list of past moves, each stored as (state, action, reward, next state).`)]),r(`li`,null,`Every new move goes in at the top. When the buffer is full, the oldest move drops out.`),r(`li`,null,[n(`For training, a `),r(`strong`,null,`random batch`),n(` is drawn from anywhere in the buffer. In the picture, rows 2, 4 and 7 are drawn.`)]),r(`li`,null,`A random batch mixes moves from different times, so it is not a run of near-copies. Every move can also be used many times.`),r(`li`,null,`Q-learning can use these old moves because it is off-policy.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DVi-Y4NQ.js b/lecture-08/assets/md-DVi-Y4NQ.js new file mode 100644 index 0000000000000000000000000000000000000000..c56ebc6a95a6ca87a00f2a10aa0b82c73f1cedba --- /dev/null +++ b/lecture-08/assets/md-DVi-Y4NQ.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_50`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),49))),{default:i(()=>[p[0]||=r(`h1`,null,`Q-learning: no map needed`,-1),r(`div`,f,[t(m,{kind:`qtable`,size:170})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DWRKYI2u.js b/lecture-08/assets/md-DWRKYI2u.js new file mode 100644 index 0000000000000000000000000000000000000000..30b79ec7f1f0c52880007be3851b5b4519320d35 --- /dev/null +++ b/lecture-08/assets/md-DWRKYI2u.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_72`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),71))),{default:i(()=>[p[0]||=r(`h1`,null,`Deep Q-networks`,-1),r(`div`,f,[t(m,{kind:`dqn`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DYp24jFE2.js b/lecture-08/assets/md-DYp24jFE2.js new file mode 100644 index 0000000000000000000000000000000000000000..a950a26e79bf32746df87cad888196701b8d1f41 --- /dev/null +++ b/lecture-08/assets/md-DYp24jFE2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_87`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),86))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The DQN loss`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The DQN loss is the `),r(`strong`,null,`mean squared error`),n(` between the target and the prediction, over a batch of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`N`)]),r(`annotation`,{encoding:`application/x-tex`},`N`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.109em`}},`N`)])])]),n(` moves.`)]),r(`li`,null,[n(`The `),r(`strong`,null,`target`),n(` is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`msub`,null,[r(`mrow`,null,[r(`mi`,null,`max`),r(`mo`,null,`⁡`)]),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`msup`,null,[r(`mi`,null,`a`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`;`),r(`msup`,null,[r(`mi`,{mathvariant:`bold`},`w`),r(`mo`,null,`−`)]),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max_{a'} Q(s', a'; \\mathbf{w}^-)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0213em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mop`},[r(`span`,{class:`mop`},`max`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.328em`}},[r(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.6828em`}},[r(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[r(`span`,{class:`pstrut`,style:{height:`2.5em`}}),r(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`;`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7713em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mbin mtight`},`−`)])])])])])])]),r(`span`,{class:`mclose`},`)`)])])]),n(`, computed with the frozen target network. It is just `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`)]),r(`annotation`,{encoding:`application/x-tex`},`r`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),n(` if the episode ended.`)]),r(`li`,null,[n(`The `),r(`strong`,null,`prediction`),n(` is the Q-network’s output for the action taken.`)]),r(`li`,null,[n(`Move 1: target `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.0`),r(`mo`,null,`=`),r(`mn`,null,`3.6`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.0 = 3.6`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.6`)])])]),n(`, predicted 1.2, squared gap 5.76.`)]),r(`li`,null,`Move 2: the episode ended, target 5, predicted 4.6, squared gap 0.16.`),r(`li`,null,[n(`The loss is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`5.76`),r(`mo`,null,`+`),r(`mn`,null,`0.16`),r(`mo`,{stretchy:`false`},`)`),r(`mi`,{mathvariant:`normal`},`/`),r(`mn`,null,`2`),r(`mo`,null,`=`),r(`mn`,null,`2.96`)]),r(`annotation`,{encoding:`application/x-tex`},`(5.76 + 0.16)/2 = 2.96`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},`5.76`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`0.16`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mord`},`/2`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.96`)])])]),n(`. Gradient descent on `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(` then makes it smaller.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Da8Z3odW2.js b/lecture-08/assets/md-Da8Z3odW2.js new file mode 100644 index 0000000000000000000000000000000000000000..2e12221bb0956958c65aec0e316b42325fcc18a6 --- /dev/null +++ b/lecture-08/assets/md-Da8Z3odW2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_93`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),92))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: In PyTorch: the replay buffer`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The buffer is a `),r(`code`,null,`deque`),n(` with a maximum length. When it is full, a new move pushes out the oldest one.`)]),r(`li`,null,[r(`code`,null,`store`),n(` adds one move: state, action, reward, next state, and `),r(`code`,null,`done`),n(`, which says whether the episode ended.`)]),r(`li`,null,[r(`code`,null,`sample`),n(` draws 32 moves at random and turns them into tensors. States have shape (32, 9). Actions, rewards and done flags have shape (32,).`)]),r(`li`,null,[r(`code`,null,`done`),n(` is stored as 1.0 or 0.0, so the training step can switch off the next-state term by multiplying with it.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Ddtfqral.css b/lecture-08/assets/md-Ddtfqral.css new file mode 100644 index 0000000000000000000000000000000000000000..00bed7e7ce9df28c542138238d4d433a342d47f8 --- /dev/null +++ b/lecture-08/assets/md-Ddtfqral.css @@ -0,0 +1 @@ +.dl-disc[data-v-f97bf95b]{width:100%;max-width:30rem;height:auto}.dl-disc__w[data-v-f97bf95b]{fill:var(--dl-accent)}.dl-disc__g[data-v-f97bf95b]{fill:var(--dl-enc)}.dl-disc__g.is-bad[data-v-f97bf95b]{fill:var(--dl-danger)}.dl-disc__axis[data-v-f97bf95b]{stroke:var(--dl-body);stroke-width:1.4px}.dl-disc__cap[data-v-f97bf95b]{fill:var(--dl-muted);font-size:11px}.dl-disc__lab[data-v-f97bf95b]{fill:var(--dl-heading);font-size:13px;font-weight:600}.dl-disc__num[data-v-f97bf95b]{fill:var(--dl-heading);font-variant-numeric:tabular-nums;font-size:12px;font-weight:700}.dl-disc__note[data-v-f97bf95b]{font-style:italic}b[data-v-f97bf95b]{color:var(--dl-accent)} diff --git a/lecture-08/assets/md-DglvD3Oh.js b/lecture-08/assets/md-DglvD3Oh.js new file mode 100644 index 0000000000000000000000000000000000000000..c201b5619fcf42c20cab71198e24f6443ab332f1 --- /dev/null +++ b/lecture-08/assets/md-DglvD3Oh.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_102`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),101))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Four ideas, one robot`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The lecture built four ideas, each with its glyph:`),r(`ol`,null,[r(`li`,null,[r(`strong`,null,`Return.`),n(` The total discounted reward: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`G`),r(`mi`,null,`t`)]),r(`mo`,null,`=`),r(`msub`,null,[r(`mi`,null,`R`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])]),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`msub`,null,[r(`mi`,null,`G`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])])]),r(`annotation`,{encoding:`application/x-tex`},`G_t = R_{t+1} + \\gamma G_{t+1}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`G`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])])])])]),n(`. The discount makes sooner rewards worth more.`)]),r(`li`,null,[r(`strong`,null,`Value.`),n(` The Bellman equation: a cell’s value is the best of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`mi`,null,`v`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma v(s')`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mclose`},`)`)])])]),n(`. Value iteration solves it, but needs the map.`)]),r(`li`,null,[r(`strong`,null,`Q-learning.`),n(` Move `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(s, a)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mclose`},`)`)])])]),n(` toward `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`mi`,null,`max`),r(`mo`,null,`⁡`),r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{separator:`true`},`,`),r(`mo`,null,`⋅`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma \\max Q(s', \\cdot)`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mop`},`max`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`⋅`),r(`span`,{class:`mclose`},`)`)])])]),n(` using real moves, so no map is needed.`)]),r(`li`,null,[r(`strong`,null,`DQN.`),n(` A network replaces the table. Experience replay and a target network keep its training stable.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DhZ23yU-.css b/lecture-08/assets/md-DhZ23yU-.css new file mode 100644 index 0000000000000000000000000000000000000000..4fa42dfcec45a8be26c0e45f16c3ef5f119f4d31 --- /dev/null +++ b/lecture-08/assets/md-DhZ23yU-.css @@ -0,0 +1 @@ +.dl-linkcard[data-v-77ab5d10]{border:1px solid var(--dl-border);border-left:3px solid var(--dl-accent);background:var(--dl-surface);border-radius:8px;align-items:flex-start;gap:.85rem;padding:.9rem 1rem;text-decoration:none;transition:transform .15s,border-color .15s;display:flex}.dl-linkcard[data-v-77ab5d10]:hover{border-color:var(--dl-accent);transform:translateY(-2px)}.dl-linkcard__icon[data-v-77ab5d10]{font-family:Apple Color Emoji,Segoe UI Emoji,Noto Color Emoji,Twemoji Mozilla,sans-serif;font-size:1.6rem;line-height:1}.dl-linkcard__text[data-v-77ab5d10]{min-width:0}.dl-linkcard__title[data-v-77ab5d10]{color:var(--dl-heading);font-size:1.05rem;font-weight:600}.dl-linkcard__blurb[data-v-77ab5d10]{color:var(--dl-body);margin-top:.15rem;font-size:.9rem}.dl-linkcard__host[data-v-77ab5d10]{color:var(--dl-accent);margin-top:.3rem;font-size:.78rem} diff --git a/lecture-08/assets/md-DoGnq9kW.js b/lecture-08/assets/md-DoGnq9kW.js new file mode 100644 index 0000000000000000000000000000000000000000..d9914dab988da6d7f94ab69cfa14e2cc23d0c735 --- /dev/null +++ b/lecture-08/assets/md-DoGnq9kW.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_97`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),96))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Going deeper: the whole loop, on CartPole`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`CartPole`),n(` is a standard test problem: push a cart left or right to keep a pole upright. The state is 4 numbers, there are 2 actions, and the reward is +1 per step.`)]),r(`li`,null,[n(`Each episode starts with `),r(`code`,null,`env.reset()`),n(` and runs until the pole falls or time runs out.`)]),r(`li`,null,`ε starts at 1 and falls to 0.05 over 5000 steps: explore a lot first, less later.`),r(`li`,null,`Each step: choose an action, step the environment, store the move, train.`),r(`li`,null,`Training starts once the buffer holds 1000 moves.`),r(`li`,null,[n(`Only a real end (`),r(`code`,null,`terminated`),n(`) is stored as an end. A time limit is not.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Du9GpJ-U.js b/lecture-08/assets/md-Du9GpJ-U.js new file mode 100644 index 0000000000000000000000000000000000000000..7e4774e9d59d0bc8e3a55ce615dea2aff18223e9 --- /dev/null +++ b/lecture-08/assets/md-Du9GpJ-U.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";var _={class:`grid grid-cols-[1fr_1.4fr] gap-6 items-center mt-1`},v={class:`flex justify-center`},y={class:`dl-tight`},b={class:`mt-2 dl-callout`},x={__name:`slides.md__slidev_55`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=g,w=r(`click`);return e(),l(h,u(n(d(p)(d(O),54))),{default:s(()=>[x[3]||=a(`h1`,null,`Explore or exploit?`,-1),a(`div`,_,[a(`div`,v,[t(S,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[-5,0,0,.5],[0,0,0,0]],highlight:[7],greedy:``,cell:84})]),a(`div`,y,[x[2]||=a(`p`,null,[i(`Guesses at START so far: up `),a(`strong`,null,`−5`),i(`, down `),a(`strong`,null,`0`),i(`, left `),a(`strong`,null,`0`),i(`, right `),a(`strong`,null,`0.5`),i(`.`)],-1),t(C,null,{default:s(()=>[...x[0]||=[a(`ul`,null,[a(`li`,null,[a(`strong`,null,`Exploit`),i(`: always take the best guess (right). Left is never tried`)]),a(`li`,null,[a(`strong`,null,`Explore`),i(`: sometimes try another move. It may be better than it looks`)]),a(`li`,null,`Only exploit: stuck with a guess that may be wrong`),a(`li`,null,`Only explore: never uses what it learned`)],-1)]]),_:1}),c((e(),o(`div`,b,[...x[1]||=[a(`p`,null,[i(`The agent must do `),a(`strong`,null,`both`),i(`: mostly exploit, sometimes explore.`)],-1)]])),[[w]])])])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DwcCo75s.js b/lecture-08/assets/md-DwcCo75s.js new file mode 100644 index 0000000000000000000000000000000000000000..b151c8fc61bcf76e238b8d94c36accb9edc52105 --- /dev/null +++ b/lecture-08/assets/md-DwcCo75s.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var g={class:`flex justify-center mt-1`},_={viewBox:`0 0 560 160`,class:`dl-diagram`,style:{"max-width":`32rem`},role:`img`,"aria-label":`Three outcomes of a slippery move, with widths equal to their probabilities, average to 3`},v={class:`mt-1 dl-callout`},y={__name:`slides.md__slidev_21`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(E),20))),{default:s(()=>[y[11]||=a(`h1`,null,`Refresher: an expected value is a weighted average`,-1),a(`div`,g,[(e(),o(`svg`,_,[y[1]||=a(`rect`,{x:`20`,y:`30`,width:`400`,height:`44`,style:{fill:`color-mix(in srgb, var(--dl-enc) 30%, var(--dl-bg))`,stroke:`var(--dl-enc)`}},null,-1),y[2]||=a(`text`,{class:`dl-dg-lab is-sm`,x:`220`,y:`57`,"text-anchor":`middle`},`charger: +5 · p = 0.8`,-1),y[3]||=a(`rect`,{x:`420`,y:`30`,width:`50`,height:`44`,style:{fill:`color-mix(in srgb, var(--dl-danger) 25%, var(--dl-bg))`,stroke:`var(--dl-danger)`}},null,-1),y[4]||=a(`text`,{class:`dl-dg-small`,x:`445`,y:`57`,"text-anchor":`middle`},`−10`,-1),y[5]||=a(`rect`,{x:`470`,y:`30`,width:`50`,height:`44`,class:`dl-dg-box`},null,-1),y[6]||=a(`text`,{class:`dl-dg-small`,x:`495`,y:`57`,"text-anchor":`middle`},`0`,-1),y[7]||=a(`text`,{class:`dl-dg-small`,x:`445`,y:`92`,"text-anchor":`middle`},`hole 0.1`,-1),y[8]||=a(`text`,{class:`dl-dg-small`,x:`495`,y:`92`,"text-anchor":`middle`},`wall 0.1`,-1),c((e(),o(`g`,null,[...y[0]||=[a(`text`,{class:`dl-dg-lab is-sm`,x:`20`,y:`126`},`0.8 × 5 + 0.1 × (−10) + 0.1 × 0 = 4 − 1 + 0 = 3`,-1),a(`text`,{class:`dl-dg-small`,x:`20`,y:`150`},`each outcome times its probability, then add up`,-1)]])),[[x]])]))]),t(b,{ranges:[]},{default:s(()=>[...y[9]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mo`,{stretchy:`false`},`[`),a(`mi`,null,`X`),a(`mo`,{stretchy:`false`},`]`),a(`mo`,null,`=`),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`x`)]),a(`mi`,null,`x`),a(`mtext`,null,` `),a(`mi`,null,`P`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`X`),a(`mo`,null,`=`),a(`mi`,null,`x`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbb{E}[X] = \\sum_{x} x \\, P(X = x) `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`),a(`span`,{class:`mclose`},`]`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3em`,"vertical-align":`-1.25em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.9em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`x`)])])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.25em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1}),y[12]||=a(`div`,{class:`dl-secondary text-center`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`X`)]),a(`annotation`,{encoding:`application/x-tex`},`X`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`)])])]),i(`: the reward · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`x`)]),a(`annotation`,{encoding:`application/x-tex`},`x`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`x`)])])]),i(`: one value of it · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`P`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`X`),a(`mo`,null,`=`),a(`mi`,null,`x`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`P(X = x)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0785em`}},`X`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`x`),a(`span`,{class:`mclose`},`)`)])])]),i(`: its probability`)])],-1),c((e(),o(`div`,v,[...y[10]||=[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mo`,{stretchy:`false`},`[`),a(`msub`,null,[a(`mi`,null,`R`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])]),a(`mo`,null,`∣`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`]`),a(`mo`,null,`=`),a(`mn`,null,`3`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbb{E}[R_{t+1} \\mid (2,3), \\text{up}] = 3`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`mopen`},`[`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`]`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3`)])])]),i(`: the average reward of "up" from (2,3), over many tries.`)],-1)]])),[[x]])]),_:1},16)}}};export{y as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-DxEIUlRz.js b/lecture-08/assets/md-DxEIUlRz.js new file mode 100644 index 0000000000000000000000000000000000000000..0b028c8e4d2200b18bc8a1b74948afd19652176d --- /dev/null +++ b/lecture-08/assets/md-DxEIUlRz.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var _={class:`grid grid-cols-[1.35fr_1fr] gap-6 items-start`},v={class:`mt-2`},y={class:`mt-2 dl-callout`},b={__name:`slides.md__slidev_19`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=f();return C.setup(),(f,b)=>{let x=g,S=m,C=r(`click`);return e(),l(h,u(n(d(p)(d(D),18))),{default:s(()=>[b[4]||=a(`h1`,null,`Reading the equation: the rule of the world`,-1),a(`div`,_,[a(`div`,null,[b[2]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])])]),a(`td`,null,`current state`),a(`td`,null,`a cell`),a(`td`,null,`(2,3)`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`a`)]),a(`annotation`,{encoding:`application/x-tex`},`a`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`a`)])])])]),a(`td`,null,`action`),a(`td`,null,`one of four moves`),a(`td`,null,`up`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`td`,null,`next state`),a(`td`,null,`the cell after the move`),a(`td`,null,`charger`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`)]),a(`annotation`,{encoding:`application/x-tex`},`r`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])])]),a(`td`,null,`reward`),a(`td`,null,`the number that comes back`),a(`td`,null,`+5`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`⋅`),a(`mo`,null,`∣`),a(`mo`,null,`⋅`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(\\cdot \\mid \\cdot)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`⋅`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`⋅`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`dynamics`),a(`td`,null,[i(`chance of `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`(s', r)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mclose`},`)`)])])]),i(` given `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`0.8`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`∣`)]),a(`annotation`,{encoding:`application/x-tex`},`\\mid`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mrel`},`∣`)])])])]),a(`td`,null,`"given"`),a(`td`,null,`condition on what is known`),a(`td`,null,`—`)])])])],-1),c((e(),o(`div`,v,[b[1]||=a(`p`,null,[i(`Drop the reward and add over it: the `),a(`strong`,null,`state-transition probability`)],-1),t(x,{ranges:[]},{default:s(()=>[...b[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`munder`,null,[a(`mo`,null,`∑`),a(`mi`,null,`r`)]),a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(s' \\mid s, a) = \\sum_{r} p(s', r \\mid s, a) `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0519em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.3em`,"vertical-align":`-1.25em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.9em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0278em`}},`r`)])])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.25em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])])],-1)]]),_:1})])),[[C]])]),a(`div`,null,[t(S,{slip:``,robot:5,cell:60,plain:``}),c((e(),o(`div`,y,[...b[3]||=[a(`p`,null,[i(`Deterministic floor: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),i(` is always `),a(`strong`,null,`0 or 1`),i(`. "Up" from (2,3) reaches the charger with probability 1.`)],-1)]])),[[C]])])])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-F2Pj1FPG.js b/lecture-08/assets/md-F2Pj1FPG.js new file mode 100644 index 0000000000000000000000000000000000000000..b10b29dfc2174bafc1b826bde564478a3b653d89 --- /dev/null +++ b/lecture-08/assets/md-F2Pj1FPG.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_45`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),44))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: The Bellman equation`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The `),r(`strong`,null,`Bellman equation`),n(` links a cell’s value to the values of the cells it can reach. A cell’s value is the best, over the moves, of `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`+`),r(`mi`,null,`γ`),r(`mtext`,null,` `),r(`msub`,null,[r(`mi`,null,`v`),r(`mo`,null,`∗`)]),r(`mo`,{stretchy:`false`},`(`),r(`msup`,null,[r(`mi`,null,`s`),r(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`r + \\gamma\\, v_*(s')`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6667em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1757em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mbin mtight`},`∗`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.7519em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`′`)])])])])])])])]),r(`span`,{class:`mclose`},`)`)])])]),n(`.`)]),r(`li`,null,[n(`The diagram tries all four moves from (3,3): `),r(`ul`,null,[r(`li`,null,[n(`up to (2,3): `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`4.5`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 5 = 4.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`)])])])]),r(`li`,null,[n(`down or right, into the wall: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.5`),r(`mo`,null,`=`),r(`mn`,null,`4.05`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.5 = 4.05`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`)])])])]),r(`li`,null,[n(`left to START: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`4.05`),r(`mo`,null,`=`),r(`mn`,null,`3.645`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.05 = 3.645`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.05`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`3.645`)])])])])])]),r(`li`,null,[n(`The largest is 4.5, through up. So `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`v`),r(`mo`,null,`∗`)]),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`3`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`4.5`)]),r(`annotation`,{encoding:`application/x-tex`},`v_*(3,3) = 4.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.1757em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mbin mtight`},`∗`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`4.5`)])])]),n(` and the best move is up.`)]),r(`li`,null,`If moves can slip, the bracket becomes an average over the outcomes, weighted by their probabilities.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-GvEn7lJR.js b/lecture-08/assets/md-GvEn7lJR.js new file mode 100644 index 0000000000000000000000000000000000000000..fcbd104a4453e0765ee71723a3f32867f090a3e0 --- /dev/null +++ b/lecture-08/assets/md-GvEn7lJR.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";import{t as y}from"./slidev/VClicks-lrjw2pb1.js";var b={class:`grid grid-cols-[1.25fr_1fr] gap-8 items-center mt-2`},x={viewBox:`0 0 360 230`,class:`dl-diagram`,role:`img`,"aria-label":`A game screen with a score; each button press changes the score up or down`},S=[`x`],C=[`x`],w=[`x`],T={class:`mt-2 dl-callout`},E={__name:`slides.md__slidev_5`,setup(E){let{$slidev:D,$nav:O,$clicksContext:k,$clicks:A,$page:j,$renderContext:M,$frontmatter:N}=g();return k.setup(),(g,E)=>{let D=y,O=i(`click`);return e(),p(v,m(r(h(_)(h(N),4))),{default:u(()=>[E[13]||=s(`h1`,null,`A game with no instructions`,-1),s(`div`,b,[s(`div`,null,[(e(),c(`svg`,x,[E[2]||=s(`rect`,{class:`dl-dg-box`,x:`40`,y:`10`,width:`280`,height:`140`,rx:`10`},null,-1),E[3]||=s(`rect`,{class:`dl-dg-fill is-muted`,x:`54`,y:`24`,width:`252`,height:`112`,rx:`4`},null,-1),E[4]||=s(`rect`,{class:`dl-dg-box is-accent`,x:`70`,y:`96`,width:`28`,height:`28`,rx:`5`},null,-1),E[5]||=s(`circle`,{cx:`78`,cy:`106`,r:`3`,style:{fill:`var(--dl-bg)`}},null,-1),E[6]||=s(`circle`,{cx:`90`,cy:`106`,r:`3`,style:{fill:`var(--dl-bg)`}},null,-1),E[7]||=s(`circle`,{class:`dl-dg-dot`,cx:`250`,cy:`90`,r:`10`,style:{fill:`var(--dl-enc)`}},null,-1),E[8]||=s(`path`,{class:`dl-dg-line is-bad`,d:`M160 124 l12 -26 l12 26 z`},null,-1),E[9]||=s(`text`,{class:`dl-dg-lab is-sm`,x:`296`,y:`42`,"text-anchor":`end`},`score 3`,-1),E[10]||=s(`rect`,{class:`dl-dg-box`,x:`150`,y:`152`,width:`60`,height:`10`,rx:`2`},null,-1),f((e(),c(`g`,null,[E[0]||=s(`text`,{class:`dl-dg-small`,x:`10`,y:`186`},`press:`,-1),(e(),c(d,null,a([[`→`,`+1`,!0],[`→`,`0`,null],[`↑`,`−1`,!1],[`→`,`+1`,!0],[`↓`,`0`,null]],(e,t)=>s(`g`,{key:t},[s(`rect`,{class:`dl-dg-box`,x:52+t*58,y:`172`,width:`26`,height:`22`,rx:`4`},null,8,S),s(`text`,{class:`dl-dg-lab is-sm`,x:65+t*58,y:`188`,"text-anchor":`middle`},n(e[0]),9,C),s(`text`,{class:l([`dl-dg-small`,e[2]===!0?`is-good`:e[2]===!1?`is-bad`:``]),x:65+t*58,y:`214`,"text-anchor":`middle`},n(e[1]),11,w)])),64)),E[1]||=s(`text`,{class:`dl-dg-small`,x:`10`,y:`214`},`score:`,-1)])),[[O]])]))]),s(`div`,null,[t(D,null,{default:u(()=>[...E[11]||=[s(`ul`,null,[s(`li`,null,[o(`Nobody says which button is `),s(`strong`,null,`right`)]),s(`li`,null,[o(`After each press, only the `),s(`strong`,null,`score`),o(` changes`)]),s(`li`,null,[o(`Still, the player gets `),s(`strong`,null,`better`)])],-1)]]),_:1})])]),f((e(),c(`div`,T,[...E[12]||=[s(`p`,null,[o(`Learning to act from a score alone is `),s(`strong`,null,`reinforcement learning`),o(` (RL).`)],-1)]])),[[O]])]),_:1},16)}}};export{E as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-L4CkW1kN.js b/lecture-08/assets/md-L4CkW1kN.js new file mode 100644 index 0000000000000000000000000000000000000000..1aaacb1601d98c9a7deaa632bed91face21f2823 --- /dev/null +++ b/lecture-08/assets/md-L4CkW1kN.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_65`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),64))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Three updates by hand`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,[n(`With `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`α`),r(`mo`,null,`=`),r(`mn`,null,`0.5`)]),r(`annotation`,{encoding:`application/x-tex`},`\\alpha = 0.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.5`)])])]),n(`, `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`γ`),r(`mo`,null,`=`),r(`mn`,null,`0.9`)]),r(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0.9`)])])]),n(` and every Q-value at 0:`)]),r(`ol`,null,[r(`li`,null,[n(`From START the robot moves up into the hole: `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`=`),r(`mo`,null,`−`),r(`mn`,null,`10`)]),r(`annotation`,{encoding:`application/x-tex`},`r = -10`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`)])])]),n(`, the episode ends. The target is just `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mo`,null,`−`),r(`mn`,null,`10`)]),r(`annotation`,{encoding:`application/x-tex`},`-10`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`)])])]),n(`, so `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mtext`,null,`START`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.5`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,null,`−`),r(`mn`,null,`10`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mo`,null,`−`),r(`mn`,null,`5`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(\\text{START}, \\text{up}) = 0 + 0.5(-10) = -5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`START`)]),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord`},`0.5`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`10`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`−`),r(`span`,{class:`mord`},`5`)])])]),n(`.`)]),r(`li`,null,[n(`Later, from (2,3) it moves up into the charger, with reward 5, and the episode ends. So `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`2`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`0.5`),r(`mo`,null,`×`),r(`mn`,null,`5`),r(`mo`,null,`=`),r(`mn`,null,`2.5`)]),r(`annotation`,{encoding:`application/x-tex`},`Q((2,3), \\text{up}) = 0.5 \\times 5 = 2.5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`((`),r(`span`,{class:`mord`},`2`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.5`)])])]),n(`.`)]),r(`li`,null,[n(`Then from (3,3) it moves up into (2,3), `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`r`),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`r = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(`. The target is `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mn`,null,`0`),r(`mo`,null,`+`),r(`mn`,null,`0.9`),r(`mo`,null,`×`),r(`mn`,null,`2.5`),r(`mo`,null,`=`),r(`mn`,null,`2.25`)]),r(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 2.5 = 2.25`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`+`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`0.9`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),r(`span`,{class:`mbin`},`×`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.5`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`2.25`)])])]),n(`, so `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mo`,{stretchy:`false`},`(`),r(`mn`,null,`3`),r(`mo`,{separator:`true`},`,`),r(`mn`,null,`3`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,{separator:`true`},`,`),r(`mtext`,null,`up`),r(`mo`,{stretchy:`false`},`)`),r(`mo`,null,`=`),r(`mn`,null,`1.125`)]),r(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\text{up}) = 1.125`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`((`),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord`},`3`),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord text`},[r(`span`,{class:`mord`},`up`)]),r(`span`,{class:`mclose`},`)`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`1.125`)])])]),n(`.`)])]),r(`p`,null,`The reward reaches (2,3) first and (3,3) after. Value moves backwards along the path, one cell per visit.`)],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-MeEdeYS7.js b/lecture-08/assets/md-MeEdeYS7.js new file mode 100644 index 0000000000000000000000000000000000000000..adcf7742588698720ef430b3ea631f8c836d6827 --- /dev/null +++ b/lecture-08/assets/md-MeEdeYS7.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,T as i,U as a,_ as o,b as s,et as c,v as l,xt as u,y as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./RlGlyph-i3WvlmEb.js";var _={class:`slidev-layout dl-end`},v={class:`dl-end__body`},y={class:`dl-end__meta`},b={key:0,class:`dl-end__next`},x=[`href`],S=p(i({__name:`end`,props:{email:{},next:{}},setup(t){let{$slidev:r,$nav:i,$clicksContext:c,$clicks:l,$page:u,$renderContext:f,$frontmatter:p}=m(),h=t;return(t,r)=>(e(),s(`div`,_,[o(`div`,v,[a(t.$slots,`default`,{},void 0,!0)]),r[0]||=o(`div`,{class:`dl-rule`},null,-1),o(`div`,y,[h.next?(e(),s(`span`,b,`Next: `+n(h.next),1)):d(`v-if`,!0),h.email?(e(),s(`a`,{key:1,href:`mailto:${h.email}`},n(h.email),9,x)):d(`v-if`,!0)])]))}}),[[`__scopeId`,`data-v-f8d31aa3`]]),C={class:`mx-auto mt-2`,style:{width:`150px`}},w={__name:`slides.md__slidev_105`,setup(n){let{$slidev:i,$nav:a,$clicksContext:s,$clicks:d,$page:p,$renderContext:_,$frontmatter:v}=m();return s.setup(),(n,i)=>{let a=g;return e(),l(S,u(r(f(h)(f(v),104))),{default:c(()=>[i[0]||=o(`h1`,null,`Questions?`,-1),o(`div`,C,[t(a,{kind:`robot`,size:150})])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Q973zyBX.js b/lecture-08/assets/md-Q973zyBX.js new file mode 100644 index 0000000000000000000000000000000000000000..2b02088f82bb5e532cc399ae7c7ee6aea8604c62 --- /dev/null +++ b/lecture-08/assets/md-Q973zyBX.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,_ as s,b as c,bt as l,et as u,m as d,tt as f,v as p,xt as m,yt as h}from"./modules/shiki-CJZsCeMT.js";import{n as g,t as _}from"./slidev/context-DB-9afGB.js";import{t as v}from"./default-DMdSOhJT.js";import{t as y}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var b={class:`flex justify-center mt-1`},x={viewBox:`0 0 560 150`,class:`dl-diagram`,role:`img`,"aria-label":`The short way: rewards 0, 0, +5 weighted by 1, 0.9 and 0.81 give a return of 4.05`},S=[`x`],C=[`x`],w=[`x`],T=[`x`,`y`,`height`],E=[`x`],D={__name:`slides.md__slidev_26`,setup(D){let{$slidev:O,$nav:k,$clicksContext:A,$clicks:j,$page:M,$renderContext:N,$frontmatter:P}=g();return A.setup(),(g,D)=>{let O=y,k=i(`click`);return e(),p(v,m(r(h(_)(h(P),25))),{default:u(()=>[D[2]||=s(`h1`,null,`The return: add up what is still to come`,-1),D[3]||=s(`p`,null,[o(`The total reward from step `),s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[s(`semantics`,null,[s(`mrow`,null,[s(`mi`,null,`t`)]),s(`annotation`,{encoding:`application/x-tex`},`t`)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),s(`span`,{class:`mord mathnormal`},`t`)])])]),o(` on, with later rewards counting less.`)],-1),t(O,{ranges:[]},{default:u(()=>[...D[0]||=[s(`p`,null,[s(`span`,{class:`katex-display`},[s(`span`,{class:`katex`},[s(`span`,{class:`katex-mathml`},[s(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[s(`semantics`,null,[s(`mrow`,null,[s(`msub`,null,[s(`mi`,null,`G`),s(`mi`,null,`t`)]),s(`mo`,null,`=`),s(`msub`,null,[s(`mi`,null,`R`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`1`)])]),s(`mo`,null,`+`),s(`mi`,null,`γ`),s(`msub`,null,[s(`mi`,null,`R`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`2`)])]),s(`mo`,null,`+`),s(`msup`,null,[s(`mi`,null,`γ`),s(`mn`,null,`2`)]),s(`msub`,null,[s(`mi`,null,`R`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mn`,null,`3`)])]),s(`mo`,null,`+`),s(`mo`,null,`⋯`),s(`mo`,null,`=`),s(`munderover`,null,[s(`mo`,null,`∑`),s(`mrow`,null,[s(`mi`,null,`k`),s(`mo`,null,`=`),s(`mn`,null,`0`)]),s(`mi`,{mathvariant:`normal`},`∞`)]),s(`msup`,null,[s(`mi`,null,`γ`),s(`mi`,null,`k`)]),s(`msub`,null,[s(`mi`,null,`R`),s(`mrow`,null,[s(`mi`,null,`t`),s(`mo`,null,`+`),s(`mi`,null,`k`),s(`mo`,null,`+`),s(`mn`,null,`1`)])])]),s(`annotation`,{encoding:`application/x-tex`},`G_t = R_{t+1} + \\gamma R_{t+2} + \\gamma^2 R_{t+3} + \\cdots = \\sum_{k=0}^{\\infty} \\gamma^k R_{t+k+1} `)])])]),s(`span`,{class:`katex-html`,"aria-hidden":`true`},[s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`},`G`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2806em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`)])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.15em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3011em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`1`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3011em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`2`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`1.0724em`,"vertical-align":`-0.2083em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8641em`}},[s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},`2`)])])])])])])]),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3011em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`3`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),s(`span`,{class:`mbin`},`+`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),s(`span`,{class:`minner`},`⋯`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),s(`span`,{class:`mrel`},`=`),s(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),s(`span`,{class:`katex-base`},[s(`span`,{class:`katex-strut`,style:{height:`2.9535em`,"vertical-align":`-1.3021em`}}),s(`span`,{class:`mop op-limits`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.6514em`}},[s(`span`,{style:{top:`-1.8479em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`),s(`span`,{class:`mrel mtight`},`=`),s(`span`,{class:`mord mtight`},`0`)])])]),s(`span`,{style:{top:`-3.05em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,null,[s(`span`,{class:`mop op-symbol large-op`},`∑`)])]),s(`span`,{style:{top:`-4.3em`,"margin-left":`0em`}},[s(`span`,{class:`pstrut`,style:{height:`3.05em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mtight`},`∞`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`1.3021em`}},[s(`span`)])])])]),s(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.8991em`}},[s(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`)])])])])])])]),s(`span`,{class:`mord`},[s(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),s(`span`,{class:`msupsub`},[s(`span`,{class:`vlist-t vlist-t2`},[s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.3361em`}},[s(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[s(`span`,{class:`pstrut`,style:{height:`2.7em`}}),s(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[s(`span`,{class:`mord mtight`},[s(`span`,{class:`mord mathnormal mtight`},`t`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0315em`}},`k`),s(`span`,{class:`mbin mtight`},`+`),s(`span`,{class:`mord mtight`},`1`)])])])]),s(`span`,{class:`vlist-s`},`​`)]),s(`span`,{class:`vlist-r`},[s(`span`,{class:`vlist`,style:{height:`0.2083em`}},[s(`span`)])])])])])])])])])],-1)]]),_:1}),s(`div`,b,[(e(),c(`svg`,x,[(e(),c(d,null,a([[`R₁`,`0`,`1`],[`R₂`,`0`,`0.9`],[`R₃`,`+5`,`0.81`]],(t,r)=>s(`g`,{key:r},[s(`rect`,{class:l([`dl-dg-box`,r===2?`is-accent`:``]),x:30+r*150,y:`14`,width:`96`,height:`40`,rx:`6`},null,10,S),s(`text`,{class:`dl-dg-lab is-sm`,x:78+r*150,y:`39`,"text-anchor":`middle`},n(t[0])+` = `+n(t[1]),9,C),f((e(),c(`g`,null,[s(`text`,{class:`dl-dg-small`,x:78+r*150,y:`76`,"text-anchor":`middle`},`× γ^`+n(r)+` = × `+n(t[2]),9,w),s(`rect`,{class:`dl-dg-bar`,x:54+r*150,y:132-(r===2?4.05:0)*10,width:`48`,height:Math.max(2,(r===2?4.05:0)*10),rx:`2`},null,8,T),s(`text`,{class:`dl-dg-small`,x:78+r*150,y:`146`,"text-anchor":`middle`},n(r===2?`4.05`:`0`),9,E)])),[[k,r+1]])])),64)),f((e(),c(`g`,null,[...D[1]||=[s(`text`,{class:`dl-dg-lab`,x:`480`,y:`40`},`G₀`,-1),s(`text`,{class:`dl-dg-lab`,x:`480`,y:`70`},`= 4.05`,-1)]])),[[k,4]])]))])]),_:1},16)}}};export{D as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-TKUiOOmA.js b/lecture-08/assets/md-TKUiOOmA.js new file mode 100644 index 0000000000000000000000000000000000000000..ae7e19a7496bb4fe54d90575627442bdfa7441c6 --- /dev/null +++ b/lecture-08/assets/md-TKUiOOmA.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_14`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),13))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: which one is reinforcement learning?`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,[n(`The answer is `),r(`strong`,null,`the walking robot`),n(`.`)]),r(`ul`,null,[r(`li`,null,[n(`It `),r(`strong`,null,`acts`),n(`: it moves its legs.`)]),r(`li`,null,[n(`The environment answers with a `),r(`strong`,null,`score`),n(`: +1 for each second upright.`)]),r(`li`,null,`Nobody tells it which leg to move. That makes it RL.`)]),r(`p`,null,`The other three are not RL:`),r(`ul`,null,[r(`li`,null,[n(`Spam sorting has a `),r(`strong`,null,`label`),n(` (spam or not) for every e-mail: supervised learning.`)]),r(`li`,null,[n(`Grouping customers has no labels, but also `),r(`strong`,null,`no actions and no reward`),n(`: that is clustering.`)]),r(`li`,null,[n(`House prices are predicted from `),r(`strong`,null,`labelled`),n(` examples: supervised regression.`)])])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-VBnw9usT2.js b/lecture-08/assets/md-VBnw9usT2.js new file mode 100644 index 0000000000000000000000000000000000000000..fbefabac605483916a371a296888e3ee8ee81562 --- /dev/null +++ b/lecture-08/assets/md-VBnw9usT2.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_74`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),73))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: When the table gets too big`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[r(`strong`,null,`Left.`),n(` The robot’s Q-table has 9 × 4 = 36 numbers. A table works here.`)]),r(`li`,null,[r(`strong`,null,`Right.`),n(` An Atari game screen, as a deep Q-network sees it: 4 stacked frames of 84 × 84 grey pixels. There are `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msup`,null,[r(`mn`,null,`256`),r(`mrow`,null,[r(`mn`,null,`28`),r(`mtext`,null,` `),r(`mn`,null,`224`)])])]),r(`annotation`,{encoding:`application/x-tex`},`256^{28\\,224}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8141em`}}),r(`span`,{class:`mord`},`25`),r(`span`,{class:`mord`},[r(`span`,{class:`mord`},`6`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.8141em`}},[r(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mtight`},`28`),r(`span`,{class:`mspace mtight`,style:{"margin-right":`0.1952em`}}),r(`span`,{class:`mord mtight`},`224`)])])])])])])])])])])]),n(` possible inputs, far too many for a table. Most screens are also seen only once.`)]),r(`li`,null,[n(`The fix is to replace the table with a `),r(`strong`,null,`function`),n(),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,null,`Q`),r(`mo`,{stretchy:`false`},`(`),r(`mi`,null,`s`),r(`mo`,{separator:`true`},`,`),r(`mi`,null,`a`),r(`mo`,{separator:`true`},`;`),r(`mi`,{mathvariant:`bold`},`w`),r(`mo`,{stretchy:`false`},`)`)]),r(`annotation`,{encoding:`application/x-tex`},`Q(s, a; \\mathbf{w})`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),r(`span`,{class:`mord mathnormal`},`Q`),r(`span`,{class:`mopen`},`(`),r(`span`,{class:`mord mathnormal`},`s`),r(`span`,{class:`mpunct`},`,`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathnormal`},`a`),r(`span`,{class:`mpunct`},`;`),r(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),r(`span`,{class:`mclose`},`)`)])])]),n(` with weights `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`mi`,{mathvariant:`bold`},`w`)]),r(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),r(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`)])])]),n(`: a neural network.`)]),r(`li`,null,`A network gives similar screens similar values, so what it learns on one screen helps on others.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-WQ4TFyjA.js b/lecture-08/assets/md-WQ4TFyjA.js new file mode 100644 index 0000000000000000000000000000000000000000..0ace45e50929f4acf88797fdfee9866603f222ce --- /dev/null +++ b/lecture-08/assets/md-WQ4TFyjA.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_25`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),24))),{default:i(()=>[p[0]||=r(`h1`,null,`The return and the discount`,-1),r(`div`,f,[t(m,{kind:`return`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-X2RPTEil.js b/lecture-08/assets/md-X2RPTEil.js new file mode 100644 index 0000000000000000000000000000000000000000..d871850290e1f149f8c6995077f1115568ee2169 --- /dev/null +++ b/lecture-08/assets/md-X2RPTEil.js @@ -0,0 +1,3 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";import{t as _}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var v={class:`grid grid-cols-[1fr_1.4fr] gap-6 items-center mt-1`},y={class:`flex justify-center`},b={class:`dl-tight`},x={class:`mt-2 dl-callout`},S={__name:`slides.md__slidev_41`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=f();return T.setup(),(f,S)=>{let C=m,w=_,T=g,D=r(`click`);return e(),l(h,u(n(d(p)(d(k),40))),{default:s(()=>[S[4]||=a(`h1`,null,[i(`The value of a move: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`q(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])],-1),S[5]||=a(`p`,null,[i(`The return to expect if you take action `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`a`)]),a(`annotation`,{encoding:`application/x-tex`},`a`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`a`)])])]),i(` in cell `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])]),i(`, then follow the policy.`)],-1),a(`div`,v,[a(`div`,y,[t(C,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[-10,3.645,3.2805,4.05],[0,0,0,0]],highlight:[7],marks:d(E)>=4?[{s:7,a:3,tone:`target`}]:[],cell:88,precision:4},null,8,[`marks`])]),a(`div`,b,[t(w,{ranges:[]},{default:s(()=>[...S[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`q`),a(`mi`,null,`π`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`msub`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mi`,null,`π`)]),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`[`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)]),a(`mtext`,null,`  `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`∣`),a(`mtext`,null,`  `),a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`\xA0`),a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`a`),a(`mtext`,null,` `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`q_\\pi(s, a) = \\mathbb{E}_\\pi\\big[\\, G_t \\;\\big|\\; S_t = s,\\ A_t = a \\,\\big] `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`[`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing mult`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.85em`}},[a(`span`,{style:{top:`-2.85em`}},[a(`span`,{class:`pstrut`,style:{height:`3.2em`}}),a(`span`,{style:{width:`0.333em`,height:`1.2em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.333em`,height:`1.2em`,viewBox:`0 0 333 1200`},[a(`path`,{d:`M145 15 v585 v0 v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v0 v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v0 v585 h43z`})])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.35em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`},`\xA0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`]`)])])])])])],-1)]]),_:1}),S[3]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,{mathvariant:`double-struck`},`E`),a(`mi`,null,`π`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\mathbb{E}_\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8389em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathbb`},`E`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0359em`}},`π`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(`: average when following policy `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`π`)]),a(`annotation`,{encoding:`application/x-tex`},`\\pi`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`π`)])])]),i(` · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`G`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`G_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`G`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(`: the return · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`S_t, A_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(`: state and action at step `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`t`)]),a(`annotation`,{encoding:`application/x-tex`},`t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6151em`}}),a(`span`,{class:`mord mathnormal`},`t`)])])])])],-1),t(T,null,{default:s(()=>[...S[1]||=[a(`ul`,null,[a(`li`,null,[i(`up → hole: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`−`),a(`mn`,null,`10`)]),a(`annotation`,{encoding:`application/x-tex`},`-10`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`10`)])])])]),a(`li`,null,[i(`down → wall, stay: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`4.05`),a(`mo`,null,`=`),a(`mn`,null,`3.645`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.05 = 3.645`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.645`)])])])]),a(`li`,null,[i(`left → (3,1): `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`3.645`),a(`mo`,null,`=`),a(`mn`,null,`3.2805`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 3.645 = 3.2805`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.645`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.2805`)])])])])],-1)]]),_:1}),c((e(),o(`div`,x,[...S[2]||=[a(`p`,null,[i(`right → (3,3): `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`4.5`),a(`mo`,null,`=`),a(`mn`,null,`4.05`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.9 \\times 4.5 = 4.05`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`4.05`)])])]),i(`, the largest. `),a(`strong`,null,[i(`Best action = largest `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`q`)]),a(`annotation`,{encoding:`application/x-tex`},`q`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`)])])])]),i(`, and `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`v`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`mi`,null,`a`)]),a(`mi`,null,`q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`v(s) = \\max_a q(s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),i(`.`)],-1)]])),[[D]])])])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-X6pHqlXs.js b/lecture-08/assets/md-X6pHqlXs.js new file mode 100644 index 0000000000000000000000000000000000000000..43ac32bbab41571765c581763c1144ec8fadd530 --- /dev/null +++ b/lecture-08/assets/md-X6pHqlXs.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";var g={class:`grid grid-cols-2 gap-8 mt-2 items-center`},_={class:`flex flex-col items-center gap-2`},v={class:`flex flex-col items-center gap-2`},y={viewBox:`0 0 300 168`,class:`dl-diagram`,style:{"max-width":`14rem`},role:`img`,"aria-label":`A thermostat adjusting the temperature forever: a wave that never stops`},b={class:`mt-3 dl-callout`},x={__name:`slides.md__slidev_23`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=r(`click`);return e(),l(h,u(n(d(p)(d(O),22))),{default:s(()=>[x[4]||=a(`h1`,null,`Some tasks end, some never do`,-1),a(`div`,g,[a(`div`,_,[t(S,{path:[3,0,0],cell:48}),x[0]||=a(`div`,{class:`dl-secondary text-center`},[a(`b`,null,`Episodic`),i(`: every run ends at a `),a(`b`,null,`terminal state`),i(` (charger or hole)`)],-1)]),c((e(),o(`div`,v,[(e(),o(`svg`,y,[...x[1]||=[a(`defs`,null,[a(`marker`,{id:`l8-cont-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),a(`rect`,{class:`dl-dg-box is-accent`,x:`12`,y:`40`,width:`54`,height:`80`,rx:`10`},null,-1),a(`circle`,{cx:`39`,cy:`96`,r:`12`,style:{fill:`var(--dl-danger)`}},null,-1),a(`rect`,{x:`35`,y:`52`,width:`8`,height:`40`,rx:`4`,style:{fill:`var(--dl-danger)`}},null,-1),a(`path`,{class:`dl-dg-line`,d:`M80 80 C100 50, 120 50, 140 80 S180 110, 200 80 S240 50, 260 80`},null,-1),a(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-cont-h)`,d:`M262 80 H290`},null,-1),a(`text`,{class:`dl-dg-small`,x:`80`,y:`140`},`heat on, heat off, … no end`,-1)]])),x[2]||=a(`div`,{class:`dl-secondary text-center`},[a(`b`,null,`Continuing`),i(`: no terminal state; the run never stops`)],-1)])),[[C]])]),c((e(),o(`div`,b,[...x[3]||=[a(`p`,null,[i(`This lecture’s robot is `),a(`strong`,null,`episodic`),i(`. A continuing task needs the discount of the next section to keep its total finite.`)],-1)]])),[[C]])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-Y9Z16ykm.js b/lecture-08/assets/md-Y9Z16ykm.js new file mode 100644 index 0000000000000000000000000000000000000000..fd07254f773f141650ce22125e8062f2c436449f --- /dev/null +++ b/lecture-08/assets/md-Y9Z16ykm.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,H as a,S as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,m,tt as h,v as g,xt as _,yt as v}from"./modules/shiki-CJZsCeMT.js";import{t as y}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as b,t as x}from"./slidev/context-DB-9afGB.js";import{a as S,c as C,d as w,g as T,i as E,m as D,n as O,t as k}from"./useReinforcement-11RE6Te1.js";import{t as A}from"./slidev/VClicks-lrjw2pb1.js";import{t as j}from"./WidgetFrame-DHgK6j2H.js";import{t as M}from"./Slider-C2M0Z0oG.js";import{t as N}from"./interactive-LBJsATV-.js";var P={viewBox:`0 0 420 250`,class:`dl-eps`,role:`img`,"aria-label":`Probability of each of the four actions under epsilon-greedy`},F=[`x`],I=[`x`,`y`,`height`],L=[`x`,`y`],R=[`x`],z=[`x`],B=[`x`],V=20,H=y(s({__name:`EpsilonGreedyLab`,props:{eps:{default:.2}},setup(r){let{$slidev:i,$nav:s,$clicksContext:h,$clicks:_,$page:y,$renderContext:x,$frontmatter:A}=b(),N=d(r.eps),H=w(D(5,E)[5])[7],U=S(H)[0],W=p(()=>C(H,N.value)),G=p(()=>{let e=T(42);return Array.from({length:V},()=>{let t=e()G.value.filter(e=>e.explore).length),q=e=>Number(e.toFixed(4)).toString().replace(`-`,`−`);return(r,i)=>{let s=M,d=j;return e(),g(d,{"max-width":`34rem`},{controls:f(()=>[t(s,{modelValue:N.value,"onUpdate:modelValue":i[0]||=e=>N.value=e,label:`ε (chance of a random pick)`,min:0,max:1,step:.05,precision:2},null,8,[`modelValue`])]),readout:f(()=>[i[7]||=o(` P(right) = 1 − ε + ε/4 = `,-1),c(`b`,null,n(W.value[v(U)].toFixed(3)),1),i[8]||=o(` · each other action ε/4 = `,-1),c(`b`,null,n((N.value/4).toFixed(3)),1),i[9]||=o(` · random picks in the strip: `,-1),c(`b`,null,n(K.value),1),o(` of `+n(V))]),default:f(()=>[(e(),l(`svg`,P,[(e(!0),l(m,null,a(W.value,(t,r)=>(e(),l(`g`,{key:r},[c(`text`,{x:60+r*95,y:`16`,"text-anchor":`middle`,class:`dl-eps__q`},`Q = `+n(q(v(H)[r])),9,F),c(`rect`,{x:35+r*95,y:170-t*140,width:`50`,height:Math.max(1,t*140),rx:`3`,class:u(r===v(U)?`dl-eps__bar is-best`:`dl-eps__bar`)},null,10,I),c(`text`,{x:60+r*95,y:164-t*140,"text-anchor":`middle`,class:`dl-eps__p`},n(t.toFixed(3)),9,L),c(`text`,{x:60+r*95,y:`190`,"text-anchor":`middle`,class:`dl-eps__a`},n(v(O)[r])+` `+n(v(k)[r]),9,R)]))),128)),i[1]||=c(`line`,{x1:`20`,y1:`170`,x2:`400`,y2:`170`,class:`dl-eps__axis`},null,-1),i[2]||=c(`text`,{x:`20`,y:`216`,class:`dl-eps__cap`},`20 draws:`,-1),(e(!0),l(m,null,a(G.value,(t,r)=>(e(),l(`g`,{key:r},[c(`rect`,{x:86+r*16,y:`203`,width:`14`,height:`18`,rx:`2`,class:u(t.explore?`dl-eps__draw is-explore`:`dl-eps__draw`)},null,10,z),c(`text`,{x:93+r*16,y:`216.5`,"text-anchor":`middle`,class:`dl-eps__arrow`},n(v(O)[t.a]),9,B)]))),128)),i[3]||=c(`rect`,{x:`86`,y:`232`,width:`10`,height:`10`,rx:`2`,class:`dl-eps__draw is-explore`},null,-1),i[4]||=c(`text`,{x:`100`,y:`241`,class:`dl-eps__cap`},`a random pick (explore)`,-1),i[5]||=c(`rect`,{x:`250`,y:`232`,width:`10`,height:`10`,rx:`2`,class:`dl-eps__draw`},null,-1),i[6]||=c(`text`,{x:`264`,y:`241`,class:`dl-eps__cap`},`the best action (exploit)`,-1)]))]),_:1})}}}),[[`__scopeId`,`data-v-807ba612`]]),U={class:`mt-2 dl-callout`},W={__name:`slides.md__slidev_57`,setup(n){let{$slidev:a,$nav:s,$clicksContext:u,$clicks:d,$page:p,$renderContext:m,$frontmatter:y}=b();return u.setup(),(n,a)=>{let s=H,u=A,d=i(`click`);return e(),g(N,_(r(v(x)(v(y),56))),{aside:f(n=>[a[2]||=c(`p`,null,[o(`With probability `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`ε`)]),c(`annotation`,{encoding:`application/x-tex`},`\\varepsilon`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),c(`span`,{class:`mord mathnormal`},`ε`)])])]),o(` ("epsilon") pick `),c(`strong`,null,`any`),o(` action at random. Otherwise pick the `),c(`strong`,null,`best`),o(`.`)],-1),t(u,null,{default:f(()=>[...a[0]||=[c(`ul`,null,[c(`li`,null,[c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`ε`),c(`mo`,null,`=`),c(`mn`,null,`0.2`)]),c(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 0.2`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),c(`span`,{class:`mord mathnormal`},`ε`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`0.2`)])])]),o(`, four actions`)]),c(`li`,null,[o(`best: `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mn`,null,`1`),c(`mo`,null,`−`),c(`mn`,null,`0.2`),c(`mo`,null,`+`),c(`mn`,null,`0.2`),c(`mi`,{mathvariant:`normal`},`/`),c(`mn`,null,`4`),c(`mo`,null,`=`),c(`mn`,null,`0.85`)]),c(`annotation`,{encoding:`application/x-tex`},`1 - 0.2 + 0.2/4 = 0.85`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),c(`span`,{class:`mord`},`1`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),c(`span`,{class:`mbin`},`−`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),c(`span`,{class:`mord`},`0.2`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),c(`span`,{class:`mbin`},`+`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),c(`span`,{class:`mord`},`0.2/4`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`0.85`)])])])]),c(`li`,null,[o(`each other: `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mn`,null,`0.2`),c(`mi`,{mathvariant:`normal`},`/`),c(`mn`,null,`4`),c(`mo`,null,`=`),c(`mn`,null,`0.05`)]),c(`annotation`,{encoding:`application/x-tex`},`0.2 / 4 = 0.05`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),c(`span`,{class:`mord`},`0.2/4`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`0.05`)])])])])],-1)]]),_:1}),h((e(),l(`div`,U,[...a[1]||=[c(`p`,null,[c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`ε`),c(`mo`,null,`=`),c(`mn`,null,`0`)]),c(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 0`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),c(`span`,{class:`mord mathnormal`},`ε`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`0`)])])]),o(`: never explores.`)],-1),c(`p`,null,[c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`ε`),c(`mo`,null,`=`),c(`mn`,null,`1`)]),c(`annotation`,{encoding:`application/x-tex`},`\\varepsilon = 1`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),c(`span`,{class:`mord mathnormal`},`ε`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`1`)])])]),o(`: always random.`)],-1)]])),[[d]])]),default:f(()=>[t(s)]),_:1},16)}}};export{W as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-YUWOF7of.js b/lecture-08/assets/md-YUWOF7of.js new file mode 100644 index 0000000000000000000000000000000000000000..e2f87d68638fa83e6b5f24b9f040bc18ab7cdbc0 --- /dev/null +++ b/lecture-08/assets/md-YUWOF7of.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-DB-9afGB.js";import{t as p}from"./default-DMdSOhJT.js";import{t as m}from"./RlGlyph-i3WvlmEb.js";import{t as h}from"./PollSlide-CA6YXjEC.js";var g={class:`grid grid-cols-[1.7fr_1fr] gap-6 items-start`},_={class:`mt-8 flex justify-center`},v={class:`mt-3 dl-reveal`},y={class:`mt-2 dl-secondary`},b={__name:`slides.md__slidev_13`,setup(b){let{$slidev:x,$nav:S,$clicksContext:C,$clicks:w,$page:T,$renderContext:E,$frontmatter:D}=d();return C.setup(),(d,b)=>{let x=h,S=m,C=r(`click`);return e(),c(p,l(n(u(f)(u(D),12))),{default:o(()=>[i(`div`,g,[i(`div`,null,[t(x,{question:`Which one is reinforcement learning?`,items:[`Sorting spam from 10 000 labelled e-mails`,`A walking robot: +1 per second upright`,`Grouping customers, with no labels`,`Predicting house prices from their size`]})]),i(`div`,_,[t(S,{kind:`loop`,size:150})])]),s((e(),a(`div`,v,[...b[0]||=[i(`p`,null,`The walking robot`,-1)]])),[[C]]),s((e(),a(`div`,y,[...b[1]||=[i(`p`,null,`It acts, and a score comes back. Nobody says which leg to move.`,-1)]])),[[C]])]),_:1},16)}}};export{b as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-dqR9EYFU.js b/lecture-08/assets/md-dqR9EYFU.js new file mode 100644 index 0000000000000000000000000000000000000000..b59e7dc610a6ace80d04ac5e9d707c435be92810 --- /dev/null +++ b/lecture-08/assets/md-dqR9EYFU.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";var g={class:`grid grid-cols-3 gap-4`},_={class:`flex flex-col items-center gap-1`},v={class:`flex flex-col items-center gap-1`},y={class:`flex flex-col items-center gap-1`},b={class:`mt-1 dl-callout`},x={__name:`slides.md__slidev_64`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=m,C=r(`click`);return e(),l(h,u(n(d(p)(d(O),63))),{default:s(()=>[x[4]||=a(`h1`,null,`Three updates by hand`,-1),x[5]||=a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`α`),a(`mo`,null,`=`),a(`mn`,null,`0.5`)]),a(`annotation`,{encoding:`application/x-tex`},`\\alpha = 0.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.5`)])])]),i(`, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`),a(`mo`,null,`=`),a(`mn`,null,`0.9`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma = 0.9`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.9`)])])]),i(`, every `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`)]),a(`annotation`,{encoding:`application/x-tex`},`Q`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`},`Q`)])])]),i(` starts at 0.`)],-1),a(`div`,g,[a(`div`,_,[t(S,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[-5,0,0,0],[0,0,0,0]],marks:[{s:7,a:0,tone:`current`}],robot:4,cell:54,precision:3}),x[0]||=a(`div`,{class:`dl-secondary text-center`},[a(`p`,null,[i(`1 · START, up → hole, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`10`)]),a(`annotation`,{encoding:`application/x-tex`},`r = -10`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`10`)])])]),i(`, end`),a(`br`),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.5`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`10`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mo`,null,`−`),a(`mn`,null,`5`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.5(-10 - 0) = -5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.5`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`10`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`5`)])])])])],-1)]),c((e(),o(`div`,v,[t(S,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2.5,0,0,0],[0,0,0,0],[-5,0,0,0],[0,0,0,0]],marks:[{s:5,a:0,tone:`current`}],robot:2,cell:54,precision:3}),x[1]||=a(`div`,{class:`dl-secondary text-center`},[a(`p`,null,[i(`2 · (2,3), up → charger, `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`=`),a(`mn`,null,`5`)]),a(`annotation`,{encoding:`application/x-tex`},`r = 5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`)])])]),i(`, end`),a(`br`),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.5`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`5`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`2.5`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.5(5 - 0) = 2.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.5`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`2.5`)])])])])],-1)])),[[C]]),c((e(),o(`div`,y,[t(S,{q:[[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[0,0,0,0],[2.5,0,0,0],[0,0,0,0],[-5,0,0,0],[1.125,0,0,0]],marks:[{s:8,a:0,tone:`current`},{s:5,a:0,tone:`target`}],robot:5,cell:54,precision:3}),x[2]||=a(`div`,{class:`dl-secondary text-center`},[a(`p`,null,[i(`3 · (3,3), up → (2,3), `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`=`),a(`mn`,null,`0`)]),a(`annotation`,{encoding:`application/x-tex`},`r = 0`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0`)])])]),a(`br`),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.5`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`2.5`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`1.125`)]),a(`annotation`,{encoding:`application/x-tex`},`0 + 0.5(0 + 0.9 \\times 2.5 - 0) = 1.125`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.5`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`2.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.125`)])])])])],-1)])),[[C]])]),c((e(),o(`div`,b,[...x[3]||=[a(`p`,null,[i(`At an end state there is no next guess: the target is just `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`)]),a(`annotation`,{encoding:`application/x-tex`},`r`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])]),i(`. The +5 travels `),a(`strong`,null,`backwards`),i(`, one cell per visit.`)],-1)]])),[[C]])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-erOyj-pS.js b/lecture-08/assets/md-erOyj-pS.js new file mode 100644 index 0000000000000000000000000000000000000000..0d4f5937178f91038ff17e372d12d183623cc0e3 --- /dev/null +++ b/lecture-08/assets/md-erOyj-pS.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,D as r,G as i,S as a,T as o,Z as s,_ as c,b as l,dt as u,et as d,g as f,m as p,tt as m,v as h,xt as ee,y as g,yt as _}from"./modules/shiki-CJZsCeMT.js";import{t as v}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as y,t as b}from"./slidev/context-DB-9afGB.js";import{a as x,f as S,o as C,t as w}from"./useReinforcement-11RE6Te1.js";import{t as T}from"./GridWorld-D5i5gg4u.js";import{t as E}from"./slidev/VClicks-lrjw2pb1.js";import{t as D}from"./WidgetFrame-DHgK6j2H.js";import{t as O}from"./Slider-C2M0Z0oG.js";import{t as k}from"./interactive-LBJsATV-.js";import{t as A}from"./StepButton-DD4XxENU.js";var j={class:`dl-ql`},M={class:`dl-ql__side`},N={class:`dl-ql__count`},P={class:`dl-ql__move`},F={class:`is-current`},I={key:0,class:`dl-ql__tag`},L={class:`dl-ql__move`},R={key:0},z={class:`dl-ql__work`},B={class:`is-target`},V={class:`dl-ql__res`},H={key:1,class:`dl-ql__move`},U=2e3,W=v(o({__name:`QLearningLab`,props:{updates:{default:0},alpha:{default:.5},eps:{default:.2},sliders:{type:Boolean,default:!0}},setup(r){let{$slidev:i,$nav:o,$clicksContext:m,$clicks:ee,$page:v,$renderContext:b,$frontmatter:E}=y(),k=r,W=u(k.alpha),G=u(k.eps),K=u(k.updates);s(()=>k.updates,e=>{K.value=e});let q=f(()=>S({updates:U,alpha:W.value,eps:G.value})),J=f(()=>K.value>0?q.value[K.value-1]:null),Y=Array.from({length:9},()=>[0,0,0,0]),X=f(()=>J.value?.Q??Y),Z=f(()=>{let e=J.value;if(!e)return[];let t=[{s:e.s,a:e.a,tone:`current`}];if(!e.done){let n=K.value>1?q.value[K.value-2].Q:Y;t.push({s:e.next,a:x(n[e.next])[0],tone:`target`})}return t});function Q(e){K.value=Math.min(U,K.value+e)}function te(){if(K.value>=U)return;let e=q.value[K.value].episode,t=K.value;for(;t{let t=Number(e.toFixed(3));return(Object.is(t,-0)?0:t).toString().replace(`-`,`−`)};return(i,o)=>{let s=T,u=A,f=O,m=D;return e(),h(m,{"max-width":`46rem`},{controls:d(()=>[t(u,{label:`1 update`,glyph:`▸`,onClick:o[0]||=e=>Q(1)}),t(u,{label:`1 episode`,variant:`ghost`,onClick:te}),t(u,{label:`+50`,variant:`ghost`,onClick:o[1]||=e=>Q(50)}),t(u,{label:`reset`,variant:`ghost`,onClick:o[2]||=e=>K.value=0}),r.sliders?(e(),h(f,{key:0,modelValue:W.value,"onUpdate:modelValue":o[3]||=e=>W.value=e,label:`α`,min:.1,max:1,step:.1,precision:1},null,8,[`modelValue`])):g(`v-if`,!0),r.sliders?(e(),h(f,{key:1,modelValue:G.value,"onUpdate:modelValue":o[4]||=e=>G.value=e,label:`ε`,min:0,max:1,step:.05,precision:2},null,8,[`modelValue`])):g(`v-if`,!0)]),readout:d(()=>[o[14]||=c(`span`,{class:`is-current`},`orange`,-1),o[15]||=a(`: the Q-value being updated · `,-1),o[16]||=c(`span`,{class:`is-target`},`purple`,-1),o[17]||=a(`: the best Q-value of the next state · Q(START, right) = `,-1),c(`b`,null,n($(X.value[7][3])),1)]),default:d(()=>[c(`div`,j,[t(s,{q:X.value,greedy:``,marks:Z.value,robot:J.value?J.value.next:7,cell:96,precision:2},null,8,[`q`,`marks`,`robot`]),c(`div`,M,[c(`div`,N,[o[5]||=a(`update `,-1),c(`b`,null,n(K.value),1),o[6]||=a(` · episode `,-1),c(`b`,null,n(J.value?J.value.episode:0),1)]),J.value?(e(),l(p,{key:0},[c(`div`,P,[o[7]||=a(` in `,-1),c(`b`,null,n(_(C)(J.value.s)),1),o[8]||=a(`, took `,-1),c(`span`,F,n(_(w)[J.value.a]),1),J.value.explored?(e(),l(`span`,I,`random pick`)):g(`v-if`,!0)]),c(`div`,L,[o[9]||=a(`→ reward `,-1),c(`b`,null,n($(J.value.reward)),1),o[10]||=a(`, now in `,-1),c(`b`,null,n(_(C)(J.value.next)),1),J.value.done?(e(),l(`span`,R,` (end)`)):g(`v-if`,!0)]),c(`div`,z,[c(`div`,null,[a(`target = `+n($(J.value.reward))+` + 0.9 × `,1),c(`span`,B,n($(J.value.maxNext)),1),o[11]||=a(` = `,-1),c(`b`,null,n($(J.value.target)),1)]),c(`div`,null,`Q ← `+n($(J.value.before))+` + `+n(W.value)+` × (`+n($(J.value.target))+` − `+n($(J.value.before))+`)`,1),c(`div`,V,[o[12]||=a(`= `,-1),c(`b`,null,n($(J.value.after)),1)])])],64)):(e(),l(`div`,H,[...o[13]||=[a(`Every Q-value starts at 0. Press `,-1),c(`b`,null,`1 update`,-1),a(`.`,-1)]]))])])]),_:1})}}}),[[`__scopeId`,`data-v-ad4cd42f`]]),G={class:`mt-2 dl-callout`},K={__name:`slides.md__slidev_66`,setup(n){let{$slidev:o,$nav:s,$clicksContext:u,$clicks:f,$page:p,$renderContext:g,$frontmatter:v}=y();return u.setup(),(n,o)=>{let s=W,u=E,f=i(`click`);return e(),h(k,ee(r(_(b)(_(v),65))),{aside:d(n=>[o[2]||=c(`p`,null,[a(`Press `),c(`strong`,null,`1 update`),a(` 7 times, then `),c(`strong`,null,`+50`),a(` twice.`)],-1),t(u,null,{default:d(()=>[...o[0]||=[c(`ul`,null,[c(`li`,null,`Updates 1, 4, 6: −5, 2.5, 1.125`),c(`li`,null,[a(`The +5 spreads `),c(`strong`,null,`backwards`)]),c(`li`,null,[a(`Update 100: START → right, `),c(`span`,{class:`katex`},[c(`span`,{class:`katex-mathml`},[c(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[c(`semantics`,null,[c(`mrow`,null,[c(`mi`,null,`Q`),c(`mo`,null,`=`),c(`mn`,null,`4.05`)]),c(`annotation`,{encoding:`application/x-tex`},`Q = 4.05`)])])]),c(`span`,{class:`katex-html`,"aria-hidden":`true`},[c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),c(`span`,{class:`mord mathnormal`},`Q`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),c(`span`,{class:`mrel`},`=`),c(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),c(`span`,{class:`katex-base`},[c(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),c(`span`,{class:`mord`},`4.05`)])])])])],-1)]]),_:1}),m((e(),l(`div`,G,[...o[1]||=[c(`p`,null,[a(`4.05 is value iteration’s number, learned `),c(`strong`,null,`without the map`),a(`.`)],-1)]])),[[f]])]),default:d(()=>[t(s,{updates:0})]),_:1},16)}}};export{K as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-es6QvLJL.js b/lecture-08/assets/md-es6QvLJL.js new file mode 100644 index 0000000000000000000000000000000000000000..f0b3496cdccf3b5ffe4012cfa86211557521ab51 --- /dev/null +++ b/lecture-08/assets/md-es6QvLJL.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_104`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),103))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: Reading and things to try`,-1),r(`div`,{class:`dl-describe`},[r(`ul`,null,[r(`li`,null,[n(`The four links are for further study: `),r(`ul`,null,[r(`li`,null,`the Hugging Face Deep RL course, hands-on, with Q-learning and DQN units;`),r(`li`,null,`Ketan Doshi’s visual explanation of Q-learning and DQN;`),r(`li`,null,`Andrej Karpathy’s "Pong from Pixels", a method that learns the policy directly;`),r(`li`,null,`a Distill article on what a trained agent’s network looks at.`)])]),r(`li`,null,`The picture is the robot’s solved floor: the values and the best arrows.`),r(`li`,null,`An exercise: write the floor as a small environment with a one-hot state. Train the Q-network from the code slides on it. Its values should approach the ones shown.`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-hTSgqenN.js b/lecture-08/assets/md-hTSgqenN.js new file mode 100644 index 0000000000000000000000000000000000000000..234bfccbe23d8088a38743a62b1cb1087a4f9648 --- /dev/null +++ b/lecture-08/assets/md-hTSgqenN.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./RlGlyph-i3WvlmEb.js";import{t as d}from"./section-CqA-0pFf.js";var f={class:`dl-side-glyph`},p={__name:`slides.md__slidev_100`,setup(p){let{$slidev:m,$nav:h,$clicksContext:g,$clicks:_,$page:v,$renderContext:y,$frontmatter:b}=c();return g.setup(),(c,p)=>{let m=u;return e(),a(d,o(n(s(l)(s(b),99))),{default:i(()=>[p[0]||=r(`h1`,null,`Recap`,-1),r(`div`,f,[t(m,{kind:`robot`,size:190})])]),_:1},16)}}};export{p as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-jnqVVH902.js b/lecture-08/assets/md-jnqVVH902.js new file mode 100644 index 0000000000000000000000000000000000000000..59ee86621653ed76b6043edb257bf1200b040897 --- /dev/null +++ b/lecture-08/assets/md-jnqVVH902.js @@ -0,0 +1 @@ +import{B as e,D as t,_ as n,et as r,v as i,xt as a,yt as o}from"./modules/shiki-CJZsCeMT.js";import{n as s,t as c}from"./slidev/context-DB-9afGB.js";import{t as l}from"./default-DMdSOhJT.js";var u={__name:`slides.md__slidev_78`,setup(u){let{$slidev:d,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=s();return p.setup(),(s,u)=>(e(),i(l,a(t(o(c)(o(_),77))),{default:r(()=>[...u[0]||=[n(`h1`,null,`In words: Going deeper: the network that played Atari`,-1),n(`div`,{class:`dl-describe`},[n(`ul`,null,[n(`li`,null,`The boxes are the layers of the deep Q-network that played Atari games.`),n(`li`,null,`The input is 4 stacked grey frames of 84 × 84 pixels. Four frames show which way things move.`),n(`li`,null,`Three convolution layers follow. Their outputs are 20 × 20 × 32, 9 × 9 × 64 and 7 × 7 × 64.`),n(`li`,null,`A fully connected layer of 512 units follows.`),n(`li`,null,`The output has one Q-value per joystick action, between 4 and 18 depending on the game.`)]),n(`p`,null,`It is a CNN, because the state is an image. The output is the same as the robot’s: one Q-value per action.`)],-1)]]),_:1},16))}};export{u as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-k6-o3Hlb2.js b/lecture-08/assets/md-k6-o3Hlb2.js new file mode 100644 index 0000000000000000000000000000000000000000..7362cdc6c33c89ad6cae60f116fcc51c979aeed6 --- /dev/null +++ b/lecture-08/assets/md-k6-o3Hlb2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,H as i,S as a,_ as o,b as s,et as c,m as l,tt as u,v as d,xt as f,yt as p}from"./modules/shiki-CJZsCeMT.js";import{n as m,t as h}from"./slidev/context-DB-9afGB.js";import{t as g}from"./default-DMdSOhJT.js";import{t as _}from"./slidev/VClicks-lrjw2pb1.js";var v={class:`grid grid-cols-[1.3fr_1fr] gap-6 items-center`},y={viewBox:`0 0 400 230`,class:`dl-diagram`,role:`img`,"aria-label":`The Q-network's weights change every step; the target network's weights stay fixed and jump to a copy every T steps, like a staircase`},b=[`x1`,`x2`],x=[`x`],S={class:`dl-tight`},C={class:`mt-2 dl-callout`},w={__name:`slides.md__slidev_83`,setup(w){let{$slidev:T,$nav:E,$clicksContext:D,$clicks:O,$page:k,$renderContext:A,$frontmatter:j}=m();return D.setup(),(m,w)=>{let T=_,E=r(`click`);return e(),d(g,f(n(p(h)(p(j),82))),{default:c(()=>[w[11]||=o(`h1`,null,`Fix 2: a target network`,-1),o(`div`,v,[o(`div`,null,[(e(),s(`svg`,y,[w[2]||=o(`defs`,null,[o(`marker`,{id:`l8-tgt-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),w[3]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tgt-h)`,d:`M30 200 H390`},null,-1),w[4]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-tgt-h)`,d:`M30 200 V20`},null,-1),w[5]||=o(`text`,{class:`dl-dg-small`,x:`388`,y:`190`,"text-anchor":`end`},`training step`,-1),w[6]||=o(`text`,{class:`dl-dg-small`,x:`36`,y:`30`},`a weight`,-1),w[7]||=o(`path`,{d:`M30 180 C60 170, 80 150, 110 152 S150 120, 190 118 S240 90, 270 86 S330 60, 380 56`,style:{fill:`none`,stroke:`var(--dl-accent)`,"stroke-width":`2.5`}},null,-1),w[8]||=o(`text`,{class:`dl-dg-small is-good`,x:`300`,y:`56`},`Q-network w: every step`,-1),u((e(),s(`g`,null,[w[0]||=o(`path`,{d:`M30 180 H130 V140 H230 V112 H330 V74 H380`,style:{fill:`none`,stroke:`var(--dl-q)`,"stroke-width":`2.5`,"stroke-dasharray":`6 3`}},null,-1),w[1]||=o(`text`,{class:`dl-dg-small`,x:`236`,y:`140`,style:{fill:`var(--dl-q)`}},`target w⁻: copied every T steps`,-1),(e(),s(l,null,i([130,230,330],e=>o(`g`,{key:e},[o(`line`,{class:`dl-dg-split`,x1:e,y1:`196`,x2:e,y2:`204`},null,8,b),o(`text`,{class:`dl-dg-small`,x:e,y:`216`,"text-anchor":`middle`},`T`,8,x)])),64))])),[[E]])]))]),o(`div`,S,[t(T,{at:`2`},{default:c(()=>[...w[9]||=[o(`ul`,null,[o(`li`,null,[a(`Keep a `),o(`strong`,null,`second copy`),a(` of the network, weights `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`msup`,null,[o(`mi`,{mathvariant:`bold`},`w`),o(`mo`,null,`−`)])]),o(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w}^-`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.7713em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])])]),o(`li`,null,[a(`Compute the `),o(`strong`,null,`target`),a(` with it`)]),o(`li`,null,[a(`Do not train it. `),o(`strong`,null,`Copy`),a(),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,{mathvariant:`bold`},`w`),o(`mo`,null,`→`),o(`msup`,null,[o(`mi`,{mathvariant:`bold`},`w`),o(`mo`,null,`−`)])]),o(`annotation`,{encoding:`application/x-tex`},`\\mathbf{w} \\to \\mathbf{w}^-`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.4444em`}}),o(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),o(`span`,{class:`mrel`},`→`),o(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.7713em`}}),o(`span`,{class:`mord`},[o(`span`,{class:`mord mathbf`,style:{"margin-right":`0.016em`}},`w`),o(`span`,{class:`msupsub`},[o(`span`,{class:`vlist-t`},[o(`span`,{class:`vlist-r`},[o(`span`,{class:`vlist`,style:{height:`0.7713em`}},[o(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[o(`span`,{class:`pstrut`,style:{height:`2.7em`}}),o(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[o(`span`,{class:`mbin mtight`},`−`)])])])])])])])])])]),a(` every `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`)]),o(`annotation`,{encoding:`application/x-tex`},`T`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),a(` steps`)])],-1)]]),_:1}),u((e(),s(`div`,C,[...w[10]||=[o(`p`,null,[a(`For `),o(`span`,{class:`katex`},[o(`span`,{class:`katex-mathml`},[o(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[o(`semantics`,null,[o(`mrow`,null,[o(`mi`,null,`T`)]),o(`annotation`,{encoding:`application/x-tex`},`T`)])])]),o(`span`,{class:`katex-html`,"aria-hidden":`true`},[o(`span`,{class:`katex-base`},[o(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),o(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`T`)])])]),a(` steps the target `),o(`strong`,null,`stands still`),a(`, so the Q-network has a fixed goal to move toward.`)],-1)]])),[[E,5]])])])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-l6R6jPGW.js b/lecture-08/assets/md-l6R6jPGW.js new file mode 100644 index 0000000000000000000000000000000000000000..c10a3a3250cca66476440ec62831bf35285f4152 --- /dev/null +++ b/lecture-08/assets/md-l6R6jPGW.js @@ -0,0 +1,3 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/VClicks-lrjw2pb1.js";import{t as _}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var v={class:`grid grid-cols-[1fr_1.5fr] gap-6 items-center`},y={class:`flex justify-center`},b={class:`dl-tight`},x={class:`mt-2 dl-callout`},S={__name:`slides.md__slidev_18`,setup(S){let{$slidev:C,$nav:w,$clicksContext:T,$clicks:E,$page:D,$renderContext:O,$frontmatter:k}=f();return T.setup(),(f,S)=>{let C=m,w=_,T=g,E=r(`click`);return e(),l(h,u(n(d(p)(d(k),17))),{default:s(()=>[S[5]||=a(`h1`,null,[i(`The rule of the world: `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])])],-1),a(`div`,v,[a(`div`,y,[t(C,{slip:``,robot:5,cell:74})]),a(`div`,b,[S[3]||=a(`p`,null,[i(`On a `),a(`strong`,null,`slippery`),i(` floor, "up" from (2,3) does not always go up.`)],-1),t(w,{ranges:[]},{default:s(()=>[...S[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mi`,null,`P`),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`(`),a(`msub`,null,[a(`mi`,null,`S`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])]),a(`mo`,null,`=`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,null,`R`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])]),a(`mo`,null,`=`),a(`mi`,null,`r`),a(`mtext`,null,`  `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`∣`),a(`mtext`,null,`  `),a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)]),a(`mo`,null,`=`),a(`mi`,null,`a`),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a) = P\\big(S_{t+1} = s',\\, R_{t+1} = r \\;\\big|\\; S_t = s,\\, A_t = a\\big) `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0519em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`(`)]),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0102em`,"vertical-align":`-0.2083em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing mult`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.85em`}},[a(`span`,{style:{top:`-2.85em`}},[a(`span`,{class:`pstrut`,style:{height:`3.2em`}}),a(`span`,{style:{width:`0.333em`,height:`1.2em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`0.333em`,height:`1.2em`,viewBox:`0 0 333 1200`},[a(`path`,{d:`M145 15 v585 v0 v585 c2.667,10,9.667,15,21,15 +c10,0,16.667,-5,20,-15 v-585 v0 v-585 c-2.667,-10,-9.667,-15,-21,-15 +c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v0 v585 h43z`})])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.35em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`)`)])])])])])],-1)]]),_:1}),S[4]||=a(`div`,{class:`dl-secondary`},[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`P`)]),a(`annotation`,{encoding:`application/x-tex`},`P`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6833em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.1389em`}},`P`)])])]),i(`: probability · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`S`),a(`mi`,null,`t`)]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`A`),a(`mi`,null,`t`)])]),a(`annotation`,{encoding:`application/x-tex`},`S_t, A_t`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8778em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`A`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2806em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])]),i(`: now · `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`S`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])]),a(`mo`,{separator:`true`},`,`),a(`msub`,null,[a(`mi`,null,`R`),a(`mrow`,null,[a(`mi`,null,`t`),a(`mo`,null,`+`),a(`mn`,null,`1`)])])]),a(`annotation`,{encoding:`application/x-tex`},`S_{t+1}, R_{t+1}`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.3011em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`t`),a(`span`,{class:`mbin mtight`},`+`),a(`span`,{class:`mord mtight`},`1`)])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.2083em`}},[a(`span`)])])])])])])])]),i(`: next`)])],-1),t(T,null,{default:s(()=>[...S[1]||=[a(`ul`,null,[a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`charger`),a(`mo`,{separator:`true`},`,`),a(`mo`,null,`+`),a(`mn`,null,`5`),a(`mo`,null,`∣`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`0.8`)]),a(`annotation`,{encoding:`application/x-tex`},`p(\\text{charger}, +5 \\mid (2,3), \\text{up}) = 0.8`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`charger`)]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`+`),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.8`)])])])]),a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`mtext`,null,`hole`),a(`mo`,{separator:`true`},`,`),a(`mo`,null,`−`),a(`mn`,null,`10`),a(`mo`,null,`∣`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`0.1`)]),a(`annotation`,{encoding:`application/x-tex`},`p(\\text{hole}, -10 \\mid (2,3), \\text{up}) = 0.1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`hole`)]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`10`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.1`)])])])]),a(`li`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`0`),a(`mo`,null,`∣`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`0.1`)]),a(`annotation`,{encoding:`application/x-tex`},`p((2,3), 0 \\mid (2,3), \\text{up}) = 0.1`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`((`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.1`)])])]),i(` (wall)`)])],-1)]]),_:1}),c((e(),o(`div`,x,[...S[2]||=[a(`p`,null,[i(`The three add up to `),a(`strong`,null,`1`),i(`. On our normal floor, one outcome has probability 1.`)],-1)]])),[[E]])])])]),_:1},16)}}};export{S as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-oSmNAz51.js b/lecture-08/assets/md-oSmNAz51.js new file mode 100644 index 0000000000000000000000000000000000000000..5b94f722e96f5954eebd72b5d8de224a739952f5 --- /dev/null +++ b/lecture-08/assets/md-oSmNAz51.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./GridWorld-D5i5gg4u.js";import{t as h}from"./default-DMdSOhJT.js";import{t as g}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var _={class:`grid grid-cols-[1.4fr_1fr] gap-6 items-start`},v={class:`mt-1 dl-tight`},y={class:`dl-math-sm`},b={class:`mt-2 dl-callout dl-tight`},x={__name:`slides.md__slidev_44`,setup(x){let{$slidev:S,$nav:C,$clicksContext:w,$clicks:T,$page:E,$renderContext:D,$frontmatter:O}=f();return w.setup(),(f,x)=>{let S=g,C=m,w=r(`click`);return e(),l(h,u(n(d(p)(d(O),43))),{default:s(()=>[x[4]||=a(`h1`,null,`Reading the equation: the Bellman equation`,-1),a(`div`,_,[a(`div`,null,[x[2]||=a(`div`,{class:`dl-ledger dl-eq-legend dl-tight`},[a(`table`,null,[a(`thead`,null,[a(`tr`,null,[a(`th`,null,`symbol`),a(`th`,null,`name`),a(`th`,null,`here`),a(`th`,null,`example`)])]),a(`tbody`,null,[a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mo`,null,`∗`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`v_*(s)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1757em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`∗`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`)])])])]),a(`td`,null,`optimal state value`),a(`td`,null,[i(`best expected return from `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`s`)]),a(`annotation`,{encoding:`application/x-tex`},`s`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`},`s`)])])])]),a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mo`,null,`∗`)]),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`5`)]),a(`annotation`,{encoding:`application/x-tex`},`v_*(2,3) = 5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1757em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`∗`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`5`)])])])])]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`mi`,null,`a`)])]),a(`annotation`,{encoding:`application/x-tex`},`\\max_a`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.5806em`,"vertical-align":`-0.15em`}}),a(`span`,{class:`mop`},[a(`span`,{class:`mop`},`max`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1514em`}},[a(`span`,{style:{top:`-2.55em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])])])])])]),a(`td`,null,`maximum over actions`),a(`td`,null,`try all four moves, keep the best`),a(`td`,null,`up`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`r`)]),a(`annotation`,{encoding:`application/x-tex`},`r`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`)])])])]),a(`td`,null,`reward of the move`),a(`td`,null,`0, +5 or −10`),a(`td`,null,`+5`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`annotation`,{encoding:`application/x-tex`},`s'`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7519em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])])]),a(`td`,null,`next state`),a(`td`,null,`where the move lands`),a(`td`,null,`charger`)]),a(`tr`,null,[a(`td`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`γ`)]),a(`annotation`,{encoding:`application/x-tex`},`\\gamma`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.625em`,"vertical-align":`-0.1944em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`)])])])]),a(`td`,null,`discount factor`),a(`td`,null,`set by hand`),a(`td`,null,`0.9`)])])])],-1),c((e(),o(`div`,v,[x[1]||=a(`p`,null,[i(`With chance, average over outcomes using `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`p(s', r \\mid s, a)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.0019em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7519em`}},[a(`span`,{style:{top:`-3.063em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),i(`:`)],-1),a(`div`,y,[t(S,{ranges:[]},{default:s(()=>[...x[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`msub`,null,[a(`mi`,null,`v`),a(`mo`,null,`∗`)]),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`munder`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`mi`,null,`a`)]),a(`munder`,null,[a(`mo`,null,`∑`),a(`mrow`,null,[a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`)])]),a(`mi`,null,`p`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`r`),a(`mo`,null,`∣`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mtext`,null,` `),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`[`),a(`mtext`,null,` `),a(`mi`,null,`r`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`mtext`,null,` `),a(`msub`,null,[a(`mi`,null,`v`),a(`mo`,null,`∗`)]),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.2em`,maxsize:`1.2em`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`v_*(s) = \\max_a \\sum_{s', r} p(s', r \\mid s, a)\\,\\big[\\, r + \\gamma\\, v_*(s') \\big] `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1757em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`∗`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`2.4801em`,"vertical-align":`-1.4301em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.4306em`}},[a(`span`,{style:{top:`-2.4em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`)])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,null,[a(`span`,{class:`mop`},`max`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.7em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.05em`}},[a(`span`,{style:{top:`-1.856em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct mtight`},`,`),a(`span`,{class:`mord mathnormal mtight`,style:{"margin-right":`0.0278em`}},`r`)])])]),a(`span`,{style:{top:`-3.05em`}},[a(`span`,{class:`pstrut`,style:{height:`3.05em`}}),a(`span`,null,[a(`span`,{class:`mop op-symbol large-op`},`∑`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.4301em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`p`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`∣`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`[`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1.2em`,"vertical-align":`-0.35em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0359em`}},`v`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.1757em`}},[a(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0359em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mbin mtight`},`∗`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.15em`}},[a(`span`)])])])])]),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size1`},`]`)])])])])])],-1)]]),_:1})])])),[[w]])]),a(`div`,null,[t(C,{slip:``,robot:5,cell:48,plain:``}),c((e(),o(`div`,b,[...x[3]||=[a(`p`,null,`Slippery "up" from (2,3), using normal-floor values:`,-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mn`,null,`0.8`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`5`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`+`),a(`mn`,null,`0.1`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,null,`−`),a(`mn`,null,`10`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`0.8(5) + 0.1(-10)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.8`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`−`),a(`span`,{class:`mord`},`10`),a(`span`,{class:`mclose`},`)`)])])])],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`+`),a(`mtext`,null,` `),a(`mn`,null,`0.1`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.9`),a(`mo`,null,`×`),a(`mn`,null,`5`),a(`mo`,{stretchy:`false`},`)`)]),a(`annotation`,{encoding:`application/x-tex`},`+\\, 0.1(0 + 0.9 \\times 5)`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`0.1`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.9`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`5`),a(`span`,{class:`mclose`},`)`)])])])],-1),a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mo`,null,`=`),a(`mn`,null,`4`),a(`mo`,null,`−`),a(`mn`,null,`1`),a(`mo`,null,`+`),a(`mn`,null,`0.45`),a(`mo`,null,`=`),a(`mn`,null,`3.45`)]),a(`annotation`,{encoding:`application/x-tex`},`= 4 - 1 + 0.45 = 3.45`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.3669em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`4`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`1`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.45`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`3.45`)])])])],-1)]])),[[w]])])])]),_:1},16)}}};export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-pFjrzahN2.js b/lecture-08/assets/md-pFjrzahN2.js new file mode 100644 index 0000000000000000000000000000000000000000..c7b65b830b009b3becfe02a1792a3f5b4ba30975 --- /dev/null +++ b/lecture-08/assets/md-pFjrzahN2.js @@ -0,0 +1 @@ +import{B as e,C as t,D as n,G as r,_ as i,b as a,et as o,tt as s,v as c,xt as l,yt as u}from"./modules/shiki-CJZsCeMT.js";import{n as d,t as f}from"./slidev/context-DB-9afGB.js";import{t as p}from"./default-DMdSOhJT.js";import{t as m}from"./RlGlyph-i3WvlmEb.js";var h={class:`grid grid-cols-4 gap-x-4 gap-y-3 mt-4`},g={class:`flex flex-col items-center text-center gap-1`},_={class:`flex flex-col items-center text-center gap-1`},v={class:`flex flex-col items-center text-center gap-1`},y={class:`flex flex-col items-center text-center gap-1`},b={class:`flex flex-col items-center text-center gap-1`},x={class:`flex flex-col items-center text-center gap-1`},S={class:`flex flex-col items-center text-center gap-1`},C={class:`mt-4 dl-callout`},w={__name:`slides.md__slidev_2`,setup(w){let{$slidev:T,$nav:E,$clicksContext:D,$clicks:O,$page:k,$renderContext:A,$frontmatter:j}=d();return D.setup(),(d,w)=>{let T=m,E=r(`click`);return e(),c(p,l(n(u(f)(u(j),1))),{default:o(()=>[w[8]||=i(`h1`,null,`Today, in seven parts`,-1),w[9]||=i(`p`,null,`One robot, one floor, four ideas, then a neural network.`,-1),i(`div`,h,[i(`div`,g,[t(T,{kind:`loop`,size:64}),w[0]||=i(`span`,{class:`dl-secondary`},`00 Learning from a score`,-1)]),i(`div`,_,[t(T,{kind:`mdp`,size:64}),w[1]||=i(`span`,{class:`dl-secondary`},`01 The world as an MDP (Markov decision process)`,-1)]),i(`div`,v,[t(T,{kind:`return`,size:64}),w[2]||=i(`span`,{class:`dl-secondary`},`02 The return and the discount`,-1)]),i(`div`,y,[t(T,{kind:`value`,size:64}),w[3]||=i(`span`,{class:`dl-secondary`},`03 Policy and value`,-1)]),i(`div`,b,[t(T,{kind:`qtable`,size:64}),w[4]||=i(`span`,{class:`dl-secondary`},`04 Q-learning`,-1)]),i(`div`,x,[t(T,{kind:`dqn`,size:64}),w[5]||=i(`span`,{class:`dl-secondary`},`05 Deep Q-networks`,-1)]),i(`div`,S,[t(T,{kind:`robot`,size:64}),w[6]||=i(`span`,{class:`dl-secondary`},`06 Recap`,-1)])]),s((e(),a(`div`,C,[...w[7]||=[i(`p`,null,`Section 04 is the core: the robot learns from its own moves, with no map of the floor.`,-1)]])),[[E]])]),_:1},16)}}};export{w as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-qI5Gn-4r.js b/lecture-08/assets/md-qI5Gn-4r.js new file mode 100644 index 0000000000000000000000000000000000000000..98c475b35d208858688c72b78cd67abad66fbce1 --- /dev/null +++ b/lecture-08/assets/md-qI5Gn-4r.js @@ -0,0 +1 @@ +import{B as e,D as t,S as n,_ as r,et as i,v as a,xt as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{n as c,t as l}from"./slidev/context-DB-9afGB.js";import{t as u}from"./default-DMdSOhJT.js";var d={__name:`slides.md__slidev_17`,setup(d){let{$slidev:f,$nav:p,$clicksContext:m,$clicks:h,$page:g,$renderContext:_,$frontmatter:v}=c();return m.setup(),(c,d)=>(e(),a(u,o(t(s(l)(s(v),16))),{default:i(()=>[...d[0]||=[r(`h1`,null,`In words: An episode is a chain of states, actions and rewards`,-1),r(`div`,{class:`dl-describe`},[r(`p`,null,`The slide writes the robot’s short way home as a chain, from the start cell (START).`),r(`ol`,null,[r(`li`,null,[r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`0`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = START. Action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mn`,null,`0`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`0`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = right gives reward `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`R`),r(`mn`,null,`1`)]),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`R_1 = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`1`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(`. Now `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`1`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_1`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`1`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = (3,3).`)]),r(`li`,null,[n(`Action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mn`,null,`1`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_1`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`1`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = up gives `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`R`),r(`mn`,null,`2`)]),r(`mo`,null,`=`),r(`mn`,null,`0`)]),r(`annotation`,{encoding:`application/x-tex`},`R_2 = 0`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),r(`span`,{class:`mord`},`0`)])])]),n(`. Now `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`2`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_2`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = (2,3).`)]),r(`li`,null,[n(`Action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mn`,null,`2`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_2`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`2`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = up gives `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`R`),r(`mn`,null,`3`)]),r(`mo`,null,`=`),r(`mo`,null,`+`),r(`mn`,null,`5`)]),r(`annotation`,{encoding:`application/x-tex`},`R_3 = +5`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`3`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])]),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),r(`span`,{class:`mrel`},`=`),r(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),r(`span`,{class:`mord`},`+`),r(`span`,{class:`mord`},`5`)])])]),n(`. Now `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`S`),r(`mn`,null,`3`)])]),r(`annotation`,{encoding:`application/x-tex`},`S_3`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0576em`}},`S`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0576em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},`3`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` = charger, and the episode ends.`)])]),r(`p`,null,[n(`The reward after action `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`A`),r(`mi`,null,`t`)])]),r(`annotation`,{encoding:`application/x-tex`},`A_t`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8333em`,"vertical-align":`-0.15em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`},`A`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2806em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`0em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`)])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.15em`}},[r(`span`)])])])])])])])]),n(` is written `),r(`span`,{class:`katex`},[r(`span`,{class:`katex-mathml`},[r(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[r(`semantics`,null,[r(`mrow`,null,[r(`msub`,null,[r(`mi`,null,`R`),r(`mrow`,null,[r(`mi`,null,`t`),r(`mo`,null,`+`),r(`mn`,null,`1`)])])]),r(`annotation`,{encoding:`application/x-tex`},`R_{t+1}`)])])]),r(`span`,{class:`katex-html`,"aria-hidden":`true`},[r(`span`,{class:`katex-base`},[r(`span`,{class:`katex-strut`,style:{height:`0.8917em`,"vertical-align":`-0.2083em`}}),r(`span`,{class:`mord`},[r(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0077em`}},`R`),r(`span`,{class:`msupsub`},[r(`span`,{class:`vlist-t vlist-t2`},[r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.3011em`}},[r(`span`,{style:{top:`-2.55em`,"margin-left":`-0.0077em`,"margin-right":`0.05em`}},[r(`span`,{class:`pstrut`,style:{height:`2.7em`}}),r(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[r(`span`,{class:`mord mtight`},[r(`span`,{class:`mord mathnormal mtight`},`t`),r(`span`,{class:`mbin mtight`},`+`),r(`span`,{class:`mord mtight`},`1`)])])])]),r(`span`,{class:`vlist-s`},`​`)]),r(`span`,{class:`vlist-r`},[r(`span`,{class:`vlist`,style:{height:`0.2083em`}},[r(`span`)])])])])])])])]),n(`.`)]),r(`p`,null,[n(`The `),r(`strong`,null,`Markov property`),n(` says that the next state and reward depend only on the current state and action. The past does not matter. A world described this way, with states, actions and rewards, is a `),r(`strong`,null,`Markov decision process`),n(` (MDP).`)])],-1)]]),_:1},16))}};export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-rreJmcjE.js b/lecture-08/assets/md-rreJmcjE.js new file mode 100644 index 0000000000000000000000000000000000000000..2189d186a7599823036004e19514cb9d9459216b --- /dev/null +++ b/lecture-08/assets/md-rreJmcjE.js @@ -0,0 +1,15 @@ +import{B as e,C as t,D as n,N as r,S as i,_ as a,et as o,v as s,xt as c,yt as l}from"./modules/shiki-CJZsCeMT.js";import{n as u,t as d}from"./slidev/context-DB-9afGB.js";import{t as f}from"./default-DMdSOhJT.js";import{t as p}from"./DqnFlow-DlxgPWo3.js";import{t as m}from"./slidev/CodeBlockWrapper-CIZDS6En.js";var h={class:`grid grid-cols-[1.9fr_1fr] gap-4 items-start`},g={class:`flex flex-col items-center gap-2 mt-4`},_={__name:`slides.md__slidev_94`,setup(_){let{$slidev:v,$nav:y,$clicksContext:b,$clicks:x,$page:S,$renderContext:C,$frontmatter:w}=u();return b.setup(),(u,_)=>{let v=m,y=p;return e(),s(f,c(n(l(d)(l(w),93))),{default:o(()=>[_[1]||=a(`h1`,null,`In PyTorch: one training step`,-1),a(`div`,h,[a(`div`,null,[t(v,r({lines:!0},{title:``,ranges:[`all`,`1-4`,`7`,`8-10`,`11-12`,`13`,`14-15`,`all`]}),{default:o(()=>[..._[0]||=[a(`pre`,{class:`shiki shiki-themes vitesse-dark vitesse-light slidev-code`,style:{"--shiki-dark":`#dbd7caee`,"--shiki-light":`#393a34`,"--shiki-dark-bg":`#121212`,"--shiki-light-bg":`#ffffff`}},[a(`code`,{class:`language-python`},[a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` target `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` QNet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(),`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` QNet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`target`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`load_state_dict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`state_dict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`())`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # start as copies`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`opt `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`optim`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`Adam`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`parameters`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(),`),a(`span`,{style:{"--shiki-dark":`#BD976A`,"--shiki-light":`#B07D48`}},` lr`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1e-3`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`gamma`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` T `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0.9`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 500`)]),i(` +`),a(`span`,{class:`line`}),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`def`),a(`span`,{style:{"--shiki-dark":`#80A665`,"--shiki-light":`#59873A`}},` train_step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`):`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` sample`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # from the buffer`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` q_pred `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`gather`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` a`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`unsqueeze`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`squeeze`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # (32,)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` with`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` torch`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`no_grad`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`():`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # target is frozen`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` q_next `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` target`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`s_next`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`max`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`).`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`values `),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},`# (32,)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` q_target `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` r `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`+`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` gamma `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` q_next `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`*`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},` (`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},`1`),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},` -`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` done`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # end: just r`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` loss `),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`=`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` nn`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`functional`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`mse_loss`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`q_pred`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`,`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` q_target`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`)`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` opt`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`zero_grad`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`; loss`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`backward`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`; opt`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`step`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`()`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # update w only`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#4D9375`,"--shiki-light":`#1E754F`}},` if`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` step `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`%`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` T `),a(`span`,{style:{"--shiki-dark":`#CB7676`,"--shiki-light":`#AB5959`}},`==`),a(`span`,{style:{"--shiki-dark":`#4C9A91`,"--shiki-light":`#2F798A`}},` 0`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`:`)]),i(` +`),a(`span`,{class:`line`},[a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},` target`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`load_state_dict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`(`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`qnet`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`.`),a(`span`,{style:{"--shiki-dark":`#DBD7CAEE`,"--shiki-light":`#393A34`}},`state_dict`),a(`span`,{style:{"--shiki-dark":`#666666`,"--shiki-light":`#999999`}},`())`),a(`span`,{style:{"--shiki-dark":`#758575DD`,"--shiki-light":`#A0ADA0`}},` # copy w -> w-`)])])],-1)]]),_:1},16)]),a(`div`,g,[t(y,{step:[0,0,3,4,6,7,8,0][l(x)]??0},null,8,[`step`])])])]),_:1},16)}}};export{_ as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-tZ6pTJCu.js b/lecture-08/assets/md-tZ6pTJCu.js new file mode 100644 index 0000000000000000000000000000000000000000..e071b50f8e490b94f676a7e1296274a5eb79dc7d --- /dev/null +++ b/lecture-08/assets/md-tZ6pTJCu.js @@ -0,0 +1,19 @@ +import{B as e,C as t,D as n,G as r,S as i,_ as a,b as o,et as s,tt as c,v as l,xt as u,yt as d}from"./modules/shiki-CJZsCeMT.js";import{n as f,t as p}from"./slidev/context-DB-9afGB.js";import{t as m}from"./default-DMdSOhJT.js";import{t as h}from"./slidev/KaTexBlockWrapper-CQp3FXpQ.js";var g={class:`flex justify-center mt-1`},_={viewBox:`0 0 560 110`,class:`dl-diagram`,role:`img`,"aria-label":`On a number line the old guess 0 moves halfway to the target 2.25, landing on 1.125`},v={class:`dl-callout`},y={__name:`slides.md__slidev_61`,setup(y){let{$slidev:b,$nav:x,$clicksContext:S,$clicks:C,$page:w,$renderContext:T,$frontmatter:E}=f();return S.setup(),(f,y)=>{let b=h,x=r(`click`);return e(),l(m,u(n(d(p)(d(E),60))),{default:s(()=>[y[10]||=a(`h1`,null,`The Q-learning update`,-1),y[11]||=a(`p`,null,`Move the guess part of the way toward the target.`,-1),t(b,{ranges:[]},{default:s(()=>[...y[0]||=[a(`p`,null,[a(`span`,{class:`katex-display`},[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`,display:`block`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`←`),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`+`),a(`mi`,null,`α`),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`[`),a(`munder`,null,[a(`munder`,null,[a(`mrow`,null,[a(`munder`,null,[a(`munder`,null,[a(`mrow`,null,[a(`mi`,null,`r`),a(`mo`,null,`+`),a(`mi`,null,`γ`),a(`munder`,null,[a(`mrow`,null,[a(`mi`,null,`max`),a(`mo`,null,`⁡`)]),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)])]),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`msup`,null,[a(`mi`,null,`s`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{separator:`true`},`,`),a(`msup`,null,[a(`mi`,null,`a`),a(`mo`,{mathvariant:`normal`,lspace:`0em`,rspace:`0em`},`′`)]),a(`mo`,{stretchy:`false`},`)`)]),a(`mo`,{stretchy:`true`},`⏟`)]),a(`mtext`,null,`target`)]),a(`mo`,null,`−`),a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mi`,null,`s`),a(`mo`,{separator:`true`},`,`),a(`mi`,null,`a`),a(`mo`,{stretchy:`false`},`)`)]),a(`mo`,{stretchy:`true`},`⏟`)]),a(`mtext`,null,`TD\xA0error`)]),a(`mo`,{fence:`false`,stretchy:`true`,minsize:`1.8em`,maxsize:`1.8em`},`]`)]),a(`annotation`,{encoding:`application/x-tex`},`Q(s, a) \\leftarrow Q(s, a) + \\alpha \\Big[ \\underbrace{\\underbrace{r + \\gamma \\max_{a'} Q(s', a')}_{\\text{target}} - Q(s, a)}_{\\text{TD error}} \\Big] `)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`←`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`4.635em`,"vertical-align":`-3.485em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size2`},`[`)]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`minner munder`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`0.485em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`TD\xA0error`)])])])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`minner munder`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{class:`svg-align`,style:{top:`-0.1934em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[a(`span`,{class:`brace-left`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[a(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),a(`span`,{class:`brace-center`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[a(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),a(`span`,{class:`brace-right`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[a(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`minner munder`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-0.9775em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord text mtight`},[a(`span`,{class:`mord mtight`},`target`)])])])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`minner munder`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{class:`svg-align`,style:{top:`-1.608em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-stretchy`,style:{height:`0.548em`,"min-width":`1.6em`}},[a(`span`,{class:`brace-left`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMinYMin slice`},[a(`path`,{d:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13 + 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688 + 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7 +-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`})])]),a(`span`,{class:`brace-center`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMidYMin slice`},[a(`path`,{d:`M199572 214 +c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14 + 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3 + 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0 +-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`})])]),a(`span`,{class:`brace-right`,style:{height:`0.548em`}},[a(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`400em`,height:`0.548em`,viewBox:`0 0 400000 548`,preserveAspectRatio:`xMaxYMin slice`},[a(`path`,{d:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3 + 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237 +-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`})])])])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0278em`}},`r`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0556em`}},`γ`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mop op-limits`},[a(`span`,{class:`vlist-t vlist-t2`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.4306em`}},[a(`span`,{style:{top:`-2.356em`,"margin-left":`0em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mathnormal mtight`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.6828em`}},[a(`span`,{style:{top:`-2.786em`,"margin-right":`0.0714em`}},[a(`span`,{class:`pstrut`,style:{height:`2.5em`}}),a(`span`,{class:`katex-sizing reset-size3 size1 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])])])])]),a(`span`,{style:{top:`-3em`}},[a(`span`,{class:`pstrut`,style:{height:`3em`}}),a(`span`,null,[a(`span`,{class:`mop`},`max`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.744em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`msupsub`},[a(`span`,{class:`vlist-t`},[a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`0.8019em`}},[a(`span`,{style:{top:`-3.113em`,"margin-right":`0.05em`}},[a(`span`,{class:`pstrut`,style:{height:`2.7em`}}),a(`span`,{class:`katex-sizing reset-size6 size3 mtight`},[a(`span`,{class:`mord mtight`},[a(`span`,{class:`mord mtight`},`′`)])])])])])])])]),a(`span`,{class:`mclose`},`)`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`1.392em`}},[a(`span`)])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`2.1586em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord mathnormal`},`s`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord mathnormal`},`a`),a(`span`,{class:`mclose`},`)`)])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`2.8066em`}},[a(`span`)])])])])])]),a(`span`,{class:`vlist-s`},`​`)]),a(`span`,{class:`vlist-r`},[a(`span`,{class:`vlist`,style:{height:`3.485em`}},[a(`span`)])])])]),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},[a(`span`,{class:`delimsizing size2`},`]`)])])])])])],-1)]]),_:1}),a(`div`,g,[(e(),o(`svg`,_,[y[3]||=a(`defs`,null,[a(`marker`,{id:`l8-upd-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[a(`path`,{class:`dl-dg-head is-k`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),y[4]||=a(`line`,{class:`dl-dg-line`,x1:`40`,y1:`60`,x2:`520`,y2:`60`},null,-1),y[5]||=a(`circle`,{cx:`80`,cy:`60`,r:`8`,style:{fill:`var(--dl-k)`}},null,-1),y[6]||=a(`text`,{class:`dl-dg-small`,x:`80`,y:`92`,"text-anchor":`middle`},`old Q = 0`,-1),y[7]||=a(`circle`,{cx:`440`,cy:`60`,r:`8`,style:{fill:`var(--dl-q)`}},null,-1),y[8]||=a(`text`,{class:`dl-dg-small`,x:`440`,y:`92`,"text-anchor":`middle`},`target = 2.25`,-1),c((e(),o(`g`,null,[...y[1]||=[a(`text`,{class:`dl-dg-small`,x:`260`,y:`22`,"text-anchor":`middle`},`TD error = 2.25 − 0 = 2.25`,-1)]])),[[x]]),c((e(),o(`g`,null,[...y[2]||=[a(`path`,{class:`dl-dg-arrow is-k`,"marker-end":`url(#l8-upd-h)`,d:`M90 48 C150 26, 220 26, 254 48`},null,-1),a(`circle`,{cx:`260`,cy:`60`,r:`8`,style:{fill:`var(--dl-accent)`}},null,-1),a(`text`,{class:`dl-dg-lab is-sm`,x:`260`,y:`92`,"text-anchor":`middle`},`new Q = 1.125`,-1)]])),[[x]])]))]),c((e(),o(`div`,v,[...y[9]||=[a(`p`,null,[a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`α`),a(`mo`,null,`=`),a(`mn`,null,`0.5`)]),a(`annotation`,{encoding:`application/x-tex`},`\\alpha = 0.5`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.4306em`}}),a(`span`,{class:`mord mathnormal`,style:{"margin-right":`0.0037em`}},`α`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`0.5`)])])]),i(`: go halfway. `),a(`span`,{class:`katex`},[a(`span`,{class:`katex-mathml`},[a(`math`,{xmlns:`http://www.w3.org/1998/Math/MathML`},[a(`semantics`,null,[a(`mrow`,null,[a(`mi`,null,`Q`),a(`mo`,{stretchy:`false`},`(`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`3`),a(`mo`,{separator:`true`},`,`),a(`mn`,null,`3`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,{separator:`true`},`,`),a(`mtext`,null,`up`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`0`),a(`mo`,null,`+`),a(`mn`,null,`0.5`),a(`mo`,null,`×`),a(`mo`,{stretchy:`false`},`(`),a(`mn`,null,`2.25`),a(`mo`,null,`−`),a(`mn`,null,`0`),a(`mo`,{stretchy:`false`},`)`),a(`mo`,null,`=`),a(`mn`,null,`1.125`)]),a(`annotation`,{encoding:`application/x-tex`},`Q((3,3), \\text{up}) = 0 + 0.5 \\times (2.25 - 0) = 1.125`)])])]),a(`span`,{class:`katex-html`,"aria-hidden":`true`},[a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord mathnormal`},`Q`),a(`span`,{class:`mopen`},`((`),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord`},`3`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mpunct`},`,`),a(`span`,{class:`mspace`,style:{"margin-right":`0.1667em`}}),a(`span`,{class:`mord text`},[a(`span`,{class:`mord`},`up`)]),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`+`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.7278em`,"vertical-align":`-0.0833em`}}),a(`span`,{class:`mord`},`0.5`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`×`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mopen`},`(`),a(`span`,{class:`mord`},`2.25`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}}),a(`span`,{class:`mbin`},`−`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2222em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`1em`,"vertical-align":`-0.25em`}}),a(`span`,{class:`mord`},`0`),a(`span`,{class:`mclose`},`)`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}}),a(`span`,{class:`mrel`},`=`),a(`span`,{class:`mspace`,style:{"margin-right":`0.2778em`}})]),a(`span`,{class:`katex-base`},[a(`span`,{class:`katex-strut`,style:{height:`0.6444em`}}),a(`span`,{class:`mord`},`1.125`)])])])],-1)]])),[[x]])]),_:1},16)}}};export{y as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-v7LlsJSs2.js b/lecture-08/assets/md-v7LlsJSs2.js new file mode 100644 index 0000000000000000000000000000000000000000..d5b89c56a62211f22e031187183eaa25ee2f7b4f --- /dev/null +++ b/lecture-08/assets/md-v7LlsJSs2.js @@ -0,0 +1 @@ +import{B as e,Ct as t,D as n,G as r,H as i,S as a,_ as o,b as s,bt as c,et as l,m as u,tt as d,v as f,xt as p,yt as m}from"./modules/shiki-CJZsCeMT.js";import{n as h,t as g}from"./slidev/context-DB-9afGB.js";import{t as _}from"./default-DMdSOhJT.js";var v={class:`mt-1 flex justify-center`},y={viewBox:`0 0 680 230`,class:`dl-diagram`,role:`img`,"aria-label":`Top: a table maps a state and an action to one Q-value. Bottom: a network maps a state to all four Q-values at once`},b=[`y`],x=[`y`],S=[`d`],C=[`y`,`width`],w=[`x`,`y`],T={class:`mt-1 dl-callout`},E={__name:`slides.md__slidev_75`,setup(E){let{$slidev:D,$nav:O,$clicksContext:k,$clicks:A,$page:j,$renderContext:M,$frontmatter:N}=h();return k.setup(),(h,E)=>{let D=r(`click`);return e(),f(_,p(n(m(g)(m(N),74))),{default:l(()=>[E[17]||=o(`h1`,null,`A network instead of a table`,-1),o(`div`,v,[(e(),s(`svg`,y,[E[8]||=o(`defs`,null,[o(`marker`,{id:`l8-net-h`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[o(`path`,{class:`dl-dg-head`,d:`M0 0 L7 3.5 L0 7 z`})])],-1),E[9]||=o(`text`,{class:`dl-dg-small`,x:`10`,y:`26`},`state s, action a`,-1),E[10]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-net-h)`,d:`M110 22 H160`},null,-1),E[11]||=o(`rect`,{class:`dl-dg-box`,x:`166`,y:`6`,width:`120`,height:`34`,rx:`4`},null,-1),E[12]||=o(`text`,{class:`dl-dg-small`,x:`226`,y:`27`,"text-anchor":`middle`},`Q-table lookup`,-1),E[13]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-net-h)`,d:`M288 22 H330`},null,-1),E[14]||=o(`text`,{class:`dl-dg-small`,x:`336`,y:`26`},`one Q(s, a)`,-1),E[15]||=o(`line`,{class:`dl-dg-split`,x1:`8`,y1:`56`,x2:`672`,y2:`56`},null,-1),d((e(),s(`g`,null,[(e(),s(u,null,i(9,e=>o(`g`,{key:e},[o(`rect`,{class:c([`dl-dg-box`,e===9?`is-accent`:``]),x:`30`,y:66+(e-1)*17,width:`22`,height:`14`,rx:`2`},null,10,b),o(`text`,{class:`dl-dg-small`,x:`41`,y:77+(e-1)*17,"text-anchor":`middle`},t(+(e===9)),9,x)])),64)),E[0]||=o(`text`,{class:`dl-dg-small`,x:`10`,y:`226`},`s: (3,3) one-hot, 9`,-1),E[1]||=o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-net-h)`,d:`M58 142 H110`},null,-1),E[2]||=o(`polygon`,{class:`dl-dg-net`,points:`116,78 250,98 250,186 116,206`},null,-1),E[3]||=o(`text`,{class:`dl-dg-in`,x:`183`,y:`138`,"text-anchor":`middle`},`Linear 9→32`,-1),E[4]||=o(`text`,{class:`dl-dg-in`,x:`183`,y:`156`,"text-anchor":`middle`},`ReLU`,-1),E[5]||=o(`text`,{class:`dl-dg-in`,x:`183`,y:`174`,"text-anchor":`middle`},`Linear 32→4`,-1),E[6]||=o(`text`,{class:`dl-dg-small`,x:`183`,y:`222`,"text-anchor":`middle`},`weights w — learned`,-1)])),[[D]]),d((e(),s(`g`,null,[(e(),s(u,null,i([[`up`,1.2,!0],[`down`,.3,!1],[`left`,.6,!1],[`right`,.4,!1]],(e,n)=>o(`g`,{key:n},[o(`path`,{class:`dl-dg-arrow`,"marker-end":`url(#l8-net-h)`,d:`M254 ${108+n*26} H300`},null,8,S),o(`rect`,{class:`dl-dg-bar`,x:306,y:98+n*26,width:e[1]*80,height:`18`,rx:`2`},null,8,C),o(`text`,{class:c([`dl-dg-small`,e[2]?`is-good`:``]),x:312+e[1]*80,y:112+n*26},`Q((3,3), `+t(e[0])+`) = `+t(e[1]),11,w)])),64)),E[7]||=o(`text`,{class:`dl-dg-small`,x:`306`,y:`214`},`all four actions in one forward pass`,-1)])),[[D]])]))]),d((e(),s(`div`,T,[...E[16]||=[o(`p`,null,[a(`One forward pass gives every action’s Q-value. `),o(`strong`,null,`Act`),a(`: take the largest (or explore). `),o(`strong`,null,`Learn`),a(`: train the weights.`)],-1)]])),[[D]])]),_:1},16)}}};export{E as default}; \ No newline at end of file diff --git a/lecture-08/assets/md-yQZmZhEY.css b/lecture-08/assets/md-yQZmZhEY.css new file mode 100644 index 0000000000000000000000000000000000000000..a41323135824e109f341c696d6d798c0b35eb1e9 --- /dev/null +++ b/lecture-08/assets/md-yQZmZhEY.css @@ -0,0 +1 @@ +.dl-vi[data-v-4c1cbbff]{align-items:center;gap:1.4rem;display:flex}.dl-vi__side[data-v-4c1cbbff]{min-width:15rem;font-size:.85rem}.dl-vi__sweep[data-v-4c1cbbff]{margin-bottom:.4rem;font-size:1.05rem}.dl-vi__sweep b[data-v-4c1cbbff],.dl-vi__hint b[data-v-4c1cbbff]{color:var(--dl-accent)}.dl-vi__head[data-v-4c1cbbff]{color:var(--dl-muted);margin-bottom:.2rem}.dl-vi__row[data-v-4c1cbbff]{font-variant-numeric:tabular-nums;border-radius:4px;grid-template-columns:3.2rem 1fr auto;gap:.4rem;padding:.08rem .3rem;display:grid}.dl-vi__row.is-best[data-v-4c1cbbff]{background:var(--dl-accent-soft);font-weight:700}.dl-vi__act[data-v-4c1cbbff]{color:var(--dl-muted)}.dl-vi__eq[data-v-4c1cbbff]{color:var(--dl-heading)} diff --git a/lecture-08/assets/modules/file-saver-BpWusTEB.js b/lecture-08/assets/modules/file-saver-BpWusTEB.js new file mode 100644 index 0000000000000000000000000000000000000000..d51ba687ddb2a77bc46265ef5845f6be048ed538 --- /dev/null +++ b/lecture-08/assets/modules/file-saver-BpWusTEB.js @@ -0,0 +1 @@ +import{t as e}from"../rolldown-runtime-hePW80VL.js";var t=e(((e,t)=>{(function(t,n){typeof define==`function`&&define.amd?define([],n):e===void 0?(n(),t.FileSaver={exports:{}}.exports):n()})(e,function(){function e(e,t){return t===void 0?t={autoBom:!1}:typeof t!=`object`&&(console.warn(`Deprecated: Expected third argument to be a object`),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob([``,e],{type:e.type}):e}function n(e,t,n){var r=new XMLHttpRequest;r.open(`GET`,e),r.responseType=`blob`,r.onload=function(){s(r.response,t,n)},r.onerror=function(){console.error(`could not download file`)},r.send()}function r(e){var t=new XMLHttpRequest;t.open(`HEAD`,e,!1);try{t.send()}catch{}return 200<=t.status&&299>=t.status}function i(e){try{e.dispatchEvent(new MouseEvent(`click`))}catch{var t=document.createEvent(`MouseEvents`);t.initMouseEvent(`click`,!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),e.dispatchEvent(t)}}var a=typeof window==`object`&&window.window===window?window:typeof self==`object`&&self.self===self?self:typeof global==`object`&&global.global===global?global:void 0,o=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),s=a.saveAs||(typeof window!=`object`||window!==a?function(){}:`download`in HTMLAnchorElement.prototype&&!o?function(e,t,o){var s=a.URL||a.webkitURL,c=document.createElement(`a`);t=t||e.name||`download`,c.download=t,c.rel=`noopener`,typeof e==`string`?(c.href=e,c.origin===location.origin?i(c):r(c.href)?n(e,t,o):i(c,c.target=`_blank`)):(c.href=s.createObjectURL(e),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){i(c)},0))}:`msSaveOrOpenBlob`in navigator?function(t,a,o){if(a=a||t.name||`download`,typeof t!=`string`)navigator.msSaveOrOpenBlob(e(t,o),a);else if(r(t))n(t,a,o);else{var s=document.createElement(`a`);s.href=t,s.target=`_blank`,setTimeout(function(){i(s)})}}:function(e,t,r,i){if(i||=open(``,`_blank`),i&&(i.document.title=i.document.body.innerText=`downloading...`),typeof e==`string`)return n(e,t,r);var s=e.type===`application/octet-stream`,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||o)&&typeof FileReader<`u`){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,`data:attachment/file;`),i?i.location.href=e:location=e,i=null},u.readAsDataURL(e)}else{var d=a.URL||a.webkitURL,f=d.createObjectURL(e);i?i.location=f:location.href=f,i=null,setTimeout(function(){d.revokeObjectURL(f)},4e4)}});a.saveAs=s.saveAs=s,t!==void 0&&(t.exports=s)})}));export{t}; \ No newline at end of file diff --git a/lecture-08/assets/modules/shiki-BrmBd2_v.css b/lecture-08/assets/modules/shiki-BrmBd2_v.css new file mode 100644 index 0000000000000000000000000000000000000000..be27a11806f53e2a186afcc8baba6c680d0e3ce3 --- /dev/null +++ b/lecture-08/assets/modules/shiki-BrmBd2_v.css @@ -0,0 +1 @@ +.shiki-magic-move-container{white-space:pre;position:relative}.shiki-magic-move-line-number{opacity:.3;-webkit-user-select:none;user-select:none}.shiki-magic-move-item{transition:color var(--smm-duration,.5s) var(--smm-easing,"ease");display:inline-block}.shiki-magic-move-enter-active,.shiki-magic-move-leave-active,.shiki-magic-move-move{transition:all var(--smm-duration,.5s) var(--smm-easing,"ease")}.shiki-magic-move-container-resize,.shiki-magic-move-container-restyle{transition:all var(--smm-duration,.5s) var(--smm-easing,"ease");transition-delay:calc(var(--smm-duration,.5s)*var(--smm-delay-container,1))}.shiki-magic-move-move{transition-delay:calc(var(--smm-duration,.5s)*var(--smm-delay-move,1) + var(--smm-stagger,0));z-index:1}.shiki-magic-move-enter-active{transition-delay:calc(var(--smm-duration,.5s)*var(--smm-delay-enter,1) + var(--smm-stagger,0));z-index:1}.shiki-magic-move-leave-active{transition-delay:calc(var(--smm-duration,.5s)*var(--smm-delay-leave,1) + var(--smm-stagger,0))}.shiki-magic-move-enter-from,.shiki-magic-move-leave-to{opacity:0}br.shiki-magic-move-leave-active{display:none}.resize-observer[data-v-b329ee4c]{z-index:-1;pointer-events:none;opacity:0;background-color:#0000;border:none;width:100%;height:100%;display:block;position:absolute;top:0;left:0;overflow:hidden}.resize-observer[data-v-b329ee4c] object{pointer-events:none;z-index:-1;width:100%;height:100%;display:block;position:absolute;top:0;left:0;overflow:hidden}.v-popper__popper{z-index:10000;outline:none;top:0;left:0}.v-popper__popper.v-popper__popper--hidden{visibility:hidden;opacity:0;pointer-events:none;transition:opacity .15s,visibility .15s}.v-popper__popper.v-popper__popper--shown{visibility:visible;opacity:1;transition:opacity .15s}.v-popper__popper.v-popper__popper--skip-transition,.v-popper__popper.v-popper__popper--skip-transition>.v-popper__wrapper{transition:none!important}.v-popper__backdrop{width:100%;height:100%;display:none;position:absolute;top:0;left:0}.v-popper__inner{box-sizing:border-box;position:relative;overflow-y:auto}.v-popper__inner>div{z-index:1;max-width:inherit;max-height:inherit;position:relative}.v-popper__arrow-container{width:10px;height:10px;position:absolute}.v-popper__popper--arrow-overflow .v-popper__arrow-container,.v-popper__popper--no-positioning .v-popper__arrow-container{display:none}.v-popper__arrow-inner,.v-popper__arrow-outer{border-style:solid;width:0;height:0;position:absolute;top:0;left:0}.v-popper__arrow-inner{visibility:hidden;border-width:7px}.v-popper__arrow-outer{border-width:6px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{left:-2px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{left:-1px}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-outer{border-bottom-width:0;border-bottom-color:#0000!important;border-left-color:#0000!important;border-right-color:#0000!important}.v-popper__popper[data-popper-placement^=top] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-container{top:0}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{border-top-width:0;border-top-color:#0000!important;border-left-color:#0000!important;border-right-color:#0000!important}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-inner{top:-4px}.v-popper__popper[data-popper-placement^=bottom] .v-popper__arrow-outer{top:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{top:-2px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{top:-1px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{border-left-width:0;border-top-color:#0000!important;border-bottom-color:#0000!important;border-left-color:#0000!important}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-inner{left:-4px}.v-popper__popper[data-popper-placement^=right] .v-popper__arrow-outer{left:-6px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-container{right:-10px}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner,.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-outer{border-right-width:0;border-top-color:#0000!important;border-bottom-color:#0000!important;border-right-color:#0000!important}.v-popper__popper[data-popper-placement^=left] .v-popper__arrow-inner{left:-2px}.v-popper--theme-tooltip .v-popper__inner{color:#fff;background:#000c;border-radius:6px;padding:7px 12px 6px}.v-popper--theme-tooltip .v-popper__arrow-outer{border-color:#000c}.v-popper--theme-dropdown .v-popper__inner{color:#000;background:#fff;border:1px solid #ddd;border-radius:6px;box-shadow:0 6px 30px #0000001a}.v-popper--theme-dropdown .v-popper__arrow-inner{visibility:visible;border-color:#fff}.v-popper--theme-dropdown .v-popper__arrow-outer{border-color:#ddd}:root{--twoslash-border-color:#8888;--twoslash-underline-color:currentColor;--twoslash-highlighted-border:#c37d0d50;--twoslash-highlighted-bg:#c37d0d20;--twoslash-popup-bg:#f8f8f8;--twoslash-popup-color:inherit;--twoslash-popup-shadow:#00000014 0px 1px 4px;--twoslash-docs-color:#888;--twoslash-docs-font:sans-serif;--twoslash-code-font:inherit;--twoslash-code-font-size:1em;--twoslash-matched-color:inherit;--twoslash-unmatched-color:#888;--twoslash-cursor-color:#8888;--twoslash-error-color:#d45656;--twoslash-error-bg:#d4565620;--twoslash-warn-color:#c37d0d;--twoslash-warn-bg:#c37d0d20;--twoslash-tag-color:#3772cf;--twoslash-tag-bg:#3772cf20;--twoslash-tag-warn-color:var(--twoslash-warn-color);--twoslash-tag-warn-bg:var(--twoslash-warn-bg);--twoslash-tag-annotate-color:#1ba673;--twoslash-tag-annotate-bg:#1ba67320}@media (prefers-reduced-motion:reduce){.twoslash *{transition:none!important}}.twoslash:hover .twoslash-hover{border-color:var(--twoslash-underline-color)}.twoslash .twoslash-hover{border-bottom:1px dotted #0000;transition:border-color .3s;position:relative}.twoslash .twoslash-popup-container{opacity:0;background:var(--twoslash-popup-bg);color:var(--twoslash-popup-color);border:1px solid var(--twoslash-border-color);pointer-events:none;z-index:10;-webkit-user-select:none;user-select:none;text-align:left;box-shadow:var(--twoslash-popup-shadow);border-radius:4px;flex-direction:column;transition:opacity .3s;display:inline-flex;position:absolute;transform:translateY(1.1em)}.twoslash .twoslash-query-persisted .twoslash-popup-container{z-index:9;transform:translateY(1.5em)}.twoslash .twoslash-hover:hover .twoslash-popup-container,.twoslash .twoslash-error-hover:hover .twoslash-popup-container,.twoslash .twoslash-query-persisted .twoslash-popup-container,.twoslash .twoslash-query-line .twoslash-popup-container{opacity:1;pointer-events:auto}.twoslash .twoslash-popup-container:hover{-webkit-user-select:auto;user-select:auto}.twoslash .twoslash-popup-arrow{border-top:1px solid var(--twoslash-border-color);border-right:1px solid var(--twoslash-border-color);background:var(--twoslash-popup-bg);pointer-events:none;width:6px;height:6px;position:absolute;top:-4px;left:1em;transform:rotate(-45deg)}.twoslash .twoslash-popup-code,.twoslash .twoslash-popup-error,.twoslash .twoslash-popup-docs{padding:6px 8px!important}.twoslash .twoslash-popup-code{font-family:var(--twoslash-code-font);font-size:var(--twoslash-code-font-size)}.twoslash .twoslash-popup-docs{color:var(--twoslash-docs-color);font-family:var(--twoslash-docs-font);border-top:1px solid var(--twoslash-border-color);font-size:.8em}.twoslash .twoslash-popup-error{color:var(--twoslash-error-color);background-color:var(--twoslash-error-bg);font-family:var(--twoslash-docs-font);font-size:.8em}.twoslash .twoslash-popup-docs-tags{font-family:var(--twoslash-docs-font);flex-direction:column;display:flex}.twoslash .twoslash-popup-docs-tags,.twoslash .twoslash-popup-docs-tag-name{margin-right:.5em}.twoslash .twoslash-popup-docs-tag-name{font-family:var(--twoslash-code-font)}.twoslash .twoslash-query-line .twoslash-popup-container{margin-bottom:1.4em;position:relative;transform:translateY(.6em)}.twoslash .twoslash-error-line{background-color:var(--twoslash-error-bg);border-left:3px solid var(--twoslash-error-color);color:var(--twoslash-error-color);width:max-content;min-width:100%;margin:.2em 0;padding:6px 12px;position:relative}.twoslash .twoslash-error-line.twoslash-error-level-warning{background-color:var(--twoslash-warn-bg);border-left:3px solid var(--twoslash-warn-color);color:var(--twoslash-warn-color)}.twoslash .twoslash-error{background:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c94824'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 100% repeat-x;padding-bottom:2px}.twoslash .twoslash-error.twoslash-error-level-warning{background:url("data:image/svg+xml,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20viewBox%3D'0%200%206%203'%20enable-background%3D'new%200%200%206%203'%20height%3D'3'%20width%3D'6'%3E%3Cg%20fill%3D'%23c37d0d'%3E%3Cpolygon%20points%3D'5.5%2C0%202.5%2C3%201.1%2C3%204.1%2C0'%2F%3E%3Cpolygon%20points%3D'4%2C0%206%2C2%206%2C0.6%205.4%2C0'%2F%3E%3Cpolygon%20points%3D'0%2C2%201%2C3%202.4%2C3%200%2C0.6'%2F%3E%3C%2Fg%3E%3C%2Fsvg%3E") 0 100% repeat-x;padding-bottom:2px}.twoslash .twoslash-completion-cursor{position:relative}.twoslash .twoslash-completion-cursor .twoslash-completion-list{-webkit-user-select:none;user-select:none;z-index:8;box-shadow:var(--twoslash-popup-shadow);background:var(--twoslash-popup-bg);border:1px solid var(--twoslash-border-color);margin:3px 0 0 -1px;display:inline-block;position:absolute;top:0;left:0;transform:translateY(1.2em)}.twoslash-completion-list{flex-direction:column;gap:4px;width:240px;padding:4px;font-size:.8rem;display:flex}.twoslash-completion-list:hover{-webkit-user-select:auto;user-select:auto}.twoslash-completion-list:before{background-color:var(--twoslash-cursor-color);content:" ";width:2px;height:1.4em;position:absolute;top:-1.6em;left:-1px}.twoslash-completion-list li{align-items:center;gap:.25em;line-height:1em;display:flex;overflow:hidden}.twoslash-completion-list li span.twoslash-completions-unmatched{color:var(--twoslash-unmatched-color)}.twoslash-completion-list .deprecated{opacity:.5;text-decoration:line-through}.twoslash-completion-list li span.twoslash-completions-matched{color:var(--twoslash-matched-color)}.twoslash-highlighted{background-color:var(--twoslash-highlighted-bg);border:1px solid var(--twoslash-highlighted-border);border-radius:4px;margin:-1px -3px;padding:1px 2px}.twoslash-completion-list .twoslash-completions-icon{color:var(--twoslash-unmatched-color);flex:none;width:1em}.twoslash .twoslash-tag-line{background-color:var(--twoslash-tag-bg);border-left:3px solid var(--twoslash-tag-color);color:var(--twoslash-tag-color);align-items:center;gap:.3em;width:max-content;min-width:100%;margin:.2em 0;padding:6px 10px;display:flex;position:relative}.twoslash .twoslash-tag-line .twoslash-tag-icon{width:1.1em;color:inherit}.twoslash .twoslash-tag-line.twoslash-tag-error-line{background-color:var(--twoslash-error-bg);border-left:3px solid var(--twoslash-error-color);color:var(--twoslash-error-color)}.twoslash .twoslash-tag-line.twoslash-tag-warn-line{background-color:var(--twoslash-tag-warn-bg);border-left:3px solid var(--twoslash-tag-warn-color);color:var(--twoslash-tag-warn-color)}.twoslash .twoslash-tag-line.twoslash-tag-annotate-line{background-color:var(--twoslash-tag-annotate-bg);border-left:3px solid var(--twoslash-tag-annotate-color);color:var(--twoslash-tag-annotate-color)}:root{--twoslash-popup-bg:var(--vp-c-bg,inherit);--twoslash-popup-color:var(--vp-c-text-1);--twoslash-docs-color:var(--vp-c-text-1);--twoslash-docs-font:var(--vp-font-family-base);--twoslash-code-font:var(--vp-font-family-mono);--twoslash-code-size:var(--vp-code-font-size);--twoslash-underline-color:#8888;--twoslash-border-color:var(--vp-c-border);--twoslash-cursor-color:var(--vp-c-brand);--twoslash-matched-color:var(--vp-c-brand);--twoslash-unmatched-color:var(--vp-c-text-2)}.v-popper--theme-twoslash{z-index:calc(var(--vp-z-index-local-nav) - 1)}.v-popper--theme-twoslash .v-popper__inner{background:var(--twoslash-popup-bg);color:var(--twoslash-popup-color);border-color:var(--twoslash-border-color)}.v-popper--theme-twoslash .v-popper__arrow-outer{border-color:var(--twoslash-border-color)}.v-popper--theme-twoslash .v-popper__arrow-inner{border-color:var(--twoslash-popup-bg)}.twoslash-popup-container{transform:translateY(1.5em)}.twoslash-query-persisted .twoslash-popup-container{transform:translateY(1.8em)}.twoslash .v-popper{display:inline-block}.twoslash-completion-list .twoslash-completions-icon{color:var(--twoslash-unmatched-color)!important}.twoslash-floating .twoslash-popup-code{width:fit-content;min-width:100%;max-width:600px;line-height:var(--vp-code-line-height);font-size:var(--twoslash-code-size);white-space:pre-wrap;padding:6px 12px;transition:color .5s;display:block}.twoslash-floating .twoslash-popup-docs,.twoslash-floating .twoslash-popup-error{font-family:var(--twoslash-docs-font);text-wrap:balance;max-width:700px;max-height:500px;font-size:.9em;overflow:hidden auto;padding:12px!important}.twoslash-floating .twoslash-popup-docs p:first-child,.twoslash-floating .twoslash-popup-error p:first-child{margin-top:0}.twoslash-floating .twoslash-popup-docs p:last-child,.twoslash-floating .twoslash-popup-error p:last-child{margin-bottom:0}.twoslash-floating .twoslash-popup-docs{border-top:1px solid var(--twoslash-border-color);color:var(--twoslash-docs-color)}.twoslash-floating .twoslash-popup-error{color:var(--twoslash-error-color)}.twoslash-floating .twoslash-popup-error.twoslash-error-level-warning{color:var(--twoslash-warn-color)}.twoslash-floating .twoslash-popup-docs p,.twoslash-floating .twoslash-popup-error p{text-wrap:balance;margin:6px 0}.twoslash-floating .twoslash-popup-docs pre .twoslash-floating .twoslash-popup-error pre{background-color:var(--vp-code-block-bg);border-radius:8px;margin:6px -2px;padding:12px;overflow-x:auto}.twoslash-floating .twoslash-popup-docs-tags{flex-direction:column;display:flex;padding:8px 12px!important}.twoslash-floating .twoslash-popup-docs-tags .twoslash-popup-docs-tag-name{font-family:var(--twoslash-code-font);color:var(--twoslash-unmatched-color);margin-right:.5em}.twoslash-completion-cursor{background:var(--twoslash-cursor-color);-webkit-user-select:none;user-select:none;width:2px;height:1.2em;margin-bottom:-.2em;display:inline-block}.twoslash-floating.twoslash-completion .v-popper__arrow-container{display:none}.twoslash-floating.twoslash-completion .twoslash-completion-list{font-family:var(--twoslash-code-font);padding:6px;font-size:var(--twoslash-code-size)!important}.twoslash-floating.twoslash-completion .twoslash-completion-list li{padding:3px 0}.twoslash-error:empty,.twoslash-error-empty{vertical-align:middle;min-width:.55em;min-height:1.2em;display:inline-block} diff --git a/lecture-08/assets/modules/shiki-CJZsCeMT.js b/lecture-08/assets/modules/shiki-CJZsCeMT.js new file mode 100644 index 0000000000000000000000000000000000000000..d8f6c66b34bb5820bf9f30abd42969dd072cc11e --- /dev/null +++ b/lecture-08/assets/modules/shiki-CJZsCeMT.js @@ -0,0 +1,10 @@ +import{n as e}from"../rolldown-runtime-hePW80VL.js";function t(e){let t=Object.create(null);for(let n of e.split(`,`))t[n]=1;return e=>e in t}var n={},r=[],i=()=>{},a=()=>!1,o=e=>e.charCodeAt(0)===111&&e.charCodeAt(1)===110&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),s=e=>e.startsWith(`onUpdate:`),c=Object.assign,l=(e,t)=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)},u=Object.prototype.hasOwnProperty,d=(e,t)=>u.call(e,t),f=Array.isArray,p=e=>C(e)===`[object Map]`,m=e=>C(e)===`[object Set]`,h=e=>C(e)===`[object Date]`,g=e=>C(e)===`[object RegExp]`,_=e=>typeof e==`function`,v=e=>typeof e==`string`,y=e=>typeof e==`symbol`,b=e=>typeof e==`object`&&!!e,x=e=>(b(e)||_(e))&&_(e.then)&&_(e.catch),S=Object.prototype.toString,C=e=>S.call(e),w=e=>C(e).slice(8,-1),T=e=>C(e)===`[object Object]`,E=e=>v(e)&&e!==`NaN`&&e[0]!==`-`&&``+parseInt(e,10)===e,D=t(`,key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted`),ee=t(`bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo`),te=e=>{let t=Object.create(null);return(n=>t[n]||(t[n]=e(n)))},O=/-\w/g,k=te(e=>e.replace(O,e=>e.slice(1).toUpperCase())),ne=/\B([A-Z])/g,A=te(e=>e.replace(ne,`-$1`).toLowerCase()),re=te(e=>e.charAt(0).toUpperCase()+e.slice(1)),j=te(e=>e?`on${re(e)}`:``),M=(e,t)=>!Object.is(e,t),ie=(e,...t)=>{for(let n=0;n{Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:r,value:n})},oe=e=>{let t=parseFloat(e);return isNaN(t)?e:t},se=e=>{let t=v(e)?Number(e):NaN;return isNaN(t)?e:t},ce,le=()=>ce||=typeof globalThis<`u`?globalThis:typeof self<`u`?self:typeof window<`u`?window:typeof global<`u`?global:{};function ue(e,t){return e+JSON.stringify(t,(e,t)=>typeof t==`function`?t.toString():t)}var de=t(`Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol`);function fe(e){if(f(e)){let t={};for(let n=0;n{if(e){let n=e.split(me);n.length>1&&(t[n[0].trim()]=n[1].trim())}}),t}function _e(e){let t=``;if(v(e))t=e;else if(f(e))for(let n=0;nje(e,t))}var Ne=e=>!!(e&&e.__v_isRef===!0),Pe=e=>v(e)?e:e==null?``:f(e)||b(e)&&(e.toString===S||!_(e.toString))?Ne(e)?Pe(e.value):JSON.stringify(e,Fe,2):String(e),Fe=(e,t)=>Ne(t)?Fe(e,t.value):p(t)?{[`Map(${t.size})`]:[...t.entries()].reduce((e,[t,n],r)=>(e[Ie(t,r)+` =>`]=n,e),{})}:m(t)?{[`Set(${t.size})`]:[...t.values()].map(e=>Ie(e))}:y(t)?Ie(t):b(t)&&!f(t)&&!T(t)?String(t):t,Ie=(e,t=``)=>y(e)?`Symbol(${e.description??t})`:e;function Le(e){return e==null?`initial`:typeof e==`string`?e===``?` `:e:String(e)}var N,Re=class{constructor(e=!1){this.detached=e,this._active=!0,this._on=0,this.effects=[],this.cleanups=[],this._isPaused=!1,this._warnOnRun=!0,this.__v_skip=!0,!e&&N&&(N.active?(this.parent=N,this.index=(N.scopes||(N.scopes=[])).push(this)-1):(this._active=!1,this._warnOnRun=!1))}get active(){return this._active}pause(){if(this._active){this._isPaused=!0;let e,t;if(this.scopes){let n=this.scopes.slice();for(e=0,t=n.length;e0&&--this._on===0){if(N===this)N=this.prevScope;else{let e=N;for(;e;){if(e.prevScope===this){e.prevScope=this.prevScope;break}e=e.prevScope}}this.prevScope=void 0}}stop(e){if(this._active){this._active=!1;let t,n;for(t=0,n=this.effects.length;t0)return;if(Ke){let e=Ke;for(Ke=void 0;e;){let t=e.next;e.next=void 0,e.flags&=-9,e=t}}let e;for(;Ge;){let t=Ge;for(Ge=void 0;t;){let n=t.next;if(t.next=void 0,t.flags&=-9,t.flags&1)try{t.trigger()}catch(t){e||=t}t=n}}if(e)throw e}function Xe(e){for(let t=e.deps;t;t=t.nextDep)t.version=-1,t.prevActiveLink=t.dep.activeLink,t.dep.activeLink=t}function Ze(e){let t,n=e.depsTail,r=n;for(;r;){let e=r.prevDep;r.version===-1?(r===n&&(n=e),et(r),tt(r)):t=r,r.dep.activeLink=r.prevActiveLink,r.prevActiveLink=void 0,r=e}e.deps=t,e.depsTail=n}function Qe(e){for(let t=e.deps;t;t=t.nextDep)if(t.dep.version!==t.version||t.dep.computed&&($e(t.dep.computed)||t.dep.version!==t.version))return!0;return!!e._dirty}function $e(e){if(e.flags&4&&!(e.flags&16)||(e.flags&=-17,e.globalVersion===lt)||(e.globalVersion=lt,!e.isSSR&&e.flags&128&&(!e.deps&&!e._dirty||!Qe(e))))return;e.flags|=2;let t=e.dep,n=P,r=it;P=e,it=!0;try{Xe(e);let n=e.fn(e._value);(t.version===0||M(n,e._value))&&(e.flags|=128,e._value=n,t.version++)}catch(e){throw t.version++,e}finally{P=n,it=r,Ze(e),e.flags&=-3}}function et(e,t=!1){let{dep:n,prevSub:r,nextSub:i}=e;if(r&&(r.nextSub=i,e.prevSub=void 0),i&&(i.prevSub=r,e.nextSub=void 0),n.subs===e&&(n.subs=r,!r&&n.computed)){n.computed.flags&=-5;for(let e=n.computed.deps;e;e=e.nextDep)et(e,!0)}!t&&!--n.sc&&n.map&&n.map.delete(n.key)}function tt(e){let{prevDep:t,nextDep:n}=e;t&&(t.nextDep=n,e.prevDep=void 0),n&&(n.prevDep=t,e.nextDep=void 0)}function nt(e,t){e.effect instanceof Ue&&(e=e.effect.fn);let n=new Ue(e);t&&c(n,t);try{n.run()}catch(e){throw n.stop(),e}let r=n.run.bind(n);return r.effect=n,r}function rt(e){e.effect.stop()}var it=!0,at=[];function ot(){at.push(it),it=!1}function st(){let e=at.pop();it=e===void 0||e}function ct(e){let{cleanup:t}=e;if(e.cleanup=void 0,t){let e=P;P=void 0;try{t()}finally{P=e}}}var lt=0,ut=class{constructor(e,t){this.sub=e,this.dep=t,this.version=t.version,this.nextDep=this.prevDep=this.nextSub=this.prevSub=this.prevActiveLink=void 0}},dt=class{constructor(e){this.computed=e,this.version=0,this.activeLink=void 0,this.subs=void 0,this.map=void 0,this.key=void 0,this.sc=0,this.__v_skip=!0}track(e){if(!P||!it||P===this.computed)return;let t=this.activeLink;if(t===void 0||t.sub!==P)t=this.activeLink=new ut(P,this),P.deps?(t.prevDep=P.depsTail,P.depsTail.nextDep=t,P.depsTail=t):P.deps=P.depsTail=t,ft(t);else if(t.version===-1&&(t.version=this.version,t.nextDep)){let e=t.nextDep;e.prevDep=t.prevDep,t.prevDep&&(t.prevDep.nextDep=e),t.prevDep=P.depsTail,t.nextDep=void 0,P.depsTail.nextDep=t,P.depsTail=t,P.deps===t&&(P.deps=e)}return t}trigger(e){this.version++,lt++,this.notify(e)}notify(e){Je();try{for(let e=this.subs;e;e=e.prevSub)e.sub.notify()&&e.sub.dep.notify()}finally{Ye()}}};function ft(e){if(e.dep.sc++,e.sub.flags&4){let t=e.dep.computed;if(t&&!e.dep.subs){t.flags|=20;for(let e=t.deps;e;e=e.nextDep)ft(e)}let n=e.dep.subs;n!==e&&(e.prevSub=n,n&&(n.nextSub=e)),e.dep.subs=e}}var pt=new WeakMap,mt=Symbol(``),ht=Symbol(``),gt=Symbol(``);function _t(e,t,n){if(it&&P){let t=pt.get(e);t||pt.set(e,t=new Map);let r=t.get(n);r||(t.set(n,r=new dt),r.map=t,r.key=n),r.track()}}function vt(e,t,n,r,i,a){let o=pt.get(e);if(!o){lt++;return}let s=e=>{e&&e.trigger()};if(Je(),t===`clear`)o.forEach(s);else{let i=f(e),a=i&&E(n);if(i&&n===`length`){let e=Number(r);o.forEach((t,n)=>{(n===`length`||n===gt||!y(n)&&n>=e)&&s(t)})}else switch((n!==void 0||o.has(void 0))&&s(o.get(n)),a&&s(o.get(gt)),t){case`add`:i?a&&s(o.get(`length`)):(s(o.get(mt)),p(e)&&s(o.get(ht)));break;case`delete`:i||(s(o.get(mt)),p(e)&&s(o.get(ht)));break;case`set`:p(e)&&s(o.get(mt))}}Ye()}function yt(e,t){let n=pt.get(e);return n&&n.get(t)}function bt(e){let t=F(e);return t===e?t:(_t(t,`iterate`,gt),ln(e)?t:t.map(fn))}function xt(e){return _t(e=F(e),`iterate`,gt),e}function St(e,t){return cn(e)?pn(sn(e)?fn(t):t):fn(t)}var Ct={__proto__:null,[Symbol.iterator](){return wt(this,Symbol.iterator,e=>St(this,e))},concat(...e){return bt(this).concat(...e.map(e=>f(e)?bt(e):e))},entries(){return wt(this,`entries`,e=>(e[1]=St(this,e[1]),e))},every(e,t){return Et(this,`every`,e,t,void 0,arguments)},filter(e,t){return Et(this,`filter`,e,t,e=>e.map(e=>St(this,e)),arguments)},find(e,t){return Et(this,`find`,e,t,e=>St(this,e),arguments)},findIndex(e,t){return Et(this,`findIndex`,e,t,void 0,arguments)},findLast(e,t){return Et(this,`findLast`,e,t,e=>St(this,e),arguments)},findLastIndex(e,t){return Et(this,`findLastIndex`,e,t,void 0,arguments)},forEach(e,t){return Et(this,`forEach`,e,t,void 0,arguments)},includes(...e){return Ot(this,`includes`,e)},indexOf(...e){return Ot(this,`indexOf`,e)},join(e){return bt(this).join(e)},lastIndexOf(...e){return Ot(this,`lastIndexOf`,e)},map(e,t){return Et(this,`map`,e,t,void 0,arguments)},pop(){return kt(this,`pop`)},push(...e){return kt(this,`push`,e)},reduce(e,...t){return Dt(this,`reduce`,e,t)},reduceRight(e,...t){return Dt(this,`reduceRight`,e,t)},shift(){return kt(this,`shift`)},some(e,t){return Et(this,`some`,e,t,void 0,arguments)},splice(...e){return kt(this,`splice`,e)},toReversed(){return bt(this).toReversed()},toSorted(e){return bt(this).toSorted(e)},toSpliced(...e){return bt(this).toSpliced(...e)},unshift(...e){return kt(this,`unshift`,e)},values(){return wt(this,`values`,e=>St(this,e))}};function wt(e,t,n){let r=xt(e),i=r[t]();return r!==e&&!ln(e)&&(i._next=i.next,i.next=()=>{let e=i._next();return e.done||(e.value=n(e.value)),e}),i}var Tt=Array.prototype;function Et(e,t,n,r,i,a){let o=xt(e),s=o!==e&&!ln(e),c=o[t];if(c!==Tt[t]){let t=c.apply(e,a);return s?fn(t):t}let l=n;o!==e&&(s?l=function(t,r){return n.call(this,St(e,t),r,e)}:n.length>2&&(l=function(t,r){return n.call(this,t,r,e)}));let u=c.call(o,l,r);return s&&i?i(u):u}function Dt(e,t,n,r){let i=xt(e),a=i!==e&&!ln(e),o=n,s=!1;i!==e&&(a?(s=r.length===0,o=function(t,r,i){return s&&(s=!1,t=St(e,t)),n.call(this,t,St(e,r),i,e)}):n.length>3&&(o=function(t,r,i){return n.call(this,t,r,i,e)}));let c=i[t](o,...r);return s?St(e,c):c}function Ot(e,t,n){let r=F(e);_t(r,`iterate`,gt);let i=r[t](...n);return(i===-1||i===!1)&&un(n[0])?(n[0]=F(n[0]),r[t](...n)):i}function kt(e,t,n=[]){ot(),Je();let r=F(e)[t].apply(e,n);return Ye(),st(),r}var At=t(`__proto__,__v_isRef,__isVue`),jt=new Set(Object.getOwnPropertyNames(Symbol).filter(e=>e!==`arguments`&&e!==`caller`).map(e=>Symbol[e]).filter(y));function Mt(e){y(e)||(e=String(e));let t=F(this);return _t(t,`has`,e),t.hasOwnProperty(e)}var Nt=class{constructor(e=!1,t=!1){this._isReadonly=e,this._isShallow=t}get(e,t,n){if(t===`__v_skip`)return e.__v_skip;let r=this._isReadonly,i=this._isShallow;if(t===`__v_isReactive`)return!r;if(t===`__v_isReadonly`)return r;if(t===`__v_isShallow`)return i;if(t===`__v_raw`)return n===(r?i?$t:Qt:i?Zt:Xt).get(e)||Object.getPrototypeOf(e)===Object.getPrototypeOf(n)?e:void 0;let a=f(e);if(!r){let e;if(a&&(e=Ct[t]))return e;if(t===`hasOwnProperty`)return Mt}let o=Reflect.get(e,t,I(e)?e:n);if((y(t)?jt.has(t):At(t))||(r||_t(e,`get`,t),i))return o;if(I(o)){let e=a&&E(t)?o:o.value;return r&&b(e)?rn(e):e}return b(o)?r?rn(o):tn(o):o}},Pt=class extends Nt{constructor(e=!1){super(!1,e)}set(e,t,n,r){let i=e[t],a=f(e)&&E(t);if(!this._isShallow){let e=cn(i);if(!ln(n)&&!cn(n)&&(i=F(i),n=F(n)),!a&&I(i)&&!I(n))return e||(i.value=n),!0}let o=a?Number(t)e,Vt=e=>Reflect.getPrototypeOf(e);function Ht(e,t,n){return function(...r){let i=this.__v_raw,a=F(i),o=p(a),s=e===`entries`||e===Symbol.iterator&&o,l=e===`keys`&&o,u=i[e](...r),d=n?Bt:t?pn:fn;return!t&&_t(a,`iterate`,l?ht:mt),c(Object.create(u),{next(){let{value:e,done:t}=u.next();return t?{value:e,done:t}:{value:s?[d(e[0]),d(e[1])]:d(e),done:t}}})}}function Ut(e){return function(...t){return e===`delete`?!1:e===`clear`?void 0:this}}function Wt(e,t){let n={get(n){let r=this.__v_raw,i=F(r),a=F(n);e||(M(n,a)&&_t(i,`get`,n),_t(i,`get`,a));let{has:o}=Vt(i),s=t?Bt:e?pn:fn;if(o.call(i,n))return s(r.get(n));if(o.call(i,a))return s(r.get(a));r!==i&&r.get(n)},get size(){let t=this.__v_raw;return!e&&_t(F(t),`iterate`,mt),t.size},has(t){let n=this.__v_raw,r=F(n),i=F(t);return e||(M(t,i)&&_t(r,`has`,t),_t(r,`has`,i)),t===i?n.has(t):n.has(t)||n.has(i)},forEach(n,r){let i=this,a=i.__v_raw,o=F(a),s=t?Bt:e?pn:fn;return!e&&_t(o,`iterate`,mt),a.forEach((e,t)=>n.call(r,s(e),s(t),i))}};return c(n,e?{add:Ut(`add`),set:Ut(`set`),delete:Ut(`delete`),clear:Ut(`clear`)}:{add(e){let n=F(this),r=Vt(n),i=F(e),a=!t&&!ln(e)&&!cn(e)?i:e;return r.has.call(n,a)||M(e,a)&&r.has.call(n,e)||M(i,a)&&r.has.call(n,i)||(n.add(a),vt(n,`add`,a,a)),this},set(e,n){!t&&!ln(n)&&!cn(n)&&(n=F(n));let r=F(this),{has:i,get:a}=Vt(r),o=i.call(r,e);o||=(e=F(e),i.call(r,e));let s=a.call(r,e);return r.set(e,n),o?M(n,s)&&vt(r,`set`,e,n,s):vt(r,`add`,e,n),this},delete(e){let t=F(this),{has:n,get:r}=Vt(t),i=n.call(t,e);i||=(e=F(e),n.call(t,e));let a=r?r.call(t,e):void 0,o=t.delete(e);return i&&vt(t,`delete`,e,void 0,a),o},clear(){let e=F(this),t=e.size!==0,n=e.clear();return t&&vt(e,`clear`,void 0,void 0,void 0),n}}),[`keys`,`values`,`entries`,Symbol.iterator].forEach(r=>{n[r]=Ht(r,e,t)}),n}function Gt(e,t){let n=Wt(e,t);return(t,r,i)=>r===`__v_isReactive`?!e:r===`__v_isReadonly`?e:r===`__v_raw`?t:Reflect.get(d(n,r)&&r in t?n:t,r,i)}var Kt={get:Gt(!1,!1)},qt={get:Gt(!1,!0)},Jt={get:Gt(!0,!1)},Yt={get:Gt(!0,!0)},Xt=new WeakMap,Zt=new WeakMap,Qt=new WeakMap,$t=new WeakMap;function en(e){switch(e){case`Object`:case`Array`:return 1;case`Map`:case`Set`:case`WeakMap`:case`WeakSet`:return 2;default:return 0}}function tn(e){return cn(e)?e:on(e,!1,It,Kt,Xt)}function nn(e){return on(e,!1,Rt,qt,Zt)}function rn(e){return on(e,!0,Lt,Jt,Qt)}function an(e){return on(e,!0,zt,Yt,$t)}function on(e,t,n,r,i){if(!b(e)||e.__v_raw&&!(t&&e.__v_isReactive)||e.__v_skip||!Object.isExtensible(e))return e;let a=i.get(e);if(a)return a;let o=en(w(e));if(o===0)return e;let s=new Proxy(e,o===2?r:n);return i.set(e,s),s}function sn(e){return cn(e)?sn(e.__v_raw):!!(e&&e.__v_isReactive)}function cn(e){return!!(e&&e.__v_isReadonly)}function ln(e){return!!(e&&e.__v_isShallow)}function un(e){return e?!!e.__v_raw:!1}function F(e){let t=e&&e.__v_raw;return t?F(t):e}function dn(e){return!d(e,`__v_skip`)&&Object.isExtensible(e)&&ae(e,`__v_skip`,!0),e}var fn=e=>b(e)?tn(e):e,pn=e=>b(e)?rn(e):e;function I(e){return e?e.__v_isRef===!0:!1}function mn(e){return gn(e,!1)}function hn(e){return gn(e,!0)}function gn(e,t){return I(e)?e:new _n(e,t)}var _n=class{constructor(e,t){this.dep=new dt,this.__v_isRef=!0,this.__v_isShallow=!1,this._rawValue=t?e:F(e),this._value=t?e:fn(e),this.__v_isShallow=t}get value(){return this.dep.track(),this._value}set value(e){let t=this._rawValue,n=this.__v_isShallow||ln(e)||cn(e);e=n?e:F(e),M(e,t)&&(this._rawValue=e,this._value=n?e:fn(e),this.dep.trigger())}};function vn(e){e.dep&&e.dep.trigger()}function yn(e){return I(e)?e.value:e}function bn(e){return _(e)?e():yn(e)}var xn={get:(e,t,n)=>t===`__v_raw`?e:yn(Reflect.get(e,t,n)),set:(e,t,n,r)=>{let i=e[t];return I(i)&&!I(n)?(i.value=n,!0):Reflect.set(e,t,n,r)}};function Sn(e){return sn(e)?e:new Proxy(e,xn)}var Cn=class{constructor(e){this.__v_isRef=!0,this._value=void 0;let t=this.dep=new dt,{get:n,set:r}=e(t.track.bind(t),t.trigger.bind(t));this._get=n,this._set=r}get value(){return this._value=this._get()}set value(e){this._set(e)}};function wn(e){return new Cn(e)}function Tn(e){let t=f(e)?Array(e.length):{};for(let n in e)t[n]=kn(e,n);return t}var En=class{constructor(e,t,n){this._object=e,this._defaultValue=n,this.__v_isRef=!0,this._value=void 0,this._key=y(t)?t:String(t),this._raw=F(e);let r=!0,i=e;if(!f(e)||y(this._key)||!E(this._key))do r=!un(i)||ln(i);while(r&&(i=i.__v_raw));this._shallow=r}get value(){let e=this._object[this._key];return this._shallow&&(e=yn(e)),this._value=e===void 0?this._defaultValue:e}set value(e){if(this._shallow&&I(this._raw[this._key])){let t=this._object[this._key];if(I(t)){t.value=e;return}}this._object[this._key]=e}get dep(){return yt(this._raw,this._key)}},Dn=class{constructor(e){this._getter=e,this.__v_isRef=!0,this.__v_isReadonly=!0,this._value=void 0}get value(){return this._value=this._getter()}};function On(e,t,n){return I(e)?e:_(e)?new Dn(e):b(e)&&arguments.length>1?kn(e,t,n):mn(e)}function kn(e,t,n){return new En(e,t,n)}var An=class{constructor(e,t,n){this.fn=e,this.setter=t,this._value=void 0,this.dep=new dt(this),this.__v_isRef=!0,this.deps=void 0,this.depsTail=void 0,this.flags=16,this.globalVersion=lt-1,this.next=void 0,this.effect=this,this.__v_isReadonly=!t,this.isSSR=n}notify(){if(this.flags|=16,!(this.flags&8)&&P!==this)return qe(this,!0),!0}get value(){let e=this.dep.track();return $e(this),e&&(e.version=this.dep.version),this._value}set value(e){this.setter&&this.setter(e)}};function jn(e,t,n=!1){let r,i;return _(e)?r=e:(r=e.get,i=e.set),new An(r,i,n)}var Mn={GET:`get`,HAS:`has`,ITERATE:`iterate`},Nn={SET:`set`,ADD:`add`,DELETE:`delete`,CLEAR:`clear`},Pn={},Fn=new WeakMap,In=void 0;function Ln(){return In}function Rn(e,t=!1,n=In){if(n){let t=Fn.get(n);t||Fn.set(n,t=[]),t.push(e)}}function zn(e,t,r=n){let{immediate:a,deep:o,once:s,scheduler:c,augmentJob:u,call:d}=r,p=e=>o?e:ln(e)||o===!1||o===0?Bn(e,1):Bn(e),m,h,g,v,y=!1,b=!1;if(I(e)?(h=()=>e.value,y=ln(e)):sn(e)?(h=()=>p(e),y=!0):f(e)?(b=!0,y=e.some(e=>sn(e)||ln(e)),h=()=>e.map(e=>{if(I(e))return e.value;if(sn(e))return p(e);if(_(e))return d?d(e,2):e()})):h=_(e)?t?d?()=>d(e,2):e:()=>{if(g){ot();try{g()}finally{st()}}let t=In;In=m;try{return d?d(e,3,[v]):e(v)}finally{In=t}}:i,t&&o){let e=h,t=o===!0?1/0:o;h=()=>Bn(e(),t)}let x=Be(),S=()=>{m.stop(),x&&x.active&&l(x.effects,m)};if(s&&t){let e=t;t=(...t)=>{let n=e(...t);return S(),n}}let C=b?Array(e.length).fill(Pn):Pn,w=e=>{if(!(!(m.flags&1)||!m.dirty&&!e)){if(t){let n=m.run();if(e||o||y||(b?n.some((e,t)=>M(e,C[t])):M(n,C))){g&&g();let e=In;In=m;try{let e=[n,C===Pn?void 0:b&&C[0]===Pn?[]:C,v];C=n,d?d(t,3,e):t(...e)}finally{In=e}}}else m.run()}};return u&&u(w),m=new Ue(h),m.scheduler=c?()=>c(w,!1):w,v=e=>Rn(e,!1,m),g=m.onStop=()=>{let e=Fn.get(m);if(e){if(d)d(e,4);else for(let t of e)t();Fn.delete(m)}},t?a?w(!0):C=m.run():c?c(w.bind(null,!0),!0):m.run(),S.pause=m.pause.bind(m),S.resume=m.resume.bind(m),S.stop=S,S}function Bn(e,t=1/0,n){if(t<=0||!b(e)||e.__v_skip||(n||=new Map,(n.get(e)||0)>=t))return e;if(n.set(e,t),t--,I(e))Bn(e.value,t,n);else if(f(e))for(let r=0;r{Bn(e,t,n)});else if(T(e)){for(let r in e)Bn(e[r],t,n);for(let r of Object.getOwnPropertySymbols(e))Object.prototype.propertyIsEnumerable.call(e,r)&&Bn(e[r],t,n)}return e}var Vn=[];function Hn(e){Vn.push(e)}function Un(){Vn.pop()}function Wn(e,t){}var Gn={SETUP_FUNCTION:0,0:`SETUP_FUNCTION`,RENDER_FUNCTION:1,1:`RENDER_FUNCTION`,NATIVE_EVENT_HANDLER:5,5:`NATIVE_EVENT_HANDLER`,COMPONENT_EVENT_HANDLER:6,6:`COMPONENT_EVENT_HANDLER`,VNODE_HOOK:7,7:`VNODE_HOOK`,DIRECTIVE_HOOK:8,8:`DIRECTIVE_HOOK`,TRANSITION_HOOK:9,9:`TRANSITION_HOOK`,APP_ERROR_HANDLER:10,10:`APP_ERROR_HANDLER`,APP_WARN_HANDLER:11,11:`APP_WARN_HANDLER`,FUNCTION_REF:12,12:`FUNCTION_REF`,ASYNC_COMPONENT_LOADER:13,13:`ASYNC_COMPONENT_LOADER`,SCHEDULER:14,14:`SCHEDULER`,COMPONENT_UPDATE:15,15:`COMPONENT_UPDATE`,APP_UNMOUNT_CLEANUP:16,16:`APP_UNMOUNT_CLEANUP`},Kn={sp:`serverPrefetch hook`,bc:`beforeCreate hook`,c:`created hook`,bm:`beforeMount hook`,m:`mounted hook`,bu:`beforeUpdate hook`,u:`updated`,bum:`beforeUnmount hook`,um:`unmounted hook`,a:`activated hook`,da:`deactivated hook`,ec:`errorCaptured hook`,rtc:`renderTracked hook`,rtg:`renderTriggered hook`,0:`setup function`,1:`render function`,2:`watcher getter`,3:`watcher callback`,4:`watcher cleanup function`,5:`native event handler`,6:`component event handler`,7:`vnode hook`,8:`directive hook`,9:`transition hook`,10:`app errorHandler`,11:`app warnHandler`,12:`ref function`,13:`async component loader`,14:`scheduler flush`,15:`component update`,16:`app unmount cleanup function`};function qn(e,t,n,r){try{return r?e(...r):e()}catch(e){Yn(e,t,n)}}function Jn(e,t,n,r){if(_(e)){let i=qn(e,t,n,r);return i&&x(i)&&i.catch(e=>{Yn(e,t,n)}),i}if(f(e)){let i=[];for(let a=0;a>>1,i=Zn[r],a=dr(i);a=dr(n)?Zn.push(e):Zn.splice(ar(t),0,e),e.flags|=1,sr()}}function sr(){rr||=nr.then(fr)}function cr(e){if(!f(e))er&&e.id===-1?er.splice(tr+1,0,e):e.flags&1||($n.push(e),e.flags|=1);else for(let t=0;tdr(e)-dr(t));if($n.length=0,er){for(let t=0;te.id==null?e.flags&2?-1:1/0:e.id;function fr(e){try{for(Qn=0;Qnpr.emit(e,...t)),mr=[]):typeof window<`u`&&window.HTMLElement&&!(window.navigator?.userAgent)?.includes(`jsdom`)?((t.__VUE_DEVTOOLS_HOOK_REPLAY__=t.__VUE_DEVTOOLS_HOOK_REPLAY__||[]).push(e=>{hr(e,t)}),setTimeout(()=>{pr||(t.__VUE_DEVTOOLS_HOOK_REPLAY__=null,mr=[])},3e3)):mr=[]}var L=null,gr=null;function _r(e){let t=L;return L=e,gr=e&&e.type.__scopeId||null,t}function vr(e){gr=e}function yr(){gr=null}var br=e=>xr;function xr(e,t=L,n){if(!t||e._n)return e;let r=(...n)=>{r._d&&xs(-1);let i=_r(t),a=gs.length,o;try{o=e(...n)}finally{for(let e=gs.length;e>a;e--)ys();_r(i),r._d&&xs(1)}return o};return r._n=!0,r._c=!0,r._d=!0,r}function Sr(e,t){if(L===null)return e;let r=cc(L),i=e.dirs||=[];for(let e=0;e1)return n&&_(t)?t.call(r&&r.proxy):t}}function Er(){return!!(Gs()||uo)}var Dr=Symbol.for(`v-scx`),Or=()=>Tr(Dr);function kr(e,t){return Nr(e,null,t)}function Ar(e,t){return Nr(e,null,{flush:`post`})}function jr(e,t){return Nr(e,null,{flush:`sync`})}function Mr(e,t,n){return Nr(e,t,n)}function Nr(e,t,r=n){let{immediate:a,deep:o,flush:s,once:l}=r,u=c({},r),d=t&&a||!t&&s!==`post`,f;if(Zs){if(s===`sync`){let e=Or();f=e.__watcherHandles||=[]}else if(!d){let e=()=>{};return e.stop=i,e.resume=i,e.pause=i,e}}let p=H;u.call=(e,t,n)=>Jn(e,p,t,n);let m=!1;s===`post`?u.scheduler=e=>{R(e,p&&p.suspense)}:s!==`sync`&&(m=!0,u.scheduler=(e,t)=>{t?e():or(e)}),u.augmentJob=e=>{t&&(e.flags|=4),m&&(e.flags|=2,p&&(e.id=p.uid,e.i=p))};let h=zn(e,t,u);return Zs&&(f?f.push(h):d&&h()),h}function Pr(e,t,n){let r=this.proxy,i=v(e)?e.includes(`.`)?Fr(r,e):()=>r[e]:e.bind(r,r),a;_(t)?a=t:(a=t.handler,n=t);let o=Js(this),s=Nr(i,a.bind(r),n);return o(),s}function Fr(e,t){let n=t.split(`.`);return()=>{let t=e;for(let e=0;ee.__isTeleport,zr=e=>e&&(e.disabled||e.disabled===``),Br=e=>e&&(e.defer||e.defer===``),Vr=e=>typeof SVGElement<`u`&&e instanceof SVGElement,Hr=e=>typeof MathMLElement==`function`&&e instanceof MathMLElement,Ur=(e,t)=>{let n=e&&e.to;return v(n)?t?t(n):null:n},Wr={name:`Teleport`,__isTeleport:!0,process(e,t,n,r,i,a,o,s,c,l){let{mc:u,pc:d,pbc:f,o:{insert:p,querySelector:m,createText:h,createComment:g,parentNode:_}}=l,v=zr(t.props),{dynamicChildren:y}=t,b=(e,t,n)=>{e.shapeFlag&16&&u(e.children,t,n,i,a,o,s,c)},x=(e=t)=>{let n=zr(e.props),r=e.target=Ur(e.props,m),a=Yr(r,e,h,p);r&&(o!==`svg`&&Vr(r)?o=`svg`:o!==`mathml`&&Hr(r)&&(o=`mathml`),i&&i.isCE&&(i.ce._teleportTargets||(i.ce._teleportTargets=new Set)).add(r),n||(b(e,r,a),Jr(e,!1)))},S=e=>{let t=()=>{if(Ir.get(e)===t){if(Ir.delete(e),zr(e.props)){let t=_(e.el)||n;b(e,t,e.anchor),Jr(e,!0)}x(e)}};Ir.set(e,t),R(t,a)};if(e==null){let e=t.el=h(``),i=t.anchor=h(``);if(p(e,n,r),p(i,n,r),Br(t.props)||a&&a.pendingBranch){S(t);return}v&&(b(t,n,i),Jr(t,!0)),x()}else{t.el=e.el;let r=t.anchor=e.anchor,u=Ir.get(e);if(u){u.flags|=8,Ir.delete(e),S(t);return}t.targetStart=e.targetStart;let p=t.target=e.target,h=t.targetAnchor=e.targetAnchor,g=zr(e.props),_=g?n:p,b=g?r:h;if(o===`svg`||Vr(p)?o=`svg`:(o===`mathml`||Hr(p))&&(o=`mathml`),y?(f(e.dynamicChildren,y,_,i,a,o,s),Xo(e,t,!0)):c||d(e,t,_,b,i,a,o,s,!1),v)g?t.props&&e.props&&t.props.to!==e.props.to&&(t.props.to=e.props.to):Gr(t,n,r,l,1);else if((t.props&&t.props.to)!==(e.props&&e.props.to)){let e=Ur(t.props,m);e&&(t.target=e,Gr(t,e,null,l,0))}else g&&Gr(t,p,h,l,1);Jr(t,v)}},remove(e,t,n,{um:r,o:{remove:i}},a){let{shapeFlag:o,children:s,anchor:c,targetStart:l,targetAnchor:u,target:d,props:f}=e,p=zr(f),m=a||!p,h=Ir.get(e);if(h&&(h.flags|=8,Ir.delete(e)),d&&(i(l),i(u)),a&&i(c),!h&&(p||d)&&o&16)for(let e=0;e{e.isMounted=!0}),sa(()=>{e.isUnmounting=!0}),e}var $r=[Function,Array],ei={mode:String,appear:Boolean,persisted:Boolean,onBeforeEnter:$r,onEnter:$r,onAfterEnter:$r,onEnterCancelled:$r,onBeforeLeave:$r,onLeave:$r,onAfterLeave:$r,onLeaveCancelled:$r,onBeforeAppear:$r,onAppear:$r,onAfterAppear:$r,onAppearCancelled:$r},ti=e=>{let t=e.subTree;return t.component?ti(t.component):t},ni={name:`BaseTransition`,props:ei,setup(e,{slots:t}){let n=Gs(),r=Qr();return()=>{let i=t.default&&ui(t.default(),!0),a=i&&i.length?ri(i):n.subTree?Is():void 0;if(!a)return;let o=F(e),{mode:s}=o;if(r.isLeaving)return si(a);let c=ci(a);if(!c)return si(a);let l=oi(c,o,r,n,e=>l=e);c.type!==B&&li(c,l);let u=n.subTree&&ci(n.subTree);if(u&&u.type!==B&&!Es(u,c)&&ti(n).type!==B){let e=oi(u,o,r,n);if(li(u,e),s===`out-in`&&c.type!==B)return r.isLeaving=!0,e.afterLeave=()=>{r.isLeaving=!1,n.job.flags&8||n.update(),delete e.afterLeave,u=void 0},si(a);s===`in-out`&&c.type!==B?e.delayLeave=(e,t,n)=>{let i=ai(r,u);i[String(u.key)]=u,e[Xr]=()=>{t(),e[Xr]=void 0,delete l.delayedLeave,u=void 0},l.delayedLeave=()=>{n(),delete l.delayedLeave,u=void 0}}:u=void 0}else u&&=void 0;return a}}};function ri(e){let t=e[0];if(e.length>1){for(let n of e)if(n.type!==B){t=n;break}}return t}var ii=ni;function ai(e,t){let{leavingVNodes:n}=e,r=n.get(t.type);return r||(r=Object.create(null),n.set(t.type,r)),r}function oi(e,t,n,r,i){let{appear:a,mode:o,persisted:s=!1,onBeforeEnter:c,onEnter:l,onAfterEnter:u,onEnterCancelled:d,onBeforeLeave:p,onLeave:m,onAfterLeave:h,onLeaveCancelled:g,onBeforeAppear:_,onAppear:v,onAfterAppear:y,onAppearCancelled:b}=t,x=String(e.key),S=ai(n,e),C=(e,t)=>{e&&Jn(e,r,9,t)},w=(e,t)=>{let n=t[1];C(e,t),f(e)?e.every(e=>e.length<=1)&&n():e.length<=1&&n()},T={mode:o,persisted:s,beforeEnter(t){let r=c;if(!n.isMounted){if(a)r=_||c;else return}t[Xr]&&t[Xr](!0);let i=S[x];i&&Es(e,i)&&i.el[Xr]&&i.el[Xr](),C(r,[t])},enter(t){if(S[x]===e)return;let r=l,i=u,o=d;if(!n.isMounted){if(a)r=v||l,i=y||u,o=b||d;else return}let s=!1;t[Zr]=e=>{s||(s=!0,C(e?o:i,[t]),T.delayedLeave&&T.delayedLeave(),t[Zr]=void 0)};let c=t[Zr].bind(null,!1);r?w(r,[t,c]):c()},leave(t,r){let i=String(e.key);if(t[Zr]&&t[Zr](!0),n.isUnmounting)return r();C(p,[t]);let a=!1;t[Xr]=n=>{a||(a=!0,r(),C(n?g:h,[t]),t[Xr]=void 0,S[i]===e&&delete S[i])};let o=t[Xr].bind(null,!1);S[i]=e,m?w(m,[t,o]):o()},clone(e){let a=oi(e,t,n,r,i);return i&&i(a),a}};return T}function si(e){if(Ki(e))return e=Ns(e),e.children=null,e}function ci(e){if(!Ki(e))return Rr(e.type)&&e.children?ri(e.children):e;if(e.component)return e.component.subTree;let{shapeFlag:t,children:n}=e;if(n){if(t&16)return n[0];if(t&32&&_(n.default))return n.default()}}function li(e,t){if(e.shapeFlag&6&&e.component){e.transition=t;let n=e.component.subTree;li(Rr(n.type)&&ci(n)||n,t)}else e.shapeFlag&128?(e.ssContent.transition=t.clone(e.ssContent),e.ssFallback.transition=t.clone(e.ssFallback)):e.transition=t}function ui(e,t=!1,n){let r=[],i=0;for(let a=0;a1)for(let e=0;er.value,set:e=>r.value=e})}return r}function hi(e,t){let n;return!!((n=Object.getOwnPropertyDescriptor(e,t))&&!n.configurable)}var gi=new WeakMap;function _i(e,t,r,i,o=!1){if(f(e)){e.forEach((e,n)=>_i(e,t&&(f(t)?t[n]:t),r,i,o));return}if(Ui(i)&&!o){i.shapeFlag&512&&i.type.__asyncResolved&&i.component.subTree.component&&_i(e,t,r,i.component.subTree);return}let s=i.shapeFlag&4?cc(i.component):i.el,c=o?null:s,{i:u,r:p}=e,m=t&&t.r,h=u.refs===n?u.refs={}:u.refs,g=u.setupState,y=F(g),b=g===n?a:e=>!hi(h,e)&&d(y,e),x=(e,t)=>!(t&&hi(h,t));if(m!=null&&m!==p){if(vi(t),v(m))h[m]=null,b(m)&&(g[m]=null);else if(I(m)){let e=t;x(m,e.k)&&(m.value=null),e.k&&(h[e.k]=null)}}if(_(p))qn(p,u,12,[c,h]);else{let t=v(p),n=I(p);if(t||n){let i=()=>{if(e.f){let n=t?b(p)?g[p]:h[p]:x(p)||!e.k?p.value:h[e.k];if(o)f(n)&&l(n,s);else if(f(n))n.includes(s)||n.push(s);else if(t)h[p]=[s],b(p)&&(g[p]=h[p]);else{let t=[s];x(p,e.k)&&(p.value=t),e.k&&(h[e.k]=t)}}else t?(h[p]=c,b(p)&&(g[p]=c)):n&&(x(p,e.k)&&(p.value=c),e.k&&(h[e.k]=c))};if(c){let t=()=>{i(),gi.delete(e)};t.id=-1,gi.set(e,t),R(t,r)}else vi(e),i()}}}function vi(e){let t=gi.get(e);t&&(t.flags|=8,gi.delete(e))}var yi=!1,bi=()=>{yi||=(console.error(`Hydration completed but contains mismatches.`),!0)},xi=e=>e.namespaceURI.includes(`svg`)&&e.tagName!==`foreignObject`,Si=e=>e.namespaceURI.includes(`MathML`),Ci=e=>{if(e.nodeType===1){if(xi(e))return`svg`;if(Si(e))return`mathml`}},wi=e=>e.nodeType===8;function Ti(e){let{mt:t,p:n,o:{patchProp:r,createText:i,nextSibling:a,parentNode:s,remove:c,insert:l,createComment:u}}=e,d=(e,t)=>{if(!t.hasChildNodes()){n(null,e,t),ur(),t._vnode=e;return}f(t.firstChild,e,null,null,null),ur(),t._vnode=e},f=(n,r,o,c,u,d=!1)=>{d||=!!r.dynamicChildren;let b=wi(n)&&n.data===`[`,x=()=>g(n,r,o,c,u,b),{type:S,ref:C,shapeFlag:w,patchFlag:T}=r,E=n.nodeType;r.el=n,T===-2&&(d=!1,r.dynamicChildren=null);let D=null;switch(S){case ms:E===3?(n.data!==r.children&&(bi(),n.data=r.children),D=a(n)):r.children===``?(l(r.el=i(``),s(n),n),D=n):D=x();break;case B:y(n)?(D=a(n),v(r.el=n.content.firstChild,n,o)):D=E!==8||b?x():a(n);break;case hs:if(b&&(n=a(n),E=n.nodeType),E===1||E===3){D=n;let e=!r.children.length;for(let t=0;t{s||=!!t.dynamicChildren;let{type:l,dynamicProps:u,props:d,patchFlag:f,shapeFlag:p,dirs:h,transition:g}=t,_=l===`input`||l===`option`,b=!!u;if(_||b||f!==-1){h&&Cr(t,null,n,`created`);let l=!1;if(y(e)){l=Yo(null,g)&&n&&n.vnode.props&&n.vnode.props.appear;let r=e.content.firstChild;if(l){let e=r.getAttribute(`class`);e&&(r.$cls=e),g.beforeEnter(r)}v(r,e,n),t.el=e=r}if(p&16&&!(d&&(d.innerHTML||d.textContent))){let r=m(e.firstChild,t,e,n,i,a,s);for(r&&!Ai(e,1)&&bi();r;){let e=r;r=r.nextSibling,c(e)}}else if(p&8){let n=t.children;n[0]===` +`&&(e.tagName===`PRE`||e.tagName===`TEXTAREA`)&&(n=n.slice(1));let{textContent:r}=e;r!==n&&r!==n.replace(/\r\n|\r/g,` +`)&&(Ai(e,0)||bi(),e.textContent=t.children)}if(d){if(_||b||!s||f&48){let t=e.tagName.includes(`-`),i=e.namespaceURI.includes(`svg`)?`svg`:e.namespaceURI.includes(`MathML`)?`mathml`:void 0;for(let a in d)if(_&&(a.endsWith(`value`)||a===`indeterminate`)||o(a)&&!D(a)||a[0]===`.`||t&&!D(a)||u&&u.includes(a)){if(Di(e,a,d[a]))continue;r(e,a,null,d[a],i,n)}}else if(d.onClick)r(e,`onClick`,null,d.onClick,void 0,n);else if(f&4&&sn(d.style))for(let e in d.style)d.style[e]}let x;(x=d&&d.onVnodeBeforeMount)&&Vs(x,n,t),h&&Cr(t,null,n,`beforeMount`),((x=d&&d.onVnodeMounted)||h||l)&&ds(()=>{x&&Vs(x,n,t),l&&g.enter(e),h&&Cr(t,null,n,`mounted`)},i)}return e.nextSibling},m=(e,t,r,o,s,c,u)=>{u||=!!t.dynamicChildren;let d=t.children,p=d.length,m=!1;for(let t=0;t{let{slotScopeIds:c}=t;c&&(i=i?i.concat(c):c);let d=s(e),f=m(a(e),t,d,n,r,i,o);return f&&wi(f)&&f.data===`]`?a(t.anchor=f):(bi(),l(t.anchor=u(`]`),d,f),f)},g=(e,t,r,i,o,l)=>{if(Mi(e,t)||bi(),t.el=null,l){let t=_(e);for(;;){let n=a(e);if(n&&n!==t)c(n);else break}}let u=a(e),d=s(e);return c(e),n(null,t,d,u,r,i,Ci(d),o),r&&(r.vnode.el=t.el,To(r,t.el)),u},_=(e,t=`[`,n=`]`)=>{let r=0;for(;e;)if(e=a(e),e&&wi(e)&&(e.data===t&&r++,e.data===n)){if(r===0)return a(e);r--}return e},v=(e,t,n)=>{let r=t.parentNode;r&&r.replaceChild(e,t);let i=n;for(;i;)i.vnode.el===t&&(i.vnode.el=i.subTree.el=e),i=i.parent},y=e=>e.nodeType===1&&e.tagName===`TEMPLATE`;return[d,f]}var Ei=new Set([`src`,`srcset`,`href`,`poster`]);function Di(e,t,n){return Ei.has(t)?e.getAttribute(t)===(n==null?null:`${n}`):!1}var Oi=`data-allow-mismatch`,ki={0:`text`,1:`children`,2:`class`,3:`style`,4:`attribute`};function Ai(e,t){if(t===0||t===1)for(;e&&!e.hasAttribute(Oi);)e=e.parentElement;return ji(e&&e.getAttribute(Oi),t)}function ji(e,t){if(e==null)return!1;if(e===``)return!0;{let n=e.split(`,`);return t===0&&n.includes(`children`)?!0:n.includes(ki[t])}}function Mi(e,t){return Ai(e.parentElement,1)||Ni(e)||Pi(t)}function Ni(e){return e.nodeType===1&&ji(e.getAttribute(Oi),1)}function Pi({props:e}){let t=e&&e[Oi];return typeof t==`string`&&ji(t,1)}var Fi=le().requestIdleCallback||(e=>setTimeout(e,1)),Ii=le().cancelIdleCallback||(e=>clearTimeout(e)),Li=(e=1e4)=>t=>{let n=Fi(t,{timeout:e});return()=>Ii(n)};function Ri(e){let{top:t,left:n,bottom:r,right:i}=e.getBoundingClientRect(),{innerHeight:a,innerWidth:o}=window;return(t>0&&t0&&r0&&n0&&i(t,n)=>{let r=new IntersectionObserver(e=>{for(let n of e)if(n.isIntersecting){r.disconnect(),t();break}},e);return n(e=>{if(e instanceof Element){if(Ri(e))return t(),r.disconnect(),!1;r.observe(e)}}),()=>r.disconnect()},Bi=e=>t=>{if(e){let n=matchMedia(e);if(n.matches)t();else return n.addEventListener(`change`,t,{once:!0}),()=>n.removeEventListener(`change`,t)}},Vi=(e=[])=>(t,n)=>{v(e)&&(e=[e]);let r=!1,i=e=>{r||(r=!0,a(),t(),e.target.dispatchEvent(new e.constructor(e.type,e)))},a=()=>{n(t=>{for(let n of e)t.removeEventListener(n,i)})};return n(t=>{for(let n of e)t.addEventListener(n,i,{once:!0})}),a};function Hi(e,t){if(wi(e)&&e.data===`[`){let n=1,r=e.nextSibling;for(;r;){if(r.nodeType===1){if(t(r)===!1)break}else if(wi(r)){if(r.data===`]`){if(--n===0)break}else r.data===`[`&&n++}r=r.nextSibling}}else t(e)}var Ui=e=>!!e.type.__asyncLoader;function Wi(e){_(e)&&(e={loader:e});let{loader:t,loadingComponent:n,errorComponent:r,delay:i=200,hydrate:a,timeout:o,suspensible:s=!0,onError:c}=e,l=null,u,d=0,f=()=>(d++,l=null,p()),p=()=>{let e;return l||(e=l=t().catch(e=>{if(e=e instanceof Error?e:Error(String(e)),c)return new Promise((t,n)=>{c(e,()=>t(f()),()=>n(e),d+1)});throw e}).then(t=>e!==l&&l?l:(t&&(t.__esModule||t[Symbol.toStringTag]===`Module`)&&(t=t.default),u=t,t)))};return di({name:`AsyncComponentWrapper`,__asyncLoader:p,__asyncHydrate(e,t,n){let r=e.isConnected,i=!1;(t.bu||=[]).push(()=>i=!0);let o=()=>{i||!e.parentNode||r&&!e.isConnected||n()},s=a?()=>{let n=a(o,t=>Hi(e,t));n&&(t.bum||=[]).push(n)}:o;u?s():p().then(()=>!t.isUnmounted&&s())},get __asyncResolved(){return u},setup(){let e=H;if(pi(e),u)return()=>Gi(u,e);let t=t=>{l=null,Yn(t,e,13,!r)};if(s&&e.suspense||Zs)return p().then(t=>()=>Gi(t,e)).catch(e=>(t(e),()=>r?V(r,{error:e}):null));let a=mn(!1),c=mn(),d=mn(!!i),f,m;return ca(()=>{f!=null&&clearTimeout(f),m!=null&&clearTimeout(m)}),i&&(m=setTimeout(()=>{e.isUnmounted||(d.value=!1)},i)),o!=null&&(f=setTimeout(()=>{if(!e.isUnmounted&&!a.value&&!c.value){let e=Error(`Async component timed out after ${o}ms.`);t(e),c.value=e}},o)),p().then(()=>{e.isUnmounted||(a.value=!0,e.parent&&Ki(e.parent.vnode)&&e.parent.update())}).catch(n=>{if(e.isUnmounted){l=null;return}t(n),c.value=n}),()=>{if(a.value&&u)return Gi(u,e);if(c.value&&r)return V(r,{error:c.value});if(n&&!d.value)return Gi(n,e)}}})}function Gi(e,t){let{ref:n,props:r,children:i,ce:a}=t.vnode,o=V(e,r,i);return o.ref=n,o.ce=a,delete t.vnode.ce,o}var Ki=e=>e.type.__isKeepAlive,qi={name:`KeepAlive`,__isKeepAlive:!0,props:{include:[String,RegExp,Array],exclude:[String,RegExp,Array],max:[String,Number]},setup(e,{slots:t}){let n=Gs(),r=n.ctx;if(!r.renderer)return()=>{let e=t.default&&t.default();return e&&e.length===1?e[0]:e};let i=new Map,a=new Set,o=null,s=n.suspense,{renderer:{p:c,m:l,um:u,o:{createElement:d}}}=r,f=d(`div`);r.activate=(e,t,n,r,i)=>{let a=e.component;l(e,t,n,0,s),c(a.vnode,e,t,n,a,s,r,e.slotScopeIds,i),R(()=>{a.isDeactivated=!1,a.a&&ie(a.a);let t=e.props&&e.props.onVnodeMounted;t&&Vs(t,a.parent,e)},s)},r.deactivate=e=>{let t=e.component;$o(t.m),$o(t.a),l(e,f,null,1,s),R(()=>{t.da&&ie(t.da);let n=e.props&&e.props.onVnodeUnmounted;n&&Vs(n,t.parent,e),t.isDeactivated=!0},s)};function p(e){$i(e),u(e,n,s,!0)}function m(e){i.forEach((t,n)=>{let r=lc(Ui(t)?t.type.__asyncResolved||{}:t.type);r&&!e(r)&&h(n)})}function h(e){let t=i.get(e);t&&(!o||!Es(t,o))?p(t):o&&$i(o),i.delete(e),a.delete(e)}Mr(()=>[e.include,e.exclude],([e,t])=>{e&&m(t=>Ji(e,t)),t&&m(e=>!Ji(t,e))},{flush:`post`,deep:!0});let g=null,_=()=>{g!=null&&(ts(n.subTree.type)?R(()=>{i.set(g,ea(n.subTree))},n.subTree.suspense):i.set(g,ea(n.subTree)))};return ia(_),oa(_),sa(()=>{i.forEach(e=>{let{subTree:t,suspense:r}=n,i=ea(t);if(e.type===i.type&&e.key===i.key){$i(i);let e=i.component.da;e&&R(e,r);return}p(e)})}),()=>{if(g=null,!t.default)return o=null;let n=t.default(),r=n[0];if(n.length>1)return o=null,n;if(!Ts(r)||!(r.shapeFlag&4)&&!(r.shapeFlag&128))return o=null,r;let s=ea(r);if(s.type===B)return o=null,s;let c=s.type,l=lc(Ui(s)?s.type.__asyncResolved||{}:c),{include:u,exclude:d,max:f}=e;if(u&&(!l||!Ji(u,l))||d&&l&&Ji(d,l))return s.shapeFlag&=-257,o=s,r;let p=s.key==null?c:s.key,m=i.get(p);return s.el&&(s=Ns(s),r.shapeFlag&128&&(r.ssContent=s)),g=p,m?(s.el=m.el,s.component=m.component,s.transition&&li(s,s.transition),s.shapeFlag|=512,a.delete(p),a.add(p)):(a.add(p),f&&a.size>parseInt(f,10)&&h(a.values().next().value)),s.shapeFlag|=256,o=s,ts(r.type)?r:s}}};function Ji(e,t){return f(e)?e.some(e=>Ji(e,t)):v(e)?e.split(`,`).includes(t):g(e)?(e.lastIndex=0,e.test(t)):!1}function Yi(e,t){Zi(e,`a`,t)}function Xi(e,t){Zi(e,`da`,t)}function Zi(e,t,n=H){let r=e.__wdc||=()=>{let t=n;for(;t;){if(t.isDeactivated)return;t=t.parent}return e()};if(ta(t,r,n),n){let e=n.parent;for(;e&&e.parent;)Ki(e.parent.vnode)&&Qi(r,t,n,e),e=e.parent}}function Qi(e,t,n,r){let i=ta(t,e,r,!0);ca(()=>{l(r[t],i)},n)}function $i(e){e.shapeFlag&=-257,e.shapeFlag&=-513}function ea(e){return e.shapeFlag&128?e.ssContent:e}function ta(e,t,n=H,r=!1){if(n){let i=n[e]||(n[e]=[]),a=t.__weh||=(...r)=>{ot();let i=Js(n),a=Jn(t,n,e,r);return i(),st(),a};return r?i.unshift(a):i.push(a),a}}var na=e=>(t,n=H)=>{(!Zs||e===`sp`)&&ta(e,(...e)=>t(...e),n)},ra=na(`bm`),ia=na(`m`),aa=na(`bu`),oa=na(`u`),sa=na(`bum`),ca=na(`um`),la=na(`sp`),ua=na(`rtg`),da=na(`rtc`);function fa(e,t=H){ta(`ec`,e,t)}var pa=`components`,ma=`directives`;function ha(e,t){return ya(pa,e,!0,t)||e}var ga=Symbol.for(`v-ndc`);function _a(e){return v(e)?ya(pa,e,!1)||e:e||ga}function va(e){return ya(ma,e)}function ya(e,t,n=!0,r=!1){let i=L||H;if(i){let n=i.type;if(e===pa){let e=lc(n,!1);if(e&&(e===t||e===k(t)||e===re(k(t))))return n}let a=ba(i[e]||n[e],t)||ba(i.appContext[e],t);return!a&&r?n:a}}function ba(e,t){return e&&(e[t]||e[k(t)]||e[re(k(t))])}function xa(e,t,n,r){let i,a=n&&n[r],o=f(e);if(o||v(e)){let n=o&&sn(e),r=!1,s=!1;n&&(r=!ln(e),s=cn(e),e=xt(e)),i=Array(e.length);for(let n=0,o=e.length;nt(e,n,void 0,a&&a[n]));else{let n=Object.keys(e);i=Array(n.length);for(let r=0,o=n.length;r{let t=r.fn(...e);return t&&(t.key=r.key),t}:r.fn)}return e}function Ca(e,t,n,r,i,a){if(n??={},L.ce||L.parent&&Ui(L.parent)&&L.parent.ce){let e=a!=null&&n.key==null?c({},n,{key:a}):n,i=Object.keys(e).length>0;return t!=="default"&&(e.name=t),vs(),ws(z,null,[V(`slot`,e,r&&r())],i?-2:64)}let o=e[t];o&&o._c&&(o._d=!1);let s=gs.length;vs();let l;try{let i=o&&wa(o(n)),s=n.key||a||i&&i.key;l=ws(z,{key:(s&&!y(s)?s:`_${t}`)+(!i&&r?`_fb`:``)},i||(r?r():[]),i&&e._===1?64:-2)}catch(e){for(let e=gs.length;e>s;e--)ys();throw e}finally{o&&o._c&&(o._d=!0)}return!i&&l.scopeId&&(l.slotScopeIds=[l.scopeId+`-s`]),l}function wa(e){return e.some(e=>!Ts(e)||!(e.type===B||e.type===z&&!wa(e.children)))?e:null}function Ta(e,t){let n={};for(let r in e)n[t&&/[A-Z]/.test(r)?`on:${r}`:j(r)]=e[r];return n}var Ea=e=>e?Xs(e)?cc(e):Ea(e.parent):null,Da=c(Object.create(null),{$:e=>e,$el:e=>e.vnode.el,$data:e=>e.data,$props:e=>e.props,$attrs:e=>e.attrs,$slots:e=>e.slots,$refs:e=>e.refs,$parent:e=>Ea(e.parent),$root:e=>Ea(e.root),$host:e=>e.ce,$emit:e=>e.emit,$options:e=>Za(e),$forceUpdate:e=>e.f||=()=>{or(e.update)},$nextTick:e=>e.n||=ir.bind(e.proxy),$watch:e=>Pr.bind(e)}),Oa=(e,t)=>e!==n&&!e.__isScriptSetup&&d(e,t),ka={get({_:e},t){if(t===`__v_skip`)return!0;let{ctx:r,setupState:i,data:a,props:o,accessCache:s,type:c,appContext:l}=e;if(t[0]!==`$`){let e=s[t];if(e!==void 0)switch(e){case 1:return i[t];case 2:return a[t];case 4:return r[t];case 3:return o[t]}else if(Oa(i,t))return s[t]=1,i[t];else if(a!==n&&d(a,t))return s[t]=2,a[t];else if(d(o,t))return s[t]=3,o[t];else if(r!==n&&d(r,t))return s[t]=4,r[t];else Ka&&(s[t]=0)}let u=Da[t],f,p;if(u)return t===`$attrs`&&_t(e.attrs,`get`,``),u(e);if((f=c.__cssModules)&&(f=f[t]))return f;if(r!==n&&d(r,t))return s[t]=4,r[t];if(p=l.config.globalProperties,d(p,t))return p[t]},set({_:e},t,r){let{data:i,setupState:a,ctx:o}=e;return Oa(a,t)?(a[t]=r,!0):i!==n&&d(i,t)?(i[t]=r,!0):d(e.props,t)||t[0]===`$`&&t.slice(1)in e?!1:(o[t]=r,!0)},has({_:{data:e,setupState:t,accessCache:r,ctx:i,appContext:a,props:o,type:s}},c){let l;return!!(r[c]||e!==n&&c[0]!==`$`&&d(e,c)||Oa(t,c)||d(o,c)||d(i,c)||d(Da,c)||d(a.config.globalProperties,c)||(l=s.__cssModules)&&l[c])},defineProperty(e,t,n){return n.get==null?d(n,`value`)&&this.set(e,t,n.value,null):e._.accessCache[t]=0,Reflect.defineProperty(e,t,n)}},Aa=c({},ka,{get(e,t){if(t!==Symbol.unscopables)return ka.get(e,t,e)},has(e,t){return t[0]!==`_`&&!de(t)}});function ja(){return null}function Ma(){return null}function Na(e){}function Pa(e){}function Fa(){return null}function Ia(){}function La(e,t){return null}function Ra(){return Ba(`useSlots`).slots}function za(){return Ba(`useAttrs`).attrs}function Ba(e){let t=Gs();return t.setupContext||=sc(t)}function Va(e){return f(e)?e.reduce((e,t)=>(e[t]=null,e),{}):e}function Ha(e,t){let n=Va(e);for(let e in t){if(e.startsWith(`__skip`))continue;let r=n[e];r?f(r)||_(r)?r=n[e]={type:r,default:t[e]}:r.default=t[e]:r===null&&(r=n[e]={default:t[e]}),r&&t[`__skip_${e}`]&&(r.skipFactory=!0)}return n}function Ua(e,t){return!e||!t?e||t:f(e)&&f(t)?e.concat(t):c({},Va(e),Va(t))}function Wa(e,t){let n={};for(let r in e)t.includes(r)||Object.defineProperty(n,r,{enumerable:!0,get:()=>e[r]});return n}function Ga(e){let t=Gs(),n=Zs,r=e();Ys(),n&&qs(!1);let i=()=>{Js(t),n&&qs(!0)},a=()=>{Gs()!==t&&t.scope.off(),Ys(),n&&qs(!1)};return x(r)&&(r=r.catch(e=>{throw i(),Promise.resolve().then(()=>Promise.resolve().then(a)),e})),[r,()=>{i(),Promise.resolve().then(a)}]}var Ka=!0;function qa(e){let t=Za(e),n=e.proxy,r=e.ctx;Ka=!1,t.beforeCreate&&Ya(t.beforeCreate,e,`bc`);let{data:a,computed:o,methods:s,watch:c,provide:l,inject:u,created:d,beforeMount:p,mounted:m,beforeUpdate:h,updated:g,activated:v,deactivated:y,beforeDestroy:x,beforeUnmount:S,destroyed:C,unmounted:w,render:T,renderTracked:E,renderTriggered:D,errorCaptured:ee,serverPrefetch:te,expose:O,inheritAttrs:k,components:ne,directives:A,filters:re}=t;if(u&&Ja(u,r,null),s)for(let e in s){let t=s[e];_(t)&&(r[e]=t.bind(n))}if(a){let t=a.call(n,n);b(t)&&(e.data=tn(t))}if(Ka=!0,o)for(let e in o){let t=o[e],a=dc({get:_(t)?t.bind(n,n):_(t.get)?t.get.bind(n,n):i,set:!_(t)&&_(t.set)?t.set.bind(n):i});Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>a.value,set:e=>a.value=e})}if(c)for(let e in c)Xa(c[e],r,n,e);if(l){let e=_(l)?l.call(n):l;Reflect.ownKeys(e).forEach(t=>{wr(t,e[t])})}d&&Ya(d,e,`c`);function j(e,t){f(t)?t.forEach(t=>e(t.bind(n))):t&&e(t.bind(n))}if(j(ra,p),j(ia,m),j(aa,h),j(oa,g),j(Yi,v),j(Xi,y),j(fa,ee),j(da,E),j(ua,D),j(sa,S),j(ca,w),j(la,te),f(O)){if(O.length){let t=e.exposed||={};O.forEach(e=>{Object.defineProperty(t,e,{get:()=>n[e],set:t=>n[e]=t,enumerable:!0})})}else e.exposed||={}}T&&e.render===i&&(e.render=T),k!=null&&(e.inheritAttrs=k),ne&&(e.components=ne),A&&(e.directives=A),te&&pi(e)}function Ja(e,t,n=i){f(e)&&(e=no(e));for(let n in e){let r=e[n],i;i=b(r)?`default`in r?Tr(r.from||n,r.default,!0):Tr(r.from||n):Tr(r),I(i)?Object.defineProperty(t,n,{enumerable:!0,configurable:!0,get:()=>i.value,set:e=>i.value=e}):t[n]=i}}function Ya(e,t,n){Jn(f(e)?e.map(e=>e.bind(t.proxy)):e.bind(t.proxy),t,n)}function Xa(e,t,n,r){let i=r.includes(`.`)?Fr(n,r):()=>n[r];if(v(e)){let n=t[e];_(n)&&Mr(i,n)}else if(_(e))Mr(i,e.bind(n));else if(b(e)){if(f(e))e.forEach(e=>Xa(e,t,n,r));else{let r=_(e.handler)?e.handler.bind(n):t[e.handler];_(r)&&Mr(i,r,e)}}}function Za(e){let t=e.type,{mixins:n,extends:r}=t,{mixins:i,optionsCache:a,config:{optionMergeStrategies:o}}=e.appContext,s=a.get(t),c;return s?c=s:!i.length&&!n&&!r?c=t:(c={},i.length&&i.forEach(e=>Qa(c,e,o,!0)),Qa(c,t,o)),b(t)&&a.set(t,c),c}function Qa(e,t,n,r=!1){let{mixins:i,extends:a}=t;a&&Qa(e,a,n,!0),i&&i.forEach(t=>Qa(e,t,n,!0));for(let i in t)if(!(r&&i===`expose`)){let r=$a[i]||n&&n[i];e[i]=r?r(e[i],t[i]):t[i]}return e}var $a={data:eo,props:ao,emits:ao,methods:io,computed:io,beforeCreate:ro,created:ro,beforeMount:ro,mounted:ro,beforeUpdate:ro,updated:ro,beforeDestroy:ro,beforeUnmount:ro,destroyed:ro,unmounted:ro,activated:ro,deactivated:ro,errorCaptured:ro,serverPrefetch:ro,components:io,directives:io,watch:oo,provide:eo,inject:to};function eo(e,t){return t?e?function(){return c(_(e)?e.call(this,this):e,_(t)?t.call(this,this):t)}:t:e}function to(e,t){return io(no(e),no(t))}function no(e){if(f(e)){let t={};for(let n=0;n{let l,u=n,d;return jr(()=>{let t=e[a];M(l,t)&&(l=t,c())}),{get(){return s(),r.get?r.get(l):l},set(e){let s=r.set?r.set(e):e;if(!M(s,l)&&!(u!==n&&M(e,u)))return;let f=i.vnode.props,p=!!(f&&(t in f||a in f||o in f)&&(`onUpdate:${t}`in f||`onUpdate:${a}`in f||`onUpdate:${o}`in f));p||(l=e,c()),i.emit(`update:${t}`,s),M(e,u)&&(M(e,s)&&!M(s,d)||p&&u!==n&&!M(s,l))&&c(),u=e,d=s}}});return c[Symbol.iterator]=()=>{let e=0;return{next(){return e<2?{value:e++?s||n:c,done:!1}:{done:!0}}}},c}var po=(e,t)=>t===`modelValue`||t===`model-value`?e.modelModifiers:e[`${t}Modifiers`]||e[`${k(t)}Modifiers`]||e[`${A(t)}Modifiers`];function mo(e,t,...r){if(e.isUnmounted)return;let i=e.vnode.props||n,a=r,o=t.startsWith(`update:`),s=o&&po(i,t.slice(7));s&&(s.trim&&(a=r.map(e=>v(e)?e.trim():e)),s.number&&(a=r.map(oe)));let c,l=i[c=j(t)]||i[c=j(k(t))];!l&&o&&(l=i[c=j(A(t))]),l&&Jn(l,e,6,a);let u=i[c+`Once`];if(u){if(!e.emitted)e.emitted={};else if(e.emitted[c])return;e.emitted[c]=!0,Jn(u,e,6,a)}}var ho=new WeakMap;function go(e,t,n=!1){let r=n?ho:t.emitsCache,i=r.get(e);if(i!==void 0)return i;let a=e.emits,o={},s=!1;if(!_(e)){let r=e=>{let n=go(e,t,!0);n&&(s=!0,c(o,n))};!n&&t.mixins.length&&t.mixins.forEach(r),e.extends&&r(e.extends),e.mixins&&e.mixins.forEach(r)}return!a&&!s?(b(e)&&r.set(e,null),null):(f(a)?a.forEach(e=>o[e]=null):c(o,a),b(e)&&r.set(e,o),o)}function _o(e,t){return!e||!o(t)?!1:(t=t.slice(2),t=t===`Once`?t:t.replace(/Once$/,``),d(e,t[0].toLowerCase()+t.slice(1))||d(e,A(t))||d(e,t))}function vo(e){let{type:t,vnode:n,proxy:r,withProxy:i,propsOptions:[a],slots:o,attrs:c,emit:l,render:u,renderCache:d,props:f,data:p,setupState:m,ctx:h,inheritAttrs:g}=e,_=_r(e),v,y;try{if(n.shapeFlag&4){let e=i||r,t=e;v=Ls(u.call(t,e,d,f,m,p,h)),y=c}else{let e=t;v=Ls(e.length>1?e(f,{attrs:c,slots:o,emit:l}):e(f,null)),y=t.props?c:bo(c)}}catch(t){gs.length=0,Yn(t,e,1),v=V(B)}let b=v;if(y&&g!==!1){let e=Object.keys(y),{shapeFlag:t}=b;e.length&&t&7&&(a&&e.some(s)&&(y=xo(y,a)),b=Ns(b,y,!1,!0))}return n.dirs&&(b=Ns(b,null,!1,!0),b.dirs=b.dirs?b.dirs.concat(n.dirs):n.dirs),n.transition&&li(Rr(b.type)&&ci(b)||b,n.transition),v=b,_r(_),v}function yo(e,t=!0){let n;for(let t=0;t{let t;for(let n in e)(n===`class`||n===`style`||o(n))&&((t||={})[n]=e[n]);return t},xo=(e,t)=>{let n={};for(let r in e)(!s(r)||!(r.slice(9)in t))&&(n[r]=e[r]);return n};function So(e,t,n){let{props:r,children:i,component:a}=e,{props:o,children:s,patchFlag:c}=t,l=a.emitsOptions;if(t.dirs||t.transition)return!0;if(n&&c>=0){if(c&1024)return!0;if(c&16)return r?Co(r,o,l):!!o;if(c&8){let e=t.dynamicProps;for(let t=0;tObject.create(Eo),Oo=e=>Object.getPrototypeOf(e)===Eo;function ko(e,t,n,r=!1){let i={},a=Do();e.propsDefaults=Object.create(null),jo(e,t,i,a);for(let t in e.propsOptions[0])t in i||(i[t]=void 0);e.props=n?r?i:nn(i):e.type.props?i:a,e.attrs=a}function Ao(e,t,n,r){let{props:i,attrs:a,vnode:{patchFlag:o}}=e,s=F(i),[c]=e.propsOptions,l=!1;if((r||o>0)&&!(o&16)){if(o&8){let n=e.vnode.dynamicProps;for(let r=0;r{p=!0;let[n,r]=Po(e,t,!0);c(l,n),r&&u.push(...r)};!i&&t.mixins.length&&t.mixins.forEach(n),e.extends&&n(e.extends),e.mixins&&e.mixins.forEach(n)}if(!s&&!p)return b(e)&&a.set(e,r),r;if(f(s))for(let e=0;ee===`_`||e===`_ctx`||e===`$stable`,Lo=e=>f(e)?e.map(Ls):[Ls(e)],Ro=(e,t,n)=>{if(t._n)return t;let r=xr((...e)=>Lo(t(...e)),n);return r._c=!1,r},zo=(e,t,n)=>{let r=e._ctx;for(let n in e){if(Io(n))continue;let i=e[n];if(_(i))t[n]=Ro(n,i,r);else if(i!=null){let e=Lo(i);t[n]=()=>e}}},Bo=(e,t)=>{let n=Lo(t);e.slots.default=()=>n},Vo=(e,t,n)=>{for(let r in t)(n||!Io(r))&&(e[r]=t[r])},Ho=(e,t,n)=>{let r=e.slots=Do();if(e.vnode.shapeFlag&32){let e=t._;e?(Vo(r,t,n),n&&ae(r,`_`,e,!0)):zo(t,r)}else t&&Bo(e,t)},Uo=(e,t,r)=>{let{vnode:i,slots:a}=e,o=!0,s=n;if(i.shapeFlag&32){let e=t._;e?r&&e===1?o=!1:Vo(a,t,r):(o=!t.$stable,zo(t,a)),s=t}else t&&(Bo(e,t),s={default:1});if(o)for(let e in a)!Io(e)&&s[e]==null&&delete a[e]},R=ds;function Wo(e){return Ko(e)}function Go(e){return Ko(e,Ti)}function Ko(e,t){let a=le();a.__VUE__=!0;let{insert:o,remove:s,patchProp:c,createElement:l,createText:u,createComment:d,setText:f,setElementText:p,parentNode:m,nextSibling:h,setScopeId:g=i,insertStaticContent:_}=e,v=(e,t,n,r=null,i=null,a=null,o=void 0,s=null,c=!!t.dynamicChildren)=>{if(e===t)return;e&&!Es(e,t)&&(r=ge(e),de(e,i,a,!0),e=null),t.patchFlag===-2&&(c=!1,t.dynamicChildren=null);let{type:l,ref:u,shapeFlag:d}=t;switch(l){case ms:y(e,t,n,r);break;case B:b(e,t,n,r);break;case hs:e??x(t,n,r,o);break;case z:ne(e,t,n,r,i,a,o,s,c);break;default:d&1?w(e,t,n,r,i,a,o,s,c):d&6?A(e,t,n,r,i,a,o,s,c):(d&64||d&128)&&l.process(e,t,n,r,i,a,o,s,c,ye)}u!=null&&i?_i(u,e&&e.ref,a,t||e,!t):u==null&&e&&e.ref!=null&&_i(e.ref,null,a,e,!0)},y=(e,t,n,r)=>{if(e==null)o(t.el=u(t.children),n,r);else{let n=t.el=e.el;t.children!==e.children&&f(n,t.children)}},b=(e,t,n,r)=>{e==null?o(t.el=d(t.children||``),n,r):t.el=e.el},x=(e,t,n,r)=>{[e.el,e.anchor]=_(e.children,t,n,r,e.el,e.anchor)},S=({el:e,anchor:t},n,r)=>{let i;for(;e&&e!==t;)i=h(e),o(e,n,r),e=i;o(t,n,r)},C=({el:e,anchor:t})=>{let n;for(;e&&e!==t;)n=h(e),s(e),e=n;s(t)},w=(e,t,n,r,i,a,o,s,c)=>{if(t.type===`svg`?o=`svg`:t.type===`math`&&(o=`mathml`),e==null)T(t,n,r,i,a,o,s,c);else{let n=e.el&&e.el._isVueCE?e.el:null;try{n&&n._beginPatch(),te(e,t,i,a,o,s,c)}finally{n&&n._endPatch()}}},T=(e,t,n,r,i,a,s,u)=>{let d,f,{props:m,shapeFlag:h,transition:g,dirs:_}=e;if(d=e.el=l(e.type,a,m&&m.is,m),h&8?p(d,e.children):h&16&&ee(e.children,d,null,r,i,qo(e,a),s,u),_&&Cr(e,null,r,`created`),E(d,e,e.scopeId,s,r),m){for(let e in m)e!==`value`&&!D(e)&&c(d,e,null,m[e],a,r);`value`in m&&c(d,`value`,null,m.value,a),(f=m.onVnodeBeforeMount)&&Vs(f,r,e)}_&&Cr(e,null,r,`beforeMount`);let v=Yo(i,g);v&&g.beforeEnter(d),o(d,t,n),((f=m&&m.onVnodeMounted)||v||_)&&R(()=>{try{f&&Vs(f,r,e),v&&g.enter(d),_&&Cr(e,null,r,`mounted`)}finally{}},i)},E=(e,t,n,r,i)=>{if(n&&g(e,n),r)for(let t=0;t{for(let l=c;l{let l=t.el=e.el,{patchFlag:u,dynamicChildren:d,dirs:f}=t;u|=e.patchFlag&16;let m=e.props||n,h=t.props||n,g;if(r&&Jo(r,!1),(g=h.onVnodeBeforeUpdate)&&Vs(g,r,t,e),f&&Cr(t,e,r,`beforeUpdate`),r&&Jo(r,!0),d&&(!e.dynamicChildren||e.dynamicChildren.length!==d.length)&&(u=0,s=!1,d=null),(m.innerHTML&&h.innerHTML==null||m.textContent&&h.textContent==null)&&p(l,``),d?O(e.dynamicChildren,d,l,r,i,qo(t,a),o):s||oe(e,t,l,null,r,i,qo(t,a),o,!1),u>0){if(u&16)k(l,m,h,r,a);else if(u&2&&m.class!==h.class&&c(l,`class`,null,h.class,a),u&4&&c(l,`style`,m.style,h.style,a),u&8){let e=t.dynamicProps;for(let t=0;t{g&&Vs(g,r,t,e),f&&Cr(t,e,r,`updated`)},i)},O=(e,t,n,r,i,a,o)=>{for(let s=0;s{if(t!==r){if(t!==n)for(let n in t)!D(n)&&!(n in r)&&c(e,n,t[n],null,a,i);for(let n in r){if(D(n))continue;let o=r[n],s=t[n];o!==s&&n!==`value`&&c(e,n,s,o,a,i)}`value`in r&&c(e,`value`,t.value,r.value,a)}},ne=(e,t,n,r,i,a,s,c,l)=>{let d=t.el=e?e.el:u(``),f=t.anchor=e?e.anchor:u(``),{patchFlag:p,dynamicChildren:m,slotScopeIds:h}=t;h&&(c=c?c.concat(h):h),e==null?(o(d,n,r),o(f,n,r),ee(t.children||[],n,f,i,a,s,c,l)):p>0&&p&64&&m&&e.dynamicChildren&&e.dynamicChildren.length===m.length?(O(e.dynamicChildren,m,n,i,a,s,c),(t.key!=null||i&&t===i.subTree)&&Xo(e,t,!0)):oe(e,t,n,f,i,a,s,c,l)},A=(e,t,n,r,i,a,o,s,c)=>{t.slotScopeIds=s,e==null?t.shapeFlag&512?i.ctx.activate(t,n,r,o,c):re(t,n,r,i,a,o,c):j(e,t,c)},re=(e,t,n,r,i,a,o)=>{let s=e.component=Ws(e,r,i);if(Ki(e)&&(s.ctx.renderer=ye),Qs(s,!1,o),s.asyncDep){if(i&&i.registerDep(s,M,o),!e.el){let r=s.subTree=V(B);b(null,r,t,n),e.placeholder=r.el}}else M(s,e,t,n,i,a,o)},j=(e,t,n)=>{let r=t.component=e.component;if(So(e,t,n)){if(r.asyncDep&&!r.asyncResolved){ae(r,t,n);return}r.next=t,r.update()}else t.el=e.el,r.vnode=t},M=(e,t,n,r,i,a,o)=>{let s=()=>{if(e.isMounted){let{next:t,bu:n,u:r,parent:s,vnode:c}=e;{let n=Qo(e);if(n){t&&(t.el=c.el,ae(e,t,o)),n.asyncDep.then(()=>{R(()=>{e.isUnmounted||l()},i)});return}}let u=t,d;Jo(e,!1),t?(t.el=c.el,ae(e,t,o)):t=c,n&&ie(n),(d=t.props&&t.props.onVnodeBeforeUpdate)&&Vs(d,s,t,c),Jo(e,!0);let f=vo(e),p=e.subTree;e.subTree=f,v(p,f,m(p.el),ge(p),e,i,a),t.el=f.el,u===null&&To(e,f.el),r&&R(r,i),(d=t.props&&t.props.onVnodeUpdated)&&R(()=>Vs(d,s,t,c),i)}else{let o,{el:s,props:c}=t,{bm:l,m:u,parent:d,root:f,type:p}=e,m=Ui(t);if(Jo(e,!1),l&&ie(l),!m&&(o=c&&c.onVnodeBeforeMount)&&Vs(o,d,t),Jo(e,!0),s&&xe){let t=()=>{e.subTree=vo(e),xe(s,e.subTree,e,i,null)};m&&p.__asyncHydrate?p.__asyncHydrate(s,e,t):t()}else{f.ce&&f.ce._hasShadowRoot()&&f.ce._injectChildStyle(p,e.parent?e.parent.type:void 0);let o=e.subTree=vo(e);v(null,o,n,r,e,i,a),t.el=o.el}if(u&&R(u,i),!m&&(o=c&&c.onVnodeMounted)){let e=t;R(()=>Vs(o,d,e),i)}(t.shapeFlag&256||d&&Ui(d.vnode)&&d.vnode.shapeFlag&256)&&e.a&&R(e.a,i),e.isMounted=!0,t=n=r=null}};e.scope.on();let c=e.effect=new Ue(s);e.scope.off();let l=e.update=c.run.bind(c),u=e.job=c.runIfDirty.bind(c);u.i=e,u.id=e.uid,c.scheduler=()=>or(u),Jo(e,!0),l()},ae=(e,t,n)=>{t.component=e;let r=e.vnode.props;e.vnode=t,e.next=null,Ao(e,t.props,r,n),Uo(e,t.children,n),ot(),lr(e),st()},oe=(e,t,n,r,i,a,o,s,c=!1)=>{let l=e&&e.children,u=e?e.shapeFlag:0,d=t.children,{patchFlag:f,shapeFlag:m}=t;if(f>0){if(f&128){ce(l,d,n,r,i,a,o,s,c);return}if(f&256){se(l,d,n,r,i,a,o,s,c);return}}m&8?(u&16&&he(l,i,a),d!==l&&p(n,d)):u&16?m&16?ce(l,d,n,r,i,a,o,s,c):he(l,i,a,!0):(u&8&&p(n,``),m&16&&ee(d,n,r,i,a,o,s,c))},se=(e,t,n,i,a,o,s,c,l)=>{e||=r,t||=r;let u=e.length,d=t.length,f=Math.min(u,d),p;for(p=0;pd?he(e,a,o,!0,!1,f):ee(t,n,i,a,o,s,c,l,f)},ce=(e,t,n,i,a,o,s,c,l)=>{let u=0,d=t.length,f=e.length-1,p=d-1;for(;u<=f&&u<=p;){let r=e[u],i=t[u]=l?Rs(t[u]):Ls(t[u]);if(Es(r,i))v(r,i,n,null,a,o,s,c,l);else break;u++}for(;u<=f&&u<=p;){let r=e[f],i=t[p]=l?Rs(t[p]):Ls(t[p]);if(Es(r,i))v(r,i,n,null,a,o,s,c,l);else break;f--,p--}if(u>f){if(u<=p){let e=p+1,r=ep)for(;u<=f;)de(e[u],a,o,!0),u++;else{let m=u,h=u,g=new Map;for(u=h;u<=p;u++){let e=t[u]=l?Rs(t[u]):Ls(t[u]);e.key!=null&&g.set(e.key,u)}let _,y=0,b=p-h+1,x=!1,S=0,C=Array(b);for(u=0;u=b){de(r,a,o,!0);continue}let i;if(r.key!=null)i=g.get(r.key);else for(_=h;_<=p;_++)if(C[_-h]===0&&Es(r,t[_])){i=_;break}i===void 0?de(r,a,o,!0):(C[i-h]=u+1,i>=S?S=i:x=!0,v(r,t[i],n,null,a,o,s,c,l),y++)}let w=x?Zo(C):r;for(_=w.length-1,u=b-1;u>=0;u--){let e=h+u,r=t[e],f=t[e+1],p=e+1{let{el:a,type:c,transition:l,children:u,shapeFlag:d}=e;if(d&6){ue(e.component.subTree,t,n,r);return}if(d&128){e.suspense.move(t,n,r);return}if(d&64){c.move(e,t,n,ye);return}if(c===z){o(a,t,n);for(let e=0;el.enter(a),i));else{let{leave:r,delayLeave:i,afterLeave:c}=l,u=()=>{e.ctx.isUnmounted?s(a):o(a,t,n)},d=()=>{let e=a._isLeaving||!!a[Xr];a._isLeaving&&a[Xr](!0),l.persisted&&!e?u():r(a,()=>{u(),c&&c()})};i?i(a,u,d):d()}}else o(a,t,n)},de=(e,t,n,r=!1,i=!1)=>{let{type:a,props:o,ref:s,children:c,dynamicChildren:l,shapeFlag:u,patchFlag:d,dirs:f,cacheIndex:p,memo:m}=e;if(d===-2&&(i=!1),s!=null&&(ot(),_i(s,null,n,e,!0),st()),p!=null&&(t.renderCache[p]=void 0),u&256){t.ctx.deactivate(e);return}let h=u&1&&f,g=!Ui(e),_;if(g&&(_=o&&o.onVnodeBeforeUnmount)&&Vs(_,t,e),u&6)me(e.component,n,r);else{if(u&128){e.suspense.unmount(n,r);return}h&&Cr(e,null,t,`beforeUnmount`),u&64?e.type.remove(e,t,n,ye,r):l&&!l.hasOnce&&(a!==z||d>0&&d&64)?he(l,t,n,!1,!0):(a===z&&d&384||!i&&u&16)&&he(c,t,n),r&&fe(e)}let v=m!=null&&p==null;(g&&(_=o&&o.onVnodeUnmounted)||h||v)&&R(()=>{_&&Vs(_,t,e),h&&Cr(e,null,t,`unmounted`),v&&(e.el=null)},n)},fe=e=>{let{type:t,el:n,anchor:r,transition:i}=e;if(t===z){pe(n,r);return}if(t===hs){C(e);return}let a=()=>{s(n),i&&!i.persisted&&i.afterLeave&&i.afterLeave()};if(e.shapeFlag&1&&i&&!i.persisted){let{leave:t,delayLeave:r}=i,o=()=>t(n,a);r?r(e.el,a,o):o()}else a()},pe=(e,t)=>{let n;for(;e!==t;)n=h(e),s(e),e=n;s(t)},me=(e,t,n)=>{let{bum:r,scope:i,job:a,subTree:o,um:s,m:c,a:l}=e;$o(c),$o(l),r&&ie(r),i.stop(),a&&(a.flags|=8,de(o,e,t,n)),s&&R(s,t),R(()=>{e.isUnmounted=!0},t)},he=(e,t,n,r=!1,i=!1,a=0)=>{for(let o=a;o{if(e.shapeFlag&6)return ge(e.component.subTree);if(e.shapeFlag&128)return e.suspense.next();let t=h(e.anchor||e.el),n=t&&t[Lr];return n?h(n):t},_e=!1,ve=(e,t,n)=>{let r;e==null?t._vnode&&(de(t._vnode,null,null,!0),r=t._vnode.component):v(t._vnode||null,e,t,null,null,null,n),t._vnode=e,_e||=(_e=!0,lr(r),ur(),!1)},ye={p:v,um:de,m:ue,r:fe,mt:re,mc:ee,pc:oe,pbc:O,n:ge,o:e},be,xe;return t&&([be,xe]=t(ye)),{render:ve,hydrate:be,createApp:lo(ve,be)}}function qo({type:e,props:t},n){return n===`svg`&&e===`foreignObject`||n===`mathml`&&e===`annotation-xml`&&t&&t.encoding&&t.encoding.includes(`html`)?void 0:n}function Jo({effect:e,job:t},n){n?(e.flags|=32,t.flags|=4):(e.flags&=-33,t.flags&=-5)}function Yo(e,t){return(!e||e&&!e.pendingBranch)&&t&&!t.persisted}function Xo(e,t,n=!1){let r=e.children,i=t.children;if(f(r)&&f(i))for(let e=0;e>1,e[n[s]]0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function Qo(e){let t=e.subTree.component;if(t)return t.asyncDep&&!t.asyncResolved?t:Qo(t)}function $o(e){if(e)for(let t=0;te.__isSuspense,ns=0,rs={name:`Suspense`,__isSuspense:!0,process(e,t,n,r,i,a,o,s,c,l){if(e==null)as(t,n,r,i,a,o,s,c,l);else{if(a&&a.deps>0&&!e.suspense.isInFallback){t.suspense=e.suspense,t.suspense.vnode=t,t.el=e.el;return}os(e,t,n,r,i,o,s,c,l)}},hydrate:cs,normalize:ls};function is(e,t){let n=e.props&&e.props[t];_(n)&&n()}function as(e,t,n,r,i,a,o,s,c){let{p:l,o:{createElement:u}}=c,d=u(`div`),f=e.suspense=ss(e,i,r,t,d,n,a,o,s,c);l(null,f.pendingBranch=e.ssContent,d,null,r,f,a,o),f.deps>0?(is(e,`onPending`),is(e,`onFallback`),l(null,e.ssFallback,t,n,r,null,a,o),fs(f,e.ssFallback)):f.resolve(!1,!0)}function os(e,t,n,r,i,a,o,s,{p:c,um:l,o:{createElement:u}}){let d=t.suspense=e.suspense;d.vnode=t,t.el=e.el;let f=t.ssContent,p=t.ssFallback,{activeBranch:m,pendingBranch:h,isInFallback:g,isHydrating:_}=d;if(h)d.pendingBranch=f,Es(h,f)?(c(h,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():g&&(_||(c(m,p,n,r,i,null,a,o,s),fs(d,p)))):(d.pendingId=ns++,_?(d.isHydrating=!1,d.activeBranch=h):l(h,i,d),d.deps=0,d.effects.length=0,d.hiddenContainer=u(`div`),g?(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0?d.resolve():(c(m,p,n,r,i,null,a,o,s),fs(d,p))):m&&Es(m,f)?(c(m,f,n,r,i,d,a,o,s),d.resolve(!0)):(c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0&&d.resolve()));else if(m&&Es(m,f))c(m,f,n,r,i,d,a,o,s),fs(d,f);else if(is(t,`onPending`),d.pendingBranch=f,d.pendingId=f.shapeFlag&512?f.component.suspenseId:ns++,c(null,f,d.hiddenContainer,null,i,d,a,o,s),d.deps<=0)d.resolve();else{let{timeout:e,pendingId:t}=d;e>0?setTimeout(()=>{d.pendingId===t&&d.fallback(p)},e):e===0&&d.fallback(p)}}function ss(e,t,n,r,i,a,o,s,c,l,u=!1){let{p:d,m:f,um:p,n:m,o:{parentNode:h,remove:g}}=l,_,v=ps(e);v&&t&&t.pendingBranch&&(_=t.pendingId,t.deps++);let y=e.props?se(e.props.timeout):void 0,b=a,x={vnode:e,parent:t,parentComponent:n,namespace:o,container:r,hiddenContainer:i,deps:0,pendingId:ns++,timeout:typeof y==`number`?y:-1,activeBranch:null,isFallbackMountPending:!1,pendingBranch:null,isInFallback:!u,isHydrating:u,isUnmounted:!1,effects:[],resolve(e=!1,n=!1){let{vnode:r,activeBranch:i,pendingBranch:o,pendingId:s,effects:c,parentComponent:l,container:u,isInFallback:d}=x,g=!1;if(x.isHydrating)x.isHydrating=!1;else if(!e){g=i&&o.transition&&o.transition.mode===`out-in`;let e=!1;g&&(i.transition.afterLeave=()=>{s===x.pendingId&&(f(o,u,a===b&&!e?m(i):a,0),cr(c),d&&r.ssFallback&&(r.ssFallback.el=null))}),i&&!x.isFallbackMountPending&&(h(i.el)===u&&(a=m(i),e=!0),p(i,l,x,!0),!g&&d&&r.ssFallback&&R(()=>r.ssFallback.el=null,x)),g||f(o,u,a,0)}x.isFallbackMountPending=!1,fs(x,o),x.pendingBranch=null,x.isInFallback=!1;let y=x.parent,S=!1;for(;y;){if(y.pendingBranch){for(let e=0;e{x.isFallbackMountPending=!1,x.isInFallback&&(d(null,e,i,o,r,null,a,s,c),fs(x,e))},u=e.transition&&e.transition.mode===`out-in`;u&&(x.isFallbackMountPending=!0,n.transition.afterLeave=l),x.isInFallback=!0,p(n,r,null,!0),u||l()},move(e,t,n){x.activeBranch&&f(x.activeBranch,e,t,n),x.container=e},next(){return x.activeBranch&&m(x.activeBranch)},registerDep(e,t,n){let r=!!x.pendingBranch;r&&x.deps++;let i=e.vnode.el;e.asyncDep.catch(t=>{Yn(t,e,0)}).then(a=>{if(e.isUnmounted||x.isUnmounted||x.pendingId!==e.suspenseId)return;Ys(),e.asyncResolved=!0;let{vnode:s}=e;ec(e,a,!1),i&&(s.el=i);let c=!i&&e.subTree.el;t(e,s,h(i||e.subTree.el),i?null:m(e.subTree),x,o,n),c&&(s.placeholder=null,g(c)),To(e,s.el),r&&--x.deps===0&&x.resolve()})},unmount(e,t){x.isUnmounted=!0,x.activeBranch&&p(x.activeBranch,n,e,t),x.pendingBranch&&p(x.pendingBranch,n,e,t)}};return x}function cs(e,t,n,r,i,a,o,s,c){let l=t.suspense=ss(t,r,n,e.parentNode,document.createElement(`div`),null,i,a,o,s,!0),u=c(e,l.pendingBranch=t.ssContent,n,l,a,o);return l.deps===0&&l.resolve(!1,!0),u}function ls(e){let{shapeFlag:t,children:n}=e,r=t&32;e.ssContent=us(r?n.default:n),e.ssFallback=r?us(n.fallback):V(B)}function us(e){let t;if(_(e)){let n=bs&&e._c;n&&(e._d=!1,vs()),e=e(),n&&(e._d=!0,t=_s,ys())}return f(e)&&(e=yo(e)),e=Ls(e),t&&!e.dynamicChildren&&(e.dynamicChildren=t.filter(t=>t!==e)),e}function ds(e,t){t&&t.pendingBranch?f(e)?t.effects.push(...e):t.effects.push(e):cr(e)}function fs(e,t){e.activeBranch=t;let{vnode:n,parentComponent:r}=e,i=t.el;for(;!i&&t.component;)t=t.component.subTree,i=t.el;n.el=i,r&&r.subTree===n&&(r.vnode.el=i,To(r,i))}function ps(e){let t=e.props&&e.props.suspensible;return t!=null&&t!==!1}var z=Symbol.for(`v-fgt`),ms=Symbol.for(`v-txt`),B=Symbol.for(`v-cmt`),hs=Symbol.for(`v-stc`),gs=[],_s=null;function vs(e=!1){gs.push(_s=e?null:[])}function ys(){gs.pop(),_s=gs[gs.length-1]||null}var bs=1;function xs(e,t=!1){bs+=e,e<0&&_s&&t&&(_s.hasOnce=!0)}function Ss(e){return e.dynamicChildren=bs>0?_s||r:null,ys(),bs>0&&_s&&_s.push(e),e}function Cs(e,t,n,r,i,a){return Ss(As(e,t,n,r,i,a,!0))}function ws(e,t,n,r,i){return Ss(V(e,t,n,r,i,!0))}function Ts(e){return e?e.__v_isVNode===!0:!1}function Es(e,t){return e.type===t.type&&e.key===t.key}function Ds(e){}var Os=({key:e})=>e??null,ks=({ref:e,ref_key:t,ref_for:n})=>(typeof e==`number`&&(e=``+e),e==null?null:v(e)||I(e)||_(e)?{i:L,r:e,k:t,f:!!n}:e);function As(e,t=null,n=null,r=0,i=null,a=e===z?0:1,o=!1,s=!1){let c={__v_isVNode:!0,__v_skip:!0,type:e,props:t,key:t&&Os(t),ref:t&&ks(t),scopeId:gr,slotScopeIds:null,children:n,component:null,suspense:null,ssContent:null,ssFallback:null,dirs:null,transition:null,el:null,anchor:null,target:null,targetStart:null,targetAnchor:null,staticCount:0,shapeFlag:a,patchFlag:r,dynamicProps:i,dynamicChildren:null,appContext:null,ctx:L};return s?(zs(c,n),a&128&&e.normalize(c)):n&&(c.shapeFlag|=v(n)?8:16),bs>0&&!o&&_s&&(c.patchFlag>0||a&6)&&c.patchFlag!==32&&_s.push(c),c}var V=js;function js(e,t=null,n=null,r=0,i=null,a=!1){if((!e||e===ga)&&(e=B),Ts(e)){let r=Ns(e,t,!0);return n&&zs(r,n),bs>0&&!a&&_s&&(r.shapeFlag&6?_s[_s.indexOf(e)]=r:_s.push(r)),r.patchFlag=-2,r}if(uc(e)&&(e=e.__vccOpts),t){t=Ms(t);let{class:e,style:n}=t;e&&!v(e)&&(t.class=_e(e)),b(n)&&(un(n)&&!f(n)&&(n=c({},n)),t.style=fe(n))}let o=v(e)?1:ts(e)?128:Rr(e)?64:b(e)?4:_(e)?2:0;return As(e,t,n,r,i,o,a,!0)}function Ms(e){return e?un(e)||Oo(e)?c({},e):e:null}function Ns(e,t,n=!1,r=!1){let{props:i,ref:a,patchFlag:o,children:s,transition:c}=e,l=t?Bs(i||{},t):i,u={__v_isVNode:!0,__v_skip:!0,type:e.type,props:l,key:l&&Os(l),ref:t&&t.ref?n&&a?f(a)?a.concat(ks(t)):[a,ks(t)]:ks(t):a,scopeId:e.scopeId,slotScopeIds:e.slotScopeIds,children:s,target:e.target,targetStart:e.targetStart,targetAnchor:e.targetAnchor,staticCount:e.staticCount,shapeFlag:e.shapeFlag,patchFlag:t&&e.type!==z?o===-1?16:o|16:o,dynamicProps:e.dynamicProps,dynamicChildren:e.dynamicChildren,appContext:e.appContext,dirs:e.dirs,transition:c,component:e.component,suspense:e.suspense,ssContent:e.ssContent&&Ns(e.ssContent),ssFallback:e.ssFallback&&Ns(e.ssFallback),placeholder:e.placeholder,el:e.el,anchor:e.anchor,ctx:e.ctx,ce:e.ce};return c&&r&&li(u,c.clone(u)),u}function Ps(e=` `,t=0){return V(ms,null,e,t)}function Fs(e,t){let n=V(hs,null,e);return n.staticCount=t,n}function Is(e=``,t=!1){return t?(vs(),ws(B,null,e)):V(B,null,e)}function Ls(e){return e==null||typeof e==`boolean`?V(B):f(e)?V(z,null,e.slice()):Ts(e)?Rs(e):V(ms,null,String(e))}function Rs(e){return e.el===null&&e.patchFlag!==-1||e.memo?e:Ns(e)}function zs(e,t){let n=0,{shapeFlag:r}=e;if(t==null)t=null;else if(f(t))n=16;else if(typeof t==`object`){if(r&65){let n=t.default;n&&(n._c&&(n._d=!1),zs(e,n()),n._c&&(n._d=!0));return}{n=32;let r=t._;!r&&!Oo(t)?t._ctx=L:r===3&&L&&(L.slots._===1?t._=1:(t._=2,e.patchFlag|=1024))}}else if(_(t)){if(r&65){zs(e,{default:t});return}t={default:t,_ctx:L},n=32}else t=String(t),r&64?(n=16,t=[Ps(t)]):n=8;e.children=t,e.shapeFlag|=n}function Bs(...e){let t={};for(let n=0;nH||L,Ks,qs;{let e=le(),t=(t,n)=>{let r;return(r=e[t])||(r=e[t]=[]),r.push(n),e=>{r.length>1?r.forEach(t=>t(e)):r[0](e)}};Ks=t(`__VUE_INSTANCE_SETTERS__`,e=>H=e),qs=t(`__VUE_SSR_SETTERS__`,e=>Zs=e)}var Js=e=>{let t=H;return Ks(e),e.scope.on(),()=>{e.scope.off(),Ks(t)}},Ys=()=>{H&&H.scope.off(),Ks(null)};function Xs(e){return e.vnode.shapeFlag&4}var Zs=!1;function Qs(e,t=!1,n=!1){t&&qs(t);let{props:r,children:i}=e.vnode,a=Xs(e);ko(e,r,a,t),Ho(e,i,n||t);let o=a?$s(e,t):void 0;return t&&qs(!1),o}function $s(e,t){let n=e.type;e.accessCache=Object.create(null),e.proxy=new Proxy(e.ctx,ka);let{setup:r}=n;if(r){ot();let n=e.setupContext=r.length>1?sc(e):null,i=Js(e),a=qn(r,e,0,[e.props,n]),o=x(a);if(st(),i(),(o||e.sp)&&!Ui(e)&&pi(e),o){if(a.then(Ys,Ys),t)return a.then(n=>{qs(!0);try{ec(e,n,t)}finally{qs(!1)}}).catch(t=>{Yn(t,e,0)});e.asyncDep=a}else ec(e,a,t)}else ac(e,t)}function ec(e,t,n){_(t)?e.type.__ssrInlineRender?e.ssrRender=t:e.render=t:b(t)&&(e.setupState=Sn(t)),ac(e,n)}var tc,nc;function rc(e){tc=e,nc=e=>{e.render._rc&&(e.withProxy=new Proxy(e.ctx,Aa))}}var ic=()=>!tc;function ac(e,t,n){let r=e.type;if(!e.render){if(!t&&tc&&!r.render){let t=r.template||Za(e).template;if(t){let{isCustomElement:n,compilerOptions:i}=e.appContext.config,{delimiters:a,compilerOptions:o}=r,s=c(c({isCustomElement:n,delimiters:a},i),o);r.render=tc(t,s)}}e.render=r.render||i,nc&&nc(e)}{let t=Js(e);ot();try{qa(e)}finally{st(),t()}}}var oc={get(e,t){return _t(e,`get`,``),e[t]}};function sc(e){return{attrs:new Proxy(e.attrs,oc),slots:e.slots,emit:e.emit,expose:t=>{e.exposed=t||{}}}}function cc(e){return e.exposed?e.exposeProxy||=new Proxy(Sn(dn(e.exposed)),{get(t,n){if(n in t)return t[n];if(n in Da)return Da[n](e)},has(e,t){return t in e||t in Da}}):e.proxy}function lc(e,t=!0){return _(e)?e.displayName||e.name:e.name||t&&e.__name}function uc(e){return _(e)&&`__vccOpts`in e}var dc=(e,t)=>jn(e,t,Zs);function fc(e,t,n){try{xs(-1);let r=arguments.length;return r===2?b(t)&&!f(t)?Ts(t)?V(e,null,[t]):V(e,t):V(e,null,t):(r>3?n=Array.prototype.slice.call(arguments,2):r===3&&Ts(n)&&(n=[n]),V(e,t,n))}finally{xs(1)}}function pc(){}function mc(e,t,n,r){let i=n[r];if(i&&hc(i,e))return i;let a=t();return a.memo=e.slice(),a.cacheIndex=r,n[r]=a}function hc(e,t){let n=e.memo;if(n.length!=t.length)return!1;for(let e=0;e0&&_s&&_s.push(e),!0}var gc=`3.5.41`,_c=i,vc=Kn,yc=pr,bc=hr,xc={createComponentInstance:Ws,setupComponent:Qs,renderComponentRoot:vo,setCurrentRenderingInstance:_r,isVNode:Ts,normalizeVNode:Ls,getComponentPublicInstance:cc,ensureValidVNode:wa,pushWarningContext:Hn,popWarningContext:Un},Sc=e({BaseTransition:()=>ii,BaseTransitionPropsValidators:()=>ei,Comment:()=>B,DeprecationTypes:()=>null,EffectScope:()=>Re,ErrorCodes:()=>Gn,ErrorTypeStrings:()=>vc,Fragment:()=>z,KeepAlive:()=>qi,ReactiveEffect:()=>Ue,Static:()=>hs,Suspense:()=>rs,Teleport:()=>qr,Text:()=>ms,TrackOpTypes:()=>Mn,Transition:()=>Ic,TransitionGroup:()=>Gl,TriggerOpTypes:()=>Nn,VueElement:()=>Ll,assertNumber:()=>Wn,callWithAsyncErrorHandling:()=>Jn,callWithErrorHandling:()=>qn,camelize:()=>k,capitalize:()=>re,cloneVNode:()=>Ns,compatUtils:()=>null,computed:()=>dc,createApp:()=>Du,createBlock:()=>ws,createCommentVNode:()=>Is,createElementBlock:()=>Cs,createElementVNode:()=>As,createHydrationRenderer:()=>Go,createPropsRestProxy:()=>Wa,createRenderer:()=>Wo,createSSRApp:()=>Ou,createSlots:()=>Sa,createStaticVNode:()=>Fs,createTextVNode:()=>Ps,createVNode:()=>V,customRef:()=>wn,defineAsyncComponent:()=>Wi,defineComponent:()=>di,defineCustomElement:()=>Pl,defineEmits:()=>Ma,defineExpose:()=>Na,defineModel:()=>Ia,defineOptions:()=>Pa,defineProps:()=>ja,defineSSRCustomElement:()=>Fl,defineSlots:()=>Fa,devtools:()=>yc,effect:()=>nt,effectScope:()=>ze,getCurrentInstance:()=>Gs,getCurrentScope:()=>Be,getCurrentWatcher:()=>Ln,getTransitionRawChildren:()=>ui,guardReactiveProps:()=>Ms,h:()=>fc,handleError:()=>Yn,hasInjectionContext:()=>Er,hydrate:()=>Eu,hydrateOnIdle:()=>Li,hydrateOnInteraction:()=>Vi,hydrateOnMediaQuery:()=>Bi,hydrateOnVisible:()=>zi,initCustomFormatter:()=>pc,initDirectivesForSSR:()=>Mu,inject:()=>Tr,isMemoSame:()=>hc,isProxy:()=>un,isReactive:()=>sn,isReadonly:()=>cn,isRef:()=>I,isRuntimeOnly:()=>ic,isShallow:()=>ln,isVNode:()=>Ts,markRaw:()=>dn,mergeDefaults:()=>Ha,mergeModels:()=>Ua,mergeProps:()=>Bs,nextTick:()=>ir,nodeOps:()=>Ac,normalizeClass:()=>_e,normalizeProps:()=>ve,normalizeStyle:()=>fe,onActivated:()=>Yi,onBeforeMount:()=>ra,onBeforeUnmount:()=>sa,onBeforeUpdate:()=>aa,onDeactivated:()=>Xi,onErrorCaptured:()=>fa,onMounted:()=>ia,onRenderTracked:()=>da,onRenderTriggered:()=>ua,onScopeDispose:()=>Ve,onServerPrefetch:()=>la,onUnmounted:()=>ca,onUpdated:()=>oa,onWatcherCleanup:()=>Rn,openBlock:()=>vs,patchProp:()=>Al,popScopeId:()=>yr,provide:()=>wr,proxyRefs:()=>Sn,pushScopeId:()=>vr,queuePostFlushCb:()=>cr,reactive:()=>tn,readonly:()=>rn,ref:()=>mn,registerRuntimeCompiler:()=>rc,render:()=>Tu,renderList:()=>xa,renderSlot:()=>Ca,resolveComponent:()=>ha,resolveDirective:()=>va,resolveDynamicComponent:()=>_a,resolveFilter:()=>null,resolveTransitionHooks:()=>oi,setBlockTracking:()=>xs,setDevtoolsHook:()=>bc,setTransitionHooks:()=>li,shallowReactive:()=>nn,shallowReadonly:()=>an,shallowRef:()=>hn,ssrContextKey:()=>Dr,ssrUtils:()=>xc,stop:()=>rt,toDisplayString:()=>Pe,toHandlerKey:()=>j,toHandlers:()=>Ta,toRaw:()=>F,toRef:()=>On,toRefs:()=>Tn,toValue:()=>bn,transformVNodeArgs:()=>Ds,triggerRef:()=>vn,unref:()=>yn,useAttrs:()=>za,useCssModule:()=>Bl,useCssVars:()=>il,useHost:()=>Rl,useId:()=>fi,useModel:()=>fo,useSSRContext:()=>Or,useShadowRoot:()=>zl,useSlots:()=>Ra,useTemplateRef:()=>mi,useTransitionState:()=>Qr,vModelCheckbox:()=>iu,vModelDynamic:()=>du,vModelRadio:()=>ou,vModelSelect:()=>su,vModelText:()=>ru,vShow:()=>el,version:()=>gc,warn:()=>_c,watch:()=>Mr,watchEffect:()=>kr,watchPostEffect:()=>Ar,watchSyncEffect:()=>jr,withAsyncContext:()=>Ga,withCtx:()=>xr,withDefaults:()=>La,withDirectives:()=>Sr,withKeys:()=>yu,withMemo:()=>mc,withModifiers:()=>_u,withScopeId:()=>br}),Cc=void 0,wc=typeof window<`u`&&window.trustedTypes;if(wc)try{Cc=wc.createPolicy(`vue`,{createHTML:e=>e})}catch{}var Tc=Cc?e=>Cc.createHTML(e):e=>e,Ec=`http://www.w3.org/2000/svg`,Dc=`http://www.w3.org/1998/Math/MathML`,Oc=typeof document<`u`?document:null,kc=Oc&&Oc.createElement(`template`),Ac={insert:(e,t,n)=>{t.insertBefore(e,n||null)},remove:e=>{let t=e.parentNode;t&&t.removeChild(e)},createElement:(e,t,n,r)=>{let i=t===`svg`?Oc.createElementNS(Ec,e):t===`mathml`?Oc.createElementNS(Dc,e):n?Oc.createElement(e,{is:n}):Oc.createElement(e);return e===`select`&&r&&r.multiple!=null&&i.setAttribute(`multiple`,r.multiple),i},createText:e=>Oc.createTextNode(e),createComment:e=>Oc.createComment(e),setText:(e,t)=>{e.nodeValue=t},setElementText:(e,t)=>{e.textContent=t},parentNode:e=>e.parentNode,nextSibling:e=>e.nextSibling,querySelector:e=>Oc.querySelector(e),setScopeId(e,t){e.setAttribute(t,``)},insertStaticContent(e,t,n,r,i,a){let o=n?n.previousSibling:t.lastChild;if(i&&(i===a||i.nextSibling))for(;t.insertBefore(i.cloneNode(!0),n),!(i===a||!(i=i.nextSibling)););else{kc.innerHTML=Tc(r===`svg`?`${e}`:r===`mathml`?`${e}`:e);let i=kc.content;if(r===`svg`||r===`mathml`){let e=i.firstChild;for(;e.firstChild;)i.appendChild(e.firstChild);i.removeChild(e)}t.insertBefore(i,n)}return[o?o.nextSibling:t.firstChild,n?n.previousSibling:t.lastChild]}},jc=`transition`,Mc=`animation`,Nc=Symbol(`_vtc`),Pc={name:String,type:String,css:{type:Boolean,default:!0},duration:[String,Number,Object],enterFromClass:String,enterActiveClass:String,enterToClass:String,appearFromClass:String,appearActiveClass:String,appearToClass:String,leaveFromClass:String,leaveActiveClass:String,leaveToClass:String},Fc=c({},ei,Pc),Ic=(e=>(e.displayName=`Transition`,e.props=Fc,e))((e,{slots:t})=>fc(ii,zc(e),t)),Lc=(e,t=[])=>{f(e)?e.forEach(e=>e(...t)):e&&e(...t)},Rc=e=>e?f(e)?e.some(e=>e.length>1):e.length>1:!1;function zc(e){let t={};for(let n in e)n in Pc||(t[n]=e[n]);if(e.css===!1)return t;let{name:n=`v`,type:r,duration:i,enterFromClass:a=`${n}-enter-from`,enterActiveClass:o=`${n}-enter-active`,enterToClass:s=`${n}-enter-to`,appearFromClass:l=a,appearActiveClass:u=o,appearToClass:d=s,leaveFromClass:f=`${n}-leave-from`,leaveActiveClass:p=`${n}-leave-active`,leaveToClass:m=`${n}-leave-to`}=e,h=Bc(i),g=h&&h[0],_=h&&h[1],{onBeforeEnter:v,onEnter:y,onEnterCancelled:b,onLeave:x,onLeaveCancelled:S,onBeforeAppear:C=v,onAppear:w=y,onAppearCancelled:T=b}=t,E=(e,t,n,r)=>{e._enterCancelled=r,Uc(e,t?d:s),Uc(e,t?u:o),n&&n()},D=(e,t)=>{e._isLeaving=!1,Uc(e,f),Uc(e,m),Uc(e,p),t&&t()},ee=e=>(t,n)=>{let i=e?w:y,o=()=>E(t,e,n);Lc(i,[t,o]),Wc(()=>{Uc(t,e?l:a),Hc(t,e?d:s),Rc(i)||Kc(t,r,g,o)})};return c(t,{onBeforeEnter(e){Lc(v,[e]),Hc(e,a),Hc(e,o)},onBeforeAppear(e){Lc(C,[e]),Hc(e,l),Hc(e,u)},onEnter:ee(!1),onAppear:ee(!0),onLeave(e,t){e._isLeaving=!0;let n=()=>D(e,t);Hc(e,f),e._enterCancelled?(Hc(e,p),Xc(e)):(Xc(e),Hc(e,p)),Wc(()=>{e._isLeaving&&(Uc(e,f),Hc(e,m),Rc(x)||Kc(e,r,_,n))}),Lc(x,[e,n])},onEnterCancelled(e){E(e,!1,void 0,!0),Lc(b,[e])},onAppearCancelled(e){E(e,!0,void 0,!0),Lc(T,[e])},onLeaveCancelled(e){D(e),Lc(S,[e])}})}function Bc(e){if(e==null)return null;if(b(e))return[Vc(e.enter),Vc(e.leave)];{let t=Vc(e);return[t,t]}}function Vc(e){return se(e)}function Hc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.add(t)),(e[Nc]||(e[Nc]=new Set)).add(t)}function Uc(e,t){t.split(/\s+/).forEach(t=>t&&e.classList.remove(t));let n=e[Nc];n&&(n.delete(t),n.size||(e[Nc]=void 0))}function Wc(e){requestAnimationFrame(()=>{requestAnimationFrame(e)})}var Gc=0;function Kc(e,t,n,r){let i=e._endId=++Gc,a=()=>{i===e._endId&&r()};if(n!=null)return setTimeout(a,n);let{type:o,timeout:s,propCount:c}=qc(e,t);if(!o)return r();let l=o+`end`,u=0,d=()=>{e.removeEventListener(l,f),a()},f=t=>{t.target===e&&++u>=c&&d()};setTimeout(()=>{u(n[e]||``).split(`, `),i=r(`${jc}Delay`),a=r(`${jc}Duration`),o=Jc(i,a),s=r(`${Mc}Delay`),c=r(`${Mc}Duration`),l=Jc(s,c),u=null,d=0,f=0;t===jc?o>0&&(u=jc,d=o,f=a.length):t===Mc?l>0&&(u=Mc,d=l,f=c.length):(d=Math.max(o,l),u=d>0?o>l?jc:Mc:null,f=u?u===jc?a.length:c.length:0);let p=u===jc&&/\b(?:transform|all)(?:,|$)/.test(r(`${jc}Property`).toString());return{type:u,timeout:d,propCount:f,hasTransform:p}}function Jc(e,t){for(;e.lengthYc(t)+Yc(e[n])))}function Yc(e){return e===`auto`?0:Number(e.slice(0,-1).replace(`,`,`.`))*1e3}function Xc(e){return(e?e.ownerDocument:document).body.offsetHeight}function Zc(e,t,n){let r=e[Nc];r&&(t=(t?[t,...r]:[...r]).join(` `)),t==null?e.removeAttribute(`class`):n?e.setAttribute(`class`,t):e.className=t}var Qc=Symbol(`_vod`),$c=Symbol(`_vsh`),el={name:`show`,beforeMount(e,{value:t},{transition:n}){e[Qc]=e.style.display===`none`?``:e.style.display,n&&t?n.beforeEnter(e):tl(e,t)},mounted(e,{value:t},{transition:n}){n&&t&&n.enter(e)},updated(e,{value:t,oldValue:n},{transition:r}){!t!=!n&&(r?t?(r.beforeEnter(e),tl(e,!0),r.enter(e)):r.leave(e,()=>{tl(e,!1)}):tl(e,t))},beforeUnmount(e,{value:t}){tl(e,t)}};function tl(e,t){e.style.display=t?e[Qc]:`none`,e[$c]=!t}function nl(){el.getSSRProps=({value:e})=>{if(!e)return{style:{display:`none`}}}}var rl=Symbol(``);function il(e){let t=Gs();if(!t)return;let n=t.ut=(n=e(t.proxy))=>{Array.from(document.querySelectorAll(`[data-v-owner="${t.uid}"]`)).forEach(e=>ol(e,n))},r=()=>{let r=e(t.proxy);t.ce?ol(t.ce,r):al(t.subTree,r),n(r)};aa(()=>{cr(r)}),ia(()=>{Mr(r,i,{flush:`post`});let e=new MutationObserver(r);e.observe(t.subTree.el.parentNode,{childList:!0}),ca(()=>e.disconnect())})}function al(e,t){if(e.shapeFlag&128){let n=e.suspense;e=n.activeBranch,n.pendingBranch&&!n.isHydrating&&n.effects.push(()=>{al(n.activeBranch,t)})}for(;e.component;)e=e.component.subTree;if(e.shapeFlag&1&&e.el)ol(e.el,t);else if(e.type===z)e.children.forEach(e=>al(e,t));else if(e.type===hs){let{el:n,anchor:r}=e;for(;n&&(ol(n,t),n!==r);)n=n.nextSibling}}function ol(e,t){if(e.nodeType===1){let n=e.style,r=``;for(let e in t){let i=Le(t[e]);n.setProperty(`--${e}`,i),r+=`--${e}: ${i};`}n[rl]=r}}var sl=/(?:^|;)\s*display\s*:/;function cl(e,t,n){let r=e.style,i=v(n),a=!1;if(n&&!i){if(t){if(v(t))for(let e of t.split(`;`)){let t=e.slice(0,e.indexOf(`:`)).trim();n[t]??ul(r,t,``)}else for(let e in t)n[e]??ul(r,e,``)}for(let i in n){i===`display`&&(a=!0);let o=n[i];o==null?ul(r,i,``):ml(e,i,!v(t)&&t?t[i]:void 0,o)||ul(r,i,o)}}else if(i){if(t!==n){let e=r[rl];e&&(n+=`;`+e),r.cssText=n,a=sl.test(n)}}else t&&e.removeAttribute(`style`);Qc in e&&(e[Qc]=a?r.display:``,e[$c]&&(r.display=`none`))}var ll=/\s*!important$/;function ul(e,t,n){if(f(n))n.forEach(n=>ul(e,t,n));else if(n??=``,t.startsWith(`--`))e.setProperty(t,n);else{let r=pl(e,t);ll.test(n)?e.setProperty(A(r),n.replace(ll,``),`important`):e[r]=n}}var dl=[`Webkit`,`Moz`,`ms`],fl={};function pl(e,t){let n=fl[t];if(n)return n;let r=k(t);if(r!==`filter`&&r in e)return fl[t]=r;r=re(r);for(let n=0;nTl||=(El.then(()=>Tl=0),Date.now());function Ol(e,t){let n=e=>{if(!e._vts)e._vts=Date.now();else if(e._vts<=n.attached)return;let r=n.value;if(f(r)){let n=e.stopImmediatePropagation;e.stopImmediatePropagation=()=>{n.call(e),e._stopped=!0};let i=r.slice(),a=[e];for(let n=0;ne.charCodeAt(0)===111&&e.charCodeAt(1)===110&&e.charCodeAt(2)>96&&e.charCodeAt(2)<123,Al=(e,t,n,r,i,a)=>{let c=i===`svg`;t===`class`?Zc(e,r,c):t===`style`?cl(e,n,r):o(t)?s(t)||xl(e,t,n,r,a):(t[0]===`.`?(t=t.slice(1),!0):t[0]===`^`?(t=t.slice(1),!1):jl(e,t,r,c))?(_l(e,t,r),!e.tagName.includes(`-`)&&(t===`value`||t===`checked`||t===`selected`)&&gl(e,t,r,c,a,t!==`value`)):e._isVueCE&&(Ml(e,t)||e._def.__asyncLoader&&(/[A-Z]/.test(t)||!v(r)))?_l(e,k(t),r,a,t):(t===`true-value`?e._trueValue=r:t===`false-value`&&(e._falseValue=r),gl(e,t,r,c))};function jl(e,t,n,r){if(r)return!!(t===`innerHTML`||t===`textContent`||t in e&&kl(t)&&_(n));if(t===`spellcheck`||t===`draggable`||t===`translate`||t===`autocorrect`||t===`sandbox`&&e.tagName===`IFRAME`||t===`form`||t===`list`&&e.tagName===`INPUT`||t===`type`&&e.tagName===`TEXTAREA`)return!1;if(t===`width`||t===`height`){let t=e.tagName;if(t===`IMG`||t===`VIDEO`||t===`CANVAS`||t===`SOURCE`)return!1}return kl(t)&&v(n)?!1:t in e}function Ml(e,t){let n=e._def.props;if(!n)return!1;let r=k(t);return Array.isArray(n)?n.some(e=>k(e)===r):Object.keys(n).some(e=>k(e)===r)}var Nl={};function Pl(e,t,n){let r=di(e,t);T(r)&&(r=c({},r,t));class i extends Ll{constructor(e){super(r,e,n)}}return i.def=r,i}var Fl=((e,t)=>Pl(e,t,Ou)),Il=typeof HTMLElement<`u`?HTMLElement:class{},Ll=class e extends Il{constructor(e,t={},n=Du){super(),this._def=e,this._props=t,this._createApp=n,this._isVueCE=!0,this._instance=null,this._app=null,this._nonce=this._def.nonce,this._connected=!1,this._resolved=!1,this._patching=!1,this._dirty=!1,this._numberProps=null,this._styleChildren=new WeakSet,this._styleAnchors=new WeakMap,this._ob=null,this.shadowRoot&&n!==Du?this._root=this.shadowRoot:e.shadowRoot===!1?this._root=this:(this.attachShadow(c({},e.shadowRootOptions,{mode:`open`})),this._root=this.shadowRoot)}connectedCallback(){if(!this.isConnected)return;!this.shadowRoot&&!this._resolved&&this._parseSlots(),this._connected=!0;let t=this;for(;t&&=t.assignedSlot||t.parentNode||t.host;)if(t instanceof e){this._parent=t;break}this._instance||(this._resolved?this._mount(this._def):t&&t._pendingResolve?this._pendingResolve=t._pendingResolve.then(()=>{if(this._pendingResolve=void 0,this.isConnected)return this._resolveDef()}):this._resolveDef())}_setParent(e=this._parent){e&&(this._instance.parent=e._instance,this._inheritParentContext(e))}_inheritParentContext(e=this._parent){e&&this._app&&Object.setPrototypeOf(this._app._context.provides,e._instance.provides)}disconnectedCallback(){this._connected=!1,ir(()=>{this._connected||(this._ob&&=(this._ob.disconnect(),null),this._app&&this._app.unmount(),this._instance&&(this._instance.ce=void 0),this._app=this._instance=null,this._teleportTargets&&=(this._teleportTargets.clear(),void 0))})}_processMutations(e){for(let t of e)this._setAttr(t.attributeName)}_resolveDef(){if(this._pendingResolve)return this._pendingResolve;for(let e=0;e{this._resolved=!0,this._pendingResolve=void 0;let{props:n,styles:r}=e,i;if(n&&!f(n))for(let e in n){let t=n[e];(t===Number||t&&t.type===Number)&&(e in this._props&&(this._props[e]=se(this._props[e])),(i||=Object.create(null))[k(e)]=!0)}this._numberProps=i,this._resolveProps(e),this.shadowRoot&&this._applyStyles(r),this._mount(e)},t=this._def.__asyncLoader;if(t)return this._pendingResolve=t().then(t=>{t.configureApp=this._def.configureApp,e(this._def=t,!0)}),this._pendingResolve;e(this._def)}_mount(e){this._app=this._createApp(e),this._inheritParentContext(),e.configureApp&&e.configureApp(this._app),this._app._ceVNode=this._createVNode(),this._app.mount(this._root);let t=this._instance&&this._instance.exposed;if(t)for(let e in t)d(this,e)||Object.defineProperty(this,e,{get:()=>yn(t[e])})}_resolveProps(e){let{props:t}=e,n=f(t)?t:Object.keys(t||{});for(let e of Object.keys(this))e[0]!==`_`&&n.includes(e)&&this._setProp(e,this[e]);for(let e of n.map(k))Object.defineProperty(this,e,{get(){return this._getProp(e)},set(t){this._setProp(e,t,!0,!this._patching)}})}_setAttr(e){if(e.startsWith(`data-v-`))return;let t=this.hasAttribute(e),n=t?this.getAttribute(e):Nl,r=k(e);t&&this._numberProps&&this._numberProps[r]&&(n=se(n)),this._setProp(r,n,!1,!0)}_getProp(e){return this._props[e]}_setProp(e,t,n=!0,r=!1){if(t!==this._props[e]&&(this._dirty=!0,t===Nl?delete this._props[e]:(this._props[e]=t,e===`key`&&this._app&&(this._app._ceVNode.key=t)),r&&this._instance&&this._update(),n)){let n=this._ob;n&&(this._processMutations(n.takeRecords()),n.disconnect()),t===!0?this.setAttribute(A(e),``):typeof t==`string`||typeof t==`number`?this.setAttribute(A(e),t+``):t||this.removeAttribute(A(e)),n&&n.observe(this,{attributes:!0})}}_update(){let e=this._createVNode();this._app&&(e.appContext=this._app._context),Tu(e,this._root)}_createVNode(){let e={};this.shadowRoot||(e.onVnodeMounted=e.onVnodeUpdated=this._renderSlots.bind(this));let t=V(this._def,c(e,this._props));return this._instance||(t.ce=e=>{this._instance=e,e.ce=this,e.isCE=!0;let t=(e,t)=>{this.dispatchEvent(new CustomEvent(e,T(t[0])?c({detail:t},t[0]):{detail:t}))};e.emit=(e,...n)=>{t(e,n),A(e)!==e&&t(A(e),n)},this._setParent()}),t}_applyStyles(e,t,n){if(!e)return;if(t){if(t===this._def||this._styleChildren.has(t))return;this._styleChildren.add(t)}let r=this._nonce,i=this.shadowRoot,a=n?this._getStyleAnchor(n)||this._getStyleAnchor(this._def):this._getRootStyleInsertionAnchor(i),o=null;for(let s=e.length-1;s>=0;s--){let c=document.createElement(`style`);r&&c.setAttribute(`nonce`,r),c.textContent=e[s],i.insertBefore(c,o||a),o=c,s===0&&(n||this._styleAnchors.set(this._def,c),t&&this._styleAnchors.set(t,c))}}_getStyleAnchor(e){if(!e)return null;let t=this._styleAnchors.get(e);return t&&t.parentNode===this.shadowRoot?t:(t&&this._styleAnchors.delete(e),null)}_getRootStyleInsertionAnchor(e){for(let t=0;t(delete e.props.mode,e))({name:`TransitionGroup`,props:c({},Fc,{tag:String,moveClass:String}),setup(e,{slots:t}){let n=Gs(),r=Qr(),i,a;return oa(()=>{if(!i.length)return;let t=e.moveClass||`${e.name||`v`}-move`;if(!Xl(i[0].el,n.vnode.el,t)){i=[];return}i.forEach(Kl),i.forEach(ql);let r=i.filter(Jl);Xc(n.vnode.el),r.forEach(e=>{let n=e.el,r=n.style;Hc(n,t),r.transform=r.webkitTransform=r.transitionDuration=``;let i=n[Ul]=e=>{e&&e.target!==n||(!e||e.propertyName.endsWith(`transform`))&&(n.removeEventListener(`transitionend`,i),n[Ul]=null,Uc(n,t))};n.addEventListener(`transitionend`,i)}),i=[]}),()=>{let o=F(e),s=zc(o),c=o.tag||z;if(i=[],a)for(let e=0;e{e.split(/\s+/).forEach(e=>e&&r.classList.remove(e))}),n.split(/\s+/).forEach(e=>e&&r.classList.add(e)),r.style.display=`none`;let a=t.nodeType===1?t:t.parentNode;a.appendChild(r);let{hasTransform:o}=qc(r);return a.removeChild(r),o}var Zl=e=>{let t=e.props[`onUpdate:modelValue`]||!1;return f(t)?e=>ie(t,e):t};function Ql(e){e.target.composing=!0}function $l(e){let t=e.target;t.composing&&(t.composing=!1,t.dispatchEvent(new Event(`input`)))}var eu=Symbol(`_assign`),tu=Symbol(`_initialValue`);function nu(e,t,n){return t&&(e=e.trim()),n&&(e=oe(e)),e}var ru={created(e,{modifiers:{lazy:t,trim:n,number:r}},i){e.parentNode&&(e.type===`text`?e[tu]=e.defaultValue.replace(/[\r\n]/g,``):e.type===`textarea`&&(e[tu]=e.defaultValue.replace(/\r\n?/g,` +`))),e[eu]=Zl(i);let a=r||i.props&&i.props.type===`number`;vl(e,t?`change`:`input`,t=>{t.target.composing||e[eu](nu(e.value,n,a))}),(n||a)&&vl(e,`change`,()=>{e.value=nu(e.value,n,a)}),t||(vl(e,`compositionstart`,Ql),vl(e,`compositionend`,$l),vl(e,`change`,$l))},mounted(e,{value:t,modifiers:{trim:n,number:r}}){let i=t??``,a=e[tu];delete e[tu],a!==void 0&&(e.type===`text`||e.type===`textarea`)&&e.value!==a?e[eu](nu(e.value,n,r)):e.value=i},beforeUpdate(e,{value:t,oldValue:n,modifiers:{lazy:r,trim:i,number:a}},o){if(e[eu]=Zl(o),e.composing)return;let s=(a||e.type===`number`)&&!/^0\d/.test(e.value)?oe(e.value):e.value,c=t??``;if(s===c)return;let l=e.getRootNode();(l instanceof Document||l instanceof ShadowRoot)&&l.activeElement===e&&e.type!==`range`&&(r&&t===n||i&&e.value.trim()===c)||(e.value=c)}},iu={deep:!0,created(e,t,n){e[eu]=Zl(n),vl(e,`change`,()=>{let t=e._modelValue,n=lu(e),r=e.checked,i=e[eu];if(f(t)){let e=Me(t,n),a=e!==-1;if(r&&!a)i(t.concat(n));else if(!r&&a){let n=[...t];n.splice(e,1),i(n)}}else if(m(t)){let e=new Set(t);r?e.add(n):e.delete(n),i(e)}else i(uu(e,r))})},mounted:au,beforeUpdate(e,t,n){e[eu]=Zl(n),au(e,t,n)}};function au(e,{value:t,oldValue:n},r){e._modelValue=t;let i;if(f(t))i=Me(t,r.props.value)>-1;else if(m(t))i=t.has(r.props.value);else{if(t===n)return;i=je(t,uu(e,!0))}e.checked!==i&&(e.checked=i)}var ou={created(e,{value:t},n){e.checked=je(t,n.props.value),e[eu]=Zl(n),vl(e,`change`,()=>{e[eu](lu(e))})},beforeUpdate(e,{value:t,oldValue:n},r){e[eu]=Zl(r),t!==n&&(e.checked=je(t,r.props.value))}},su={deep:!0,created(e,{value:t,modifiers:{number:n}},r){e._modelValue=t,vl(e,`change`,()=>{let t=Array.prototype.filter.call(e.options,e=>e.selected).map(e=>n?oe(lu(e)):lu(e));e[eu](e.multiple?m(e._modelValue)?new Set(t):t:t[0]),e._assigning=!0,ir(()=>{e._assigning=!1})}),e[eu]=Zl(r)},mounted(e,{value:t}){cu(e,t)},beforeUpdate(e,{value:t},n){e._modelValue=t,e[eu]=Zl(n)},updated(e,{value:t}){e._assigning||cu(e,t)}};function cu(e,t){let n=e.multiple,r=f(t);if(!(n&&!r&&!m(t))){for(let i=0,a=e.options.length;iString(e)===String(o)):Me(t,o)>-1}else a.selected=t.has(o)}else if(je(lu(a),t)){e.selectedIndex!==i&&(e.selectedIndex=i);return}}!n&&e.selectedIndex!==-1&&(e.selectedIndex=-1)}}function lu(e){return`_value`in e?e._value:e.value}function uu(e,t){let n=t?`_trueValue`:`_falseValue`;return n in e?e[n]:t}var du={created(e,t,n){pu(e,t,n,null,`created`)},mounted(e,t,n){pu(e,t,n,null,`mounted`)},beforeUpdate(e,t,n,r){pu(e,t,n,r,`beforeUpdate`)},updated(e,t,n,r){pu(e,t,n,r,`updated`)}};function fu(e,t){switch(e){case`SELECT`:return su;case`TEXTAREA`:return ru;default:switch(t){case`checkbox`:return iu;case`radio`:return ou;default:return ru}}}function pu(e,t,n,r,i){let a=fu(e.tagName,n.props&&n.props.type)[i];a&&a(e,t,n,r)}function mu(){ru.getSSRProps=({value:e})=>({value:e}),ou.getSSRProps=({value:e},t)=>{if(t.props&&je(t.props.value,e))return{checked:!0}},iu.getSSRProps=({value:e},t)=>{if(f(e)){if(t.props&&Me(e,t.props.value)>-1)return{checked:!0}}else if(m(e)){if(t.props&&e.has(t.props.value))return{checked:!0}}else if(e)return{checked:!0}},du.getSSRProps=(e,t)=>{if(typeof t.type!=`string`)return;let n=fu(t.type.toUpperCase(),t.props&&t.props.type);if(n.getSSRProps)return n.getSSRProps(e,t)}}var hu=[`ctrl`,`shift`,`alt`,`meta`],gu={stop:e=>e.stopPropagation(),prevent:e=>e.preventDefault(),self:e=>e.target!==e.currentTarget,ctrl:e=>!e.ctrlKey,shift:e=>!e.shiftKey,alt:e=>!e.altKey,meta:e=>!e.metaKey,left:e=>`button`in e&&e.button!==0,middle:e=>`button`in e&&e.button!==1,right:e=>`button`in e&&e.button!==2,exact:(e,t)=>hu.some(n=>e[`${n}Key`]&&!t.includes(n))},_u=(e,t)=>{if(!e)return e;let n=e._withMods||={},r=t.join(`.`);return n[r]||(n[r]=((n,...r)=>{for(let e=0;e{let n=e._withKeys||={},r=t.join(`.`);return n[r]||(n[r]=(n=>{if(!(`key`in n))return;let r=A(n.key);if(t.some(e=>e===r||vu[e]===r))return e(n)}))},bu=c({patchProp:Al},Ac),xu,Su=!1;function Cu(){return xu||=Wo(bu)}function wu(){return xu=Su?xu:Go(bu),Su=!0,xu}var Tu=((...e)=>{Cu().render(...e)}),Eu=((...e)=>{wu().hydrate(...e)}),Du=((...e)=>{let t=Cu().createApp(...e),{mount:n}=t;return t.mount=e=>{let r=Au(e);if(!r)return;let i=t._component;!_(i)&&!i.render&&!i.template&&(i.template=r.innerHTML),r.nodeType===1&&(r.textContent=``);let a=n(r,!1,ku(r));return r instanceof Element&&(r.removeAttribute(`v-cloak`),r.setAttribute(`data-v-app`,``)),a},t}),Ou=((...e)=>{let t=wu().createApp(...e),{mount:n}=t;return t.mount=e=>{let t=Au(e);if(t)return n(t,!0,ku(t))},t});function ku(e){if(e instanceof SVGElement)return`svg`;if(typeof MathMLElement==`function`&&e instanceof MathMLElement)return`mathml`}function Au(e){return v(e)?document.querySelector(e):e}var ju=!1,Mu=()=>{ju||(ju=!0,mu(),nl())},Nu=Symbol(``),Pu=Symbol(``),Fu=Symbol(``),Iu=Symbol(``),Lu=Symbol(``),Ru=Symbol(``),zu=Symbol(``),Bu=Symbol(``),Vu=Symbol(``),Hu=Symbol(``),Uu=Symbol(``),Wu=Symbol(``),Gu=Symbol(``),Ku=Symbol(``),qu=Symbol(``),Ju=Symbol(``),Yu=Symbol(``),Xu=Symbol(``),Zu=Symbol(``),Qu=Symbol(``),$u=Symbol(``),ed=Symbol(``),td=Symbol(``),nd=Symbol(``),rd=Symbol(``),id=Symbol(``),ad=Symbol(``),od=Symbol(``),sd=Symbol(``),cd=Symbol(``),ld=Symbol(``),ud=Symbol(``),dd=Symbol(``),fd=Symbol(``),pd=Symbol(``),md=Symbol(``),hd=Symbol(``),gd=Symbol(``),_d=Symbol(``),vd={[Nu]:`Fragment`,[Pu]:`Teleport`,[Fu]:`Suspense`,[Iu]:`KeepAlive`,[Lu]:`BaseTransition`,[Ru]:`openBlock`,[zu]:`createBlock`,[Bu]:`createElementBlock`,[Vu]:`createVNode`,[Hu]:`createElementVNode`,[Uu]:`createCommentVNode`,[Wu]:`createTextVNode`,[Gu]:`createStaticVNode`,[Ku]:`resolveComponent`,[qu]:`resolveDynamicComponent`,[Ju]:`resolveDirective`,[Yu]:`resolveFilter`,[Xu]:`withDirectives`,[Zu]:`renderList`,[Qu]:`renderSlot`,[$u]:`createSlots`,[ed]:`toDisplayString`,[td]:`mergeProps`,[nd]:`normalizeClass`,[rd]:`normalizeStyle`,[id]:`normalizeProps`,[ad]:`guardReactiveProps`,[od]:`toHandlers`,[sd]:`camelize`,[cd]:`capitalize`,[ld]:`toHandlerKey`,[ud]:`setBlockTracking`,[dd]:`pushScopeId`,[fd]:`popScopeId`,[pd]:`withCtx`,[md]:`unref`,[hd]:`isRef`,[gd]:`withMemo`,[_d]:`isMemoSame`};function yd(e){Object.getOwnPropertySymbols(e).forEach(t=>{vd[t]=e[t]})}var bd={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:``};function xd(e,t=``){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:bd}}function Sd(e,t,n,r,i,a,o,s=!1,c=!1,l=!1,u=bd){return e&&(s?(e.helper(Ru),e.helper(jd(e.inSSR,l))):e.helper(Ad(e.inSSR,l)),o&&e.helper(Xu)),{type:13,tag:t,props:n,children:r,patchFlag:i,dynamicProps:a,directives:o,isBlock:s,disableTracking:c,isComponent:l,loc:u}}function Cd(e,t=bd){return{type:17,loc:t,elements:e}}function wd(e,t=bd){return{type:15,loc:t,properties:e}}function U(e,t){return{type:16,loc:bd,key:v(e)?W(e,!0):e,value:t}}function W(e,t=!1,n=bd,r=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:r}}function Td(e,t=bd){return{type:8,loc:t,children:e}}function G(e,t=[],n=bd){return{type:14,loc:n,callee:e,arguments:t}}function Ed(e,t=void 0,n=!1,r=!1,i=bd){return{type:18,params:e,returns:t,newline:n,isSlot:r,loc:i}}function Dd(e,t,n,r=!0){return{type:19,test:e,consequent:t,alternate:n,newline:r,loc:bd}}function Od(e,t,n=!1,r=!1){return{type:20,index:e,value:t,needPauseTracking:n,inVOnce:r,needArraySpread:!1,loc:bd}}function kd(e){return{type:21,body:e,loc:bd}}function Ad(e,t){return e||t?Vu:Hu}function jd(e,t){return e||t?zu:Bu}function Md(e,{helper:t,removeHelper:n,inSSR:r}){e.isBlock||(e.isBlock=!0,n(Ad(r,e.isComponent)),t(Ru),t(jd(r,e.isComponent)))}var Nd=new Uint8Array([123,123]),Pd=new Uint8Array([125,125]);function Fd(e){return e>=97&&e<=122||e>=65&&e<=90}function Id(e){return e===32||e===10||e===9||e===12||e===13}function Ld(e){return e===47||e===62||Id(e)}function Rd(e){let t=new Uint8Array(e.length);for(let n=0;n100){let t=-1,n=r;for(;t+1>>1;this.newlines[r]=0;t--)if(e>this.newlines[t]){i=t;break}return i>=0&&(t=i+2,n=e-this.newlines[i]),{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex]){if(this.delimiterIndex===this.delimiterOpen.length-1){let e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++}else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){let t=this.sequenceIndex===this.currentSequence.length;if(!(t?Ld(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!t){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||Id(e)){let t=this.index-this.currentSequence.length;if(this.sectionStart=e||(this.state===28?this.currentSequence===zd.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}};function Vd(e,{compatConfig:t}){let n=t&&t[e];return e===`MODE`?n||3:n}function Hd(e,t){let n=Vd(`MODE`,t),r=Vd(e,t);return n===3?r===!0:r!==!1}function Ud(e,t,n,...r){return Hd(e,t)}function Wd(e){throw e}function Gd(e){}function K(e,t,n,r){let i=`https://vuejs.org/error-reference/#compiler-${e}`,a=SyntaxError(String(i));return a.code=e,a.loc=t,a}var Kd=e=>e.type===4&&e.isStatic;function qd(e){switch(e){case`Teleport`:case`teleport`:return Pu;case`Suspense`:case`suspense`:return Fu;case`KeepAlive`:case`keep-alive`:return Iu;case`BaseTransition`:case`base-transition`:return Lu}}var Jd=/^$|^\d|[^\$\w\xA0-\uFFFF]/,Yd=e=>!Jd.test(e),Xd=/[A-Za-z_$\xA0-\uFFFF]/,Zd=/[\.\?\w$\xA0-\uFFFF]/,Qd=/\s+[.[]\s*|\s*[.[]\s+/g,$d=e=>e.type===4?e.content:e.loc.source,ef=e=>{let t=$d(e).trim().replace(Qd,e=>e.trim()),n=0,r=[],i=0,a=0,o=null;for(let e=0;e|^\s*(?:async\s+)?function(?:\s+[\w$]+)?\s*\(/,nf=e=>tf.test($d(e));function rf(e,t,n=!1){for(let r=0;re.type===7&&e.name===`bind`&&(!e.arg||e.arg.type!==4||!e.arg.isStatic))}function cf(e){return e.type===5||e.type===2}function lf(e){return e.type===7&&e.name===`pre`}function uf(e){return e.type===7&&e.name===`slot`}function df(e){return e.type===1&&e.tagType===3}function ff(e){return e.type===1&&e.tagType===2}var pf=new Set([id,ad]);function mf(e,t=[]){if(e&&!v(e)&&e.type===14){let n=e.callee;if(!v(n)&&pf.has(n))return mf(e.arguments[0],t.concat(e))}return[e,t]}function hf(e,t,n){if(e.type!==13&&gf(e,t))return;let r,i=e.type===13?e.props:e.arguments[2],a=[],o;if(i&&!v(i)&&i.type===14){let e=mf(i);i=e[0],a=e[1],o=a[a.length-1]}if(i==null||v(i))r=wd([t]);else if(i.type===14){let e=i.arguments[0];!v(e)&&e.type===15?_f(t,e)||e.properties.unshift(t):i.callee===od?r=G(n.helper(td),[wd([t]),i]):i.arguments.unshift(wd([t])),!r&&(r=i)}else i.type===15?(_f(t,i)||i.properties.unshift(t),r=i):(r=G(n.helper(td),[wd([t]),i]),o&&o.callee===ad&&(o=a[a.length-2]));e.type===13?o?o.arguments[0]=r:e.props=r:o?o.arguments[0]=r:e.arguments[2]=r}function gf(e,t){var n,r,i;if(t.key.type!==4||t.key.content!==`key`)return!1;let a=e.arguments[2];if(a&&!v(a)){let[e]=mf(a);if(e&&!v(e)&&e.type===15&&_f(t,e))return!0}return(n=e.arguments)[2]||(n[2]=`{}`),(r=e.arguments)[3]||(r[3]=`undefined`),(i=e.arguments)[4]||(i[4]=`undefined`),e.arguments[5]=t.value,!0}function _f(e,t){let n=!1;if(e.key.type===4){let r=e.key.content;n=t.properties.some(e=>e.key.type===4&&e.key.content===r)}return n}function vf(e,t){return`_${t}_${e.replace(/[^\w]/g,(t,n)=>t===`-`?`_`:e.charCodeAt(n).toString())}`}function yf(e){return e.type===14&&e.callee===gd?e.arguments[1].returns:e}var bf=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;function xf(e){for(let t=0;t0,isVoidTag:a,isPreTag:a,isIgnoreNewlineTag:a,isCustomElement:a,onError:Wd,onWarn:Gd,comments:!1,prefixIdentifiers:!1},q=wf,Tf=null,Ef=``,Df=null,J=null,Of=``,kf=-1,Af=-1,jf=0,Mf=!1,Nf=null,Y=[],X=new Bd(Y,{onerr:tp,ontext(e,t){Rf(Z(e,t),e,t)},ontextentity(e,t,n){Rf(e,t,n)},oninterpolation(e,t){if(Mf)return Rf(Z(e,t),e,t);let n=e+X.delimiterOpen.length,r=t-X.delimiterClose.length;for(;Id(Ef.charCodeAt(n));)n++;for(;Id(Ef.charCodeAt(r-1));)r--;let i=Z(n,r);i.includes(`&`)&&(i=q.decodeEntities(i,!1)),Xf({type:5,content:ep(i,!1,Q(n,r)),loc:Q(e,t)})},onopentagname(e,t){let n=Z(e,t);Df={type:1,tag:n,ns:q.getNamespace(n,Y[0],q.ns),tagType:0,props:[],children:[],loc:Q(e-1,t),codegenNode:void 0}},onopentagend(e){Lf(e)},onclosetag(e,t){let n=Z(e,t);if(!q.isVoidTag(n)){let r=!1;for(let e=0;e0&&tp(24,Y[0].loc.start.offset);for(let n=0;n<=e;n++)zf(Y.shift(),t,n(e.type===7?e.rawName:e.name)===n)&&tp(2,t)},onattribend(e,t){if(Df&&J){if(Qf(J.loc,t),e!==0){if(Of.includes(`&`)&&(Of=q.decodeEntities(Of,!0)),J.type===6)J.name===`class`&&(Of=Yf(Of).trim()),e===1&&!Of&&tp(13,t),J.value={type:2,content:Of,loc:e===1?Q(kf,Af):Q(kf-1,Af+1)},X.inSFCRoot&&Df.tag===`template`&&J.name===`lang`&&Of&&Of!==`html`&&X.enterRCDATA(Rd(`e.content===`sync`))>-1&&Ud(`COMPILER_V_BIND_SYNC`,q,J.loc,J.arg.loc.source)&&(J.name=`model`,J.modifiers.splice(e,1))}}(J.type!==7||J.name!==`pre`)&&Df.props.push(J)}Of=``,kf=Af=-1},oncomment(e,t){q.comments&&Xf({type:3,content:Z(e,t),loc:Q(e-4,t+3)})},onend(){let e=Ef.length;for(let t=0;t{let i=t.start.offset+n;return ep(e,!1,Q(i,i+e.length),0,+!!r)},s={source:o(a.trim(),n.indexOf(a,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1},c=i.trim().replace(Ff,``).trim(),l=i.indexOf(c),u=c.match(Pf);if(u){c=c.replace(Pf,``).trim();let e=u[1].trim(),t;if(e&&(t=n.indexOf(e,l+c.length),s.key=o(e,t,!0)),u[2]){let r=u[2].trim();r&&(s.index=o(r,n.indexOf(r,s.key?t+e.length:l+c.length),!0))}}return c&&(s.value=o(c,l,!0)),s}function Z(e,t){return Ef.slice(e,t)}function Lf(e){X.inSFCRoot&&(Df.innerLoc=Q(e+1,e+1)),Xf(Df);let{tag:t,ns:n}=Df;n===0&&q.isPreTag(t)&&jf++,q.isVoidTag(t)?zf(Df,e):(Y.unshift(Df),(n===1||n===2)&&(X.inXML=!0)),Df=null}function Rf(e,t,n){{let t=Y[0]&&Y[0].tag;t!==`script`&&t!==`style`&&e.includes(`&`)&&(e=q.decodeEntities(e,!1))}let r=Y[0]||Tf,i=r.children[r.children.length-1];i&&i.type===2?(i.content+=e,Qf(i.loc,n)):r.children.push({type:2,content:e,loc:Q(t,n)})}function zf(e,t,n=!1){n?Qf(e.loc,Vf(t,60)):Qf(e.loc,Bf(t,62)+1),X.inSFCRoot&&(e.children.length?e.innerLoc.end=c({},e.children[e.children.length-1].loc.end):e.innerLoc.end=c({},e.innerLoc.start),e.innerLoc.source=Z(e.innerLoc.start.offset,e.innerLoc.end.offset));let{tag:r,ns:i,children:a}=e;if(Mf||(r===`slot`?e.tagType=2:Uf(e)?e.tagType=3:Wf(e)&&(e.tagType=1)),X.inRCDATA||(e.children=qf(a)),i===0&&q.isIgnoreNewlineTag(r)){let e=a[0];e&&e.type===2&&(e.content=e.content.replace(/^\r?\n/,``))}i===0&&q.isPreTag(r)&&jf--,Nf===e&&(Mf=X.inVPre=!1,Nf=null),X.inXML&&(Y[0]?Y[0].ns:q.ns)===0&&(X.inXML=!1);{let t=e.props;if(!X.inSFCRoot&&Hd(`COMPILER_NATIVE_TEMPLATE`,q)&&e.tag===`template`&&!Uf(e)){let t=Y[0]||Tf,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}let n=t.find(e=>e.type===6&&e.name===`inline-template`);n&&Ud(`COMPILER_INLINE_TEMPLATE`,q,n.loc)&&e.children.length&&(n.value={type:2,content:Z(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function Bf(e,t){let n=e;for(;Ef.charCodeAt(n)!==t&&n=0;)n--;return n}var Hf=new Set([`if`,`else`,`else-if`,`for`,`slot`]);function Uf({tag:e,props:t}){if(e===`template`){for(let e=0;e64&&e<91}var Kf=/\r\n/g;function qf(e){let t=q.whitespace!==`preserve`,n=!1;for(let r=0;re.type!==3);return t.length===1&&t[0].type===1&&!ff(t[0])?t[0]:null}function op(e,t,n,r=!1,i=!1){let{children:a}=e,o=[];for(let t=0;t0){if(e>=2){s.codegenNode.patchFlag=-1,o.push(s);continue}}else{let e=s.codegenNode;if(e.type===13){let t=e.patchFlag;if((t===void 0||t===512||t===1)&&up(s,n)>=2){let t=dp(s);t&&(e.props=n.hoist(t))}e.dynamicProps&&=n.hoist(e.dynamicProps)}}}else if(s.type===12&&(r?0:sp(s,n))>=2){s.codegenNode.type===14&&s.codegenNode.arguments.length>0&&s.codegenNode.arguments.push(`-1`),o.push(s);continue}if(s.type===1){let t=s.tagType===1;t&&n.scopes.vSlot++,op(s,e,n,!1,i),t&&n.scopes.vSlot--}else if(s.type===11)op(s,e,n,s.children.length===1,!0);else if(s.type===9)for(let t=0;te.key===t||e.key.content===t);return n&&n.value}}o.length&&n.transformHoist&&n.transformHoist(a,n,e)}function sp(e,t){let{constantCache:n}=t;switch(e.type){case 1:if(e.tagType!==0)return 0;let r=n.get(e);if(r!==void 0)return r;let i=e.codegenNode;if(i.type!==13||i.isBlock&&e.tag!==`svg`&&e.tag!==`foreignObject`&&e.tag!==`math`)return 0;if(i.patchFlag===void 0){let r=3,a=up(e,t);if(a===0)return n.set(e,0),0;a1)for(let i=0;in&&(D.childIndex--,D.onNodeRemoved()),D.parent.children.splice(n,1)},onNodeRemoved:i,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){v(e)&&(e=W(e)),D.hoists.push(e);let t=W(`_hoisted_${D.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache(e,t=!1,n=!1){let r=Od(D.cached.length,e,t,n);return D.cached.push(r),r}};return D.filters=new Set,D}function pp(e,t){let n=fp(e,t);gp(e,n),t.hoistStatic&&ip(e,n),t.ssr||mp(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function mp(e,t){let{helper:n}=t,{children:r}=e;if(r.length===1){let n=ap(e);if(n&&n.codegenNode){let r=n.codegenNode;r.type===13&&Md(r,t),e.codegenNode=r}else e.codegenNode=r[0]}else r.length>1&&(e.codegenNode=Sd(t,n(Nu),void 0,e.children,64,void 0,void 0,!0,void 0,!1))}function hp(e,t){let n=0,r=()=>{n--};for(;nt===e:t=>e.test(t);return(e,r)=>{if(e.type===1){let{props:i}=e;if(e.tagType===3&&i.some(uf))return;let a=[];for(let o=0;o`${vd[e]}: _${vd[e]}`;function bp(e,{mode:t=`function`,prefixIdentifiers:n=t===`module`,sourceMap:r=!1,filename:i=`template.vue.html`,scopeId:a=null,optimizeImports:o=!1,runtimeGlobalName:s=`Vue`,runtimeModuleName:c=`vue`,ssrRuntimeModuleName:l=`vue/server-renderer`,ssr:u=!1,isTS:d=!1,inSSR:f=!1}){let p={mode:t,prefixIdentifiers:n,sourceMap:r,filename:i,scopeId:a,optimizeImports:o,runtimeGlobalName:s,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:u,isTS:d,inSSR:f,source:e.source,code:``,column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper(e){return`_${vd[e]}`},push(e,t=-2,n){p.code+=e},indent(){m(++p.indentLevel)},deindent(e=!1){e?--p.indentLevel:m(--p.indentLevel)},newline(){m(p.indentLevel)}};function m(e){p.push(` +`+` `.repeat(e),0)}return p}function xp(e,t={}){let n=bp(e,t);t.onContextCreated&&t.onContextCreated(n);let{mode:r,push:i,prefixIdentifiers:a,indent:o,deindent:s,newline:c,scopeId:l,ssr:u}=n,d=Array.from(e.helpers),f=d.length>0,p=!a&&r!==`module`;if(Sp(e,n),i(`function ${u?`ssrRender`:`render`}(${(u?[`_ctx`,`_push`,`_parent`,`_attrs`]:[`_ctx`,`_cache`]).join(`, `)}) {`),o(),p&&(i(`with (_ctx) {`),o(),f&&(i(`const { ${d.map(yp).join(`, `)} } = _Vue +`,-1),c())),e.components.length&&(Cp(e.components,`component`,n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Cp(e.directives,`directive`,n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Cp(e.filters,`filter`,n),c()),e.temps>0){i(`let `);for(let t=0;t0?`, `:``}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i(` +`,0),c()),u||i(`return `),e.codegenNode?Dp(e.codegenNode,n):i(`null`),p&&(s(),i(`}`)),s(),i(`}`),{ast:e,code:n.code,preamble:``,map:n.map?n.map.toJSON():void 0}}function Sp(e,t){let{ssr:n,prefixIdentifiers:r,push:i,newline:a,runtimeModuleName:o,runtimeGlobalName:s,ssrRuntimeModuleName:c}=t,l=s,u=Array.from(e.helpers);u.length>0&&(i(`const _Vue = ${l} +`,-1),e.hoists.length&&i(`const { ${[Vu,Hu,Uu,Wu,Gu].filter(e=>u.includes(e)).map(yp).join(`, `)} } = _Vue +`,-1)),wp(e.hoists,t),a(),i(`return `)}function Cp(e,t,{helper:n,push:r,newline:i,isTS:a}){let o=n(t===`filter`?Yu:t===`component`?Ku:Ju);for(let n=0;n3||!1;t.push(`[`),n&&t.indent(),Ep(e,t,n),n&&t.deindent(),t.push(`]`)}function Ep(e,t,n=!1,r=!0){let{push:i,newline:a}=t;for(let o=0;oe||`null`)}function Ip(e,t){let{push:n,helper:r,pure:i}=t,a=v(e.callee)?e.callee:r(e.callee);i&&n(vp),n(a+`(`,-2,e),Ep(e.arguments,t),n(`)`)}function Lp(e,t){let{push:n,indent:r,deindent:i,newline:a}=t,{properties:o}=e;if(!o.length){n(`{}`,-2,e);return}let s=o.length>1||!1;n(s?`{`:`{ `),s&&r();for(let e=0;e `),(c||s)&&(n(`{`),r()),o?(c&&n(`return `),f(o)?Tp(o,t):Dp(o,t)):s&&Dp(s,t),(c||s)&&(i(),n(`}`)),l&&(e.isNonScopedSlot&&n(`, undefined, true`),n(`)`))}function Bp(e,t){let{test:n,consequent:r,alternate:i,newline:a}=e,{push:o,indent:s,deindent:c,newline:l}=t;if(n.type===4){let e=!Yd(n.content);e&&o(`(`),kp(n,t),e&&o(`)`)}else o(`(`),Dp(n,t),o(`)`);a&&s(),t.indentLevel++,a||o(` `),o(`? `),Dp(r,t),t.indentLevel--,a&&l(),a||o(` `),o(`: `);let u=i.type===19;u||t.indentLevel++,Dp(i,t),u||t.indentLevel--,a&&c(!0)}function Vp(e,t){let{push:n,helper:r,indent:i,deindent:a,newline:o}=t,{needPauseTracking:s,needArraySpread:c}=e;c&&n(`[...(`),n(`_cache[${e.index}] || (`),s&&(i(),n(`${r(ud)}(-1`),e.inVOnce&&n(`, true`),n(`),`),o(),n(`(`)),n(`_cache[${e.index}] = `),Dp(e.value,t),s&&(n(`).cacheIndex = ${e.index},`),o(),n(`${r(ud)}(1),`),o(),n(`_cache[${e.index}]`),a()),n(`)`),c&&n(`)]`)}RegExp(`\\b`+`arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield`.split(`,`).join(`\\b|\\b`)+`\\b`);var Hp=_p(/^(?:if|else|else-if)$/,(e,t,n)=>Up(e,t,n,(e,t,r)=>{let i=n.parent.children,a=i.indexOf(e),o=0;for(;a-->=0;){let e=i[a];e&&e.type===9&&(o+=e.branches.length)}return()=>{if(r)e.codegenNode=Gp(t,o,n);else{let r=qp(e.codegenNode);r.alternate=Gp(t,o+e.branches.length-1,n)}}}));function Up(e,t,n,r){if(t.name!==`else`&&(!t.exp||!t.exp.content.trim())){let r=t.exp?t.exp.loc:e.loc;n.onError(K(28,t.loc)),t.exp=W(`true`,!1,r)}if(t.name===`if`){let i=Wp(e,t),a={type:9,loc:Zf(e.loc),branches:[i]};if(n.replaceNode(a),r)return r(a,i,!0)}else{let i=n.parent.children,a=i.indexOf(e);for(;a-->=-1;){let o=i[a];if(o&&Cf(o)){n.removeNode(o);continue}if(o&&o.type===9){(t.name===`else-if`||t.name===`else`)&&o.branches[o.branches.length-1].condition===void 0&&n.onError(K(30,e.loc)),n.removeNode();let i=Wp(e,t);o.branches.push(i);let a=r&&r(o,i,!1);gp(i,n),a&&a(),n.currentNode=null}else n.onError(K(30,e.loc));break}}}function Wp(e,t){let n=e.tagType===3;return{type:10,loc:e.loc,condition:t.name===`else`?void 0:t.exp,children:n&&!rf(e,`for`)?e.children:[e],userKey:af(e,`key`),isTemplateIf:n}}function Gp(e,t,n){return e.condition?Dd(e.condition,Kp(e,t,n),G(n.helper(Uu),[`""`,`true`])):Kp(e,t,n)}function Kp(e,t,n){let{helper:r}=n,i=U(`key`,W(`${t}`,!1,bd,2)),{children:a}=e,o=a[0];if(a.length!==1||o.type!==1){if(a.length===1&&o.type===11){let e=o.codegenNode;return hf(e,i,n),e}return Sd(n,r(Nu),wd([i]),a,64,void 0,void 0,!0,!1,!1,e.loc)}{let e=o.codegenNode,t=yf(e);return t.type===13&&Md(t,n),hf(t,i,n),e}}function qp(e){for(;;)if(e.type===19){if(e.alternate.type===19)e=e.alternate;else return e}else e.type===20&&(e=e.value)}var Jp=_p(`for`,(e,t,n)=>{let{helper:r,removeHelper:i}=n;return Yp(e,t,n,t=>{let a=G(r(Zu),[t.source]),o=df(e),s=rf(e,`memo`),c=af(e,`key`,!1,!0);c&&c.type;let l=c&&(c.type===6?c.value?W(c.value.content,!0):void 0:c.exp),u=l?U(`key`,l):null,d=t.source.type===4&&t.source.constType>0,f=d?64:c?128:256;return t.codegenNode=Sd(n,r(Nu),void 0,a,f,void 0,void 0,!0,!d,!1,e.loc),()=>{let c,{children:f}=t,p=f.length!==1||f[0].type!==1,m=ff(e)?e:o&&e.children.length===1&&ff(e.children[0])?e.children[0]:null;if(m)c=m.codegenNode,o&&u&&hf(c,u,n);else if(p)c=Sd(n,r(Nu),u?wd([u]):void 0,e.children,64,void 0,void 0,!0,void 0,!1);else{c=f[0].codegenNode,o&&u&&hf(c,u,n);let e=!d||c.isBlockRequired===!0;c.isBlock!==e&&(c.isBlock?(i(Ru),i(jd(n.inSSR,c.isComponent))):i(Ad(n.inSSR,c.isComponent))),c.isBlock=e,c.isBlock?(r(Ru),r(jd(n.inSSR,c.isComponent))):(r(Ad(n.inSSR,c.isComponent)),c.needsPatch&&(c.patchFlag=(c.patchFlag??0)|512))}if(s){let e=Ed(Zp(t.parseResult,[W(`_cached`)]));e.body=kd([Td([`const _memo = (`,s.exp,`)`]),Td([`if (_cached && _cached.el`,...l?[` && _cached.key === `,l]:[],` && ${n.helperString(_d)}(_cached, _memo)) return _cached`]),Td([`const _item = `,c]),W(`_item.memo = _memo`),W(`return _item`)]),a.arguments.push(e,W(`_cache`),W(String(n.cached.length))),n.cached.push(null)}else a.arguments.push(Ed(Zp(t.parseResult),c,!0))}})});function Yp(e,t,n,r){if(!t.exp){n.onError(K(31,t.loc));return}let i=t.forParseResult;if(!i){n.onError(K(32,t.loc));return}Xp(i,n);let{addIdentifiers:a,removeIdentifiers:o,scopes:s}=n,{source:c,value:l,key:u,index:d}=i,f={type:11,loc:t.loc,source:c,valueAlias:l,keyAlias:u,objectIndexAlias:d,parseResult:i,children:df(e)?e.children:[e]};n.replaceNode(f),s.vFor++;let p=r&&r(f);return()=>{s.vFor--,p&&p()}}function Xp(e,t){e.finalized||=!0}function Zp({value:e,key:t,index:n},r=[]){return Qp([e,t,n,...r])}function Qp(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map((e,t)=>e||W(`_`.repeat(t+1),!1))}var $p=W(`undefined`,!1),em=(e,t)=>{if(e.type===1&&(e.tagType===1||e.tagType===3)){let n=rf(e,`slot`);if(n)return n.exp,t.scopes.vSlot++,()=>{t.scopes.vSlot--}}},tm=(e,t,n,r)=>Ed(e,n,!1,!0,n.length?n[0].loc:r);function nm(e,t,n=tm){t.helper(pd);let{children:r,loc:i}=e,a=[],o=[],s=t.scopes.vSlot>0||t.scopes.vFor>0,c=rf(e,`slot`,!0);if(c){let{arg:e,exp:t}=c;e&&!Kd(e)&&(s=!0),a.push(U(e||W(`default`,!0),n(t,void 0,r,i)))}let l=!1,u=!1,d=[],f=new Set,p=0;for(let e=0;e{let a=n(e,void 0,r,i);return t.compatConfig&&(a.isNonScopedSlot=!0),U(`default`,a)};l?d.length&&!d.every(Sf)&&(u?t.onError(K(39,d[0].loc)):a.push(e(void 0,d))):a.push(e(void 0,r))}let m=s?2:im(e.children)?3:1,h=wd(a.concat(U(`_`,W(m+``,!1))),i);return o.length&&(h=G(t.helper($u),[h,Cd(o)])),{slots:h,hasDynamicSlots:s}}function rm(e,t,n){let r=[U(`name`,e),U(`fn`,t)];return n!=null&&r.push(U(`key`,W(String(n),!0))),wd(r)}function im(e){for(let t=0;tfunction(){if(e=t.currentNode,e.type!==1||e.tagType!==0&&e.tagType!==1)return;let{tag:n,props:r}=e,i=e.tagType===1,a=i?sm(e,t):`"${n}"`,o=b(a)&&a.callee===qu,s,c,l=0,u,d,f,p=!1,m=!1,h=o||a===Pu||a===Fu||!i&&(n===`svg`||n===`foreignObject`||n===`math`);if(r.length>0){let n=cm(e,t,void 0,i,o);s=n.props,l=n.patchFlag,d=n.dynamicPropNames,p=n.needsPatch,m=n.isBlockRequired;let r=n.directives;f=r&&r.length?Cd(r.map(e=>dm(e,t))):void 0,n.shouldUseBlock&&(h=!0)}if(e.children.length>0){if(a===Iu&&(h=!0,l|=1024),i&&a!==Pu&&a!==Iu){let{slots:n,hasDynamicSlots:r}=nm(e,t);c=n,r&&(l|=1024)}else if(e.children.length===1&&a!==Pu){let n=e.children[0],r=n.type,i=r===5||r===8;i&&sp(n,t)===0&&(l|=1),c=i||r===2?n:e.children}else c=e.children}d&&d.length&&(u=fm(d));let g=e.codegenNode=Sd(t,a,s,c,l===0?void 0:l,u,f,!!h,!1,i,e.loc);p&&=l===0||l===32,p&&(g.needsPatch=!0),m&&(g.isBlockRequired=!0)};function sm(e,t,n=!1){let{tag:r}=e,i=pm(r),a=af(e,`is`,!1,!0);if(a){if(i||Hd(`COMPILER_IS_ON_ELEMENT`,t)){let e;if(a.type===6?e=a.value&&W(a.value.content,!0):(e=a.exp,e||=W(`is`,!1,a.arg.loc)),e)return G(t.helper(qu),[e])}else a.type===6&&a.value.content.startsWith(`vue:`)&&(r=a.value.content.slice(4))}let o=qd(r)||t.isBuiltInComponent(r);return o?(n||t.helper(o),o):(t.helper(Ku),t.components.add(r),vf(r,`component`))}function cm(e,t,n=e.props,r,i,a=!1){let{tag:s,loc:c,children:l}=e,u=[],d=[],f=[],p=l.length>0,m=!1,h=!1,g=0,_=!1,v=!1,b=!1,x=!1,S=!1,C=!1,w=[],T=e=>{u.length&&(d.push(wd(lm(u),c)),u=[]),e&&d.push(e)},E=()=>{t.scopes.vFor>0&&u.push(U(W(`ref_for`,!0),W(`true`)))},te=({key:e,value:n})=>{if(Kd(e)){let a=e.content,s=o(a);if(s&&(!r||i)&&a.toLowerCase()!==`onclick`&&a!==`onUpdate:modelValue`&&!D(a)&&(x=!0),s&&D(a)&&(C=!0),a===`ref`&&(_=!0),s&&n.type===14&&(n=n.arguments[0]),n.type===20||(n.type===4||n.type===8)&&sp(n,t)>0)return;a===`class`?v=!0:a===`style`?b=!0:a!==`ref`&&a!==`key`&&!w.includes(a)&&w.push(a),r&&(a===`class`||a===`style`)&&!w.includes(a)&&w.push(a)}else S=!0};for(let i=0;ie.content===`prop`)&&(g|=32);let C=t.directiveTransforms[n];if(C){let{props:n,needRuntime:r}=C(o,e,t);!a&&n.forEach(te),x&&i&&!Kd(i)?T(wd(n,c)):u.push(...n),r&&(f.push(o),y(r)&&am.set(o,r))}else ee(n)||(f.push(o),p&&(m=!0,h=!0))}}let O;d.length?(T(),O=d.length>1?G(t.helper(td),d,c):d[0]):u.length&&(O=wd(lm(u),c)),S?g|=16:(v&&!r&&(g|=2),b&&!r&&(g|=4),w.length&&(g|=8),x&&(g|=32));let ne=(g===0||g===32)&&(_||C||f.length>0);if(!m&&ne&&(g|=512),!t.inSSR&&O)switch(O.type){case 15:let e=-1,n=-1,r=!1;for(let t=0;tU(e,t)),i))}return Cd(n,e.loc)}function fm(e){let t=`[`;for(let n=0,r=e.length;n{if(ff(e)){let{children:n,loc:r}=e,{slotName:i,slotProps:a}=hm(e,t),o=[t.prefixIdentifiers?`_ctx.$slots`:`$slots`,i,`{}`,`undefined`,`true`],s=2;a&&(o[2]=a,s=3),n.length&&(o[3]=Ed([],n,!1,!1,r),s=4),t.scopeId&&!t.slotted&&(s=5),o.splice(s),e.codegenNode=G(t.helper(Qu),o,r)}};function hm(e,t){let n=`"default"`,r,i=[];for(let t=0;t0){let{props:n,directives:a}=cm(e,t,i,!1,!1);r=n,a.length&&t.onError(K(36,a[0].loc))}return{slotName:n,slotProps:r}}var gm=(e,t,n,r)=>{let{loc:i,modifiers:a,arg:o}=e;!e.exp&&!a.length&&n.onError(K(35,i));let s;if(o.type===4){if(o.isStatic){let e=o.content;e.startsWith(`vue:`)&&(e=`vnode-${e.slice(4)}`),s=W(t.tagType!==0||e.startsWith(`vnode`)||!/[A-Z]/.test(e)?j(k(e)):`on:${e}`,!0,o.loc)}else s=Td([`${n.helperString(ld)}(`,o,`)`])}else s=o,s.children.unshift(`${n.helperString(ld)}(`),s.children.push(`)`);let c=e.exp;c&&!c.content.trim()&&(c=void 0);let l=n.cacheHandlers&&!c&&!n.inVOnce;if(c){let e=ef(c),t=!(e||nf(c)),n=c.content.includes(`;`);(t||l&&e)&&(c=Td([`${t?`$event`:`(...args)`} => ${n?`{`:`(`}`,c,n?`}`:`)`]))}let u={props:[U(s,c||W(`() => {}`,!1,i))]};return r&&(u=r(u)),l&&(u.props[0].value=n.cache(u.props[0].value)),u.props.forEach(e=>e.key.isHandlerKey=!0),u},_m=(e,t,n)=>{let{modifiers:r,loc:i}=e,a=e.arg,{exp:o}=e;return o&&o.type===4&&!o.content.trim()&&(o=void 0),a.type===4?a.isStatic||(a.content=a.content?`${a.content} || ""`:`""`):(a.children.unshift(`(`),a.children.push(`) || ""`)),r.some(e=>e.content===`camel`)&&(a.type===4?a.content=a.isStatic?k(a.content):`${n.helperString(sd)}(${a.content})`:(a.children.unshift(`${n.helperString(sd)}(`),a.children.push(`)`))),n.inSSR||(r.some(e=>e.content===`prop`)&&vm(a,`.`),r.some(e=>e.content===`attr`)&&vm(a,`^`)),{props:[U(a,o)]}},vm=(e,t)=>{e.type===4?e.content=e.isStatic?t+e.content:`\`${t}\${${e.content}}\``:(e.children.unshift(`'${t}' + (`),e.children.push(`)`))},ym=(e,t)=>{if(e.type===0||e.type===1||e.type===11||e.type===10)return()=>{let n=e.children,r,i=!1;for(let e=0;ee.type===7&&!t.directiveTransforms[e.name])&&e.tag!==`template`)))for(let e=0;e{if(e.type===1&&rf(e,`once`,!0))return bm.has(e)||t.inVOnce||t.inSSR?void 0:(bm.add(e),t.inVOnce=!0,t.helper(ud),()=>{t.inVOnce=!1;let e=t.currentNode;e.codegenNode&&=t.cache(e.codegenNode,!0,!0)})},Sm=(e,t,n)=>{let{exp:r,arg:i}=e;if(!r)return n.onError(K(41,e.loc)),Cm();let a=r.loc.source.trim(),o=r.type===4?r.content:a,s=n.bindingMetadata[a];if(s===`props`||s===`props-aliased`)return n.onError(K(44,r.loc)),Cm();if(s===`literal-const`||s===`setup-const`)return n.onError(K(45,r.loc)),Cm();if(!o.trim()||!ef(r))return n.onError(K(42,r.loc)),Cm();let c=i||W(`modelValue`,!0),l=i?Kd(i)?`onUpdate:${k(i.content)}`:Td([`"onUpdate:" + `,i]):`onUpdate:modelValue`,u;u=Td([`${n.isTS?`($event: any)`:`$event`} => ((`,r,`) = $event)`]);let d=[U(c,e.exp),U(l,u)];if(e.modifiers.length&&t.tagType===1){let t=e.modifiers.map(e=>e.content).map(e=>(Yd(e)?e:JSON.stringify(e))+`: true`).join(`, `),n=i?Kd(i)?`${i.content}Modifiers`:Td([i,` + "Modifiers"`]):`modelModifiers`;d.push(U(n,W(`{ ${t} }`,!1,e.loc,2)))}return Cm(d)};function Cm(e=[]){return{props:e}}var wm=/[\w).+\-_$\]]/,Tm=(e,t)=>{Hd(`COMPILER_FILTERS`,t)&&(e.type===5?Em(e.content,t):e.type===1&&e.props.forEach(e=>{e.type===7&&e.name!==`for`&&e.exp&&Em(e.exp,t)}))};function Em(e,t){if(e.type===4)Dm(e,t);else for(let n=0;n=0&&(t=n.charAt(e),t===` `);e--);(!t||!wm.test(t))&&(o=!0)}}m===void 0?m=n.slice(0,p).trim():u!==0&&g();function g(){h.push(n.slice(u,p).trim()),u=p+1}if(h.length){for(p=0;p{if(e.type===1){let n=rf(e,`memo`);return!n||km.has(e)||t.inSSR?void 0:(km.add(e),()=>{let r=e.codegenNode||t.currentNode.codegenNode;r&&r.type===13&&(e.tagType!==1&&Md(r,t),e.codegenNode=G(t.helper(gd),[n.exp,Ed(void 0,r),`_cache`,String(t.cached.length)]),t.cached.push(null))})}},jm=(e,t)=>{if(e.type===1){for(let n of e.props)if(n.type===7&&n.name===`bind`&&(!n.exp||n.exp.type===4&&!n.exp.content.trim())&&n.arg){let e=n.arg;if(e.type!==4||!e.isStatic)t.onError(K(53,e.loc)),n.exp=W(``,!0,e.loc);else{let t=k(e.content);(Xd.test(t[0])||t[0]===`-`)&&(n.exp=W(t,!1,e.loc))}}}};function Mm(e){return[[jm,xm,Hp,Am,Jp,Tm,mm,om,em,ym],{on:gm,bind:_m,model:Sm}]}function Nm(e,t={}){let n=t.onError||Wd,r=t.mode===`module`;t.prefixIdentifiers===!0?n(K(48)):r&&n(K(49)),t.cacheHandlers&&n(K(50)),t.scopeId&&!r&&n(K(51));let i=c({},t,{prefixIdentifiers:!1}),a=v(e)?rp(e,i):e,[o,s]=Mm();return pp(a,c({},i,{nodeTransforms:[...o,...t.nodeTransforms||[]],directiveTransforms:c({},s,t.directiveTransforms||{})})),xp(a,i)}var Pm=()=>({props:[]}),Fm=Symbol(``),Im=Symbol(``),Lm=Symbol(``),Rm=Symbol(``),zm=Symbol(``),Bm=Symbol(``),Vm=Symbol(``),Hm=Symbol(``),Um=Symbol(``),Wm=Symbol(``);yd({[Fm]:`vModelRadio`,[Im]:`vModelCheckbox`,[Lm]:`vModelText`,[Rm]:`vModelSelect`,[zm]:`vModelDynamic`,[Bm]:`withModifiers`,[Vm]:`withKeys`,[Hm]:`vShow`,[Um]:`Transition`,[Wm]:`TransitionGroup`});var Gm;function Km(e,t=!1){return Gm||=document.createElement(`div`),t?(Gm.innerHTML=`
`,Gm.children[0].getAttribute(`foo`)):(Gm.innerHTML=e,Gm.textContent)}var qm={parseMode:`html`,isVoidTag:Ee,isNativeTag:e=>Ce(e)||we(e)||Te(e),isPreTag:e=>e===`pre`,isIgnoreNewlineTag:e=>e===`pre`||e===`textarea`,decodeEntities:Km,isBuiltInComponent:e=>{if(e===`Transition`||e===`transition`)return Um;if(e===`TransitionGroup`||e===`transition-group`)return Wm},getNamespace(e,t,n){let r=t?t.ns:n;if(t&&r===2){if(t.tag===`annotation-xml`){if(e===`svg`)return 1;t.props.some(e=>e.type===6&&e.name===`encoding`&&e.value!=null&&(e.value.content===`text/html`||e.value.content===`application/xhtml+xml`))&&(r=0)}else/^m(?:[ions]|text)$/.test(t.tag)&&e!==`mglyph`&&e!==`malignmark`&&(r=0)}else t&&r===1&&(t.tag===`foreignObject`||t.tag===`desc`||t.tag===`title`)&&(r=0);if(r===0){if(e===`svg`)return 1;if(e===`math`)return 2}return r}},Jm=e=>{e.type===1&&e.props.forEach((t,n)=>{t.type===6&&t.name===`style`&&t.value&&(e.props[n]={type:7,name:`bind`,arg:W(`style`,!0,t.loc),exp:Ym(t.value.content,t.loc),modifiers:[],loc:t.loc})})},Ym=(e,t)=>{let n=ge(e);return W(JSON.stringify(n),!1,t,3)};function Xm(e,t){return K(e,t,void 0)}var Zm=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(54,i)),t.children.length&&(n.onError(Xm(55,i)),t.children.length=0),{props:[U(W(`innerHTML`,!0,i),r||W(``,!0))]}},Qm=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(56,i)),t.children.length&&(n.onError(Xm(57,i)),t.children.length=0),{props:[U(W(`textContent`,!0),r?sp(r,n)>0?r:G(n.helperString(ed),[r],i):W(``,!0))]}},$m=(e,t,n)=>{let r=Sm(e,t,n);if(!r.props.length||t.tagType===1)return r;e.arg&&n.onError(Xm(59,e.arg.loc));let{tag:i}=t,a=n.isCustomElement(i);if(i===`input`||i===`textarea`||i===`select`||a){let o=Lm,s=!1;if(i===`input`||a){let r=af(t,`type`);if(r){if(r.type===7)o=zm;else if(r.value)switch(r.value.content){case`radio`:o=Fm;break;case`checkbox`:o=Im;break;case`file`:s=!0,n.onError(Xm(60,e.loc))}}else sf(t)&&(o=zm)}else i===`select`&&(o=Rm);s||(r.needRuntime=n.helper(o))}else n.onError(Xm(58,e.loc));return r.props=r.props.filter(e=>e.key.type!==4||e.key.content!==`modelValue`),r},eh=t(`passive,once,capture`),th=t(`stop,prevent,self,ctrl,shift,alt,meta,exact,middle`),nh=t(`left,right`),rh=t(`onkeyup,onkeydown,onkeypress`),ih=(e,t,n,r)=>{let i=[],a=[],o=[];for(let s=0;sKd(e)&&e.content.toLowerCase()===`onclick`?W(t,!0):e.type===4?e:Td([`(`,e,`) === "onClick" ? "${t}" : (`,e,`)`]),oh=(e,t,n)=>gm(e,t,n,t=>{let{modifiers:r}=e;if(!r.length)return t;let{key:i,value:a}=t.props[0],{keyModifiers:o,nonKeyModifiers:s,eventOptionModifiers:c}=ih(i,r,n,e.loc);if(s.includes(`right`)&&(i=ah(i,`onContextmenu`)),s.includes(`middle`)&&(i=ah(i,`onMouseup`)),s.length&&(a=G(n.helper(Bm),[a,JSON.stringify(s)])),o.length&&(!Kd(i)||rh(i.content.toLowerCase()))&&(a=G(n.helper(Vm),[a,JSON.stringify(o)])),c.length){let e=c.map(re).join(``);i=Kd(i)?W(`${i.content}${e}`,!0):Td([`(`,i,`) + "${e}"`])}return{props:[U(i,a)]}}),sh=(e,t,n)=>{let{exp:r,loc:i}=e;return r||n.onError(Xm(62,i)),{props:[],needRuntime:n.helper(Hm)}},ch=(e,t)=>{e.type===1&&e.tagType===0&&(e.tag===`script`||e.tag===`style`)&&t.removeNode()},lh=[Jm],uh={cloak:Pm,html:Zm,text:Qm,model:$m,on:oh,show:sh};function dh(e,t={}){return Nm(e,c({},qm,t,{nodeTransforms:[ch,...lh,...t.nodeTransforms||[]],directiveTransforms:c({},uh,t.directiveTransforms||{}),transformHoist:null}))}var fh=Object.create(null);function ph(e,t){if(!v(e)){if(e.nodeType)e=e.innerHTML;else return i}let n=ue(e,t),r=fh[n];if(r)return r;if(e[0]===`#`){let t=document.querySelector(e);e=t?t.innerHTML:``}let a=c({hoistStatic:!0,onError:void 0,onWarn:i},t);!a.isCustomElement&&typeof customElements<`u`&&(a.isCustomElement=e=>!!customElements.get(e));let{code:o}=dh(e,a),s=Function(`Vue`,o)(Sc);return s._rc=!0,fh[n]=s}rc(ph);var mh=[`top`,`right`,`bottom`,`left`],hh=[`start`,`end`],gh=mh.reduce((e,t)=>e.concat(t,t+`-`+hh[0],t+`-`+hh[1]),[]),_h=Math.min,vh=Math.max,yh={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function bh(e,t,n){return vh(e,_h(t,n))}function xh(e,t){return typeof e==`function`?e(t):e}function Sh(e){return e.split(`-`)[0]}function Ch(e){return e.split(`-`)[1]}function wh(e){return e===`x`?`y`:`x`}function Th(e){return e===`y`?`height`:`width`}function Eh(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Dh(e){return wh(Eh(e))}function Oh(e,t,n){n===void 0&&(n=!1);let r=Ch(e),i=Dh(e),a=Th(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Lh(o)),[o,Lh(o)]}function kh(e){let t=Lh(e);return[Ah(e),t,Ah(t)]}function Ah(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var jh=[`left`,`right`],Mh=[`right`,`left`],Nh=[`top`,`bottom`],Ph=[`bottom`,`top`];function Fh(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mh:jh:t?jh:Mh;case`left`:case`right`:return t?Nh:Ph;default:return[]}}function Ih(e,t,n,r){let i=Ch(e),a=Fh(Sh(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ah)))),a}function Lh(e){let t=Sh(e);return yh[t]+e.slice(t.length)}function Rh(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function zh(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Rh(e)}function Bh(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vh(e,t,n){let{reference:r,floating:i}=e,a=Eh(t),o=Dh(t),s=Th(o),c=Sh(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=Ch(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Hh(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=xh(t,e),p=zh(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Bh(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Bh(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Uh=50,Wh=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Hh},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Vh(l,r,c),f=r,p=0,m={};for(let n=0;n({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=xh(e,t)||{};if(l==null)return{};let d=zh(u),f={x:n,y:r},p=Dh(i),m=Th(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=_h(d[_],T),D=_h(d[v],T),ee=C-h[m]-D,te=C/2-h[m]/2+w,O=bh(E,te,ee),k=!c.arrow&&Ch(i)!=null&&te!==O&&a.reference[m]/2-(teCh(t)===e),...n.filter(t=>Ch(t)!==e)]:n.filter(e=>Sh(e)===e)).filter(n=>!e||Ch(n)===e||(t?Ah(n)!==n:!1))}var qh=function(e){return e===void 0&&(e={}),{name:`autoPlacement`,options:e,async fn(t){let{rects:n,middlewareData:r,placement:i,platform:a,elements:o}=t,{crossAxis:s=!1,alignment:c,allowedPlacements:l=gh,autoAlignment:u=!0,...d}=xh(e,t),f=c!==void 0||l===gh?Kh(c||null,u,l):l,p=r.autoPlacement?.index||0,m=f[p];if(m==null)return{};if(i!==m)return{reset:{placement:f[0]}};let h=await a.detectOverflow(t,d),g=Oh(m,n,await(a.isRTL==null?void 0:a.isRTL(o.floating))),_=[h[Sh(m)],h[g[0]],h[g[1]]],v=[...r.autoPlacement?.overflows||[],{placement:m,overflows:_}],y=f[p+1];if(y)return{data:{index:p+1,overflows:v},reset:{placement:y}};let b=v.map(e=>{let t=Ch(e.placement);return[e.placement,t&&s?e.overflows.slice(0,2).reduce((e,t)=>e+t,0):e.overflows[0],e.overflows]}).sort((e,t)=>e[1]-t[1]),x=b.filter(e=>e[2].slice(0,Ch(e[0])?2:3).every(e=>e<=0))[0]?.[0]||b[0][0];return x===i?{}:{data:{index:p+1,overflows:v},reset:{placement:x}}}}},Jh=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=xh(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=Sh(r),_=Eh(o),v=Sh(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Lh(o)]:kh(o)),x=p!==`none`;!d&&x&&b.push(...Ih(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Oh(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Eh(t)||T.every(e=>Eh(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Eh(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Yh=new Set([`left`,`top`]);async function Xh(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=Sh(n),s=Ch(n),c=Eh(n)===`y`,l=Yh.has(o)?-1:1,u=a&&c?-1:1,d=xh(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Zh=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Xh(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Qh=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=xh(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Eh(i),p=wh(f),m=u[p],h=u[f],g=(e,t)=>bh(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},$h=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=xh(e,t),c=await i.detectOverflow(t,s),l=Sh(n),u=Ch(n),d=Eh(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=_h(p-c[m],g),y=_h(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*vh(c.left,c.right):S=p-2*vh(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function eg(e){return e.ownerDocument?.defaultView||window}function tg(e){return eg(e).getComputedStyle(e)}var ng=Math.min,rg=Math.max,ig=Math.round;function ag(e){let t=tg(e),n=parseFloat(t.width),r=parseFloat(t.height),i=e.offsetWidth,a=e.offsetHeight,o=ig(n)!==i||ig(r)!==a;return o&&(n=i,r=a),{width:n,height:r,fallback:o}}function og(e){return dg(e)?(e.nodeName||``).toLowerCase():``}var sg;function cg(){if(sg)return sg;let e=navigator.userAgentData;return e&&Array.isArray(e.brands)?(sg=e.brands.map((e=>e.brand+`/`+e.version)).join(` `),sg):navigator.userAgent}function lg(e){return e instanceof eg(e).HTMLElement}function ug(e){return e instanceof eg(e).Element}function dg(e){return e instanceof eg(e).Node}function fg(e){return typeof ShadowRoot>`u`?!1:e instanceof eg(e).ShadowRoot||e instanceof ShadowRoot}function pg(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=tg(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&![`inline`,`contents`].includes(i)}function mg(e){return[`table`,`td`,`th`].includes(og(e))}function hg(e){let t=/firefox/i.test(cg()),n=tg(e),r=n.backdropFilter||n.WebkitBackdropFilter;return n.transform!==`none`||n.perspective!==`none`||!!r&&r!==`none`||t&&n.willChange===`filter`||t&&!!n.filter&&n.filter!==`none`||[`transform`,`perspective`].some((e=>n.willChange.includes(e)))||[`paint`,`layout`,`strict`,`content`].some((e=>{let t=n.contain;return t!=null&&t.includes(e)}))}function gg(){return!/^((?!chrome|android).)*safari/i.test(cg())}function _g(e){return[`html`,`body`,`#document`].includes(og(e))}function vg(e){return ug(e)?e:e.contextElement}var yg={x:1,y:1};function bg(e){let t=vg(e);if(!lg(t))return yg;let n=t.getBoundingClientRect(),{width:r,height:i,fallback:a}=ag(t),o=(a?ig(n.width):n.width)/r,s=(a?ig(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}function xg(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=vg(e),o=yg;t&&(r?ug(r)&&(o=bg(r)):o=bg(e));let s=a?eg(a):window,c=!gg()&&n,l=(i.left+(c&&s.visualViewport?.offsetLeft||0))/o.x,u=(i.top+(c&&s.visualViewport?.offsetTop||0))/o.y,d=i.width/o.x,f=i.height/o.y;if(a){let e=eg(a),t=r&&ug(r)?eg(r):r,n=e.frameElement;for(;n&&r&&t!==e;){let e=bg(n),t=n.getBoundingClientRect(),r=getComputedStyle(n);t.x+=(n.clientLeft+parseFloat(r.paddingLeft))*e.x,t.y+=(n.clientTop+parseFloat(r.paddingTop))*e.y,l*=e.x,u*=e.y,d*=e.x,f*=e.y,l+=t.x,u+=t.y,n=eg(n).frameElement}}return{width:d,height:f,top:u,right:l+d,bottom:u+f,left:l,x:l,y:u}}function Sg(e){return((dg(e)?e.ownerDocument:e.document)||window.document).documentElement}function Cg(e){return ug(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function wg(e){return xg(Sg(e)).left+Cg(e).scrollLeft}function Tg(e){if(og(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||fg(e)&&e.host||Sg(e);return fg(t)?t.host:t}function Eg(e){let t=Tg(e);return _g(t)?t.ownerDocument.body:lg(t)&&pg(t)?t:Eg(t)}function Dg(e,t){t===void 0&&(t=[]);let n=Eg(e),r=n===e.ownerDocument?.body,i=eg(n);return r?t.concat(i,i.visualViewport||[],pg(n)?n:[]):t.concat(n,Dg(n))}function Og(e,t,n){return t===`viewport`?Bh(function(e,t){let n=eg(e),r=Sg(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=gg();(e||!e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s,y:c}}(e,n)):ug(t)?Bh(function(e,t){let n=xg(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=lg(e)?bg(e):{x:1,y:1};return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}(t,n)):Bh(function(e){let t=Sg(e),n=Cg(e),r=e.ownerDocument.body,i=rg(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=rg(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+wg(e),s=-n.scrollTop;return tg(r).direction===`rtl`&&(o+=rg(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}(Sg(e)))}function kg(e){return lg(e)&&tg(e).position!==`fixed`?e.offsetParent:null}function Ag(e){let t=eg(e),n=kg(e);for(;n&&mg(n)&&tg(n).position===`static`;)n=kg(n);return n&&(og(n)===`html`||og(n)===`body`&&tg(n).position===`static`&&!hg(n))?t:n||function(e){let t=Tg(e);for(;lg(t)&&!_g(t);){if(hg(t))return t;t=Tg(t)}return null}(e)||t}function jg(e,t,n){let r=lg(t),i=Sg(t),a=xg(e,!0,n===`fixed`,t),o={scrollLeft:0,scrollTop:0},s={x:0,y:0};if(r||!r&&n!==`fixed`){if((og(t)!==`body`||pg(i))&&(o=Cg(t)),lg(t)){let e=xg(t,!0);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&(s.x=wg(i))}return{x:a.left+o.scrollLeft-s.x,y:a.top+o.scrollTop-s.y,width:a.width,height:a.height}}var Mg={getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?function(e,t){let n=t.get(e);if(n)return n;let r=Dg(e).filter((e=>ug(e)&&og(e)!==`body`)),i=null,a=tg(e).position===`fixed`,o=a?Tg(e):e;for(;ug(o)&&!_g(o);){let e=tg(o),t=hg(o);(a?t||i:t||e.position!==`static`||!i||![`absolute`,`fixed`].includes(i.position))?i=e:r=r.filter((e=>e!==o)),o=Tg(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=a[0],s=a.reduce(((e,n)=>{let r=Og(t,n,i);return e.top=rg(r.top,e.top),e.right=ng(r.right,e.right),e.bottom=ng(r.bottom,e.bottom),e.left=rg(r.left,e.left),e}),Og(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{rect:t,offsetParent:n,strategy:r}=e,i=lg(n),a=Sg(n);if(n===a)return t;let o={scrollLeft:0,scrollTop:0},s={x:1,y:1},c={x:0,y:0};if((i||!i&&r!==`fixed`)&&((og(n)!==`body`||pg(a))&&(o=Cg(n)),lg(n))){let e=xg(n);s=bg(n),c.x=e.x+n.clientLeft,c.y=e.y+n.clientTop}return{width:t.width*s.x,height:t.height*s.y,x:t.x*s.x-o.scrollLeft*s.x+c.x,y:t.y*s.y-o.scrollTop*s.y+c.y}},isElement:ug,getDimensions:function(e){return lg(e)?ag(e):e.getBoundingClientRect()},getOffsetParent:Ag,getDocumentElement:Sg,getScale:bg,async getElementRects(e){let{reference:t,floating:n,strategy:r}=e,i=this.getOffsetParent||Ag,a=this.getDimensions;return{reference:jg(t,await i(n),r),floating:{x:0,y:0,...await a(n)}}},getClientRects:e=>Array.from(e.getClientRects()),isRTL:e=>tg(e).direction===`rtl`},Ng=(e,t,n)=>{let r=new Map,i={platform:Mg,...n},a={...i.platform,_c:r};return Wh(e,t,{...i,platform:a})};function Pg(e,t){for(let n in t)Object.prototype.hasOwnProperty.call(t,n)&&(typeof t[n]==`object`&&e[n]?Pg(e[n],t[n]):e[n]=t[n])}var Fg={disabled:!1,distance:5,skidding:0,container:`body`,boundary:void 0,instantMove:!1,disposeTimeout:150,popperTriggers:[],strategy:`absolute`,preventOverflow:!0,flip:!0,shift:!0,overflowPadding:0,arrowPadding:0,arrowOverflow:!0,autoHideOnMousedown:!1,themes:{tooltip:{placement:`top`,triggers:[`hover`,`focus`,`touch`],hideTriggers:e=>[...e,`click`],delay:{show:200,hide:0},handleResize:!1,html:!1,loadingContent:`...`},dropdown:{placement:`bottom`,triggers:[`click`],delay:0,handleResize:!0,autoHide:!0},menu:{$extend:`dropdown`,triggers:[`hover`,`focus`],popperTriggers:[`hover`],delay:{show:0,hide:400}}}};function Ig(e,t){let n=Fg.themes[e]||{},r;do r=n[t],typeof r>`u`?n.$extend?n=Fg.themes[n.$extend]||{}:(n=null,r=Fg[t]):n=null;while(n);return r}function Lg(e){let t=[e],n=Fg.themes[e]||{};do n.$extend&&!n.$resetCss?(t.push(n.$extend),n=Fg.themes[n.$extend]||{}):n=null;while(n);return t.map(e=>`v-popper--theme-${e}`)}function Rg(e){let t=[e],n=Fg.themes[e]||{};do n.$extend?(t.push(n.$extend),n=Fg.themes[n.$extend]||{}):n=null;while(n);return t}var zg=!1;if(typeof window<`u`){zg=!1;try{let e=Object.defineProperty({},"passive",{get(){zg=!0}});window.addEventListener(`test`,null,e)}catch{}}var Bg=!1;typeof window<`u`&&typeof navigator<`u`&&(Bg=/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream);var Vg=[`auto`,`top`,`bottom`,`left`,`right`].reduce((e,t)=>e.concat([t,`${t}-start`,`${t}-end`]),[]),Hg={hover:`mouseenter`,focus:`focus`,click:`click`,touch:`touchstart`,pointer:`pointerdown`},Ug={hover:`mouseleave`,focus:`blur`,click:`click`,touch:`touchend`,pointer:`pointerup`};function Wg(e,t){let n=e.indexOf(t);n!==-1&&e.splice(n,1)}function Gg(){return new Promise(e=>requestAnimationFrame(()=>{requestAnimationFrame(e)}))}var Kg=[],qg=null,Jg={};function Yg(e){let t=Jg[e];return t||=Jg[e]=[],t}var Xg=function(){};typeof window<`u`&&(Xg=window.Element);function $(e){return function(t){return Ig(t.theme,e)}}var Zg=`__floating-vue__popper`,Qg=()=>di({name:`VPopper`,provide(){return{[Zg]:{parentPopper:this}}},inject:{[Zg]:{default:null}},props:{theme:{type:String,required:!0},targetNodes:{type:Function,required:!0},referenceNode:{type:Function,default:null},popperNode:{type:Function,required:!0},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:$(`disabled`)},positioningDisabled:{type:Boolean,default:$(`positioningDisabled`)},placement:{type:String,default:$(`placement`),validator:e=>Vg.includes(e)},delay:{type:[String,Number,Object],default:$(`delay`)},distance:{type:[Number,String],default:$(`distance`)},skidding:{type:[Number,String],default:$(`skidding`)},triggers:{type:Array,default:$(`triggers`)},showTriggers:{type:[Array,Function],default:$(`showTriggers`)},hideTriggers:{type:[Array,Function],default:$(`hideTriggers`)},popperTriggers:{type:Array,default:$(`popperTriggers`)},popperShowTriggers:{type:[Array,Function],default:$(`popperShowTriggers`)},popperHideTriggers:{type:[Array,Function],default:$(`popperHideTriggers`)},container:{type:[String,Object,Xg,Boolean],default:$(`container`)},boundary:{type:[String,Xg],default:$(`boundary`)},strategy:{type:String,validator:e=>[`absolute`,`fixed`].includes(e),default:$(`strategy`)},autoHide:{type:[Boolean,Function],default:$(`autoHide`)},handleResize:{type:Boolean,default:$(`handleResize`)},instantMove:{type:Boolean,default:$(`instantMove`)},eagerMount:{type:Boolean,default:$(`eagerMount`)},popperClass:{type:[String,Array,Object],default:$(`popperClass`)},computeTransformOrigin:{type:Boolean,default:$(`computeTransformOrigin`)},autoMinSize:{type:Boolean,default:$(`autoMinSize`)},autoSize:{type:[Boolean,String],default:$(`autoSize`)},autoMaxSize:{type:Boolean,default:$(`autoMaxSize`)},autoBoundaryMaxSize:{type:Boolean,default:$(`autoBoundaryMaxSize`)},preventOverflow:{type:Boolean,default:$(`preventOverflow`)},overflowPadding:{type:[Number,String],default:$(`overflowPadding`)},arrowPadding:{type:[Number,String],default:$(`arrowPadding`)},arrowOverflow:{type:Boolean,default:$(`arrowOverflow`)},flip:{type:Boolean,default:$(`flip`)},shift:{type:Boolean,default:$(`shift`)},shiftCrossAxis:{type:Boolean,default:$(`shiftCrossAxis`)},noAutoFocus:{type:Boolean,default:$(`noAutoFocus`)},disposeTimeout:{type:Number,default:$(`disposeTimeout`)}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},data(){return{isShown:!1,isMounted:!1,skipTransition:!1,classes:{showFrom:!1,showTo:!1,hideFrom:!1,hideTo:!0},result:{x:0,y:0,placement:``,strategy:this.strategy,arrow:{x:0,y:0,centerOffset:0},transformOrigin:null},randomId:`popper_${[Math.random(),Date.now()].map(e=>e.toString(36).substring(2,10)).join(`_`)}`,shownChildren:new Set,lastAutoHide:!0,pendingHide:!1,containsGlobalTarget:!1,isDisposed:!0,mouseDownContains:!1}},computed:{popperId(){return this.ariaId==null?this.randomId:this.ariaId},shouldMountContent(){return this.eagerMount||this.isMounted},slotData(){return{popperId:this.popperId,isShown:this.isShown,shouldMountContent:this.shouldMountContent,skipTransition:this.skipTransition,autoHide:typeof this.autoHide==`function`?this.lastAutoHide:this.autoHide,show:this.show,hide:this.hide,handleResize:this.handleResize,onResize:this.onResize,classes:{...this.classes,popperClass:this.popperClass},result:this.positioningDisabled?null:this.result,attrs:this.$attrs}},parentPopper(){return this[Zg]?.parentPopper},hasPopperShowTriggerHover(){return this.popperTriggers?.includes(`hover`)||this.popperShowTriggers?.includes(`hover`)}},watch:{shown:`$_autoShowHide`,disabled(e){e?this.dispose():this.init()},async container(){this.isShown&&(this.$_ensureTeleport(),await this.$_computePosition())},triggers:{handler:`$_refreshListeners`,deep:!0},positioningDisabled:`$_refreshListeners`,...[`placement`,`distance`,`skidding`,`boundary`,`strategy`,`overflowPadding`,`arrowPadding`,`preventOverflow`,`shift`,`shiftCrossAxis`,`flip`].reduce((e,t)=>(e[t]=`$_computePosition`,e),{})},created(){this.autoMinSize&&console.warn('[floating-vue] `autoMinSize` option is deprecated. Use `autoSize="min"` instead.'),this.autoMaxSize&&console.warn("[floating-vue] `autoMaxSize` option is deprecated. Use `autoBoundaryMaxSize` instead.")},mounted(){this.init(),this.$_detachPopperNode()},activated(){this.$_autoShowHide()},deactivated(){this.hide()},beforeUnmount(){this.dispose()},methods:{show({event:e=null,skipDelay:t=!1,force:n=!1}={}){var r;(r=this.parentPopper)!=null&&r.lockedChild&&this.parentPopper.lockedChild!==this||(this.pendingHide=!1,(n||!this.disabled)&&(this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.$_scheduleShow(e,t),this.$emit(`show`),this.$_showFrameLocked=!0,requestAnimationFrame(()=>{this.$_showFrameLocked=!1})),this.$emit(`update:shown`,!0))},hide({event:e=null,skipDelay:t=!1}={}){if(!this.$_hideInProgress){if(this.shownChildren.size>0){this.pendingHide=!0;return}if(this.hasPopperShowTriggerHover&&this.$_isAimingPopper()){this.parentPopper&&(this.parentPopper.lockedChild=this,clearTimeout(this.parentPopper.lockedChildTimer),this.parentPopper.lockedChildTimer=setTimeout(()=>{this.parentPopper.lockedChild===this&&(this.parentPopper.lockedChild.hide({skipDelay:t}),this.parentPopper.lockedChild=null)},1e3));return}this.parentPopper?.lockedChild===this&&(this.parentPopper.lockedChild=null),this.pendingHide=!1,this.$_scheduleHide(e,t),this.$emit(`hide`),this.$emit(`update:shown`,!1)}},init(){this.isDisposed&&(this.isDisposed=!1,this.isMounted=!1,this.$_events=[],this.$_preventShow=!1,this.$_referenceNode=this.referenceNode?.call(this)??this.$el,this.$_targetNodes=this.targetNodes().filter(e=>e.nodeType===e.ELEMENT_NODE),this.$_popperNode=this.popperNode(),this.$_innerNode=this.$_popperNode.querySelector(`.v-popper__inner`),this.$_arrowNode=this.$_popperNode.querySelector(`.v-popper__arrow-container`),this.$_swapTargetAttrs(`title`,`data-original-title`),this.$_detachPopperNode(),this.triggers.length&&this.$_addEventListeners(),this.shown&&this.show())},dispose(){this.isDisposed||(this.isDisposed=!0,this.$_removeEventListeners(),this.hide({skipDelay:!0}),this.$_detachPopperNode(),this.isMounted=!1,this.isShown=!1,this.$_updateParentShownChildren(!1),this.$_swapTargetAttrs(`data-original-title`,`title`))},async onResize(){this.isShown&&(await this.$_computePosition(),this.$emit(`resize`))},async $_computePosition(){if(this.isDisposed||this.positioningDisabled)return;let e={strategy:this.strategy,middleware:[]};(this.distance||this.skidding)&&e.middleware.push(Zh({mainAxis:this.distance,crossAxis:this.skidding}));let t=this.placement.startsWith(`auto`);if(t?e.middleware.push(qh({alignment:this.placement.split(`-`)[1]??``})):e.placement=this.placement,this.preventOverflow&&(this.shift&&e.middleware.push(Qh({padding:this.overflowPadding,boundary:this.boundary,crossAxis:this.shiftCrossAxis})),!t&&this.flip&&e.middleware.push(Jh({padding:this.overflowPadding,boundary:this.boundary}))),e.middleware.push(Gh({element:this.$_arrowNode,padding:this.arrowPadding})),this.arrowOverflow&&e.middleware.push({name:`arrowOverflow`,fn:({placement:e,rects:t,middlewareData:n})=>{let r,{centerOffset:i}=n.arrow;return r=e.startsWith(`top`)||e.startsWith(`bottom`)?Math.abs(i)>t.reference.width/2:Math.abs(i)>t.reference.height/2,{data:{overflow:r}}}}),this.autoMinSize||this.autoSize){let t=this.autoSize?this.autoSize:this.autoMinSize?`min`:null;e.middleware.push({name:`autoSize`,fn:({rects:e,placement:n,middlewareData:r})=>{var i;if((i=r.autoSize)!=null&&i.skip)return{};let a,o;return n.startsWith(`top`)||n.startsWith(`bottom`)?a=e.reference.width:o=e.reference.height,this.$_innerNode.style[t===`min`?`minWidth`:t===`max`?`maxWidth`:`width`]=a==null?null:`${a}px`,this.$_innerNode.style[t===`min`?`minHeight`:t===`max`?`maxHeight`:`height`]=o==null?null:`${o}px`,{data:{skip:!0},reset:{rects:!0}}}})}(this.autoMaxSize||this.autoBoundaryMaxSize)&&(this.$_innerNode.style.maxWidth=null,this.$_innerNode.style.maxHeight=null,e.middleware.push($h({boundary:this.boundary,padding:this.overflowPadding,apply:({availableWidth:e,availableHeight:t})=>{this.$_innerNode.style.maxWidth=e==null?null:`${e}px`,this.$_innerNode.style.maxHeight=t==null?null:`${t}px`}})));let n=await Ng(this.$_referenceNode,this.$_popperNode,e);Object.assign(this.result,{x:n.x,y:n.y,placement:n.placement,strategy:n.strategy,arrow:{...n.middlewareData.arrow,...n.middlewareData.arrowOverflow}})},$_scheduleShow(e,t=!1){if(this.$_updateParentShownChildren(!0),this.$_hideInProgress=!1,clearTimeout(this.$_scheduleTimer),qg&&this.instantMove&&qg.instantMove&&qg!==this.parentPopper){qg.$_applyHide(!0),this.$_applyShow(!0);return}t?this.$_applyShow():this.$_scheduleTimer=setTimeout(this.$_applyShow.bind(this),this.$_computeDelay(`show`))},$_scheduleHide(e,t=!1){if(this.shownChildren.size>0){this.pendingHide=!0;return}this.$_updateParentShownChildren(!1),this.$_hideInProgress=!0,clearTimeout(this.$_scheduleTimer),this.isShown&&(qg=this),t?this.$_applyHide():this.$_scheduleTimer=setTimeout(this.$_applyHide.bind(this),this.$_computeDelay(`hide`))},$_computeDelay(e){let t=this.delay;return parseInt(t&&t[e]||t||0)},async $_applyShow(e=!1){clearTimeout(this.$_disposeTimer),clearTimeout(this.$_scheduleTimer),this.skipTransition=e,!this.isShown&&(this.$_ensureTeleport(),await Gg(),await this.$_computePosition(),await this.$_applyShowEffect(),this.positioningDisabled||this.$_registerEventListeners([...Dg(this.$_referenceNode),...Dg(this.$_popperNode)],`scroll`,()=>{this.$_computePosition()}))},async $_applyShowEffect(){if(this.$_hideInProgress)return;if(this.computeTransformOrigin){let e=this.$_referenceNode.getBoundingClientRect(),t=this.$_popperNode.querySelector(`.v-popper__wrapper`),n=t.parentNode.getBoundingClientRect(),r=e.x+e.width/2-(n.left+t.offsetLeft),i=e.y+e.height/2-(n.top+t.offsetTop);this.result.transformOrigin=`${r}px ${i}px`}this.isShown=!0,this.$_applyAttrsToTarget({"aria-describedby":this.popperId,"data-popper-shown":``});let e=this.showGroup;if(e){let t;for(let n=0;n0){this.pendingHide=!0,this.$_hideInProgress=!1;return}if(clearTimeout(this.$_scheduleTimer),!this.isShown)return;this.skipTransition=e,Wg(Kg,this),Kg.length===0&&document.body.classList.remove(`v-popper--some-open`);for(let e of Rg(this.theme)){let t=Yg(e);Wg(t,this),t.length===0&&document.body.classList.remove(`v-popper--some-open--${e}`)}qg===this&&(qg=null),this.isShown=!1,this.$_applyAttrsToTarget({"aria-describedby":void 0,"data-popper-shown":void 0}),clearTimeout(this.$_disposeTimer);let t=this.disposeTimeout;t!==null&&(this.$_disposeTimer=setTimeout(()=>{this.$_popperNode&&(this.$_detachPopperNode(),this.isMounted=!1)},t)),this.$_removeEventListeners(`scroll`),this.$emit(`apply-hide`),this.classes.showFrom=!1,this.classes.showTo=!1,this.classes.hideFrom=!0,this.classes.hideTo=!1,await Gg(),this.classes.hideFrom=!1,this.classes.hideTo=!0},$_autoShowHide(){this.shown?this.show():this.hide()},$_ensureTeleport(){if(this.isDisposed)return;let e=this.container;if(typeof e==`string`?e=window.document.querySelector(e):e===!1&&(e=this.$_targetNodes[0].parentNode),!e)throw Error(`No container for popover: `+this.container);e.appendChild(this.$_popperNode),this.isMounted=!0},$_addEventListeners(){let e=e=>{this.isShown&&!this.$_hideInProgress||(e.usedByTooltip=!0,!this.$_preventShow&&this.show({event:e}))};this.$_registerTriggerListeners(this.$_targetNodes,Hg,this.triggers,this.showTriggers,e),this.$_registerTriggerListeners([this.$_popperNode],Hg,this.popperTriggers,this.popperShowTriggers,e);let t=e=>{e.usedByTooltip||this.hide({event:e})};this.$_registerTriggerListeners(this.$_targetNodes,Ug,this.triggers,this.hideTriggers,t),this.$_registerTriggerListeners([this.$_popperNode],Ug,this.popperTriggers,this.popperHideTriggers,t)},$_registerEventListeners(e,t,n){this.$_events.push({targetNodes:e,eventType:t,handler:n}),e.forEach(e=>e.addEventListener(t,n,zg?{passive:!0}:void 0))},$_registerTriggerListeners(e,t,n,r,i){let a=n;r!=null&&(a=typeof r==`function`?r(a):r),a.forEach(n=>{let r=t[n];r&&this.$_registerEventListeners(e,r,i)})},$_removeEventListeners(e){let t=[];this.$_events.forEach(n=>{let{targetNodes:r,eventType:i,handler:a}=n;!e||e===i?r.forEach(e=>e.removeEventListener(i,a)):t.push(n)}),this.$_events=t},$_refreshListeners(){this.isDisposed||(this.$_removeEventListeners(),this.$_addEventListeners())},$_handleGlobalClose(e,t=!1){this.$_showFrameLocked||(this.hide({event:e}),e.closePopover?this.$emit(`close-directive`):this.$emit(`auto-hide`),t&&(this.$_preventShow=!0,setTimeout(()=>{this.$_preventShow=!1},300)))},$_detachPopperNode(){this.$_popperNode.parentNode&&this.$_popperNode.parentNode.removeChild(this.$_popperNode)},$_swapTargetAttrs(e,t){for(let n of this.$_targetNodes){let r=n.getAttribute(e);r&&(n.removeAttribute(e),n.setAttribute(t,r))}},$_applyAttrsToTarget(e){for(let t of this.$_targetNodes)for(let n in e){let r=e[n];r==null?t.removeAttribute(n):t.setAttribute(n,r)}},$_updateParentShownChildren(e){let t=this.parentPopper;for(;t;)e?t.shownChildren.add(this.randomId):(t.shownChildren.delete(this.randomId),t.pendingHide&&t.hide()),t=t.parentPopper},$_isAimingPopper(){let e=this.$_referenceNode.getBoundingClientRect();if(s_>=e.left&&s_<=e.right&&c_>=e.top&&c_<=e.bottom){let e=this.$_popperNode.getBoundingClientRect(),t=s_-a_,n=c_-o_,r=e.left+e.width/2-a_+(e.top+e.height/2)-o_+e.width+e.height,i=a_+t*r,a=o_+n*r;return l_(a_,o_,i,a,e.left,e.top,e.left,e.bottom)||l_(a_,o_,i,a,e.left,e.top,e.right,e.top)||l_(a_,o_,i,a,e.right,e.top,e.right,e.bottom)||l_(a_,o_,i,a,e.left,e.bottom,e.right,e.bottom)}return!1}},render(){return this.$slots.default(this.slotData)}});if(typeof document<`u`&&typeof window<`u`){if(Bg){let e=!zg||{passive:!0,capture:!0};document.addEventListener(`touchstart`,e=>$g(e,!0),e),document.addEventListener(`touchend`,e=>e_(e,!0),e)}else window.addEventListener(`mousedown`,e=>$g(e,!1),!0),window.addEventListener(`click`,e=>e_(e,!1),!0);window.addEventListener(`resize`,i_)}function $g(e,t){if(Fg.autoHideOnMousedown)t_(e,t);else for(let t=0;t=0;r--){let i=Kg[r];try{let r=i.containsGlobalTarget=i.mouseDownContains||i.popperNode().contains(e.target);i.pendingHide=!1,requestAnimationFrame(()=>{if(i.pendingHide=!1,!n[i.randomId]&&n_(i,r,e)){if(i.$_handleGlobalClose(e,t),!e.closeAllPopover&&e.closePopover&&r){let e=i.parentPopper;for(;e;)n[e.randomId]=!0,e=e.parentPopper;return}let a=i.parentPopper;for(;a&&n_(a,a.containsGlobalTarget,e);)a.$_handleGlobalClose(e,t),a=a.parentPopper}})}catch{}}}function n_(e,t,n){return n.closeAllPopover||n.closePopover&&t||r_(e,n)&&!t}function r_(e,t){if(typeof e.autoHide==`function`){let n=e.autoHide(t);return e.lastAutoHide=n,n}return e.autoHide}function i_(){for(let e=0;e{a_=s_,o_=c_,s_=e.clientX,c_=e.clientY},zg?{passive:!0}:void 0);function l_(e,t,n,r,i,a,o,s){let c=((o-i)*(t-a)-(s-a)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t)),l=((n-e)*(t-a)-(r-t)*(e-i))/((s-a)*(n-e)-(o-i)*(r-t));return c>=0&&c<=1&&l>=0&&l<=1}var u_={extends:Qg()},d_=(e,t)=>{let n=e.__vccOpts||e;for(let[e,r]of t)n[e]=r;return n};function f_(e,t,n,r,i,a){return vs(),Cs(`div`,{ref:`reference`,class:_e([`v-popper`,{"v-popper--shown":e.slotData.isShown}])},[Ca(e.$slots,`default`,ve(Ms(e.slotData)))],2)}var p_=d_(u_,[[`render`,f_]]);function m_(){var e=window.navigator.userAgent,t=e.indexOf(`MSIE `);if(t>0)return parseInt(e.substring(t+5,e.indexOf(`.`,t)),10);if(e.indexOf(`Trident/`)>0){var n=e.indexOf(`rv:`);return parseInt(e.substring(n+3,e.indexOf(`.`,n)),10)}var r=e.indexOf(`Edge/`);return r>0?parseInt(e.substring(r+5,e.indexOf(`.`,r)),10):-1}var h_;function g_(){g_.init||(g_.init=!0,h_=m_()!==-1)}var __={name:`ResizeObserver`,props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:[`notify`],mounted(){g_(),ir(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});let e=document.createElement(`object`);this._resizeObject=e,e.setAttribute(`aria-hidden`,`true`),e.setAttribute(`tabindex`,-1),e.onload=this.addResizeHandlers,e.type=`text/html`,h_&&this.$el.appendChild(e),e.data=`about:blank`,h_||this.$el.appendChild(e)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit(`notify`,{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener(`resize`,this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!h_&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener(`resize`,this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}},v_=br(`data-v-b329ee4c`);vr(`data-v-b329ee4c`);var y_={class:`resize-observer`,tabindex:`-1`};yr(),__.render=v_((e,t,n,r,i,a)=>(vs(),ws(`div`,y_))),__.__scopeId=`data-v-b329ee4c`,__.__file=`src/components/ResizeObserver.vue`;var b_=(e=`theme`)=>({computed:{themeClass(){return Lg(this[e])}}}),x_=di({name:`VPopperContent`,components:{ResizeObserver:__},mixins:[b_()],props:{popperId:String,theme:String,shown:Boolean,mounted:Boolean,skipTransition:Boolean,autoHide:Boolean,handleResize:Boolean,classes:Object,result:Object},emits:[`hide`,`resize`],methods:{toPx(e){return e!=null&&!isNaN(e)?`${e}px`:null}}}),S_=[`id`,`aria-hidden`,`tabindex`,`data-popper-placement`],C_={ref:`inner`,class:`v-popper__inner`},w_=[As(`div`,{class:`v-popper__arrow-outer`},null,-1),As(`div`,{class:`v-popper__arrow-inner`},null,-1)];function T_(e,t,n,r,i,a){let o=ha(`ResizeObserver`);return vs(),Cs(`div`,{id:e.popperId,ref:`popover`,class:_e([`v-popper__popper`,[e.themeClass,e.classes.popperClass,{"v-popper__popper--shown":e.shown,"v-popper__popper--hidden":!e.shown,"v-popper__popper--show-from":e.classes.showFrom,"v-popper__popper--show-to":e.classes.showTo,"v-popper__popper--hide-from":e.classes.hideFrom,"v-popper__popper--hide-to":e.classes.hideTo,"v-popper__popper--skip-transition":e.skipTransition,"v-popper__popper--arrow-overflow":e.result&&e.result.arrow.overflow,"v-popper__popper--no-positioning":!e.result}]]),style:fe(e.result?{position:e.result.strategy,transform:`translate3d(${Math.round(e.result.x)}px,${Math.round(e.result.y)}px,0)`}:void 0),"aria-hidden":e.shown?`false`:`true`,tabindex:e.autoHide?0:void 0,"data-popper-placement":e.result?e.result.placement:void 0,onKeyup:t[2]||=yu(t=>e.autoHide&&e.$emit(`hide`),[`esc`])},[As(`div`,{class:`v-popper__backdrop`,onClick:t[0]||=t=>e.autoHide&&e.$emit(`hide`)}),As(`div`,{class:`v-popper__wrapper`,style:fe(e.result?{transformOrigin:e.result.transformOrigin}:void 0)},[As(`div`,C_,[e.mounted?(vs(),Cs(z,{key:0},[As(`div`,null,[Ca(e.$slots,`default`)]),e.handleResize?(vs(),ws(o,{key:0,onNotify:t[1]||=t=>e.$emit(`resize`,t)})):Is(``,!0)],64)):Is(``,!0)],512),As(`div`,{ref:`arrow`,class:`v-popper__arrow-container`,style:fe(e.result?{left:e.toPx(e.result.arrow.x),top:e.toPx(e.result.arrow.y)}:void 0)},w_,4)],4)],46,S_)}var E_=d_(x_,[[`render`,T_]]),D_={methods:{show(...e){return this.$refs.popper.show(...e)},hide(...e){return this.$refs.popper.hide(...e)},dispose(...e){return this.$refs.popper.dispose(...e)},onResize(...e){return this.$refs.popper.onResize(...e)}}},O_=function(){};typeof window<`u`&&(O_=window.Element);var k_=di({name:`VPopperWrapper`,components:{Popper:p_,PopperContent:E_},mixins:[D_,b_(`finalTheme`)],props:{theme:{type:String,default:null},referenceNode:{type:Function,default:null},shown:{type:Boolean,default:!1},showGroup:{type:String,default:null},ariaId:{default:null},disabled:{type:Boolean,default:void 0},positioningDisabled:{type:Boolean,default:void 0},placement:{type:String,default:void 0},delay:{type:[String,Number,Object],default:void 0},distance:{type:[Number,String],default:void 0},skidding:{type:[Number,String],default:void 0},triggers:{type:Array,default:void 0},showTriggers:{type:[Array,Function],default:void 0},hideTriggers:{type:[Array,Function],default:void 0},popperTriggers:{type:Array,default:void 0},popperShowTriggers:{type:[Array,Function],default:void 0},popperHideTriggers:{type:[Array,Function],default:void 0},container:{type:[String,Object,O_,Boolean],default:void 0},boundary:{type:[String,O_],default:void 0},strategy:{type:String,default:void 0},autoHide:{type:[Boolean,Function],default:void 0},handleResize:{type:Boolean,default:void 0},instantMove:{type:Boolean,default:void 0},eagerMount:{type:Boolean,default:void 0},popperClass:{type:[String,Array,Object],default:void 0},computeTransformOrigin:{type:Boolean,default:void 0},autoMinSize:{type:Boolean,default:void 0},autoSize:{type:[Boolean,String],default:void 0},autoMaxSize:{type:Boolean,default:void 0},autoBoundaryMaxSize:{type:Boolean,default:void 0},preventOverflow:{type:Boolean,default:void 0},overflowPadding:{type:[Number,String],default:void 0},arrowPadding:{type:[Number,String],default:void 0},arrowOverflow:{type:Boolean,default:void 0},flip:{type:Boolean,default:void 0},shift:{type:Boolean,default:void 0},shiftCrossAxis:{type:Boolean,default:void 0},noAutoFocus:{type:Boolean,default:void 0},disposeTimeout:{type:Number,default:void 0}},emits:{show:()=>!0,hide:()=>!0,"update:shown":e=>!0,"apply-show":()=>!0,"apply-hide":()=>!0,"close-group":()=>!0,"close-directive":()=>!0,"auto-hide":()=>!0,resize:()=>!0},computed:{finalTheme(){return this.theme??this.$options.vPopperTheme}},methods:{getTargetNodes(){return Array.from(this.$el.children).filter(e=>e!==this.$refs.popperContent.$el)}}});function A_(e,t,n,r,i,a){let o=ha(`PopperContent`),s=ha(`Popper`);return vs(),ws(s,Bs({ref:`popper`},e.$props,{theme:e.finalTheme,"target-nodes":e.getTargetNodes,"popper-node":()=>e.$refs.popperContent.$el,class:[e.themeClass],onShow:t[0]||=()=>e.$emit(`show`),onHide:t[1]||=()=>e.$emit(`hide`),"onUpdate:shown":t[2]||=t=>e.$emit(`update:shown`,t),onApplyShow:t[3]||=()=>e.$emit(`apply-show`),onApplyHide:t[4]||=()=>e.$emit(`apply-hide`),onCloseGroup:t[5]||=()=>e.$emit(`close-group`),onCloseDirective:t[6]||=()=>e.$emit(`close-directive`),onAutoHide:t[7]||=()=>e.$emit(`auto-hide`),onResize:t[8]||=()=>e.$emit(`resize`)}),{default:xr(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,show:s,hide:c,handleResize:l,onResize:u,classes:d,result:f})=>[Ca(e.$slots,`default`,{shown:n,show:s,hide:c}),V(o,{ref:`popperContent`,"popper-id":t,theme:e.finalTheme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":l,classes:d,result:f,onHide:c,onResize:u},{default:xr(()=>[Ca(e.$slots,`popper`,{shown:n,hide:c})]),_:2},1032,[`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:3},16,[`theme`,`target-nodes`,`popper-node`,`class`])}var j_=d_(k_,[[`render`,A_]]),M_={...j_,name:`VDropdown`,vPopperTheme:`dropdown`},N_={...j_,name:`VMenu`,vPopperTheme:`menu`},P_={...j_,name:`VTooltip`,vPopperTheme:`tooltip`},F_=di({name:`VTooltipDirective`,components:{Popper:Qg(),PopperContent:E_},mixins:[D_],inheritAttrs:!1,props:{theme:{type:String,default:`tooltip`},html:{type:Boolean,default:e=>Ig(e.theme,`html`)},content:{type:[String,Number,Function],default:null},loadingContent:{type:String,default:e=>Ig(e.theme,`loadingContent`)},targetNodes:{type:Function,required:!0}},data(){return{asyncContent:null}},computed:{isContentAsync(){return typeof this.content==`function`},loading(){return this.isContentAsync&&this.asyncContent==null},finalContent(){return this.isContentAsync?this.loading?this.loadingContent:this.asyncContent:this.content}},watch:{content:{handler(){this.fetchContent(!0)},immediate:!0},async finalContent(){await this.$nextTick(),this.$refs.popper.onResize()}},created(){this.$_fetchId=0},methods:{fetchContent(e){if(typeof this.content==`function`&&this.$_isShown&&(e||!this.$_loading&&this.asyncContent==null)){this.asyncContent=null,this.$_loading=!0;let e=++this.$_fetchId,t=this.content(this);t.then?t.then(t=>this.onResult(e,t)):this.onResult(e,t)}},onResult(e,t){e===this.$_fetchId&&(this.$_loading=!1,this.asyncContent=t)},onShow(){this.$_isShown=!0,this.fetchContent()},onHide(){this.$_isShown=!1}}}),I_=[`innerHTML`],L_=[`textContent`];function R_(e,t,n,r,i,a){let o=ha(`PopperContent`),s=ha(`Popper`);return vs(),ws(s,Bs({ref:`popper`},e.$attrs,{theme:e.theme,"target-nodes":e.targetNodes,"popper-node":()=>e.$refs.popperContent.$el,onApplyShow:e.onShow,onApplyHide:e.onHide}),{default:xr(({popperId:t,isShown:n,shouldMountContent:r,skipTransition:i,autoHide:a,hide:s,handleResize:c,onResize:l,classes:u,result:d})=>[V(o,{ref:`popperContent`,class:_e({"v-popper--tooltip-loading":e.loading}),"popper-id":t,theme:e.theme,shown:n,mounted:r,"skip-transition":i,"auto-hide":a,"handle-resize":c,classes:u,result:d,onHide:s,onResize:l},{default:xr(()=>[e.html?(vs(),Cs(`div`,{key:0,innerHTML:e.finalContent},null,8,I_)):(vs(),Cs(`div`,{key:1,textContent:Pe(e.finalContent)},null,8,L_))]),_:2},1032,[`class`,`popper-id`,`theme`,`shown`,`mounted`,`skip-transition`,`auto-hide`,`handle-resize`,`classes`,`result`,`onHide`,`onResize`])]),_:1},16,[`theme`,`target-nodes`,`popper-node`,`onApplyShow`,`onApplyHide`])}var z_=d_(F_,[[`render`,R_]]),B_=`v-popper--has-tooltip`;function V_(e,t){let n=e.placement;if(!n&&t)for(let e of Vg)t[e]&&(n=e);return n||=Ig(e.theme||`tooltip`,`placement`),n}function H_(e,t,n){let r,i=typeof t;return r=i===`string`?{content:t}:t&&i===`object`?t:{content:!1},r.placement=V_(r,n),r.targetNodes=()=>[e],r.referenceNode=()=>e,r}var U_,W_,G_=0;function K_(){if(U_)return;W_=mn([]),U_=Du({name:`VTooltipDirectiveApp`,setup(){return{directives:W_}},render(){return this.directives.map(e=>fc(z_,{...e.options,shown:e.shown||e.options.shown,key:e.id}))},devtools:{hide:!0}});let e=document.createElement(`div`);document.body.appendChild(e),U_.mount(e)}function q_(e,t,n){K_();let r=mn(H_(e,t,n)),i=mn(!1),a={id:G_++,options:r,shown:i};return W_.value.push(a),e.classList&&e.classList.add(B_),e.$_popper={options:r,item:a,show(){i.value=!0},hide(){i.value=!1}}}function J_(e){if(e.$_popper){let t=W_.value.indexOf(e.$_popper.item);t!==-1&&W_.value.splice(t,1),delete e.$_popper,delete e.$_popperOldShown,delete e.$_popperMountTarget}e.classList&&e.classList.remove(B_)}function Y_(e,{value:t,modifiers:n}){let r=H_(e,t,n);if(!r.content||Ig(r.theme||`tooltip`,`disabled`))J_(e);else{let i;e.$_popper?(i=e.$_popper,i.options.value=r):i=q_(e,t,n),typeof t.shown<`u`&&t.shown!==e.$_popperOldShown&&(e.$_popperOldShown=t.shown,t.shown?i.show():i.hide())}}var X_={beforeMount:Y_,updated:Y_,beforeUnmount(e){J_(e)}};function Z_(e){e.addEventListener(`mousedown`,$_),e.addEventListener(`click`,$_),e.addEventListener(`touchstart`,ev,zg?{passive:!0}:!1)}function Q_(e){e.removeEventListener(`mousedown`,$_),e.removeEventListener(`click`,$_),e.removeEventListener(`touchstart`,ev),e.removeEventListener(`touchend`,tv),e.removeEventListener(`touchcancel`,nv)}function $_(e){let t=e.currentTarget;e.closePopover=!t.$_vclosepopover_touch,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}function ev(e){if(e.changedTouches.length===1){let t=e.currentTarget;t.$_vclosepopover_touch=!0,t.$_vclosepopover_touchPoint=e.changedTouches[0],t.addEventListener(`touchend`,tv),t.addEventListener(`touchcancel`,nv)}}function tv(e){let t=e.currentTarget;if(t.$_vclosepopover_touch=!1,e.changedTouches.length===1){let n=e.changedTouches[0],r=t.$_vclosepopover_touchPoint;e.closePopover=Math.abs(n.screenY-r.screenY)<20&&Math.abs(n.screenX-r.screenX)<20,e.closeAllPopover=t.$_closePopoverModifiers&&!!t.$_closePopoverModifiers.all}}function nv(e){let t=e.currentTarget;t.$_vclosepopover_touch=!1}var rv={beforeMount(e,{value:t,modifiers:n}){e.$_closePopoverModifiers=n,(typeof t>`u`||t)&&Z_(e)},updated(e,{value:t,oldValue:n,modifiers:r}){e.$_closePopoverModifiers=r,t!==n&&(typeof t>`u`||t?Z_(e):Q_(e))},beforeUnmount(e){Q_(e)}},iv=M_,av=P_;function ov(e,t={}){e.$_vTooltipInstalled||(e.$_vTooltipInstalled=!0,Pg(Fg,t),e.directive(`tooltip`,X_),e.directive(`close-popper`,rv),e.component(`VTooltip`,P_),e.component(`VDropdown`,M_),e.component(`VMenu`,N_))}var sv={version:`5.2.2`,install:ov,options:Fg},cv=typeof navigator<`u`&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent),lv={install:(e,t={})=>{if(typeof window<`u`&&(window.addEventListener(`vitepress:codeGroupTabActivate`,i_,{passive:!0}),window.addEventListener(`click`,e=>{e.composedPath().some(e=>e?.classList?.contains?.(`vp-code-group`)||e?.classList?.contains?.(`tabs`))&&i_()},{passive:!0}),!cv)){let t=!1;window.addEventListener(`mousedown`,()=>{t=!0},{passive:!0}),window.addEventListener(`mouseup`,()=>{t=!1},{passive:!0});let n=e.component;e.component=function(...e){let r=n.apply(this,e);if(e.length>=2&&e[0]===`VMenu`)try{let n=e[1].components.Popper.extends,r=n.methods.show;n.methods.show=function(...e){if(!t)return r.apply(this,e)};let i=n.methods.hide;n.methods.hide=function(...e){if(!t)return i.apply(this,e)}}catch(e){console.error(`Failed to patch FloatingVue`,e)}return r}}e.use(sv,{strategy:`fixed`,...t,themes:{...t.themes,twoslash:{$extend:`dropdown`,triggers:cv?[`touch`]:[`hover`,`touch`],popperTriggers:cv?[`touch`]:[`hover`,`touch`],placement:`bottom-start`,overflowPadding:10,delay:{show:200,hide:0},handleResize:!1,autoHide:!0,noAutoFocus:!0,instantMove:!0,flip:!1,arrowPadding:8,autoBoundaryMaxSize:!0,...t.themes?.twoslash??{}},"twoslash-query":{$extend:`twoslash`,triggers:[`click`],popperTriggers:[`click`],autoHide:!1,noAutoFocus:!0,...t.themes?.[`twoslash-query`]??{}},"twoslash-completion":{$extend:`twoslash-query`,triggers:[`click`],popperTriggers:[`click`],autoHide:!1,noAutoFocus:!0,distance:0,arrowOverflow:!0,...t.themes?.[`twoslash-completion`]??{}}}})}};export{jr as $,Tr as A,vs as B,V as C,Pe as Ct,Ms as D,Gs as E,Yi as F,va as G,xa as H,sa as I,fo as J,_a as K,Xi as L,Ua as M,Bs as N,fc as O,ir as P,kr as Q,ia as R,Ps as S,fe as St,di as T,Ca as U,wr as V,ha as W,mi as X,Ra as Y,Mr as Z,As as _,Tn as _t,Ic as a,cn as at,Cs as b,_e as bt,iu as c,Ve as ct,yu as d,mn as dt,xr as et,_u as f,nn as ft,dc as g,On as gt,qi as h,F as ht,i_ as i,Be as it,Ts as j,Er as k,ru as l,tn as lt,z as m,hn as mt,av as n,wn as nt,Gl as o,I as ot,B as p,an as pt,fi as q,iv as r,ze as rt,Du as s,dn as st,lv as t,Sr as tt,el as u,rn as ut,ws as v,bn as vt,Wi as w,Fs as x,ve as xt,Is as y,yn as yt,ca as z}; \ No newline at end of file diff --git a/lecture-08/assets/modules/unplugin-icons-CStvVwzQ.js b/lecture-08/assets/modules/unplugin-icons-CStvVwzQ.js new file mode 100644 index 0000000000000000000000000000000000000000..2f4021458f23fc1bea24d68a9cd20965896c0626 --- /dev/null +++ b/lecture-08/assets/modules/unplugin-icons-CStvVwzQ.js @@ -0,0 +1 @@ +import{B as e,_ as t,b as n,st as r}from"./shiki-CJZsCeMT.js";var i={class:`slidev-icon`,viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`};function a(r,a){return e(),n(`svg`,i,[...a[0]||=[t(`path`,{fill:`currentColor`,d:`M200 32h-36.26a47.92 47.92 0 0 0-71.48 0H56a16 16 0 0 0-16 16v168a16 16 0 0 0 16 16h144a16 16 0 0 0 16-16V48a16 16 0 0 0-16-16m-72 0a32 32 0 0 1 32 32H96a32 32 0 0 1 32-32m72 184H56V48h26.75A47.9 47.9 0 0 0 80 64v8a8 8 0 0 0 8 8h80a8 8 0 0 0 8-8v-8a47.9 47.9 0 0 0-2.75-16H200Z`},null,-1)]])}var o=r({name:`ph-clipboard`,render:a}),s={class:`slidev-icon`,viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`};function c(r,i){return e(),n(`svg`,s,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`M173.66 98.34a8 8 0 0 1 0 11.32l-56 56a8 8 0 0 1-11.32 0l-24-24a8 8 0 0 1 11.32-11.32L112 148.69l50.34-50.35a8 8 0 0 1 11.32 0M232 128A104 104 0 1 1 128 24a104.11 104.11 0 0 1 104 104m-16 0a88 88 0 1 0-88 88a88.1 88.1 0 0 0 88-88`},null,-1)]])}var l=r({name:`ph-check-circle`,render:c}),u={class:`slidev-icon`,viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function d(r,i){return e(),n(`svg`,u,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`M16 12.005a4 4 0 1 1-4 4a4.005 4.005 0 0 1 4-4m0-2a6 6 0 1 0 6 6a6 6 0 0 0-6-6M5.394 6.813L6.81 5.399l3.505 3.506L8.9 10.319zM2 15.005h5v2H2zm3.394 10.193L8.9 21.692l1.414 1.414l-3.505 3.506zM15 25.005h2v5h-2zm6.687-1.9l1.414-1.414l3.506 3.506l-1.414 1.414zm3.313-8.1h5v2h-5zm-3.313-6.101l3.506-3.506l1.414 1.414l-3.506 3.506zM15 2.005h2v5h-2z`},null,-1)]])}var f=r({name:`carbon-sun`,render:d}),p={class:`slidev-icon`,viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`};function m(r,i){return e(),n(`svg`,p,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`M13.503 5.414a15.076 15.076 0 0 0 11.593 18.194a11.1 11.1 0 0 1-7.975 3.39c-.138 0-.278.005-.418 0a11.094 11.094 0 0 1-3.2-21.584M14.98 3a1 1 0 0 0-.175.016a13.096 13.096 0 0 0 1.825 25.981c.164.006.328 0 .49 0a13.07 13.07 0 0 0 10.703-5.555a1.01 1.01 0 0 0-.783-1.565A13.08 13.08 0 0 1 15.89 4.38A1.015 1.015 0 0 0 14.98 3`},null,-1)]])}var h=r({name:`carbon-moon`,render:m}),g={class:`slidev-icon`,viewBox:`0 0 256 256`,width:`1.2em`,height:`1.2em`};function _(r,i){return e(),n(`svg`,g,[...i[0]||=[t(`path`,{fill:`currentColor`,d:`m220.49 207.8l-12.69 12.69a12 12 0 0 1-17 0l-56.57-56.57L115 214.08l-.13.33a15.84 15.84 0 0 1-14.61 9.59h-.78a15.82 15.82 0 0 1-14.41-11L32.8 52.92A15.95 15.95 0 0 1 52.92 32.8L213 85.07a16 16 0 0 1 1.41 29.8l-.33.13l-50.16 19.27l56.57 56.56a12 12 0 0 1 0 16.97`},null,-1)]])}var v=r({name:`ph-cursor-fill`,render:_});export{o as a,l as i,h as n,f as r,v as t}; \ No newline at end of file diff --git a/lecture-08/assets/modules/vue-Dnfgf7Ad.js b/lecture-08/assets/modules/vue-Dnfgf7Ad.js new file mode 100644 index 0000000000000000000000000000000000000000..d623f70a7ef1cc53c991dec5f16efa2c24b7ab8b --- /dev/null +++ b/lecture-08/assets/modules/vue-Dnfgf7Ad.js @@ -0,0 +1,5 @@ +import{A as e,E as t,O as n,P as r,Q as i,R as a,T as o,V as s,Y as c,Z as l,_t as u,ct as d,dt as f,ft as p,g as m,gt as h,ht as g,it as _,k as v,lt as y,m as b,mt as x,nt as S,ot as C,pt as w,rt as T,ut as E,vt as D,yt as O,z as k}from"./shiki-CJZsCeMT.js";function ee(e){return typeof e==`object`||`displayName`in e||`props`in e||`__vccOpts`in e}function A(e){return e.__esModule||e[Symbol.toStringTag]===`Module`||e.default&&ee(e.default)}var j=Object.assign;function te(e,t){let n={};for(let r in t){let i=t[r];n[r]=N(i)?i.map(e):e(i)}return n}var M=()=>{},N=Array.isArray;function ne(e,t){let n={};for(let r in e)n[r]=r in t?t[r]:e[r];return n}var re=Symbol(``);function ie(e,t){return j(Error(),{type:e,[re]:!0},t)}function P(e,t){return e instanceof Error&&re in e&&(t==null||!!(e.type&t))}var ae=Symbol(``),oe=Symbol(``),se=Symbol(``),ce=Symbol(``),le=Symbol(``);function ue(){return e(se)}function de(t){return e(ce)}var fe=typeof document<`u`,pe=/#/g,me=/&/g,he=/\//g,ge=/=/g,_e=/\?/g,ve=/\+/g,ye=/%5B/g,be=/%5D/g,F=/%5E/g,xe=/%60/g,Se=/%7B/g,Ce=/%7C/g,we=/%7D/g,Te=/%20/g;function Ee(e){return e==null?``:encodeURI(``+e).replace(Ce,`|`).replace(ye,`[`).replace(be,`]`)}function De(e){return Ee(e).replace(Se,`{`).replace(we,`}`).replace(F,`^`)}function Oe(e){return Ee(e).replace(ve,`%2B`).replace(Te,`+`).replace(pe,`%23`).replace(me,`%26`).replace(xe,"`").replace(Se,`{`).replace(we,`}`).replace(F,`^`)}function ke(e){return Oe(e).replace(ge,`%3D`)}function Ae(e){return Ee(e).replace(pe,`%23`).replace(_e,`%3F`)}function je(e){return Ae(e).replace(he,`%2F`)}function Me(e){if(e==null)return null;try{return decodeURIComponent(``+e)}catch{}return``+e}var Ne=/\/$/,Pe=e=>e.replace(Ne,``);function Fe(e,t,n=`/`){let r,i={},a=``,o=``,s=t.indexOf(`#`),c=t.indexOf(`?`);return c=s>=0&&c>s?-1:c,c>=0&&(r=t.slice(0,c),a=t.slice(c,s>0?s:t.length),i=e(a.slice(1))),s>=0&&(r||=t.slice(0,s),o=t.slice(s,t.length)),r=Ue(r??t,n),{fullPath:r+a+o,path:r,query:i,hash:Me(o)}}function Ie(e,t){let n=t.query?e(t.query):``;return t.path+(n&&`?`)+n+(t.hash||``)}function Le(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||`/`}function Re(e,t,n){let r=t.matched.length-1,i=n.matched.length-1;return r>-1&&r===i&&ze(t.matched[r],n.matched[i])&&Be(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function ze(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Be(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var n in e)if(!Ve(e[n],t[n]))return!1;return!0}function Ve(e,t){return N(e)?He(e,t):N(t)?He(t,e):(e&&e.valueOf())===(t&&t.valueOf())}function He(e,t){return N(t)?e.length===t.length&&e.every((e,n)=>e===t[n]):e.length===1&&e[0]===t}function Ue(e,t){if(e.startsWith(`/`))return e;if(!e)return t;let n=t.split(`/`),r=e.split(`/`),i=r[r.length-1];(i===`..`||i===`.`)&&r.push(``);let a=n.length-1,o,s;for(o=0;o1&&a--;else break}return n.slice(0,a).join(`/`)+`/`+r.slice(o).join(`/`)}var I={path:`/`,name:void 0,params:{},query:{},hash:``,fullPath:`/`,matched:[],meta:{},redirectedFrom:void 0};function We(e){if(!e){if(fe){let t=document.querySelector(`base`);e=t&&t.getAttribute(`href`)||`/`,e=e.replace(/^\w+:\/\/[^/]+/,``)}else e=`/`}return e[0]!==`/`&&e[0]!==`#`&&(e=`/`+e),Pe(e)}var Ge=/^[^#]+#/;function Ke(e,t){return e.replace(Ge,`#`)+t}function qe(e,t){let n=document.documentElement.getBoundingClientRect(),r=e.getBoundingClientRect();return{behavior:t.behavior,left:r.left-n.left-(t.left||0),top:r.top-n.top-(t.top||0)}}var Je=()=>({left:window.scrollX,top:window.scrollY});function Ye(e){let t;if(`el`in e){let n=e.el,r=typeof n==`string`&&n.startsWith(`#`),i=typeof n==`string`?r?document.getElementById(n.slice(1)):document.querySelector(n):n;if(!i)return;t=qe(i,e)}else t=e;`scrollBehavior`in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left==null?window.scrollX:t.left,t.top==null?window.scrollY:t.top)}function Xe(e,t){return(history.state?history.state.position-t:-1)+e}var Ze=new Map;function Qe(e,t){Ze.set(e,t)}function $e(e){let t=Ze.get(e);return Ze.delete(e),t}function et(e){return typeof e==`string`||e&&typeof e==`object`}function tt(e){return typeof e==`string`||typeof e==`symbol`}function nt(e){let t={};if(e===``||e===`?`)return t;let n=(e[0]===`?`?e.slice(1):e).split(`&`);for(let e=0;ee&&Oe(e)):[r&&Oe(r)]).forEach(e=>{e!==void 0&&(t+=(t.length?`&`:``)+n,e!=null&&(t+=`=`+e))})}return t}function it(e){let t={};for(let n in e){let r=e[n];r!==void 0&&(t[n]=N(r)?r.map(e=>e==null?null:``+e):r==null?r:``+r)}return t}function at(){let e=[];function t(t){return e.push(t),()=>{let n=e.indexOf(t);n>-1&&e.splice(n,1)}}function n(){e=[]}return{add:t,list:()=>e.slice(),reset:n}}function L(e,t,n,r,i,a=e=>e()){let o=r&&(r.enterCallbacks[i]=r.enterCallbacks[i]||[]);return()=>new Promise((s,c)=>{let l=e=>{e===!1?c(ie(4,{from:n,to:t})):e instanceof Error?c(e):et(e)?c(ie(2,{from:t,to:e})):(o&&r.enterCallbacks[i]===o&&typeof e==`function`&&o.push(e),s())},u=a(()=>e.call(r&&r.instances[i],t,n,l)),d=Promise.resolve(u);e.length<3&&(d=d.then(l)),d.catch(e=>c(e))})}function ot(e,t,n,r,i=e=>e()){let a=[];for(let o of e)for(let e in o.components){let s=o.components[e];if(!(t!==`beforeRouteEnter`&&!o.instances[e])){if(ee(s)){let c=(s.__vccOpts||s)[t];c&&a.push(L(c,n,r,o,e,i))}else{let c=s();a.push(()=>c.then(a=>{if(!a)throw Error(`Couldn't resolve component "${e}" at "${o.path}"`);let s=A(a)?a.default:a;o.mods[e]=a,o.components[e]=s;let c=(s.__vccOpts||s)[t];return c&&L(c,n,r,o,e,i)()}))}}}return a}function st(e,t){let n=[],r=[],i=[],a=Math.max(t.matched.length,e.matched.length);for(let o=0;oze(e,a))?r.push(a):n.push(a));let s=e.matched[o];s&&(t.matched.find(e=>ze(e,s))||i.push(s))}return[n,r,i]}var ct=()=>location.protocol+`//`+location.host;function lt(e,t){let{pathname:n,search:r,hash:i}=t,a=e.indexOf(`#`);if(a>-1){let t=i.includes(e.slice(a))?e.slice(a).length:1,n=i.slice(t);return n[0]!==`/`&&(n=`/`+n),Le(n,``)}return Le(n,e)+r+i}function ut(e,t,n,r){let i=[],a=[],o=null,s=({state:a})=>{let s=lt(e,location),c=n.value,l=t.value,u=0;if(a){if(n.value=s,t.value=a,o&&o===c){o=null;return}u=l?a.position-l.position:0}else r(s);i.forEach(e=>{e(n.value,c,{delta:u,type:`pop`,direction:u?u>0?`forward`:`back`:``})})};function c(){o=n.value}function l(e){i.push(e);let t=()=>{let t=i.indexOf(e);t>-1&&i.splice(t,1)};return a.push(t),t}function u(){if(document.visibilityState===`hidden`){let{history:e}=window;if(!e.state)return;e.replaceState(j({},e.state,{scroll:Je()}),``)}}function d(){for(let e of a)e();a=[],window.removeEventListener(`popstate`,s),window.removeEventListener(`pagehide`,u),document.removeEventListener(`visibilitychange`,u)}return window.addEventListener(`popstate`,s),window.addEventListener(`pagehide`,u),document.addEventListener(`visibilitychange`,u),{pauseListeners:c,listen:l,destroy:d}}function dt(e,t,n,r=!1,i=!1){return{back:e,current:t,forward:n,replaced:r,position:window.history.length,scroll:i?Je():null}}function ft(e){let{history:t,location:n}=window,r={value:lt(e,n)},i={value:t.state};i.value||a(r.value,{back:null,current:r.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function a(r,a,o){let s=e.indexOf(`#`),c=s>-1?(n.host&&document.querySelector(`base`)?e:e.slice(s))+r:ct()+e+r;try{t[o?`replaceState`:`pushState`](a,``,c),i.value=a}catch(e){console.error(e),n[o?`replace`:`assign`](c)}}function o(e,n){a(e,j({},t.state,dt(i.value.back,e,i.value.forward,!0),n,{position:i.value.position}),!0),r.value=e}function s(e,n){let o=j({},i.value,t.state,{forward:e,scroll:Je()});a(o.current,o,!0),a(e,j({},dt(r.value,e,null),{position:o.position+1},n),!1),r.value=e}return{location:r,state:i,push:s,replace:o}}function pt(e){e=We(e);let t=ft(e),n=ut(e,t.state,t.location,t.replace);function r(e,t=!0){t||n.pauseListeners(),history.go(e)}let i=j({location:``,base:e,go:r,createHref:Ke.bind(null,e)},t,n);return Object.defineProperty(i,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(i,"state",{enumerable:!0,get:()=>t.state.value}),i}function mt(e){return e=location.host?e||location.pathname+location.search:``,e.includes(`#`)||(e+=`#`),pt(e)}var ht={type:0,value:``},gt=/[a-zA-Z0-9_]/;function _t(e){if(!e)return[[]];if(e===`/`)return[[ht]];if(!e.startsWith(`/`))throw Error(`Invalid path "${e}"`);function t(e){throw Error(`ERR (${n})/"${l}": ${e}`)}let n=0,r=n,i=[],a;function o(){a&&i.push(a),a=[]}let s=0,c,l=``,u=``;function d(){l&&=(n===0?a.push({type:0,value:l}):n===1||n===2||n===3?(a.length>1&&(c===`*`||c===`+`)&&t(`A repeatable param (${l}) must be alone in its segment. eg: '/:ids+.`),a.push({type:1,value:l,regexp:u,repeatable:c===`*`||c===`+`,optional:c===`*`||c===`?`})):t(`Invalid state to consume buffer`),``)}function f(){l+=c}for(;st.length?t.length===1&&t[0]===80?1:-1:0}function Ct(e,t){let n=0,r=e.score,i=t.score;for(;n0&&t[t.length-1]<0}var Tt={strict:!1,end:!0,sensitive:!1};function Et(e,t,n){let r=j(xt(_t(e.path),n),{record:e,parent:t,children:[],alias:[]});return t&&!r.record.aliasOf==!t.record.aliasOf&&t.children.push(r),r}function Dt(e,t){let n=[],r=new Map;t=ne(Tt,t);function i(e){return r.get(e)}function a(e,n,r){let i=!r,s=kt(e);s.aliasOf=r&&r.record;let l=ne(t,e),u=[s];if(`alias`in e){let t=typeof e.alias==`string`?[e.alias]:e.alias;for(let e of t)u.push(kt(j({},s,{components:r?r.record.components:s.components,path:e,aliasOf:r?r.record:s})))}let d,f;for(let t of u){let{path:u}=t;if(n&&u[0]!==`/`){let e=n.record.path,r=e[e.length-1]===`/`?``:`/`;t.path=n.record.path+(u&&r+u)}if(d=Et(t,n,l),r?r.alias.push(d):(f||=d,f!==d&&f.alias.push(d),i&&e.name&&!jt(d)&&o(e.name)),Ft(d)&&c(d),s.children){let e=s.children;for(let t=0;t{o(f)}:M}function o(e){if(tt(e)){let t=r.get(e);t&&(r.delete(e),n.splice(n.indexOf(t),1),t.children.forEach(o),t.alias.forEach(o))}else{let t=n.indexOf(e);t>-1&&(n.splice(t,1),e.record.name&&r.delete(e.record.name),e.children.forEach(o),e.alias.forEach(o))}}function s(){return n}function c(e){let t=Nt(e,n);n.splice(t,0,e),e.record.name&&!jt(e)&&r.set(e.record.name,e)}function l(e,t){let i,a={},o,s;if(`name`in e&&e.name){if(i=r.get(e.name),!i)throw ie(1,{location:e});s=i.record.name,a=j(Ot(t.params,i.keys.filter(e=>!e.optional).concat(i.parent?i.parent.keys.filter(e=>e.optional):[]).map(e=>e.name)),e.params&&Ot(e.params,i.keys.map(e=>e.name))),o=i.stringify(a)}else if(e.path!=null)o=e.path,i=n.find(e=>e.re.test(o)),i&&(a=i.parse(o),s=i.record.name,i.keys.forEach(e=>{e.optional&&!a[e.name]&&delete a[e.name]}));else{if(i=t.name?r.get(t.name):n.find(e=>e.re.test(t.path)),!i)throw ie(1,{location:e,currentLocation:t});s=i.record.name,a=j({},t.params,e.params),o=i.stringify(a)}let c=[],l=i;for(;l;)c.unshift(l.record),l=l.parent;return{name:s,path:o,params:a,matched:c,meta:Mt(c)}}e.forEach(e=>a(e));function u(){n.length=0,r.clear()}return{addRoute:a,resolve:l,removeRoute:o,clearRoutes:u,getRoutes:s,getRecordMatcher:i}}function Ot(e,t){let n={};for(let r of t)r in e&&(n[r]=e[r]);return n}function kt(e){let t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:At(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:`components`in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function At(e){let t={},n=e.props||!1;if(`component`in e)t.default=n;else for(let r in e.components)t[r]=typeof n==`object`?n[r]:n;return t}function jt(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function Mt(e){return e.reduce((e,t)=>j(e,t.meta),{})}function Nt(e,t){let n=0,r=t.length;for(;n!==r;){let i=n+r>>1;Ct(e,t[i])<0?r=i:n=i+1}let i=Pt(e);return i&&(r=t.lastIndexOf(i,r-1)),r}function Pt(e){let t=e;for(;t=t.parent;)if(Ft(t)&&Ct(e,t)===0)return t}function Ft({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function It(t){let n=e(se),r=e(ce),i=m(()=>{let e=O(t.to);return n.resolve(e)}),a=m(()=>{let{matched:e}=i.value,{length:t}=e,n=e[t-1],a=r.matched;if(!n||!a.length)return-1;let o=a.findIndex(ze.bind(null,n));if(o>-1)return o;let s=Vt(e[t-2]);return t>1&&Vt(n)===s&&a[a.length-1].path!==s?a.findIndex(ze.bind(null,e[t-2])):o}),o=m(()=>a.value>-1&&Bt(r.params,i.value.params)),s=m(()=>a.value>-1&&a.value===r.matched.length-1&&Be(r.params,i.value.params));function c(e={}){if(zt(e)){let e=n[O(t.replace)?`replace`:`push`](O(t.to)).catch(M);return t.viewTransition&&typeof document<`u`&&`startViewTransition`in document&&document.startViewTransition(()=>e),e}return Promise.resolve()}return{route:i,href:m(()=>i.value.href),isActive:o,isExactActive:s,navigate:c}}function Lt(e){return e.length===1?e[0]:e}var Rt=o({name:`RouterLink`,compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:`page`},viewTransition:Boolean},useLink:It,setup(t,{slots:r}){let i=y(It(t)),{options:a}=e(se),o=m(()=>({[Ht(t.activeClass,a.linkActiveClass,`router-link-active`)]:i.isActive,[Ht(t.exactActiveClass,a.linkExactActiveClass,`router-link-exact-active`)]:i.isExactActive}));return()=>{let e=r.default&&Lt(r.default(i));return t.custom?e:n(`a`,{"aria-current":i.isExactActive?t.ariaCurrentValue:null,href:i.href,onClick:i.navigate,class:o.value},e)}}});function zt(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(e.button===void 0||e.button===0)){if(e.currentTarget&&e.currentTarget.getAttribute){let t=e.currentTarget.getAttribute(`target`);if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function Bt(e,t){for(let n in t){let r=t[n],i=e[n];if(typeof r==`string`){if(r!==i)return!1}else if(!N(i)||i.length!==r.length||r.some((e,t)=>e.valueOf()!==i[t].valueOf()))return!1}return!0}function Vt(e){return e?e.aliasOf?e.aliasOf.path:e.path:``}var Ht=(e,t,n)=>e??t??n,Ut=o({name:`RouterView`,inheritAttrs:!1,props:{name:{type:String,default:`default`},route:Object},compatConfig:{MODE:3},setup(t,{attrs:r,slots:i}){let a=e(le),o=m(()=>t.route||a.value),c=e(oe,0),u=m(()=>{let e=O(c),{matched:t}=o.value,n;for(;(n=t[e])&&!n.components;)e++;return e}),d=m(()=>o.value.matched[u.value]);s(oe,m(()=>u.value+1)),s(ae,d),s(le,o);let p=f();return l(()=>[p.value,d.value,t.name],([e,t,n],[r,i,a])=>{t&&(t.instances[n]=e,i&&i!==t&&e&&e===r&&(t.leaveGuards.size||(t.leaveGuards=i.leaveGuards),t.updateGuards.size||(t.updateGuards=i.updateGuards))),e&&t&&(!i||!ze(t,i)||!r)&&(t.enterCallbacks[n]||[]).forEach(t=>t(e))},{flush:`post`}),()=>{let e=o.value,a=t.name,s=d.value,c=s&&s.components[a];if(!c)return Wt(i.default,{Component:c,route:e});let l=s.props[a],u=l?l===!0?e.params:typeof l==`function`?l(e):l:null,f=n(c,j({},u,r,{onVnodeUnmounted:e=>{e.component.isUnmounted&&(s.instances[a]=null)},ref:p}));return Wt(i.default,{Component:f,route:e})||f}}});function Wt(e,t){if(!e)return null;let n=e(t);return n.length===1?n[0]:n}var Gt=Ut;function Kt(e){let t=Dt(e.routes,e),n=e.parseQuery||nt,i=e.stringifyQuery||rt,a=e.history,o=at(),s=at(),c=at(),l=x(I),u=I;fe&&e.scrollBehavior&&`scrollRestoration`in history&&(history.scrollRestoration=`manual`);let d=te.bind(null,e=>``+e),f=te.bind(null,je),m=te.bind(null,Me);function h(e,n){let r,i;return tt(e)?(r=t.getRecordMatcher(e),i=n):i=e,t.addRoute(i,r)}function g(e){let n=t.getRecordMatcher(e);n&&t.removeRoute(n)}function _(){return t.getRoutes().map(e=>e.record)}function v(e){return!!t.getRecordMatcher(e)}function y(e,r){if(r=j({},r||l.value),typeof e==`string`){let i=Fe(n,e,r.path),o=t.resolve({path:i.path},r),s=a.createHref(i.fullPath);return j(i,o,{params:m(o.params),redirectedFrom:void 0,href:s})}let o;if(e.path!=null)o=j({},e,{path:Fe(n,e.path,r.path).path});else{let t=j({},e.params);for(let e in t)t[e]??delete t[e];o=j({},e,{params:f(t)}),r.params=f(r.params)}let s=t.resolve(o,r),c=e.hash||``;s.params=d(m(s.params));let u=Ie(i,j({},e,{hash:De(c),path:s.path})),p=a.createHref(u);return j({fullPath:u,hash:c,query:i===rt?it(e.query):e.query||{}},s,{redirectedFrom:void 0,href:p})}function b(e){return typeof e==`string`?Fe(n,e,l.value.path):j({},e)}function S(e,t){if(u!==e)return ie(8,{from:t,to:e})}function C(e){return E(e)}function w(e){return C(j(b(e),{replace:!0}))}function T(e,t){let n=e.matched[e.matched.length-1];if(n&&n.redirect){let{redirect:r}=n,i=typeof r==`function`?r(e,t):r;return typeof i==`string`&&(i=i.includes(`?`)||i.includes(`#`)?i=b(i):{path:i},i.params={}),j({query:e.query,hash:e.hash,params:i.path==null?e.params:{}},i)}}function E(e,t){let n=u=y(e),r=l.value,a=e.state,o=e.force,s=e.replace===!0,c=T(n,r);if(c)return E(j(b(c),{state:typeof c==`object`?j({},a,c.state):a,force:o,replace:s}),t||n);let d=n;d.redirectedFrom=t;let f;return!o&&Re(i,r,n)&&(f=ie(16,{to:d,from:r}),ge(r,r,!0,!1)),(f?Promise.resolve(f):ee(d,r)).catch(e=>P(e)?P(e,2)?e:he(e):pe(e,d,r)).then(e=>{if(e){if(P(e,2))return E(j({replace:s},b(e.to),{state:typeof e.to==`object`?j({},a,e.to.state):a,force:o}),t||d)}else e=ne(d,r,!0,s,a);return A(d,r,e),e})}function D(e,t){let n=S(e,t);return n?Promise.reject(n):Promise.resolve()}function k(e){let t=ye.values().next().value;return t&&typeof t.runWithContext==`function`?t.runWithContext(e):e()}function ee(e,t){let n,[r,i,a]=st(e,t);n=ot(r.reverse(),`beforeRouteLeave`,e,t);for(let i of r)i.leaveGuards.forEach(r=>{n.push(L(r,e,t))});let c=D.bind(null,e,t);return n.push(c),F(n).then(()=>{n=[];for(let r of o.list())n.push(L(r,e,t));return n.push(c),F(n)}).then(()=>{n=ot(i,`beforeRouteUpdate`,e,t);for(let r of i)r.updateGuards.forEach(r=>{n.push(L(r,e,t))});return n.push(c),F(n)}).then(()=>{n=[];for(let r of a)if(r.beforeEnter){if(N(r.beforeEnter))for(let i of r.beforeEnter)n.push(L(i,e,t));else n.push(L(r.beforeEnter,e,t))}return n.push(c),F(n)}).then(()=>(e.matched.forEach(e=>e.enterCallbacks={}),n=ot(a,`beforeRouteEnter`,e,t,k),n.push(c),F(n))).then(()=>{n=[];for(let r of s.list())n.push(L(r,e,t));return n.push(c),F(n)}).catch(e=>P(e,8)?e:Promise.reject(e))}function A(e,t,n){c.list().forEach(r=>k(()=>r(e,t,n)))}function ne(e,t,n,r,i){let o=S(e,t);if(o)return o;let s=t===I,c=fe?history.state:{};n&&(r||s?a.replace(e.fullPath,j({scroll:s&&c&&c.scroll},i)):a.push(e.fullPath,i)),l.value=e,ge(e,t,n,s),he()}let re;function ae(){re||=a.listen((e,t,n)=>{if(!be.listening)return;let r=y(e),i=T(r,be.currentRoute.value);if(i){E(j(i,{replace:!0,force:!0}),r).catch(M);return}u=r;let o=l.value;fe&&Qe(Xe(o.fullPath,n.delta),Je()),ee(r,o).catch(e=>P(e,12)?e:P(e,2)?(E(j(b(e.to),{force:!0}),r).then(e=>{P(e,20)&&!n.delta&&n.type===`pop`&&a.go(-1,!1)}).catch(M),Promise.reject()):(n.delta&&a.go(-n.delta,!1),pe(e,r,o))).then(e=>{e||=ne(r,o,!1),e&&(n.delta&&!P(e,8)?a.go(-n.delta,!1):n.type===`pop`&&P(e,20)&&a.go(-1,!1)),A(r,o,e)}).catch(M)})}let oe=at(),ue=at(),de;function pe(e,t,n){he(e);let r=ue.list();return r.length?r.forEach(r=>r(e,t,n)):console.error(e),Promise.reject(e)}function me(){return de&&l.value!==I?Promise.resolve():new Promise((e,t)=>{oe.add([e,t])})}function he(e){return de||(de=!e,ae(),oe.list().forEach(([t,n])=>e?n(e):t()),oe.reset()),e}function ge(t,n,i,a){let{scrollBehavior:o}=e;if(!fe||!o)return Promise.resolve();let s=!i&&$e(Xe(t.fullPath,0))||(a||!i)&&history.state&&history.state.scroll||null;return r().then(()=>o(t,n,s)).then(e=>t===l.value&&e&&Ye(e)).catch(e=>t===l.value&&pe(e,t,n))}let _e=e=>a.go(e),ve,ye=new Set,be={currentRoute:l,listening:!0,addRoute:h,removeRoute:g,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:_,resolve:y,options:e,push:C,replace:w,go:_e,back:()=>_e(-1),forward:()=>_e(1),beforeEach:o.add,beforeResolve:s.add,afterEach:c.add,onError:ue.add,isReady:me,install(e){e.component(`RouterLink`,Rt),e.component(`RouterView`,Gt),e.config.globalProperties.$router=be,Object.defineProperty(e.config.globalProperties,"$route",{enumerable:!0,get:()=>O(l)}),fe&&!ve&&l.value===I&&(ve=!0,C(a.location).catch(e=>{}));let t={};for(let e in I)Object.defineProperty(t,e,{get:()=>l.value[e],enumerable:!0});e.provide(se,be),e.provide(ce,p(t)),e.provide(le,l);let n=e.unmount;ye.add(e),e.unmount=function(){ye.delete(e),ye.size<1&&(u=I,re&&re(),re=null,l.value=I,ve=!1,de=!1),n()}}};function F(e){return e.reduce((e,t)=>e.then(()=>k(t)),Promise.resolve())}return be}function R(e,t){return _()?(d(e,t),!0):!1}var qt=new WeakMap,Jt=(...n)=>{let r=n[0],i=t()?.proxy??_();if(i==null&&!v())throw Error(`injectLocal must be called in setup`);return i&&qt.has(i)&&r in qt.get(i)?qt.get(i)[r]:e(...n)};function Yt(e,n){let r=t()?.proxy??_();if(r==null)throw Error(`provideLocal must be called in setup`);qt.has(r)||qt.set(r,Object.create(null));let i=qt.get(r);return i[e]=n,s(e,n)}var z=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Xt=e=>e!==void 0,Zt=e=>e!=null,Qt=Object.prototype.toString,$t=e=>Qt.call(e)===`[object Object]`,en=()=>+Date.now(),B=()=>{},tn=nn();function nn(){var e,t;return z&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function rn(...e){if(e.length!==1)return h(...e);let t=e[0];return typeof t==`function`?E(S(()=>({get:t,set:B}))):f(t)}function an(e,t){function n(...n){return new Promise((r,i)=>{Promise.resolve(e(()=>t.apply(this,n),{fn:t,thisArg:this,args:n})).then(r).catch(i)})}return`cancel`in e&&Object.assign(n,{cancel:e.cancel,flush:e.flush,isPending:e.isPending}),n}var on=e=>e();function sn(e,t={}){let n,r,i=B,a=B,o=x(!1),s=e=>{clearTimeout(e),i(),i=B},c;return Object.assign(l=>{let u=D(e),d=D(t.maxWait);return n&&s(n),u<=0||d!==void 0&&d<=0?(r&&=(s(r),void 0),o.value=!1,Promise.resolve(l())):(o.value=!0,new Promise((e,f)=>{i=t.rejectOnCancel?f:e,a=e,c=l,d&&!r&&(r=setTimeout(()=>{n&&s(n),r=void 0,o.value=!1,e(c())},d)),n=setTimeout(()=>{r&&s(r),r=void 0,o.value=!1,e(l())},u)}))},{cancel:()=>{n&&=(s(n),void 0),r&&=(s(r),void 0),o.value=!1,a=B},flush:()=>{if(o.value){n&&=(clearTimeout(n),void 0),r&&=(clearTimeout(r),void 0),o.value=!1;let e=a;i=B,a=B,e(c())}},isPending:w(o)})}function cn(e=on,t={}){let{initialState:n=`active`}=t,r=rn(n===`active`);function i(){r.value=!1}function a(){r.value=!0}return{isActive:w(r),pause:i,resume:a,eventFilter:(...t)=>{r.value&&e(...t)}}}function ln(e){let t;function n(){return t||=e(),t}return n.reset=async()=>{let e=t;t=void 0,e&&await e},n}function un(e,t){if(typeof e==`number`)return e+t;let n=e.match(/^-?\d+\.?\d*/)?.[0]||``,r=e.slice(n.length),i=Number.parseFloat(n)+t;return Number.isNaN(i)?e:i+r}function dn(e){return e.endsWith(`rem`)?Number.parseFloat(e)*16:Number.parseFloat(e)}function fn(e,t,n=!1){return Object.fromEntries(Object.entries(e).filter(([e,r])=>(!n||r!==void 0)&&!t.includes(e)))}function pn(e){return Array.isArray(e)?e:[e]}function mn(e){return e||t()}function hn(e){if(!z)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=T(!0),n=r.run(()=>e(...a))),R(i),n))}function gn(e,t,n={}){let{eventFilter:r=on,...i}=n;return l(e,an(r,t),i)}function _n(e,t,n={}){let{eventFilter:r,initialState:i=`active`,...a}=n,{eventFilter:o,pause:s,resume:c,isActive:l}=cn(r,{initialState:i});return{stop:gn(e,t,{...a,eventFilter:o}),pause:s,resume:c,isActive:l}}function vn(e,t={}){if(!C(e))return u(e);let n=Array.isArray(e.value)?Array.from({length:e.value.length}):{};for(let r in e.value)n[r]=S(()=>({get(){return e.value[r]},set(n){if(D(t.replaceRef)??!0){if(Array.isArray(e.value)){let t=[...e.value];t[r]=n,e.value=t}else{let t={...e.value,[r]:n};Object.setPrototypeOf(t,Object.getPrototypeOf(e.value)),e.value=t}}else e.value[r]=n}}));return n}function V(e,t=!0,n){mn(n)?a(e,n):t?e():r(e)}function yn(e,t=1e3,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=null,o=x(!1);function s(){a&&=(clearInterval(a),null)}function c(){o.value=!1,s()}function u(){let n=D(t);n<=0||(o.value=!0,i&&e(),s(),o.value&&(a=setInterval(e,n)))}return r&&z&&u(),(C(t)||typeof t==`function`)&&R(l(t,()=>{o.value&&z&&u()})),R(c),{isActive:w(o),pause:c,resume:u}}function bn(e=1e3,t={}){let{controls:n=!1,immediate:r=!0,callback:i}=t,a=x(0),o=()=>a.value+=1,s=()=>{a.value=0},c=yn(i?()=>{o(),i(a.value)}:o,e,{immediate:r});return n?{counter:w(a),reset:s,...c}:w(a)}function xn(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=x(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},D(t))}return r&&(a.value=!0,z&&l()),R(c),{isPending:w(a),start:l,stop:c}}function Sn(e=!1,t={}){let{truthyValue:n=!0,falsyValue:r=!1}=t,i=C(e),a=x(e);function o(e){if(arguments.length)return a.value=e,a.value;{let e=D(n);return a.value=a.value===e?D(r):e,a.value}}return i?o:[a,o]}function Cn(e,t,n={}){let{debounce:r=0,maxWait:i=void 0,...a}=n;return gn(e,t,{...a,eventFilter:sn(r,{maxWait:i})})}var wn=Cn;function Tn(e,t,n={}){let{eventFilter:r=on,...i}=n,a=an(r,t),o,s,c;if(i.flush===`sync`){let t=!1;s=()=>{},o=e=>{t=!0,e(),t=!1},c=l(e,(...e)=>{t||a(...e)},i)}else{let t=[],n=0,r=0;s=()=>{n=r},t.push(l(e,()=>{r++},{...i,flush:`sync`})),o=e=>{let t=r;e(),n+=r-t},t.push(l(e,(...e)=>{let t=n>0&&n===r;n=0,r=0,!t&&a(...e)},i)),c=()=>{t.forEach(e=>e())}}return{stop:c,ignoreUpdates:o,ignorePrevAsyncUpdates:s}}var En=Tn;function Dn(e,t,n){return l(e,t,{...n,immediate:!0})}function On(e,t,n){let i=l(e,(e,a,o)=>{e&&(n?.once&&r(()=>i()),t(e,a,o))},{...n,once:!1});return i}var H=z?window:void 0,kn=z?window.document:void 0,An=z?window.navigator:void 0;z&&window.location;function U(e){let t=D(e);return t?.$el??t}function W(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=m(()=>{let t=pn(D(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Dn(()=>[n.value?.map(e=>U(e))??[H].filter(e=>e!=null),pn(D(n.value?e[1]:e[0])),pn(O(n.value?e[2]:e[1])),D(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=$t(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}var jn=!1;function Mn(e,t,n={}){let{window:r=H,ignore:i=[],capture:a=!0,detectIframe:o=!1,controls:s=!1}=n;if(!r)return s?{stop:B,cancel:B,trigger:B}:B;if(tn&&!jn){jn=!0;let e={passive:!0};Array.from(r.document.body.children).forEach(t=>t.addEventListener(`click`,B,e)),r.document.documentElement.addEventListener(`click`,B,e)}let c=!0,l=e=>D(i).some(t=>{if(typeof t==`string`)return Array.from(r.document.querySelectorAll(t)).some(t=>t===e.target||e.composedPath().includes(t));{let n=U(t);return n&&(e.target===n||e.composedPath().includes(n))}});function u(e){let t=D(e);return t&&t.$.subTree.shapeFlag===16}function d(e,t){let n=D(e),r=n.$.subTree&&n.$.subTree.children;return r==null||!Array.isArray(r)?!1:r.some(e=>e.el===t.target||t.composedPath().includes(e.el))}let f=n=>{let r=U(e);if(n.target!=null&&!(!(r instanceof Element)&&u(e)&&d(e,n))&&!(!r||r===n.target||n.composedPath().includes(r))){if(`detail`in n&&n.detail===0&&(c=!l(n)),!c){c=!0;return}t(n)}},p=!1,m=[W(r,`click`,e=>{p||(p=!0,setTimeout(()=>{p=!1},0),f(e))},{passive:!0,capture:a}),W(r,`pointerdown`,t=>{let n=U(e);c=!l(t)&&!!(n&&!t.composedPath().includes(n))},{passive:!0}),o&&W(r,`blur`,n=>{setTimeout(()=>{let i=U(e),a=r.document.activeElement;for(;a?.shadowRoot;)a=a.shadowRoot.activeElement;a?.tagName===`IFRAME`&&!i?.contains(r.document.activeElement)&&t(n)},0)},{passive:!0})].filter(Boolean),h=()=>m.forEach(e=>e());return s?{stop:h,cancel:()=>{c=!1},trigger:e=>{c=!0,f(e),c=!1}}:h}function Nn(){let e=x(!1),n=t();return n&&a(()=>{e.value=!0},n),e}function G(e){let t=Nn();return m(()=>(t.value,!!e()))}function Pn(e,t,n={}){let{window:r=H,...i}=n,a,o=G(()=>r&&`MutationObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=l(m(()=>{let t=pn(D(e)).map(U).filter(Zt);return new Set(t)}),e=>{s(),o.value&&e.size&&(a=new MutationObserver(t),e.forEach(e=>a.observe(e,i)))},{immediate:!0,flush:`post`}),u=()=>a?.takeRecords(),d=()=>{c(),s()};return R(d),{isSupported:o,stop:d,takeRecords:u}}function Fn(e,t,n={}){let{window:r=H,document:a=r?.document,flush:o=`sync`}=n;if(!r||!a)return B;let s,c=e=>{s?.(),s=e},l=i(()=>{let n=U(e);if(n){let{stop:e}=Pn(a,e=>{e.map(e=>[...e.removedNodes]).flat().some(e=>e===n||e.contains(n))&&t(e)},{window:r,childList:!0,subtree:!0});c(e)}},{flush:o}),u=()=>{l(),c()};return R(u),u}function In(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function Ln(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=H,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=In(t);return W(i,a,e=>{e.repeat&&D(s)||c(e)&&n(e)},o)}function Rn(e={}){let{window:t=H,deep:n=!0,triggerOnRemoval:r=!1}=e,i=e.document??t?.document,a=()=>{let e=i?.activeElement;if(n)for(var t;e?.shadowRoot;)e=e==null||(t=e.shadowRoot)==null?void 0:t.activeElement;return e},o=x(),s=()=>{o.value=a()};if(t){let e={capture:!0,passive:!0};W(t,`blur`,e=>{e.relatedTarget===null&&s()},e),W(t,`focus`,s,e)}return r&&Fn(o,s,{document:i}),s(),o}var zn=Symbol(`vueuse-ssr-width`);function Bn(){let e=v()?Jt(zn,null):null;return typeof e==`number`?e:void 0}function K(e,t={}){let{window:n=H,ssrWidth:r=Bn()}=t,a=G(()=>n&&`matchMedia`in n&&typeof n.matchMedia==`function`),o=x(typeof r==`number`),s=x(),c=x(!1);return i(()=>{if(o.value){o.value=!a.value;let t=D(e).split(`,`);c.value=t.some(e=>{let t=e.includes(`not all`),n=e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),i=e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/),a=!!(n||i);return n&&a&&(a=r>=dn(n[1])),i&&a&&(a=r<=dn(i[1])),t?!a:a});return}a.value&&(s.value=n.matchMedia(D(e)),c.value=s.value.matches)}),W(s,`change`,e=>{c.value=e.matches},{passive:!0}),m(()=>c.value)}var Vn={sm:640,md:768,lg:1024,xl:1280,"2xl":1536};function Hn(e,t={}){function n(t,n){let r=D(e[D(t)]);return n!=null&&(r=un(r,n)),typeof r==`number`&&(r=`${r}px`),r}let{window:r=H,strategy:i=`min-width`,ssrWidth:a=Bn()}=t,o=typeof a==`number`,s=o?x(!1):{value:!0};o&&V(()=>s.value=!!r);function c(e,t){return!s.value&&o?e===`min`?a>=dn(t):a<=dn(t):r?r.matchMedia(`(${e}-width: ${t})`).matches:!1}let l=e=>K(()=>`(min-width: ${n(e)})`,t),u=e=>K(()=>`(max-width: ${n(e)})`,t),d=Object.keys(e).reduce((e,t)=>(Object.defineProperty(e,t,{get:()=>i===`min-width`?l(t):u(t),enumerable:!0,configurable:!0}),e),{});function f(){let t=Object.keys(e).map(e=>[e,d[e],dn(n(e))]).sort((e,t)=>e[2]-t[2]);return m(()=>t.filter(([,e])=>e.value).map(([e])=>e))}return Object.assign(d,{greaterOrEqual:l,smallerOrEqual:u,greater(e){return K(()=>`(min-width: ${n(e,.1)})`,t)},smaller(e){return K(()=>`(max-width: ${n(e,-.1)})`,t)},between(e,r){return K(()=>`(min-width: ${n(e)}) and (max-width: ${n(r,-.1)})`,t)},isGreater(e){return c(`min`,n(e,.1))},isGreaterOrEqual(e){return c(`min`,n(e))},isSmaller(e){return c(`max`,n(e,-.1))},isSmallerOrEqual(e){return c(`max`,n(e))},isInBetween(e,t){return c(`min`,n(e))&&c(`max`,n(t,-.1))},current:f,active(){let e=f();return m(()=>e.value.length===0?``:e.value.at(i===`min-width`?-1:0))}})}function Un(e,t={}){let{controls:n=!1,navigator:r=An}=t,i=G(()=>r&&`permissions`in r),a=x(),o=typeof e==`string`?{name:e}:e,s=x(),c=()=>{s.value=a.value?.state??`prompt`};W(a,`change`,c,{passive:!0});let l=ln(async()=>{if(i.value){if(!a.value)try{a.value=await r.permissions.query(o)}catch{a.value=void 0}finally{c()}if(n)return g(a.value)}});return l(),n?{state:s,isSupported:i,query:l}:s}function Wn(e={}){let{navigator:t=An,read:n=!1,source:r,copiedDuring:i=1500,legacy:a=!1}=e,o=G(()=>t&&`clipboard`in t),s=Un(`clipboard-read`),c=Un(`clipboard-write`),l=m(()=>o.value||a),u=x(``),d=x(!1),f=x(!1),p=xn(()=>d.value=!1,i,{immediate:!1}),h=0;async function g(){let e=!(o.value&&S(s.value));if(!e)try{u.value=await t.clipboard.readText()}catch{e=!0}e&&(u.value=b())}l.value&&n&&W([`copy`,`cut`],g,{passive:!0});async function _(e){let n=e??D(r);if(l.value&&n!=null){f.value=!0;let e=!(o.value&&S(c.value));if(!e)try{let e=v(n);await t.clipboard.write([e])}catch{e=!0}if(e){if(typeof n==`string`)u.value=n,y(n);else{let e=++h,t=await n();t!=null&&e===h&&(u.value=t,y(t))}}d.value=!0,p.start(),f.value=!1}}function v(e){return typeof e==`string`?(u.value=e,new ClipboardItem({"text/plain":e})):new ClipboardItem({"text/plain":e().then((e=``)=>(u.value=e,new Blob([e],{type:`text/plain`})))})}function y(e){let t=document.createElement(`textarea`);t.value=e,t.style.position=`absolute`,t.style.opacity=`0`,t.setAttribute(`readonly`,``),document.body.appendChild(t),t.select(),document.execCommand(`copy`),t.remove()}function b(){var e,t;return((e=document)==null||(t=e.getSelection)==null||(t=t.call(e))==null?void 0:t.toString())??``}function S(e){return e===`granted`||e===`prompt`}return{copyPending:w(f),isSupported:l,text:w(u),copied:w(d),copy:_}}function Gn(e){return JSON.parse(JSON.stringify(e))}var Kn=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{},qn=`__vueuse_ssr_handlers__`,Jn=Yn();function Yn(){return qn in Kn||(Kn[qn]=Kn[qn]||{}),Kn[qn]}function Xn(e,t){return Jn[e]||t}function Zn(e){return K(`(prefers-color-scheme: dark)`,e)}function Qn(e){return e==null?`any`:e instanceof Set?`set`:e instanceof Map?`map`:e instanceof Date?`date`:typeof e==`boolean`?`boolean`:typeof e==`string`?`string`:typeof e==`object`?`object`:Number.isNaN(e)?`any`:`number`}var $n={boolean:{read:e=>e===`true`,write:e=>String(e)},object:{read:e=>JSON.parse(e),write:e=>JSON.stringify(e)},number:{read:e=>Number.parseFloat(e),write:e=>String(e)},any:{read:e=>e,write:e=>String(e)},string:{read:e=>e,write:e=>String(e)},map:{read:e=>new Map(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e.entries()))},set:{read:e=>new Set(JSON.parse(e)),write:e=>JSON.stringify(Array.from(e))},date:{read:e=>new Date(e),write:e=>e.toISOString()}},er=`vueuse-storage`;function tr(e,t,n,i={}){let{flush:a=`pre`,deep:o=!0,listenToStorageChanges:s=!0,writeDefaults:c=!0,mergeDefaults:u=!1,shallow:d,window:p=H,eventFilter:h,onError:g=e=>{console.error(e)},initOnMounted:_}=i,v=(d?x:f)(typeof t==`function`?t():t),y=m(()=>D(e));if(!n)try{n=Xn(`getDefaultStorage`,()=>H?.localStorage)()}catch(e){g(e)}if(!n)return v;let b=D(t),S=Qn(b),C=i.serializer??$n[S],{pause:w,resume:T}=_n(v,e=>k(e),{flush:a,deep:o,eventFilter:h});l(y,()=>A(),{flush:a});let E=!1;p&&s&&(n instanceof Storage?W(p,`storage`,e=>{_&&!E||A(e)},{passive:!0}):W(p,er,e=>{_&&!E||j(e)})),_?V(()=>{E=!0,A()}):A();function O(e,t){if(p){let r={key:y.value,oldValue:e,newValue:t,storageArea:n};p.dispatchEvent(n instanceof Storage?new StorageEvent(`storage`,r):new CustomEvent(er,{detail:r}))}}function k(e){try{let t=n.getItem(y.value);if(e==null)O(t,null),n.removeItem(y.value);else{let r=C.write(e);t!==r&&(n.setItem(y.value,r),O(t,r))}}catch(e){g(e)}}function ee(e){let t=e?e.newValue:n.getItem(y.value);if(t==null)return c&&b!=null&&n.setItem(y.value,C.write(b)),b;if(!e&&u){let e=C.read(t);return typeof u==`function`?u(e,b):S===`object`&&!Array.isArray(e)?{...b,...e}:e}return typeof t==`string`?C.read(t):t}function A(e){if(!(e&&e.storageArea!==n)){if(e&&e.key==null){v.value=b;return}if(!(e&&e.key!==y.value)){w();try{let t=C.write(v.value);(e===void 0||e?.newValue!==t)&&(v.value=ee(e))}catch(e){g(e)}finally{e?r(T):T()}}}}function j(e){A(e.detail)}return v}function nr(e={}){let{document:t=kn}=e;if(!t)return x(`visible`);let n=x(t.visibilityState);return W(t,`visibilitychange`,()=>{n.value=t.visibilityState},{passive:!0}),n}var rr={speed:2,margin:30,direction:`both`};function ir(e){e.scrollLeft>e.scrollWidth-e.clientWidth&&(e.scrollLeft=Math.max(0,e.scrollWidth-e.clientWidth)),e.scrollTop>e.scrollHeight-e.clientHeight&&(e.scrollTop=Math.max(0,e.scrollHeight-e.clientHeight))}function ar(e,t={}){let{pointerTypes:n,preventDefault:r,stopPropagation:i,exact:a,onMove:o,onEnd:s,onStart:c,initialValue:u,axis:d=`both`,draggingElement:p=H,containerElement:h,handle:g=e,buttons:_=[0],restrictInView:v,autoScroll:y=!1}=t,b=f(D(u)??{x:0,y:0}),x=f(),S=e=>!n||n.includes(e.pointerType),C=e=>{D(r)&&e.preventDefault(),D(i)&&e.stopPropagation()},w=D(y),T=typeof w==`object`?{speed:D(w.speed)??rr.speed,margin:D(w.margin)??rr.margin,direction:w.direction??rr.direction}:rr,E=e=>typeof e==`number`?[e,e]:[e.x,e.y],O=(e,t,n)=>{let{clientWidth:r,clientHeight:i,scrollLeft:a,scrollTop:o,scrollWidth:s,scrollHeight:c}=e,[l,u]=E(T.margin),[d,f]=E(T.speed),p=0,m=0;(T.direction===`x`||T.direction===`both`)&&(n.x0?p=-d:n.x+t.width>r-l&&a0?m=-f:n.y+t.height>i-u&&o{let t=D(h);t&&!k&&(k=setInterval(()=>{let n=D(e).getBoundingClientRect(),{x:r,y:i}=b.value,a={x:r-t.scrollLeft,y:i-t.scrollTop};a.x>=0&&a.y>=0&&(O(t,n,a),a.x+=t.scrollLeft,a.y+=t.scrollTop,b.value=a)},1e3/60))},A=()=>{k&&=(clearInterval(k),null)},j=(e,t,n,r)=>{let[i,a]=typeof n==`number`?[n,n]:[n.x,n.y],{clientWidth:o,clientHeight:s}=t;return e.xo-i||e.ys-a};D(y)&&l(b,()=>{if(D(t.disabled)||!x.value)return;let n=D(h);if(!n)return;let r=D(e).getBoundingClientRect(),{x:i,y:a}=b.value,o={x:i-n.scrollLeft,y:a-n.scrollTop};j(o,n,T.margin,r)?ee():A()});let te=n=>{var r;if(!D(_).includes(n.button)||D(t.disabled)||!S(n)||D(a)&&n.target!==D(e))return;let i=D(h),o=i==null||(r=i.getBoundingClientRect)==null?void 0:r.call(i),s=D(e).getBoundingClientRect(),l={x:n.clientX-(i?s.left-o.left+(y?0:i.scrollLeft):s.left),y:n.clientY-(i?s.top-o.top+(y?0:i.scrollTop):s.top)};c?.(l,n)!==!1&&(x.value=l,C(n))},M=n=>{if(D(t.disabled)||!S(n)||!x.value)return;let r=D(h);r instanceof HTMLElement&&ir(r);let i=D(e).getBoundingClientRect(),{x:a,y:s}=b.value;if((d===`x`||d===`both`)&&(a=n.clientX-x.value.x,r&&(a=Math.min(Math.max(0,a),r.scrollWidth-i.width))),(d===`y`||d===`both`)&&(s=n.clientY-x.value.y,r&&(s=Math.min(Math.max(0,s),r.scrollHeight-i.height))),D(y)&&r&&(k===null&&O(r,i,{x:a,y:s}),a+=r.scrollLeft,s+=r.scrollTop),r&&(v||y)){if(d!==`y`){let e=a-r.scrollLeft;e<0?a=r.scrollLeft:e>r.clientWidth-i.width&&(a=r.clientWidth-i.width+r.scrollLeft)}if(d!==`x`){let e=s-r.scrollTop;e<0?s=r.scrollTop:e>r.clientHeight-i.height&&(s=r.clientHeight-i.height+r.scrollTop)}}b.value={x:a,y:s},o?.(b.value,n),C(n)},N=e=>{D(t.disabled)||!S(e)||x.value&&(x.value=void 0,y&&A(),s?.(b.value,e),C(e))};if(z){let e=()=>({capture:t.capture??!0,passive:!D(r)});W(g,`pointerdown`,te,e),W(p,`pointermove`,M,e),W(p,[`pointerup`,`pointercancel`],N,e)}return{...vn(b),position:b,isDragging:m(()=>!!x.value),style:m(()=>` + left: ${b.value.x}px; + top: ${b.value.y}px; + ${y?`text-wrap: nowrap;`:``} + `)}}function or(e,t,n={}){let{window:r=H,...i}=n,a,o=G(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=l(m(()=>{let t=D(e);return Array.isArray(t)?t.map(e=>U(e)):[U(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),u=()=>{s(),c()};return R(u),{isSupported:o,stop:u}}function sr(e,t={}){let{reset:n=!0,windowResize:r=!0,windowScroll:i=!0,immediate:a=!0,updateTiming:o=`sync`}=t,s=x(0),c=x(0),u=x(0),d=x(0),f=x(0),p=x(0),m=x(0),h=x(0);function g(){let t=U(e);if(!t){n&&(s.value=0,c.value=0,u.value=0,d.value=0,f.value=0,p.value=0,m.value=0,h.value=0);return}let r=t.getBoundingClientRect();s.value=r.height,c.value=r.bottom,u.value=r.left,d.value=r.right,f.value=r.top,p.value=r.width,m.value=r.x,h.value=r.y}function _(){o===`sync`?g():o===`next-frame`&&requestAnimationFrame(()=>g())}return or(e,_),l(()=>U(e),e=>!e&&_()),Pn(e,_,{attributeFilter:[`style`,`class`]}),i&&W(`scroll`,_,{capture:!0,passive:!0}),r&&W(`resize`,_,{passive:!0}),V(()=>{a&&_()}),{height:s,bottom:c,left:u,right:d,top:f,width:p,x:m,y:h,update:_}}function cr(e,t={width:0,height:0},n={}){let{window:r=H,box:i=`content-box`}=n,a=m(()=>{var t;return(t=U(e))==null||(t=t.namespaceURI)==null?void 0:t.includes(`svg`)}),o=x(t.width),s=x(t.height),{stop:c}=or(e,([t])=>{let n=i===`border-box`?t.borderBoxSize:i===`content-box`?t.contentBoxSize:t.devicePixelContentBoxSize;if(r&&a.value){let t=U(e);if(t){let e=t.getBoundingClientRect();o.value=e.width,s.value=e.height}}else if(n){let e=pn(n);o.value=e.reduce((e,{inlineSize:t})=>e+t,0),s.value=e.reduce((e,{blockSize:t})=>e+t,0)}else o.value=t.contentRect.width,s.value=t.contentRect.height},n);V(()=>{let n=U(e);if(n&&`offsetWidth`in n){if(i===`content-box`&&r){let e=r.getComputedStyle(n),t=Number.parseFloat(e.paddingLeft)+Number.parseFloat(e.paddingRight),i=Number.parseFloat(e.paddingTop)+Number.parseFloat(e.paddingBottom),a=Number.parseFloat(e.borderLeftWidth)+Number.parseFloat(e.borderRightWidth),c=Number.parseFloat(e.borderTopWidth)+Number.parseFloat(e.borderBottomWidth);o.value=n.offsetWidth-t-a,s.value=n.offsetHeight-i-c}else o.value=n.offsetWidth,s.value=n.offsetHeight}else n&&(o.value=t.width,s.value=t.height)});let u=l(()=>U(e),e=>{o.value=e?t.width:0,s.value=e?t.height:0});function d(){c(),u()}return{width:o,height:s,stop:d}}var lr=[`fullscreenchange`,`webkitfullscreenchange`,`webkitendfullscreen`,`mozfullscreenchange`,`MSFullscreenChange`];function ur(e,t={}){let{document:n=kn,autoExit:r=!1}=t,i=m(()=>U(e)??n?.documentElement),a=x(!1),o=m(()=>[`requestFullscreen`,`webkitRequestFullscreen`,`webkitEnterFullscreen`,`webkitEnterFullScreen`,`webkitRequestFullScreen`,`mozRequestFullScreen`,`msRequestFullscreen`].find(e=>n&&e in n||i.value&&e in i.value)),s=m(()=>[`exitFullscreen`,`webkitExitFullscreen`,`webkitExitFullScreen`,`webkitCancelFullScreen`,`mozCancelFullScreen`,`msExitFullscreen`].find(e=>n&&e in n||i.value&&e in i.value)),c=m(()=>[`fullScreen`,`webkitIsFullScreen`,`webkitDisplayingFullscreen`,`mozFullScreen`,`msFullscreenElement`].find(e=>n&&e in n||i.value&&e in i.value)),l=[`fullscreenElement`,`webkitFullscreenElement`,`mozFullScreenElement`,`msFullscreenElement`].find(e=>n&&e in n),u=G(()=>i.value&&n&&o.value!==void 0&&s.value!==void 0&&c.value!==void 0),d=()=>l?n?.[l]===i.value:!1,f=()=>{if(c.value){if(n&&n[c.value]!=null)return n[c.value];{let e=i.value;if(e?.[c.value]!=null)return!!e[c.value]}}return!1};async function p(){if(!(!u.value||!a.value)){if(s.value){if(n?.[s.value]!=null)await n[s.value]();else{let e=i.value;e?.[s.value]!=null&&await e[s.value]()}}a.value=!1}}async function h(){if(!u.value||a.value)return;f()&&await p();let e=i.value;o.value&&e?.[o.value]!=null&&(await e[o.value](),a.value=!0)}async function g(){await(a.value?p():h())}let _=()=>{let e=f();(!e||e&&d())&&(a.value=e)},v={capture:!1,passive:!0};return W(n,lr,_,v),W(()=>U(i),lr,_,v),V(_,!1),r&&R(p),{isSupported:u,isFullscreen:a,enter:h,exit:p,toggle:g}}function dr(e,t,n={}){let{window:r=H}=n;return tr(e,t,r?.localStorage,n)}var fr={ctrl:`control`,command:`meta`,cmd:`meta`,option:`alt`,up:`arrowup`,down:`arrowdown`,left:`arrowleft`,right:`arrowright`};function pr(e={}){let{reactive:t=!1,target:n=H,aliasMap:r=fr,passive:i=!0,onEventFired:a=B}=e,o=y(new Set),s={toJSON(){return{}},current:o},c=t?y(s):s,l=new Set,u=new Map([[`Meta`,l],[`Shift`,new Set],[`Alt`,new Set]]),d=new Set;function f(e,n){e in c&&(t?c[e]=n:c[e].value=n)}function p(){o.clear();for(let e of d)f(e,!1)}function h(e,t,n){if(!(!e||typeof t.getModifierState!=`function`)){for(let[e,r]of u)if(t.getModifierState(e)){n.forEach(e=>r.add(e));break}}}function g(e,t){if(e)return;let n=`${t[0].toUpperCase()}${t.slice(1)}`,r=u.get(n);if(![`shift`,`alt`].includes(t)||!r)return;let i=Array.from(r),a=i.indexOf(t);i.forEach((e,t)=>{t>=a&&(o.delete(e),f(e,!1))}),r.clear()}function _(e,t){let n=e.key?.toLowerCase(),r=[e.code?.toLowerCase(),n].filter(Boolean);if(n){n&&(t?o.add(n):o.delete(n));for(let e of r)d.add(e),f(e,t);h(t,e,[...o,...r]),g(t,n),n===`meta`&&!t&&(l.forEach(e=>{o.delete(e),f(e,!1)}),l.clear())}}W(n,`keydown`,e=>(_(e,!0),a(e)),{passive:i}),W(n,`keyup`,e=>(_(e,!1),a(e)),{passive:i}),W(`blur`,p,{passive:i}),W(`focus`,p,{passive:i});let v=new Proxy(c,{get(e,n,i){if(typeof n!=`string`)return Reflect.get(e,n,i);if(n=n.toLowerCase(),n in r&&(n=r[n]),!(n in c)){if(/[+_-]/.test(n)){let e=n.split(/[+_-]/g).map(e=>e.trim());c[n]=m(()=>e.map(e=>D(v[e])).every(Boolean))}else c[n]=x(!1)}let a=Reflect.get(e,n,i);return t?D(a):a}});return v}var mr={page:e=>[e.pageX,e.pageY],client:e=>[e.clientX,e.clientY],screen:e=>[e.screenX,e.screenY],movement:e=>e instanceof MouseEvent?[e.movementX,e.movementY]:null};function hr(e={}){let{type:t=`page`,touch:n=!0,resetOnTouchEnds:r=!1,initialValue:i={x:0,y:0},window:a=H,target:o=a,scroll:s=!0,eventFilter:c}=e,l=null,u=0,d=0,f=x(i.x),p=x(i.y),m=x(null),h=typeof t==`function`?t:mr[t],g=e=>{let t=h(e);l=e,t&&([f.value,p.value]=t,m.value=`mouse`),a&&(u=a.scrollX,d=a.scrollY)},_=e=>{if(e.touches.length>0){let t=h(e.touches[0]);t&&([f.value,p.value]=t,m.value=`touch`)}},v=()=>{if(!l||!a)return;let e=h(l);l instanceof MouseEvent&&e&&(f.value=e[0]+a.scrollX-u,p.value=e[1]+a.scrollY-d)},y=()=>{f.value=i.x,p.value=i.y},b=c?e=>c(()=>g(e),{}):e=>g(e),S=c?e=>c(()=>_(e),{}):e=>_(e),C=c?()=>c(()=>v(),{}):()=>v();if(o){let e={passive:!0};W(o,[`mousemove`,`dragover`],b,e),n&&t!==`movement`&&(W(o,[`touchstart`,`touchmove`],S,e),r&&W(o,`touchend`,y,e)),s&&t===`page`&&W(a,`scroll`,C,e)}return{x:f,y:p,sourceType:m}}function gr(e,t={}){let n=rn(e),{threshold:r=50,onSwipe:i,onSwipeEnd:a,onSwipeStart:o,disableTextSelect:s=!1}=t,c=y({x:0,y:0}),l=(e,t)=>{c.x=e,c.y=t},u=y({x:0,y:0}),d=(e,t)=>{u.x=e,u.y=t},f=m(()=>c.x-u.x),p=m(()=>c.y-u.y),{max:h,abs:g}=Math,_=m(()=>h(g(f.value),g(p.value))>=r),v=x(!1),b=x(!1),S=m(()=>_.value?g(f.value)>g(p.value)?f.value>0?`left`:`right`:p.value>0?`up`:`down`:`none`),C=e=>{let n=e.buttons===0,r=e.buttons===1;return t.pointerTypes?.includes(e.pointerType)??(n||r)??!0},T={passive:!0},D=[W(e,`pointerdown`,e=>{if(!C(e))return;b.value=!0,e.target?.setPointerCapture(e.pointerId);let{clientX:t,clientY:n}=e;l(t,n),d(t,n),o?.(e)},T),W(e,`pointermove`,e=>{if(!C(e)||!b.value)return;let{clientX:t,clientY:n}=e;d(t,n),!v.value&&_.value&&(v.value=!0),v.value&&i?.(e)},T),W(e,[`pointerup`,`pointercancel`],e=>{C(e)&&(v.value&&a?.(e,S.value),b.value=!1,v.value=!1)},T)];return V(()=>{var e;if((e=n.value)==null||(e=e.style)==null||e.setProperty(`touch-action`,`pan-y`),s){var t,r,i;(t=n.value)==null||(t=t.style)==null||t.setProperty(`-webkit-user-select`,`none`),(r=n.value)==null||(r=r.style)==null||r.setProperty(`-ms-user-select`,`none`),(i=n.value)==null||(i=i.style)==null||i.setProperty(`user-select`,`none`)}}),{isSwiping:w(v),direction:w(S),posStart:E(c),posEnd:E(u),distanceX:f,distanceY:p,stop:()=>D.forEach(e=>e())}}var _r=0,vr=new WeakMap;function yr(e,t={}){let n=x(!1),{document:r=kn,immediate:i=!0,manual:a=!1,id:o=`vueuse_styletag_${++_r}`}=t,s=x(e),c=()=>{},u=()=>{if(!r)return;let e=r.getElementById(o)||r.createElement(`style`);e.isConnected||(e.id=o,t.nonce&&(e.nonce=t.nonce),t.media&&(e.media=t.media),r.head.appendChild(e)),!n.value&&(vr.set(e,(vr.get(e)??0)+1),c=l(s,t=>{e.textContent=t},{immediate:!0}),n.value=!0)},d=()=>{if(!r||!n.value)return;c();let e=r.getElementById(o);if(e){let t=(vr.get(e)??1)-1;t<=0?(vr.delete(e),r.head.removeChild(e)):vr.set(e,t)}n.value=!1};return i&&!a&&V(u),a||R(d),{id:o,css:s,unload:d,load:u,isLoaded:w(n)}}function br(e,n,i,a={}){var o,s;let{clone:c=!1,passive:u=!1,eventName:d,deep:p=!1,defaultValue:h,shouldEmit:g}=a,_=t(),v=i||_?.emit||(_==null||(o=_.$emit)==null?void 0:o.bind(_))||(_==null||(s=_.proxy)==null||(s=s.$emit)==null?void 0:s.bind(_?.proxy)),y=d;n||=`modelValue`,y||=`update:${n.toString()}`;let b=e=>c?typeof c==`function`?c(e):Gn(e):e,x=()=>Xt(e[n])?b(e[n]):h,S=e=>{g?g(e)&&v(y,e):v(y,e)};if(u){let t=f(x()),i=!1;return l(()=>e[n],e=>{i||(i=!0,t.value=b(e),r(()=>i=!1))}),l(t,t=>{!i&&(t!==e[n]||p)&&S(t)},{deep:p}),t}return m({get(){return x()},set(e){S(e)}})}function xr(e={}){let{navigator:t=An,document:n=kn}=e,r=x(!1),i=x(null),a=nr({document:n}),o=G(()=>t&&`wakeLock`in t),s=m(()=>!!i.value&&a.value===`visible`);o.value&&(W(i,`release`,()=>{r.value=i.value?.type??!1},{passive:!0}),On(()=>a.value===`visible`&&n?.visibilityState===`visible`&&r.value,e=>{r.value=!1,c(e)}));async function c(e){await i.value?.release(),i.value=o.value?await t.wakeLock.request(e):null}async function l(e){a.value===`visible`?await c(e):r.value=e}async function u(){r.value=!1;let e=i.value;i.value=null,await e?.release()}return R(()=>{u()}),{sentinel:i,isSupported:o,isActive:s,request:l,forceRequest:c,release:u}}function Sr(e={}){let{window:t=H}=e;if(!t)return x(!1);let n=x(t.document.hasFocus()),r={passive:!0};return W(t,`blur`,()=>{n.value=!1},r),W(t,`focus`,()=>{n.value=!0},r),n}function Cr(e={}){let{window:t=H,initialWidth:n=1/0,initialHeight:r=1/0,listenOrientation:i=!0,includeScrollbar:a=!0,type:o=`inner`}=e,s=x(n),c=x(r),u=()=>{if(t){if(o===`outer`)s.value=t.outerWidth,c.value=t.outerHeight;else if(o===`visual`&&t.visualViewport){let{width:e,height:n,scale:r}=t.visualViewport;s.value=Math.round(e*r),c.value=Math.round(n*r)}else a?(s.value=t.innerWidth,c.value=t.innerHeight):(s.value=t.document.documentElement.clientWidth,c.value=t.document.documentElement.clientHeight)}};u(),V(u);let d={passive:!0};return W(`resize`,u,d),t&&o===`visual`&&t.visualViewport&&W(t.visualViewport,`resize`,u,d),i&&l(K(`(orientation: portrait)`),()=>u()),{width:s,height:c}}function wr(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function Tr(e,t,n=`.`,r){if(!wr(t))return Tr(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:wr(a)&&wr(i[t])?Tr(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function Er(e){return(...t)=>t.reduce((t,n)=>Tr(t,n,``,e),{})}var Dr=Er();function Or(e){return _()?(d(e),!0):!1}var kr=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Ar=e=>e!=null,jr=Object.prototype.toString,Mr=e=>jr.call(e)===`[object Object]`,Nr=()=>{};function Pr(e){return Array.isArray(e)?e:[e]}function Fr(e){return e||t()}function Ir(e,t){Fr(t)&&k(e,t)}function Lr(e,t,n){return l(e,t,{...n,immediate:!0})}var Rr=kr?window:void 0;kr&&window.document,kr&&window.navigator,kr&&window.location;function zr(e){let t=D(e);return t?.$el??t}function q(...e){let t=[],n=()=>{t.forEach(e=>e()),t.length=0},r=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),i=m(()=>{let t=Pr(D(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0}),a=Lr(()=>[i.value?.map(e=>zr(e))??[Rr].filter(e=>e!=null),Pr(D(i.value?e[1]:e[0])),Pr(O(i.value?e[2]:e[1])),D(i.value?e[3]:e[2])],([e,i,a,o])=>{if(n(),!e?.length||!i?.length||!a?.length)return;let s=Mr(o)?{...o}:o;t.push(...e.flatMap(e=>i.flatMap(t=>a.map(n=>r(e,t,n,s)))))},{flush:`post`});return Or(n),()=>{a(),n()}}function Br(){let e=x(!1),n=t();return n&&a(()=>{e.value=!0},n),e}function Vr(e){let t=Br();return m(()=>(t.value,!!e()))}function Hr(e,t,n={}){let{root:r,rootMargin:i=`0px`,threshold:a=0,window:o=Rr,immediate:s=!0}=n,c=Vr(()=>o&&`IntersectionObserver`in o),u=m(()=>Pr(D(e)).map(zr).filter(Ar)),d=Nr,f=x(s),p=c.value?l(()=>[u.value,zr(r),f.value],([e,n])=>{if(d(),!f.value||!e.length)return;let r=new IntersectionObserver(t,{root:zr(n),rootMargin:i,threshold:a});e.forEach(e=>e&&r.observe(e)),d=()=>{r.disconnect(),d=Nr}},{immediate:s,flush:`post`}):Nr,h=()=>{d(),p(),f.value=!1};return Or(h),{isSupported:c,isActive:f,pause(){d(),f.value=!1},resume(){f.value=!0},stop:h}}var Ur=1/60*1e3,Wr=typeof performance<`u`?()=>performance.now():()=>Date.now(),Gr=typeof window<`u`?e=>window.requestAnimationFrame(e):e=>setTimeout(()=>e(Wr()),Ur);function Kr(e){let t=[],n=[],r=0,i=!1,a=!1,o=new WeakSet,s={schedule:(e,a=!1,s=!1)=>{let c=s&&i,l=c?t:n;return a&&o.add(e),l.indexOf(e)===-1&&(l.push(e),c&&i&&(r=t.length)),e},cancel:e=>{let t=n.indexOf(e);t!==-1&&n.splice(t,1),o.delete(e)},process:c=>{if(i){a=!0;return}if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n(e[t]=Kr(()=>Yr=!0),e),{}),ei=Qr.reduce((e,t)=>{let n=$r[t];return e[t]=(e,t=!1,r=!1)=>(Yr||ii(),n.schedule(e,t,r)),e},{}),ti=Qr.reduce((e,t)=>(e[t]=$r[t].cancel,e),{});Qr.reduce((e,t)=>(e[t]=()=>$r[t].process(Zr),e),{});var ni=e=>$r[e].process(Zr),ri=e=>{Yr=!1,Zr.delta=Jr?Ur:Math.max(Math.min(e-Zr.timestamp,qr),1),Zr.timestamp=e,Xr=!0,Qr.forEach(ni),Xr=!1,Yr&&(Jr=!1,Gr(ri))},ii=()=>{Yr=!0,Jr=!0,Xr||Gr(ri)},ai=()=>Zr;function oi(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);iMath.min(Math.max(n,e),t),ci=.001,li=.01,ui=.05;function di({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,o=1-t;o=si(ui,1,o),e=si(li,10,e/1e3),o<1?(i=t=>{let r=t*o,i=r*e,a=r-n,s=mi(t,o),c=Math.exp(-i);return ci-a/s*c},a=t=>{let r=t*o*e,a=r*n+n,s=o**2*t**2*e,c=Math.exp(-r),l=mi(t**2,o);return(-i(t)+ci>0?-1:1)*((a-s)*c)/l}):(i=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),a=t=>Math.exp(-t*e)*((n-t)*(e*e)));let s=5/e,c=pi(i,a,s);if(e*=1e3,isNaN(c))return{stiffness:100,damping:10,duration:e};{let t=c**2*r;return{stiffness:t,damping:o*2*Math.sqrt(r*t),duration:e}}}var fi=12;function pi(e,t,n){let r=n;for(let n=1;ne[t]!==void 0)}function vi(e){let t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!_i(e,gi)&&_i(e,hi)){let n=di(e);t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1}),t.isResolvedFromDuration=!0}return t}function yi(e){var{from:t=0,to:n=1,restSpeed:r=2,restDelta:i}=e,a=oi(e,[`from`,`to`,`restSpeed`,`restDelta`]);let o={done:!1,value:t},{stiffness:s,damping:c,mass:l,velocity:u,duration:d,isResolvedFromDuration:f}=vi(a),p=bi,m=bi;function h(){let e=u?-(u/1e3):0,r=n-t,a=c/(2*Math.sqrt(s*l)),o=Math.sqrt(s/l)/1e3;if(i===void 0&&(i=Math.min(Math.abs(n-t)/100,.4)),a<1){let t=mi(o,a);p=i=>{let s=Math.exp(-a*o*i);return n-s*((e+a*o*r)/t*Math.sin(t*i)+r*Math.cos(t*i))},m=n=>{let i=Math.exp(-a*o*n);return a*o*i*(Math.sin(t*n)*(e+a*o*r)/t+r*Math.cos(t*n))-i*(Math.cos(t*n)*(e+a*o*r)-t*r*Math.sin(t*n))}}else if(a===1)p=t=>n-Math.exp(-o*t)*(r+(e+o*r)*t);else{let t=o*Math.sqrt(a*a-1);p=i=>{let s=Math.exp(-a*o*i),c=Math.min(t*i,300);return n-s*((e+a*o*r)*Math.sinh(c)+t*r*Math.cosh(c))/t}}}return h(),{next:e=>{let t=p(e);if(f)o.done=e>=d;else{let a=m(e)*1e3,s=Math.abs(a)<=r,c=Math.abs(n-t)<=i;o.done=s&&c}return o.value=o.done?n:t,o},flipTarget:()=>{u=-u,[t,n]=[n,t],h()}}}yi.needsInterpolation=(e,t)=>typeof e==`string`||typeof t==`string`;var bi=e=>0,xi=(e,t,n)=>{let r=t-e;return r===0?1:(n-e)/r},Si=(e,t,n)=>-n*e+n*t+e,Ci=(e,t)=>n=>Math.max(Math.min(n,t),e),wi=e=>e%1?Number(e.toFixed(5)):e,Ti=/(-)?([\d]*\.?[\d])+/g,Ei=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,Di=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Oi(e){return typeof e==`string`}var ki={test:e=>typeof e==`number`,parse:parseFloat,transform:e=>e},Ai=Object.assign(Object.assign({},ki),{transform:Ci(0,1)}),ji=Object.assign(Object.assign({},ki),{default:1}),Mi=e=>({test:t=>Oi(t)&&t.endsWith(e)&&t.split(` `).length===1,parse:parseFloat,transform:t=>`${t}${e}`}),J=Mi(`deg`),Ni=Mi(`%`),Y=Mi(`px`),Pi=Object.assign(Object.assign({},Ni),{parse:e=>Ni.parse(e)/100,transform:e=>Ni.transform(e*100)}),Fi=(e,t)=>n=>!!(Oi(n)&&Di.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Ii=(e,t,n)=>r=>{if(!Oi(r))return r;let[i,a,o,s]=r.match(Ti);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(o),alpha:s===void 0?1:parseFloat(s)}},X={test:Fi(`hsl`,`hue`),parse:Ii(`hue`,`saturation`,`lightness`),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>`hsla(`+Math.round(e)+`, `+Ni.transform(wi(t))+`, `+Ni.transform(wi(n))+`, `+wi(Ai.transform(r))+`)`},Li=Ci(0,255),Ri=Object.assign(Object.assign({},ki),{transform:e=>Math.round(Li(e))}),Z={test:Fi(`rgb`,`red`),parse:Ii(`red`,`green`,`blue`),transform:({red:e,green:t,blue:n,alpha:r=1})=>`rgba(`+Ri.transform(e)+`, `+Ri.transform(t)+`, `+Ri.transform(n)+`, `+wi(Ai.transform(r))+`)`};function zi(e){let t=``,n=``,r=``,i=``;return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),i=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),i=e.substr(4,1),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}var Bi={test:Fi(`#`),parse:zi,transform:Z.transform},Q={test:e=>Z.test(e)||Bi.test(e)||X.test(e),parse:e=>Z.test(e)?Z.parse(e):X.test(e)?X.parse(e):Bi.parse(e),transform:e=>Oi(e)?e:e.hasOwnProperty(`red`)?Z.transform(e):X.transform(e)},Vi="${c}",Hi="${n}";function Ui(e){return isNaN(e)&&Oi(e)&&(e.match(Ti)?.length??0)+(e.match(Ei)?.length??0)>0}function Wi(e){typeof e==`number`&&(e=`${e}`);let t=[],n=0,r=e.match(Ei);r&&(n=r.length,e=e.replace(Ei,Vi),t.push(...r.map(Q.parse)));let i=e.match(Ti);return i&&(e=e.replace(Ti,Hi),t.push(...i.map(ki.parse))),{values:t,numColors:n,tokenised:e}}function Gi(e){return Wi(e).values}function Ki(e){let{values:t,numColors:n,tokenised:r}=Wi(e),i=t.length;return e=>{let t=r;for(let r=0;rtypeof e==`number`?0:e;function Ji(e){let t=Gi(e);return Ki(e)(t.map(qi))}var Yi={test:Ui,parse:Gi,createTransformer:Ki,getAnimatableNone:Ji},Xi=new Set([`brightness`,`contrast`,`saturate`,`opacity`]);function Zi(e){let[t,n]=e.slice(0,-1).split(`(`);if(t===`drop-shadow`)return e;let[r]=n.match(Ti)||[];if(!r)return e;let i=n.replace(r,``),a=+!!Xi.has(t);return r!==n&&(a*=100),t+`(`+a+i+`)`}var Qi=/([a-z-]*)\(.*?\)/g,$i=Object.assign(Object.assign({},Yi),{getAnimatableNone:e=>{let t=e.match(Qi);return t?t.map(Zi).join(` `):e}});function ea(e,t,n){return n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function ta({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,a=0,o=0;if(!t)i=a=o=n;else{let r=n<.5?n*(1+t):n+t-n*t,s=2*n-r;i=ea(s,r,e+1/3),a=ea(s,r,e),o=ea(s,r,e-1/3)}return{red:Math.round(i*255),green:Math.round(a*255),blue:Math.round(o*255),alpha:r}}var na=(e,t,n)=>{let r=e*e,i=t*t;return Math.sqrt(Math.max(0,n*(i-r)+r))},ra=[Bi,Z,X],ia=e=>ra.find(t=>t.test(e)),aa=e=>`'${e}' is not an animatable color. Use the equivalent color code instead.`,oa=(e,t)=>{let n=ia(e),r=ia(t);aa(e),aa(t);let i=n.parse(e),a=r.parse(t);n===X&&(i=ta(i),n=Z),r===X&&(a=ta(a),r=Z);let o=Object.assign({},i);return e=>{for(let t in o)t!==`alpha`&&(o[t]=na(i[t],a[t],e));return o.alpha=Si(i.alpha,a.alpha,e),n.transform(o)}},sa=e=>typeof e==`number`,ca=(e,t)=>n=>t(e(n)),la=(...e)=>e.reduce(ca);function ua(e,t){return sa(e)?n=>Si(e,t,n):Q.test(e)?oa(e,t):ma(e,t)}var da=(e,t)=>{let n=[...e],r=n.length,i=e.map((e,n)=>ua(e,t[n]));return e=>{for(let t=0;t{let n=Object.assign(Object.assign({},e),t),r={};for(let i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ua(e[i],t[i]));return e=>{for(let t in r)n[t]=r[t](e);return n}};function pa(e){let t=Yi.parse(e),n=t.length,r=0,i=0,a=0;for(let e=0;e{let n=Yi.createTransformer(t),r=pa(e),i=pa(t);return r.numHSL===i.numHSL&&r.numRGB===i.numRGB&&r.numNumbers>=i.numNumbers?la(da(r.parsed,i.parsed),n):(`${e}${t}`,n=>`${n>0?t:e}`)},ha=(e,t)=>n=>Si(e,t,n);function ga(e){if(typeof e==`number`)return ha;if(typeof e==`string`)return Q.test(e)?oa:ma;if(Array.isArray(e))return da;if(typeof e==`object`)return fa}function _a(e,t,n){let r=[],i=n||ga(e[0]),a=e.length-1;for(let n=0;nn(xi(e,t,r))}function ya(e,t){let n=e.length,r=n-1;return i=>{let a=0,o=!1;if(i<=e[0]?o=!0:i>=e[r]&&(a=r-1,o=!0),!o){let t=1;for(;ti||t===r);t++);a=t-1}let s=xi(e[a],e[a+1],i);return t[a](s)}}function ba(e,t,{clamp:n=!0,ease:r,mixer:i}={}){let a=e.length;t.length,!r||!Array.isArray(r)||(r.length,a-1),e[0]>e[a-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());let o=_a(t,r,i),s=a===2?va(e,o):ya(e,o);return n?t=>s(si(e[0],e[a-1],t)):s}var xa=e=>t=>1-e(1-t),Sa=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Ca=e=>t=>t**+e,wa=e=>t=>t*t*((e+1)*t-e),Ta=e=>{let t=wa(e);return e=>(e*=2)<1?.5*t(e):.5*(2-2**(-10*(e-1)))},Ea=1.525,Da=4/11,Oa=8/11,ka=9/10,Aa=e=>e,ja=Ca(2),Ma=xa(ja),Na=Sa(ja),Pa=e=>1-Math.sin(Math.acos(e)),Fa=xa(Pa),Ia=Sa(Fa),La=wa(Ea),Ra=xa(La),za=Sa(La),Ba=Ta(Ea),Va=4356/361,Ha=35442/1805,Ua=16061/1805,Wa=e=>{if(e===1||e===0)return e;let t=e*e;return ee<.5?.5*(1-Wa(1-e*2)):.5*Wa(e*2-1)+.5;function qa(e,t){return e.map(()=>t||Na).splice(0,e.length-1)}function Ja(e){let t=e.length;return e.map((e,n)=>n===0?0:n/(t-1))}function Ya(e,t){return e.map(e=>e*t)}function Xa({from:e=0,to:t=1,ease:n,offset:r,duration:i=300}){let a={done:!1,value:e},o=Array.isArray(t)?t:[e,t],s=Ya(r&&r.length===o.length?r:Ja(o),i);function c(){return ba(s,o,{ease:Array.isArray(n)?n:qa(o,n)})}let l=c();return{next:e=>(a.value=l(e),a.done=e>=i,a),flipTarget:()=>{o.reverse(),l=c()}}}function Za({velocity:e=0,from:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){let o={done:!1,value:t},s=n*e,c=t+s,l=a===void 0?c:a(c);return l!==c&&(s=l-t),{next:e=>{let t=-s*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?l:l+t,o},flipTarget:()=>{}}}var Qa={keyframes:Xa,spring:yi,decay:Za};function $a(e){if(Array.isArray(e.to))return Xa;if(Qa[e.type])return Qa[e.type];let t=new Set(Object.keys(e));return t.has(`ease`)||t.has(`duration`)&&!t.has(`dampingRatio`)?Xa:t.has(`dampingRatio`)||t.has(`stiffness`)||t.has(`mass`)||t.has(`damping`)||t.has(`restSpeed`)||t.has(`restDelta`)?yi:Xa}function eo(e,t,n=0){return e-t-n}function to(e,t,n=0,r=!0){return r?eo(t+-e,t,n):t-(e-t)+n}function no(e,t,n,r){return r?e>=t+n:e<=-n}var ro=e=>{let t=({delta:t})=>e(t);return{start:()=>ei.update(t,!0),stop:()=>ti.update(t)}};function io(e){var t,{from:n,autoplay:r=!0,driver:i=ro,elapsed:a=0,repeat:o=0,repeatType:s=`loop`,repeatDelay:c=0,onPlay:l,onStop:u,onComplete:d,onRepeat:f,onUpdate:p}=e,m=oi(e,[`from`,`autoplay`,`driver`,`elapsed`,`repeat`,`repeatType`,`repeatDelay`,`onPlay`,`onStop`,`onComplete`,`onRepeat`,`onUpdate`]);let{to:h}=m,g,_=0,v=m.duration,y,b=!1,x=!0,S,C=$a(m);(t=C).needsInterpolation?.call(t,n,h)&&(S=ba([0,100],[n,h],{clamp:!1}),n=0,h=100);let w=C(Object.assign(Object.assign({},m),{from:n,to:h}));function T(){_++,s===`reverse`?(x=_%2==0,a=to(a,v,c,x)):(a=eo(a,v,c),s===`mirror`&&w.flipTarget()),b=!1,f&&f()}function E(){g.stop(),d&&d()}function D(e){if(x||(e=-e),a+=e,!b){let e=w.next(Math.max(0,a));y=e.value,S&&(y=S(y)),b=x?e.done:a<=0}p?.(y),b&&(_===0&&(v??=a),_{u?.(),g.stop()}}}function ao(e,t){return t?1e3/t*e:0}function oo({from:e=0,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:o=500,bounceDamping:s=10,restDelta:c=1,modifyTarget:l,driver:u,onUpdate:d,onComplete:f,onStop:p}){let m;function h(e){return n!==void 0&&er}function g(e){return n===void 0?r:r===void 0||Math.abs(n-e){var n;d?.(t),(n=e.onUpdate)==null||n.call(e,t)},onComplete:f,onStop:p}))}function v(e){_(Object.assign({type:`spring`,stiffness:o,damping:s,restDelta:c},e))}if(h(e))v({from:e,velocity:t,to:g(e)});else{let r=i*t+e;l!==void 0&&(r=l(r));let o=g(r),s=o===n?-1:1,u,d;_({type:`decay`,from:e,velocity:t,timeConstant:a,power:i,restDelta:c,modifyTarget:l,onUpdate:h(r)?e=>{u=d,d=e,t=ao(e-u,ai().delta),(s===1&&e>o||s===-1&&em?.stop()}}var so=(e,t)=>1-3*t+3*e,co=(e,t)=>3*t-6*e,lo=e=>3*e,uo=(e,t,n)=>((so(t,n)*e+co(t,n))*e+lo(t))*e,fo=(e,t,n)=>3*so(t,n)*e*e+2*co(t,n)*e+lo(t),po=1e-7,mo=10;function ho(e,t,n,r,i){let a,o,s=0;do o=t+(n-t)/2,a=uo(o,r,i)-e,a>0?n=o:t=o;while(Math.abs(a)>po&&++s=_o?vo(t,s,e,n):c===0?s:ho(t,r,r+bo,e,n)}return e=>e===0||e===1?e:uo(a(e),t,r)}var So={},Co=class{subscriptions=new Set;add(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}notify(e,t,n){if(this.subscriptions.size)for(let r of this.subscriptions)r(e,t,n)}clear(){this.subscriptions.clear()}};function wo(e){return!Number.isNaN(Number.parseFloat(e))}var To=class{current;prev;timeDelta=0;lastUpdated=0;updateSubscribers=new Co;stopAnimation;canTrackVelocity=!1;constructor(e){this.prev=this.current=e,this.canTrackVelocity=wo(this.current)}onChange(e){return this.updateSubscribers.add(e)}clearListeners(){this.updateSubscribers.clear()}set(e){this.updateAndNotify(e)}updateAndNotify=e=>{this.prev=this.current,this.current=e;let{delta:t,timestamp:n}=ai();this.lastUpdated!==n&&(this.timeDelta=t,this.lastUpdated=n),ei.postRender(this.scheduleVelocityCheck),this.updateSubscribers.notify(this.current)};get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?ao(Number.parseFloat(this.current)-Number.parseFloat(this.prev),this.timeDelta):0}scheduleVelocityCheck=()=>ei.postRender(this.velocityCheck);velocityCheck=({timestamp:e})=>{this.canTrackVelocity||=wo(this.current),e!==this.lastUpdated&&(this.prev=this.current)};start(e){return this.stop(),new Promise(t=>{let{stop:n}=e(t);this.stopAnimation=n}).then(()=>this.clearAnimation())}stop(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()}isAnimating(){return!!this.stopAnimation}clearAnimation(){this.stopAnimation=null}destroy(){this.updateSubscribers.clear(),this.stop()}};function Eo(e){return new To(e)}var{isArray:Do}=Array;function Oo(){let e=f({}),t=t=>{let n=t=>{e.value[t]&&(e.value[t].stop(),e.value[t].destroy(),delete e.value[t])};t?Do(t)?t.forEach(n):n(t):Object.keys(e.value).forEach(n)};return Ir(t),{motionValues:e,get:(t,n,r)=>{if(e.value[t])return e.value[t];let i=Eo(n);return i.onChange(e=>r[t]=e),e.value[t]=i,i},stop:t}}function ko(e){return Array.isArray(e)}function $(){return{type:`spring`,stiffness:500,damping:25,restDelta:.5,restSpeed:10}}function Ao(e){return{type:`spring`,stiffness:550,damping:e===0?2*Math.sqrt(550):30,restDelta:.01,restSpeed:10}}function jo(e){return{type:`spring`,stiffness:550,damping:e===0?100:30,restDelta:.01,restSpeed:10}}function Mo(){return{type:`keyframes`,ease:`linear`,duration:300}}function No(e){return{type:`keyframes`,duration:800,values:e}}var Po={default:jo,x:$,y:$,z:$,rotate:$,rotateX:$,rotateY:$,rotateZ:$,scaleX:Ao,scaleY:Ao,scale:Ao,backgroundColor:Mo,color:Mo,opacity:Mo};function Fo(e,t){let n;return n=ko(t)?No:Po[e]||Po.default,{to:t,...n(t)}}var Io={...ki,transform:Math.round},Lo={color:Q,backgroundColor:Q,outlineColor:Q,fill:Q,stroke:Q,borderColor:Q,borderTopColor:Q,borderRightColor:Q,borderBottomColor:Q,borderLeftColor:Q,borderWidth:Y,borderTopWidth:Y,borderRightWidth:Y,borderBottomWidth:Y,borderLeftWidth:Y,borderRadius:Y,radius:Y,borderTopLeftRadius:Y,borderTopRightRadius:Y,borderBottomRightRadius:Y,borderBottomLeftRadius:Y,width:Y,maxWidth:Y,height:Y,maxHeight:Y,size:Y,top:Y,right:Y,bottom:Y,left:Y,padding:Y,paddingTop:Y,paddingRight:Y,paddingBottom:Y,paddingLeft:Y,margin:Y,marginTop:Y,marginRight:Y,marginBottom:Y,marginLeft:Y,rotate:J,rotateX:J,rotateY:J,rotateZ:J,scale:ji,scaleX:ji,scaleY:ji,scaleZ:ji,skew:J,skewX:J,skewY:J,distance:Y,translateX:Y,translateY:Y,translateZ:Y,x:Y,y:Y,z:Y,perspective:Y,transformPerspective:Y,opacity:Ai,originX:Pi,originY:Pi,originZ:Y,zIndex:Io,filter:$i,WebkitFilter:$i,fillOpacity:Ai,strokeOpacity:Ai,numOctaves:Io},Ro=e=>Lo[e];function zo(e,t){return t&&typeof e==`number`&&t.transform?t.transform(e):e}function Bo(e,t){let n=Ro(e);return n!==$i&&(n=Yi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Vo={linear:Aa,easeIn:ja,easeInOut:Na,easeOut:Ma,circIn:Pa,circInOut:Ia,circOut:Fa,backIn:La,backInOut:za,backOut:Ra,anticipate:Ba,bounceIn:Ga,bounceInOut:Ka,bounceOut:Wa};function Ho(e){if(Array.isArray(e)){let[t,n,r,i]=e;return xo(t,n,r,i)}return typeof e==`string`?Vo[e]:e}function Uo(e){return Array.isArray(e)&&typeof e[0]!=`number`}function Wo(e,t){return e!==`zIndex`&&!!(typeof t==`number`||Array.isArray(t)||typeof t==`string`&&Yi.test(t)&&!t.startsWith(`url(`))}function Go(e){return Array.isArray(e.to)&&e.to[0]===null&&(e.to=[...e.to],e.to[0]=e.from),e}function Ko({ease:e,times:t,delay:n,...r}){let i={...r};return t&&(i.offset=t),e&&(i.ease=Uo(e)?e.map(Ho):Ho(e)),n&&(i.elapsed=-n),i}function qo(e,t,n){return Array.isArray(t.to)&&(e.duration||(e.duration=800)),Go(t),Jo(e)||(e={...e,...Fo(n,t.to)}),{...t,...Ko(e)}}function Jo({delay:e,repeat:t,repeatType:n,repeatDelay:r,from:i,...a}){return!!Object.keys(a).length}function Yo(e,t){return e[t]||e.default||e}function Xo(e,t,n,r,i){let a=Yo(r,e),o=a.from===null||a.from===void 0?t.get():a.from,s=Wo(e,n);o===`none`&&s&&typeof n==`string`&&(o=Bo(e,n));let c=Wo(e,o);function l(s){let c={from:o,to:n,velocity:r.velocity?r.velocity:t.getVelocity(),onUpdate:e=>t.set(e)};return a.type===`inertia`||a.type===`decay`?oo({...c,...a}):io({...qo(a,c,e),onUpdate:e=>{c.onUpdate(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i&&i(),s&&s()}})}function u(e){return t.set(n),i&&i(),e&&e(),{stop:()=>{}}}return!c||!s||a.type===!1?u:l}function Zo(){let{motionValues:e,stop:t,get:n}=Oo();return{motionValues:e,stop:t,push:(e,t,r,i={},a)=>{let o=r[e],s=n(e,o,r);if(i&&i.immediate){s.set(t);return}let c=Xo(e,s,t,i,a);s.start(c)}}}function Qo(e,t={},{motionValues:n,push:r,stop:i}=Zo()){let a=O(t),o=f(!1);l(n,e=>{o.value=Object.values(e).filter(e=>e.isAnimating()).length>0},{immediate:!0,deep:!0});let s=e=>{if(!a||!a[e])throw Error(`The variant ${e} does not exist.`);return a[e]},c=t=>{typeof t==`string`&&(t=s(t));let n=Object.entries(t).map(([n,i])=>{if(n!==`transition`)return new Promise(a=>r(n,i,e,t.transition||Fo(n,t[n]),a))}).filter(Boolean);async function i(){await Promise.all(n),t.transition?.onComplete?.()}return Promise.all([i()])};return{isAnimating:o,apply:c,set:t=>{let n=Mr(t)?t:s(t);Object.entries(n).forEach(([t,n])=>{t!==`transition`&&r(t,n,e,{immediate:!0})})},leave:async e=>{let t;if(a&&(a.leave&&(t=a.leave),!a.leave&&a.initial&&(t=a.initial)),!t){e();return}await c(t),e()},stop:i}}var $o=typeof window<`u`,es=()=>$o&&(window.onpointerdown===null||void 0),ts=()=>$o&&(window.ontouchstart===null||void 0),ns=()=>$o&&(window.onmousedown===null||void 0);function rs({target:e,state:t,variants:n,apply:r}){let i=O(n),a=f(!1),o=f(!1),s=f(!1),c=m(()=>{let e=[...Object.keys(t.value||{})];return i?(i.hovered&&(e=[...e,...Object.keys(i.hovered)]),i.tapped&&(e=[...e,...Object.keys(i.tapped)]),i.focused&&(e=[...e,...Object.keys(i.focused)]),e):e}),u=m(()=>{let e={};Object.assign(e,t.value),a.value&&i.hovered&&Object.assign(e,i.hovered),o.value&&i.tapped&&Object.assign(e,i.tapped),s.value&&i.focused&&Object.assign(e,i.focused);for(let t in e)c.value.includes(t)||delete e[t];return e});i.hovered&&(q(e,`mouseenter`,()=>a.value=!0),q(e,`mouseleave`,()=>{a.value=!1,o.value=!1})),i.tapped&&(ns()&&(q(e,`mousedown`,()=>o.value=!0),q(e,`mouseup`,()=>o.value=!1)),es()&&(q(e,`pointerdown`,()=>o.value=!0),q(e,`pointerup`,()=>o.value=!1)),ts()&&(q(e,`touchstart`,()=>o.value=!0),q(e,`touchend`,()=>o.value=!1))),i.focused&&(q(e,`focus`,()=>s.value=!0),q(e,`blur`,()=>s.value=!1)),l([a,o,s],()=>{r(u.value)})}function is({set:e,target:t,variants:n,variant:r}){let i=O(n);l(()=>t,()=>{i&&(i.initial&&(e(`initial`),r.value=`initial`),i.enter&&(r.value=`enter`))},{immediate:!0,flush:`pre`})}function as({state:e,apply:t}){l(e,e=>{e&&t(e)},{immediate:!0})}function os({target:e,variants:t,variant:n}){let r=O(t);r&&(r.visible||r.visibleOnce)&&Hr(e,([{isIntersecting:e}])=>{r.visible?n.value=e?`visible`:`initial`:r.visibleOnce&&(e&&n.value!==`visibleOnce`?n.value=`visibleOnce`:n.value||=`initial`)})}function ss(e,t={syncVariants:!0,lifeCycleHooks:!0,visibilityHooks:!0,eventListeners:!0}){t.lifeCycleHooks&&is(e),t.syncVariants&&as(e),t.visibilityHooks&&os(e),t.eventListeners&&rs(e)}function cs(e={}){let t=y({...e}),n=f({});return l(t,()=>{let e={};for(let[n,r]of Object.entries(t))e[n]=zo(r,Ro(n));n.value=e},{immediate:!0,deep:!0}),{state:t,style:n}}function ls(e,t){l(()=>zr(e),e=>{e&&t(e)},{immediate:!0})}var us={x:`translateX`,y:`translateY`,z:`translateZ`};function ds(e={},t=!0){let n=y({...e}),r=f(``);return l(n,e=>{let n=``,i=!1;if(t&&(e.x||e.y||e.z)){let t=[e.x||0,e.y||0,e.z||0].map(e=>zo(e,Y)).join(`,`);n+=`translate3d(${t}) `,i=!0}for(let[r,i]of Object.entries(e)){if(t&&(r===`x`||r===`y`||r===`z`))continue;let e=zo(i,Ro(r));n+=`${us[r]||r}(${e}) `}t&&!i&&(n+=`translateZ(0px) `),r.value=n.trim()},{immediate:!0,deep:!0}),{state:n,transform:r}}var fs=[``,`X`,`Y`,`Z`],ps=[`perspective`,`translate`,`scale`,`rotate`,`skew`],ms=[`transformPerspective`,`x`,`y`,`z`];ps.forEach(e=>{fs.forEach(t=>{let n=e+t;ms.push(n)})});var hs=new Set(ms);function gs(e){return hs.has(e)}var _s=new Set([`originX`,`originY`,`originZ`]);function vs(e){return _s.has(e)}function ys(e){let t={},n={};return Object.entries(e).forEach(([e,r])=>{gs(e)||vs(e)?t[e]=r:n[e]=r}),{transform:t,style:n}}function bs(e){let{transform:t,style:n}=ys(e),{transform:r}=ds(t),{style:i}=cs(n);return r.value&&(i.value.transform=r.value),i.value}function xs(e,t){let n,r,{state:i,style:a}=cs();return ls(e,e=>{r=e;for(let t of Object.keys(Lo))e.style[t]===null||e.style[t]===``||gs(t)||vs(t)||(i[t]=e.style[t]);n&&Object.entries(n).forEach(([t,n])=>e.style[t]=n),t&&t(i)}),l(a,e=>{if(!r){n=e;return}for(let t in e)r.style[t]=e[t]},{immediate:!0}),{style:i}}function Ss(e){let t=e.trim().split(/\) |\)/);if(t.length===1)return{};let n=e=>e.endsWith(`px`)||e.endsWith(`deg`)?Number.parseFloat(e):Number.isNaN(Number(e))?Number(e):e;return t.reduce((e,t)=>{if(!t)return e;let[r,i]=t.split(`(`),a=i.split(`,`).map(e=>n(e.endsWith(`)`)?e.replace(`)`,``):e.trim())),o=a.length===1?a[0]:a;return{...e,[r]:o}},{})}function Cs(e,t){Object.entries(Ss(t)).forEach(([t,n])=>{let r=[`x`,`y`,`z`];if(t===`translate3d`){if(n===0){r.forEach(t=>e[t]=0);return}n.forEach((t,n)=>e[r[n]]=t);return}if(n=Number.parseFloat(`${n}`),t===`translateX`){e.x=n;return}if(t===`translateY`){e.y=n;return}if(t===`translateZ`){e.z=n;return}e[t]=n})}function ws(e,t){let n,r,{state:i,transform:a}=ds();return ls(e,e=>{r=e,e.style.transform&&Cs(i,e.style.transform),n&&(e.style.transform=n),t&&t(i)}),l(a,e=>{if(!r){n=e;return}r.style.transform=e},{immediate:!0}),{transform:i}}function Ts(e){return Object.entries(e)}function Es(e,t){let n=y({}),r=e=>Object.entries(e).forEach(([e,t])=>n[e]=t),{style:i}=xs(e,r),{transform:a}=ws(e,r);return l(n,e=>{Ts(e).forEach(([e,t])=>{let n=gs(e)?a:i;n[e]&&n[e]===t||(n[e]=t)})},{immediate:!0,deep:!0}),ls(e,()=>t&&r(t)),{motionProperties:n,style:i,transform:a}}function Ds(e={}){let t=O(e),n=f();return{state:m(()=>{if(n.value)return t[n.value]}),variant:n}}function Os(e,t={},n){let{motionProperties:r}=Es(e),{variant:i,state:a}=Ds(t),o={target:e,variant:i,variants:t,state:a,motionProperties:r,...Qo(r,t)};return ss(o,n),o}var ks=[`delay`,`duration`],As=[`initial`,`enter`,`leave`,`visible`,`visible-once`,`visibleOnce`,`hovered`,`tapped`,`focused`,...ks];function js(e){return ks.includes(e)}function Ms(e,t){let n=e.props?e.props:e.data&&e.data.attrs?e.data.attrs:{};if(n){n.variants&&Mr(n.variants)&&(t.value={...t.value,...n.variants});for(let e of As)if(!(!n||!n[e])){if(js(e)&&typeof n[e]==`number`){for(let r of[`enter`,`visible`,`visibleOnce`]){let i=t.value[r];i!=null&&(i.transition??={},i.transition[e]=n[e])}continue}if(Mr(n[e])){let r=n[e];e===`visible-once`&&(e=`visibleOnce`),t.value[e]=r}}}}function Ns(e,t=!1){return{created:(n,r,i)=>{let a=r.value&&typeof r.value==`string`?r.value:i.key;a&&So[a]&&So[a].stop();let o=t?structuredClone(g(e)||{}):e||{},s=f(o);typeof r.value==`object`&&(s.value=r.value),Ms(i,s);let c=Os(n,s,{eventListeners:!0,lifeCycleHooks:!0,syncVariants:!0,visibilityHooks:!1});n.motionInstance=c,a&&(So[a]=c)},mounted:(e,t,n)=>{e.motionInstance&&os(e.motionInstance)},getSSRProps(t,n){let{initial:r}=t.value||n&&n?.props||{};r=O(r);let i=Dr({},e?.initial||{},r||{});if(!(!i||Object.keys(i).length===0))return{style:bs(i)}}}}var Ps={__proto__:null,fade:{initial:{opacity:0},enter:{opacity:1}},fadeVisible:{initial:{opacity:0},visible:{opacity:1}},fadeVisibleOnce:{initial:{opacity:0},visibleOnce:{opacity:1}},pop:{initial:{scale:0,opacity:0},enter:{scale:1,opacity:1}},popVisible:{initial:{scale:0,opacity:0},visible:{scale:1,opacity:1}},popVisibleOnce:{initial:{scale:0,opacity:0},visibleOnce:{scale:1,opacity:1}},rollBottom:{initial:{y:100,rotate:90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollLeft:{initial:{x:-100,rotate:90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollRight:{initial:{x:100,rotate:-90,opacity:0},enter:{x:0,rotate:0,opacity:1}},rollTop:{initial:{y:-100,rotate:-90,opacity:0},enter:{y:0,rotate:0,opacity:1}},rollVisibleBottom:{initial:{y:100,rotate:90,opacity:0},visible:{y:0,rotate:0,opacity:1}},rollVisibleLeft:{initial:{x:-100,rotate:90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleOnceBottom:{initial:{y:100,rotate:90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollVisibleOnceLeft:{initial:{x:-100,rotate:90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollVisibleOnceRight:{initial:{x:100,rotate:-90,opacity:0},visibleOnce:{x:0,rotate:0,opacity:1}},rollVisibleOnceTop:{initial:{y:-100,rotate:-90,opacity:0},visibleOnce:{y:0,rotate:0,opacity:1}},rollVisibleRight:{initial:{x:100,rotate:-90,opacity:0},visible:{x:0,rotate:0,opacity:1}},rollVisibleTop:{initial:{y:-100,rotate:-90,opacity:0},visible:{y:0,rotate:0,opacity:1}},slideBottom:{initial:{y:100,opacity:0},enter:{y:0,opacity:1}},slideLeft:{initial:{x:-100,opacity:0},enter:{x:0,opacity:1}},slideRight:{initial:{x:100,opacity:0},enter:{x:0,opacity:1}},slideTop:{initial:{y:-100,opacity:0},enter:{y:0,opacity:1}},slideVisibleBottom:{initial:{y:100,opacity:0},visible:{y:0,opacity:1}},slideVisibleLeft:{initial:{x:-100,opacity:0},visible:{x:0,opacity:1}},slideVisibleOnceBottom:{initial:{y:100,opacity:0},visibleOnce:{y:0,opacity:1}},slideVisibleOnceLeft:{initial:{x:-100,opacity:0},visibleOnce:{x:0,opacity:1}},slideVisibleOnceRight:{initial:{x:100,opacity:0},visibleOnce:{x:0,opacity:1}},slideVisibleOnceTop:{initial:{y:-100,opacity:0},visibleOnce:{y:0,opacity:1}},slideVisibleRight:{initial:{x:100,opacity:0},visible:{x:0,opacity:1}},slideVisibleTop:{initial:{y:-100,opacity:0},visible:{y:0,opacity:1}}},Fs=Symbol(``),Is={preset:{type:String,required:!1},instance:{type:Object,required:!1},variants:{type:Object,required:!1},initial:{type:Object,required:!1},enter:{type:Object,required:!1},leave:{type:Object,required:!1},visible:{type:Object,required:!1},visibleOnce:{type:Object,required:!1},hovered:{type:Object,required:!1},tapped:{type:Object,required:!1},focused:{type:Object,required:!1},delay:{type:[Number,String],required:!1},duration:{type:[Number,String],required:!1}};function Ls(e){return Object.prototype.toString.call(e)===`[object Object]`}function Rs(e){if(Array.isArray(e))return e.map(Rs);if(Ls(e)){let t={};for(let n in e)t[n]=Rs(e[n]);return t}return e}function zs(t){let n=y({}),r=e(Fs,{}),i=m(()=>t.preset==null?{}:r!=null&&t.preset in r?structuredClone(g(r)[t.preset]):t.preset in Ps?structuredClone(Ps[t.preset]):{}),a=m(()=>({initial:t.initial,enter:t.enter,leave:t.leave,visible:t.visible,visibleOnce:t.visibleOnce,hovered:t.hovered,tapped:t.tapped,focused:t.focused}));function o(e,t){for(let n of[`delay`,`duration`]){if(t[n]==null)continue;let r=Number.parseInt(t[n]);for(let t of[`enter`,`visible`,`visibleOnce`]){let i=e[t];i!=null&&(i.transition??={},i.transition[n]=r)}}return e}let s=m(()=>o({...Dr({},a.value,i.value,t.variants||{})},t));function c(e,t,r){e.props??={},e.props.style??={},e.props.style={...e.props.style,...r};let i=o(Rs(s.value),e.props);return e.props.onVnodeMounted=({el:e})=>{n[t]=Os(e,i)},e.props.onVnodeUpdated=({el:e})=>{let r=bs(n[t].state);for(let[t,n]of Object.entries(r))e.style[t]=n},e}return{motionConfig:s,setNodeInstance:c}}o({name:`Motion`,props:{...Is,is:{type:[String,Object],default:`div`}},setup(e){let t=c(),{motionConfig:r,setNodeInstance:i}=zs(e);return()=>{let a=bs(r.value.initial||{}),o=n(e.is,void 0,t);return i(o,0,a),o}}}),o({name:`MotionGroup`,props:{...Is,is:{type:[String,Object],required:!1}},setup(e){let t=c(),{motionConfig:r,setNodeInstance:i}=zs(e);return()=>{let a=bs(r.value.initial||{}),o=t.default?.()||[];for(let e=0;ee.every(e=>D(e)))}var Vs=Bs;function Hs(e){return m(()=>!D(e))}var Us=Hs;function Ws(...e){return m(()=>e.some(e=>D(e)))}var Gs=Ws;export{Jt as A,de as B,br as C,hn as D,Cr as E,bn as F,yn as I,Sn as L,fn as M,Yt as N,wn as O,en as P,Kt as R,yr as S,Sr as T,ue as V,pr as _,Vn as a,gr as b,Rn as c,ar as d,sr as f,dr as g,ur as h,Ns as i,z as j,En as k,Hn as l,W as m,Us as n,Mn as o,cr as p,Gs as r,Ln as s,Vs as t,Wn as u,K as v,xr as w,Zn as x,hr as y,mt as z}; \ No newline at end of file diff --git a/lecture-08/assets/overview-BIQ10iVu.css b/lecture-08/assets/overview-BIQ10iVu.css new file mode 100644 index 0000000000000000000000000000000000000000..5ac480cef2330ef92e6970e4ce48338b846b6bd0 --- /dev/null +++ b/lecture-08/assets/overview-BIQ10iVu.css @@ -0,0 +1 @@ +.overview-slide-block:hover .overview-slide-action[data-v-47f32601]{opacity:.6}.overview-slide-action[data-v-47f32601]:hover{opacity:.8} diff --git a/lecture-08/assets/play-D_7yfuao.css b/lecture-08/assets/play-D_7yfuao.css new file mode 100644 index 0000000000000000000000000000000000000000..397d386dd314e2c98360c571f82fe57cf792b617 --- /dev/null +++ b/lecture-08/assets/play-D_7yfuao.css @@ -0,0 +1 @@ +.slidev-info-dialog{max-width:37.5rem;padding:1rem!important} diff --git a/lecture-08/assets/presenter-J5ibmAMh.css b/lecture-08/assets/presenter-J5ibmAMh.css new file mode 100644 index 0000000000000000000000000000000000000000..894310ab10e45ab878c88c883d0863829e21b29e --- /dev/null +++ b/lecture-08/assets/presenter-J5ibmAMh.css @@ -0,0 +1 @@ +.slidev-presenter[data-v-e7a794bf]{--slidev-controls-foreground:current}.grid-container[data-v-e7a794bf]{--slidev-presenter-notes-width:360px;--slidev-presenter-notes-row-size:280px;background-color:#9ca3af33;flex:1;gap:1px;display:grid;position:relative;overflow:hidden}.grid-container.layout1[data-v-e7a794bf]{grid-template-columns:var(--slidev-presenter-notes-width) minmax(0, 1fr);grid-template-rows:minmax(0, 2fr) minmax(0, var(--slidev-presenter-notes-row-size)) min-content;grid-template-areas:"main main""note next""bottom bottom"}.grid-container.layout2[data-v-e7a794bf]{grid-template-columns:var(--slidev-presenter-notes-width) minmax(0, 1fr);grid-template-rows:minmax(0, var(--slidev-presenter-notes-row-size)) minmax(0, 1fr) min-content;grid-template-areas:"note main""note next""bottom bottom"}@media (aspect-ratio<=3/5){.grid-container.layout1[data-v-e7a794bf]{grid-template:"main"2fr"note"1fr"next"1fr"bottom"min-content/1fr}}@media (aspect-ratio>=1){.grid-container.layout1[data-v-e7a794bf]{grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr) var(--slidev-presenter-notes-width);grid-template-rows:minmax(0, 1fr) minmax(0, var(--slidev-presenter-notes-row-size)) min-content;grid-template-areas:"main main next""main main note""bottom bottom bottom"}}.grid-container.layout3[data-v-e7a794bf]{grid-template-columns:var(--slidev-presenter-notes-width) minmax(0, 1fr);grid-template-rows:minmax(0, var(--slidev-presenter-notes-row-size)) minmax(0, 1fr) min-content;grid-template-areas:"note next""main next""bottom bottom"}.grid-section[data-v-e7a794bf]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity))}.dark .grid-section[data-v-e7a794bf]{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.grid-section.top[data-v-e7a794bf]{grid-area:top}.grid-section.main[data-v-e7a794bf]{grid-area:main}.grid-section.next[data-v-e7a794bf]{grid-area:next}.grid-section.note[data-v-e7a794bf]{grid-area:note}.grid-section.bottom[data-v-e7a794bf]{grid-area:bottom}.notes-resizer[data-v-e7a794bf]{cursor:col-resize;z-index:10;touch-action:none;width:12px;height:100%;position:absolute;top:0}.notes-resizer[data-v-e7a794bf]:before{content:"";opacity:.2;background-color:currentColor;width:1px;height:100%;position:absolute;top:0;left:50%;transform:translate(-50%)}.notes-row-resizer[data-v-e7a794bf]{cursor:row-resize;z-index:10;touch-action:none;width:100%;height:12px;position:absolute;left:0}.notes-row-resizer[data-v-e7a794bf]:before{content:"";opacity:.2;background-color:currentColor;width:100%;height:1px;position:absolute;top:50%;left:0;transform:translateY(-50%)}.notes-vertical-resizer[data-v-e7a794bf]{right:var(--slidev-presenter-notes-width);top:0;bottom:var(--slidev-presenter-bottom-height,0px);cursor:col-resize;z-index:10;touch-action:none;width:12px;position:absolute;transform:translate(50%)}.notes-vertical-resizer[data-v-e7a794bf]:before{content:"";width:1px;height:100%;position:absolute;top:0;left:50%;transform:translate(-50%)}.notes-vertical-resizer-left[data-v-e7a794bf]{left:var(--slidev-presenter-notes-width);top:0;bottom:var(--slidev-presenter-bottom-height,0px);cursor:col-resize;z-index:10;touch-action:none;width:12px;position:absolute;transform:translate(-50%)}.notes-vertical-resizer-left[data-v-e7a794bf]:before{content:"";width:1px;height:100%;position:absolute;top:0;left:50%;transform:translate(-50%)} diff --git a/lecture-08/assets/rolldown-runtime-hePW80VL.js b/lecture-08/assets/rolldown-runtime-hePW80VL.js new file mode 100644 index 0000000000000000000000000000000000000000..19803821aea2e74c5c1a9c81c33bbad26f2ac631 --- /dev/null +++ b/lecture-08/assets/rolldown-runtime-hePW80VL.js @@ -0,0 +1 @@ +var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;li[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));export{s as n,l as r,o as t}; \ No newline at end of file diff --git a/lecture-08/assets/section-BZ9Dfv_4.css b/lecture-08/assets/section-BZ9Dfv_4.css new file mode 100644 index 0000000000000000000000000000000000000000..d27ca99afbadaf5a880bb2ca13a5955a547e6164 --- /dev/null +++ b/lecture-08/assets/section-BZ9Dfv_4.css @@ -0,0 +1 @@ +.dl-section[data-v-833128c2]{background:var(--dl-surface);flex-direction:column;justify-content:center;padding-left:4rem;display:flex}.dl-section__index[data-v-833128c2]{font-size:var(--dl-fs-secondary);letter-spacing:.2em;color:var(--dl-accent);margin-bottom:.8rem;font-weight:700}.dl-section__body[data-v-833128c2] h1,.dl-section__body[data-v-833128c2] h2{font-size:var(--dl-fs-section);margin:0;line-height:1.1}.dl-section__body[data-v-833128c2] p{color:var(--dl-muted);max-width:46ch;margin-top:.6rem}.dl-section__rule[data-v-833128c2]{margin-top:1.4rem} diff --git a/lecture-08/assets/section-CqA-0pFf.js b/lecture-08/assets/section-CqA-0pFf.js new file mode 100644 index 0000000000000000000000000000000000000000..ad50f70931fdd909d37f080883fdcfdbe64ba824 --- /dev/null +++ b/lecture-08/assets/section-CqA-0pFf.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,U as r,_ as i,b as a,y as o}from"./modules/shiki-CJZsCeMT.js";import{t as s}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as c}from"./slidev/context-DB-9afGB.js";var l={class:`slidev-layout dl-section`},u={key:0,class:`dl-section__index`},d={class:`dl-section__body`},f=s(n({__name:`section`,props:{index:{}},setup(n){let{$slidev:s,$nav:f,$clicksContext:p,$clicks:m,$page:h,$renderContext:g,$frontmatter:_}=c(),v=n;return(n,s)=>(e(),a(`div`,l,[v.index?(e(),a(`div`,u,t(v.index),1)):o(`v-if`,!0),i(`div`,d,[r(n.$slots,`default`,{},void 0,!0)]),s[0]||=i(`div`,{class:`dl-rule dl-section__rule`},null,-1)]))}}),[[`__scopeId`,`data-v-833128c2`]]);export{f as t}; \ No newline at end of file diff --git a/lecture-08/assets/shortcuts-nRB69a7e.css b/lecture-08/assets/shortcuts-nRB69a7e.css new file mode 100644 index 0000000000000000000000000000000000000000..e7e39cdb869e4b320cccd3cb3ea85ebffcf1274d --- /dev/null +++ b/lecture-08/assets/shortcuts-nRB69a7e.css @@ -0,0 +1 @@ +.autocomplete-list[data-v-61e41ebd]{--un-bg-opacity:1;background-color:rgb(255 255 255/var(--un-bg-opacity));max-height:calc(100vh - 100px);margin-top:.25rem;overflow:auto}.dark .autocomplete-list[data-v-61e41ebd]{--un-bg-opacity:1;background-color:rgb(18 18 18/var(--un-bg-opacity))}.autocomplete[data-v-61e41ebd]{cursor:pointer}.laser-pointer[data-v-1d1438ab]{background:radial-gradient(circle,#ff5050 0%,#ff0000f2 55%,#ff00001a 100%);border-radius:9999px;width:6px;height:6px;position:absolute;transform:translate(-50%,-50%);box-shadow:0 0 10px #ff0000e6,0 0 22px #ff00008c}.slidev-self-laser-active .slidev-slide-container{cursor:none}.slider{appearance:none;opacity:.7;-webkit-transition:all .2s;background-color:#9ca3af0d;border-width:1px;border-color:#9ca3af33;border-radius:.25rem;outline:none;height:22px;transition:opacity .2s;overflow:hidden}.slider:hover{opacity:1}.slider::-webkit-slider-thumb{appearance:none;background:var(--slidev-theme-primary);cursor:pointer;z-index:10;width:5px;height:22px}.slider::-moz-range-thumb{background:var(--slidev-theme-primary);cursor:pointer;z-index:10;width:5px;height:22px}.item[data-v-aa3b28a6]{cursor:default;white-space:nowrap;border-radius:.25rem;gap:.25rem;padding:.25rem .5rem;display:flex}.item[data-v-aa3b28a6]:hover{--un-bg-opacity:.1;background-color:rgb(156 163 175/var(--un-bg-opacity))}.title[data-v-aa3b28a6]{-webkit-user-select:none;user-select:none;text-wrap:nowrap;opacity:.75;padding:.25rem .75rem;font-size:.875rem;font-weight:700;line-height:1.25rem}#slideshow[data-v-835d2635]{height:100%} diff --git a/lecture-08/assets/slidev/404-DZ1RXj5D.js b/lecture-08/assets/slidev/404-DZ1RXj5D.js new file mode 100644 index 0000000000000000000000000000000000000000..78fb73b1df8da50bcd0db95b8b2e1ea43c802191 --- /dev/null +++ b/lecture-08/assets/slidev/404-DZ1RXj5D.js @@ -0,0 +1 @@ +import{B as e,Ct as t,S as n,T as r,W as i,_ as a,b as o,et as s,g as c,v as l,y as u,yt as d}from"../modules/shiki-CJZsCeMT.js";import{t as f}from"../useNav-B0kQsolV.js";import{t as p}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{V as m}from"../modules/vue-Dnfgf7Ad.js";var h={class:`grid justify-center text-center pt-15% gap-5`},g={class:`text-2xl`},_={class:`op-60`},v={class:`mt-3 flex flex-col gap-2 max-w-xs mx-auto w-full`},y=p(r({__name:`404`,setup(r){let p=/\d+/,{currentRoute:y}=m(),{total:b}=f(),x=c(()=>{let e=y.value.path.match(p);if(e){let t=+e[0];if(t>0&&t<=b.value)return t}return null});return(r,c)=>{let f=i(`RouterLink`);return e(),o(`div`,h,[a(`div`,null,[c[2]||=a(`h1`,{class:`text-9xl font-light`},` 404 `,-1),a(`p`,g,[c[0]||=n(` Page `,-1),a(`code`,_,t(d(y).path),1),c[1]||=n(` not found `,-1)])]),a(`div`,v,[x.value===1?u(`v-if`,!0):(e(),l(f,{key:0,to:`/`,class:`page-link`},{default:s(()=>[...c[3]||=[n(` Go Home `,-1)]]),_:1})),x.value?(e(),l(f,{key:1,to:`/${x.value}`,class:`page-link`},{default:s(()=>[n(` Go to Slide `+t(x.value),1)]),_:1},8,[`to`])):u(`v-if`,!0)])])}}}),[[`__scopeId`,`data-v-b584852f`]]);export{y as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/CodeBlockWrapper-CIZDS6En.js b/lecture-08/assets/slidev/CodeBlockWrapper-CIZDS6En.js new file mode 100644 index 0000000000000000000000000000000000000000..e835036270433591ac59a4aab1d748eccbe6150a --- /dev/null +++ b/lecture-08/assets/slidev/CodeBlockWrapper-CIZDS6En.js @@ -0,0 +1 @@ +import{A as e,B as t,C as n,Ct as r,Q as i,R as a,St as o,T as s,U as c,_ as l,b as u,bt as d,dt as f,g as p,v as m,y as h,yt as g,z as _}from"../modules/shiki-CJZsCeMT.js";import{tt as v}from"../useNav-B0kQsolV.js";import{u as y}from"../modules/vue-Dnfgf7Ad.js";import{a as b,l as x,n as S}from"./context-DB-9afGB.js";import{d as C,u as w}from"../index-CvCioxNn.js";import{a as T,i as E}from"../modules/unplugin-icons-CStvVwzQ.js";var D=s({__name:`TitleIcon`,props:{title:{}},setup(e){let n={pnpm:`i-vscode-icons:file-type-light-pnpm`,npm:`i-vscode-icons:file-type-npm`,yarn:`i-vscode-icons:file-type-yarn`,bun:`i-vscode-icons:file-type-bun`,deno:`i-vscode-icons:file-type-deno`,vue:`i-vscode-icons:file-type-vue`,svelte:`i-vscode-icons:file-type-svelte`,angular:`i-vscode-icons:file-type-angular`,react:`i-vscode-icons:file-type-reactjs`,next:`i-vscode-icons:file-type-light-next`,nuxt:`i-vscode-icons:file-type-nuxt`,solid:`logos:solidjs-icon`,astro:`i-vscode-icons:file-type-light-astro`,rollup:`i-vscode-icons:file-type-rollup`,webpack:`i-vscode-icons:file-type-webpack`,vite:`i-vscode-icons:file-type-vite`,esbuild:`i-vscode-icons:file-type-esbuild`,"package.json":`i-vscode-icons:file-type-node`,"tsconfig.json":`i-vscode-icons:file-type-tsconfig`,".npmrc":`i-vscode-icons:file-type-npm`,".editorconfig":`i-vscode-icons:file-type-editorconfig`,".eslintrc":`i-vscode-icons:file-type-eslint`,".eslintignore":`i-vscode-icons:file-type-eslint`,"eslint.config":`i-vscode-icons:file-type-eslint`,".gitignore":`i-vscode-icons:file-type-git`,".gitattributes":`i-vscode-icons:file-type-git`,".env":`i-vscode-icons:file-type-dotenv`,".env.example":`i-vscode-icons:file-type-dotenv`,".vscode":`i-vscode-icons:file-type-vscode`,"tailwind.config":`vscode-icons:file-type-tailwind`,"uno.config":`i-vscode-icons:file-type-unocss`,"unocss.config":`i-vscode-icons:file-type-unocss`,".oxlintrc":`i-vscode-icons:file-type-oxlint`,"vue.config":`i-vscode-icons:file-type-vueconfig`,".mts":`i-vscode-icons:file-type-typescript`,".cts":`i-vscode-icons:file-type-typescript`,".ts":`i-vscode-icons:file-type-typescript`,".tsx":`i-vscode-icons:file-type-typescript`,".mjs":`i-vscode-icons:file-type-js`,".cjs":`i-vscode-icons:file-type-js`,".json":`i-vscode-icons:file-type-json`,".js":`i-vscode-icons:file-type-js`,".jsx":`i-vscode-icons:file-type-js`,".md":`i-vscode-icons:file-type-markdown`,".py":`i-vscode-icons:file-type-python`,".ico":`i-vscode-icons:file-type-favicon`,".html":`i-vscode-icons:file-type-html`,".css":`i-vscode-icons:file-type-css`,".scss":`i-vscode-icons:file-type-scss`,".yml":`i-vscode-icons:file-type-light-yaml`,".yaml":`i-vscode-icons:file-type-light-yaml`,".php":`i-vscode-icons:file-type-php`,".svg":`i-vscode-icons:file-type-svg`};function r(e){let t=e.match(/~([^~]+)~/g);if(t&&t.length>0)return t[0].slice(1,-1);let r=Object.keys(n).sort((e,t)=>t.length-e.length);for(let t of r)if(e.toLowerCase().includes(t.toLowerCase()))return n[t];return``}return(n,i)=>r(e.title)?(t(),u(`div`,{key:0,class:d([`w-3.5 h-3.5 relative`,r(e.title)])},null,2)):h(`v-if`,!0)}}),O=[`data-title`],k={key:0,class:`slidev-code-block-title`},A={class:`leading-1em`},j=[`title`],M=s({__name:`CodeBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},lines:{type:Boolean,default:v.lineNumbers},at:{type:[String,Number],default:`+1`},maxHeight:{type:String,default:void 0},title:{type:String,default:``}},setup(s){let M=s,{$frontmatter:N,$clicksContext:P}=S(),F=p(()=>N?.codeCopy??v.codeCopy),I=f(),L=w();_(()=>{P.unregister(L)}),i(()=>{I.value?.classList.toggle(`slidev-code-line-numbers`,M.lines)}),a(()=>{if(!P||!M.ranges?.length)return;let e=P.calculateSince(M.at,M.ranges.length-1);P.register(L,e);let t=p(()=>e?Math.max(0,P.current-e.start+1):x),n=p(()=>M.finally===`last`?M.ranges.at(-1):M.finally.toString());i(()=>{if(!I.value)return;let e=M.ranges[t.value]??n.value,r=e===`hide`;I.value.classList.toggle(b,r),r&&(e=M.ranges[t.value+1]??n.value);let i=I.value.querySelector(`.shiki`),a=Array.from(i.querySelectorAll(`code > .line`)),o=a.length;if(C(e,o,M.startLine,e=>[a[e]]),M.maxHeight){let e=Array.from(i.querySelectorAll(`.line.highlighted`));e.reduce((e,t)=>t.offsetHeight+e,0)>I.value.offsetHeight?e[0].scrollIntoView({behavior:`smooth`,block:`start`}):e.length>0&&e[Math.round((e.length-1)/2)].scrollIntoView({behavior:`smooth`,block:`center`})}})});let{copied:R,copy:z}=y();function B(){let e=I.value?.querySelector(`.slidev-code`)?.textContent;e&&z(e)}let V=e(`activeTitle`,null),H=p(()=>V===null&&M.title);return(e,i)=>{let a=E,f=T;return t(),u(`div`,{ref_key:`el`,ref:I,class:d([`slidev-code-wrapper relative group`,{"slidev-code-line-numbers":M.lines,active:g(V)===s.title}]),style:o({"max-height":M.maxHeight,"overflow-y":M.maxHeight?`scroll`:void 0,"--start":M.startLine}),"data-title":s.title},[H.value?(t(),u(`div`,k,[n(D,{title:s.title},null,8,[`title`]),l(`div`,A,r(s.title.replace(/~([^~]+)~/g,``).trim()),1)])):h(`v-if`,!0),c(e.$slots,`default`),F.value?(t(),u(`button`,{key:1,class:d([`slidev-code-copy absolute right-0 transition opacity-0 group-hover:opacity-20 hover:!opacity-100`,H.value?`top-10`:`top-0`]),title:g(R)?`Copied`:`Copy`,onClick:i[0]||=e=>B()},[g(R)?(t(),m(a,{key:0,class:`p-2 w-8 h-8`})):(t(),m(f,{key:1,class:`p-2 w-8 h-8`}))],10,j)):h(`v-if`,!0)],14,O)}}});export{M as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/DrawingControls-DzQSGyTT.js b/lecture-08/assets/slidev/DrawingControls-DzQSGyTT.js new file mode 100644 index 0000000000000000000000000000000000000000..9f0e3d12d428246467a513d8eed36150b5f8c6a3 --- /dev/null +++ b/lecture-08/assets/slidev/DrawingControls-DzQSGyTT.js @@ -0,0 +1 @@ +import{n as e}from"../rolldown-runtime-hePW80VL.js";import{B as t,C as n,Ct as r,H as i,St as a,T as o,U as s,_ as c,b as l,bt as u,dt as d,et as f,l as p,m,r as h,tt as g,u as _,v,y,yt as b}from"../modules/shiki-CJZsCeMT.js";import{d as x,g as S}from"../modules/vue-Dnfgf7Ad.js";import{t as C}from"../useDrawings-B2TJYfiB.js";import{t as w}from"./IconButton-BwA4p7Ax.js";import{t as T}from"./VerticalDivider-Bvc1MZzH.js";var E=o({__name:`Draggable`,props:{storageKey:{},initial:{}},setup(e){let n=e,r=d(null),i=n.initial??{x:0,y:0},o=n.storageKey?S(n.storageKey,i):d(i),{style:c}=x(r,{initialValue:o});return(e,n)=>(t(),l(`div`,{ref_key:`el`,ref:r,class:`fixed`,style:a(b(c))},[s(e.$slots,`default`)],4))}}),D={class:`flex bg-main p-2`},O={class:`inline-block w-7 text-center`},k={class:`pt-.5`},A={class:`i-carbon:pin-filled transform -rotate-45`},j={class:`i-carbon:pin`},M={class:`i-carbon:error`},N={class:`i-carbon:close-outline`},P=o({__name:`DrawingControls`,setup(e){let{brush:o,canClear:s,canRedo:x,canUndo:S,clear:P,drauu:F,drawingEnabled:I,drawingMode:L,drawingPinned:R,brushColors:z}=C(),B=d(!1);function V(e){e.preventDefault(),e.stopPropagation(),requestAnimationFrame(()=>{requestAnimationFrame(()=>{B.value=!0})})}function H(e){e.pointerType!==`mouse`&&V(e)}function U(){F.undo()}function W(){F.redo()}let G=`stylus`;function K(e){L.value=e,I.value=!0,e!==`eraseLine`&&(G=e)}function q(e){o.value.color=e,I.value=!0,L.value=G}return(e,d)=>b(I)||b(R)?(t(),v(E,{key:0,class:u([`flex flex-wrap text-xl p-2 gap-1 rounded-md bg-main shadow transition-opacity duration-200 z-nav border border-main`,!b(I)&&b(R)?`opacity-40 hover:opacity-90`:``]),"storage-key":`slidev-drawing-pos`,"initial-x":10,"initial-y":10},{default:f(()=>[n(w,{title:`Draw with stylus`,class:u({shallow:b(L)!==`stylus`}),onClick:d[0]||=e=>K(`stylus`)},{default:f(()=>[...d[14]||=[c(`div`,{class:`i-carbon:pen`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a line`,class:u({shallow:b(L)!==`line`}),onClick:d[1]||=e=>K(`line`)},{default:f(()=>[...d[15]||=[c(`svg`,{width:`1em`,height:`1em`,class:`-mt-0.5`,preserveAspectRatio:`xMidYMid meet`,viewBox:`0 0 24 24`},[c(`path`,{d:`M21.71 3.29a1 1 0 0 0-1.42 0l-18 18a1 1 0 0 0 0 1.42a1 1 0 0 0 1.42 0l18-18a1 1 0 0 0 0-1.42z`,fill:`currentColor`})],-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an arrow`,class:u({shallow:b(L)!==`arrow`}),onClick:d[2]||=e=>K(`arrow`)},{default:f(()=>[...d[16]||=[c(`div`,{class:`i-carbon:arrow-up-right`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw an ellipse`,class:u({shallow:b(L)!==`ellipse`}),onClick:d[3]||=e=>K(`ellipse`)},{default:f(()=>[...d[17]||=[c(`div`,{class:`i-carbon:radio-button`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Draw a rectangle`,class:u({shallow:b(L)!==`rectangle`}),onClick:d[4]||=e=>K(`rectangle`)},{default:f(()=>[...d[18]||=[c(`div`,{class:`i-carbon:checkbox`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Erase`,class:u({shallow:b(L)!==`eraseLine`}),onClick:d[5]||=e=>K(`eraseLine`)},{default:f(()=>[...d[19]||=[c(`div`,{class:`i-carbon:erase`},null,-1)]]),_:1},8,[`class`]),n(T),n(b(h),{shown:B.value,"onUpdate:shown":d[8]||=e=>B.value=e,triggers:[]},{popper:f(()=>[c(`div`,D,[c(`div`,O,r(b(o).size),1),c(`div`,k,[g(c(`input`,{"onUpdate:modelValue":d[6]||=e=>b(o).size=e,type:`range`,min:`1`,max:`15`,onChange:d[7]||=e=>L.value=b(G)},null,544),[[p,b(o).size]])])])]),default:f(()=>[n(w,{title:`Adjust stroke width`,class:u({shallow:b(L)===`eraseLine`}),onClick:V,onPointerdown:H,onPointerup:H,onTouchend:V},{default:f(()=>[...d[20]||=[c(`svg`,{viewBox:`0 0 32 32`,width:`1.2em`,height:`1.2em`},[c(`line`,{x1:`2`,y1:`15`,x2:`22`,y2:`4`,stroke:`currentColor`,"stroke-width":`1`,"stroke-linecap":`round`}),c(`line`,{x1:`2`,y1:`24`,x2:`28`,y2:`10`,stroke:`currentColor`,"stroke-width":`2`,"stroke-linecap":`round`}),c(`line`,{x1:`7`,y1:`31`,x2:`29`,y2:`19`,stroke:`currentColor`,"stroke-width":`3`,"stroke-linecap":`round`})],-1)]]),_:1},8,[`class`])]),_:1},8,[`shown`]),(t(!0),l(m,null,i(b(z),e=>(t(),v(w,{key:e,title:`Set brush color`,class:u(b(o).color===e&&b(L)!==`eraseLine`?`active`:`shallow`),onClick:t=>q(e)},{default:f(()=>[c(`div`,{class:u([`w-6 h-6 transition-all transform border`,b(o).color===e?`rounded-md border-gray-300/50`:`rounded-1/2 scale-85 border-white`]),style:a(b(I)?{background:e}:{borderColor:e})},null,6)]),_:2},1032,[`class`,`onClick`]))),128)),n(T),n(w,{title:`Undo`,class:u({disabled:!b(S)}),onClick:d[9]||=e=>U()},{default:f(()=>[...d[21]||=[c(`div`,{class:`i-carbon:undo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Redo`,class:u({disabled:!b(x)}),onClick:d[10]||=e=>W()},{default:f(()=>[...d[22]||=[c(`div`,{class:`i-carbon:redo`},null,-1)]]),_:1},8,[`class`]),n(w,{title:`Delete`,class:u({disabled:!b(s)}),onClick:d[11]||=e=>b(P)()},{default:f(()=>[...d[23]||=[c(`div`,{class:`i-carbon:trash-can`},null,-1)]]),_:1},8,[`class`]),n(T),n(w,{title:b(R)?`Unpin drawing`:`Pin drawing`,class:u({shallow:!b(R)}),onClick:d[12]||=e=>R.value=!b(R)},{default:f(()=>[g(c(`div`,A,null,512),[[_,b(R)]]),g(c(`div`,j,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`]),b(I)?(t(),v(w,{key:0,title:b(R)?`Drawing pinned`:`Drawing unpinned`,class:u({shallow:!b(I)}),onClick:d[13]||=e=>I.value=!b(I)},{default:f(()=>[g(c(`div`,M,null,512),[[_,b(R)]]),g(c(`div`,N,null,512),[[_,!b(R)]])]),_:1},8,[`title`,`class`])):y(`v-if`,!0)]),_:1},8,[`class`])):y(`v-if`,!0)}}),F=e({default:()=>I}),I=P;export{F as n,I as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/DrawingLayer-CgAMPS2j.js b/lecture-08/assets/slidev/DrawingLayer-CgAMPS2j.js new file mode 100644 index 0000000000000000000000000000000000000000..cfda722355a03365ae792eccfaf5471180547fa7 --- /dev/null +++ b/lecture-08/assets/slidev/DrawingLayer-CgAMPS2j.js @@ -0,0 +1 @@ +import{B as e,I as t,R as n,T as r,Z as i,b as a,bt as o,dt as s,yt as c}from"../modules/shiki-CJZsCeMT.js";import{n as l}from"./context-DB-9afGB.js";import{t as u}from"../useDrawings-B2TJYfiB.js";var d=r({__name:`DrawingLayer`,setup(r){let{drauu:d,drawingEnabled:f,loadCanvas:p}=u(),m=l().$scale,h=s();return n(()=>{d.mount(h.value,h.value.parentElement),i(m,e=>d.options.coordinateScale=1/e,{immediate:!0}),p()}),t(()=>{d.unmount()}),(t,n)=>(e(),a(`svg`,{ref_key:`svg`,ref:h,class:o([`w-full h-full absolute top-0`,{"pointer-events-none":!c(f),"touch-none":c(f)}])},null,2))}});export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/IconButton-BwA4p7Ax.js b/lecture-08/assets/slidev/IconButton-BwA4p7Ax.js new file mode 100644 index 0000000000000000000000000000000000000000..2fbf02259081003a9351e7e5ee3213762a65f648 --- /dev/null +++ b/lecture-08/assets/slidev/IconButton-BwA4p7Ax.js @@ -0,0 +1 @@ +import{B as e,Ct as t,K as n,T as r,U as i,_ as a,bt as o,et as s,g as c,v as l}from"../modules/shiki-CJZsCeMT.js";var u={class:`sr-only`},d=r({__name:`IconButton`,props:{title:{},icon:{},as:{},to:{},disabled:{type:Boolean},active:{type:Boolean}},setup(r){let d=r,f=c(()=>d.as||(d.to?`router-link`:`button`));return(c,d)=>(e(),l(n(f.value),{class:o([`slidev-icon-btn`,{disabled:r.disabled,active:r.active}]),title:r.title,to:r.to},{default:s(()=>[a(`span`,u,t(r.title),1),i(c.$slots,`default`,{},()=>[a(`div`,{class:o(r.icon)},null,2)])]),_:3},8,[`class`,`title`,`to`]))}});export{d as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/KaTexBlockWrapper-CQp3FXpQ.js b/lecture-08/assets/slidev/KaTexBlockWrapper-CQp3FXpQ.js new file mode 100644 index 0000000000000000000000000000000000000000..4f69cfcbdd94513766b2221082be4d7e47b4b82e --- /dev/null +++ b/lecture-08/assets/slidev/KaTexBlockWrapper-CQp3FXpQ.js @@ -0,0 +1 @@ +import{B as e,Q as t,R as n,T as r,U as i,b as a,dt as o,g as s,z as c}from"../modules/shiki-CJZsCeMT.js";import{H as l}from"../useNav-B0kQsolV.js";import{a as u,c as d,l as f,n as p}from"./context-DB-9afGB.js";import{u as m}from"../index-CvCioxNn.js";var h=`.mtable > [class*=col-align]`,g=`:scope > .vlist-t > .vlist-r > .vlist > span > .mord`;function _(e){let t=Array.from(e.querySelectorAll(h)).filter(e=>!e.parentElement?.closest(h)),n=[];for(let e of t)Array.from(e.querySelectorAll(g)).forEach((e,t)=>{e&&(Array.isArray(n[t])?n[t].push(e):n[t]=[e])});return n}var v=r({__name:`KaTexBlockWrapper`,props:{ranges:{type:Array,default:()=>[]},finally:{type:[String,Number],default:`last`},startLine:{type:Number,default:1},at:{type:[String,Number],default:`+1`}},setup(r){let h=r,{$clicksContext:g}=p(),v=o(),y=m();return c(()=>{g.unregister(y)}),n(()=>{if(!g||!h.ranges?.length)return;let e=g.calculateSince(h.at,h.ranges.length-1);g.register(y,e);let n=s(()=>e?Math.max(0,g.current-e.start+1):f),r=s(()=>h.finally===`last`?h.ranges.at(-1):h.finally.toString());t(()=>{if(!v.value)return;let e=h.ranges[n.value]??r.value,t=e===`hide`;v.value.classList.toggle(u,t),t&&(e=h.ranges[n.value+1]??r.value);let i=_(v.value);if(!i.length)return;let a=h.startLine,o=l(i.length+a-1,e);i.forEach((e,t)=>{let n=o.includes(t+a);e.forEach(e=>{e.classList.toggle(d,!0),e.classList.toggle(`highlighted`,n),e.classList.toggle(`dishonored`,!n)})})})}),(t,n)=>(e(),a(`div`,{ref_key:`el`,ref:v,class:`slidev-katex-wrapper`},[i(t.$slots,`default`)],512))}});export{v as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/Modal-PBdP8Aqp.js b/lecture-08/assets/slidev/Modal-PBdP8Aqp.js new file mode 100644 index 0000000000000000000000000000000000000000..ce3d6d49240a674d98debe59e61ef293df83f119 --- /dev/null +++ b/lecture-08/assets/slidev/Modal-PBdP8Aqp.js @@ -0,0 +1 @@ +import{B as e,T as t,U as n,_ as r,b as i,bt as a,h as o,v as s,y as c,yt as l}from"../modules/shiki-CJZsCeMT.js";import{C as u}from"../modules/vue-Dnfgf7Ad.js";var d={key:0,class:`fixed top-0 bottom-0 left-0 right-0 grid z-modal`},f=t({__name:`Modal`,props:{modelValue:{default:!1},class:{default:``}},emits:[`update:modelValue`],setup(t,{emit:f}){let p=t,m=u(p,`modelValue`,f);function h(){m.value=!1}return(t,u)=>(e(),s(o,null,[l(m)?(e(),i(`div`,d,[r(`div`,{bg:`black opacity-80`,class:`absolute top-0 bottom-0 left-0 right-0 -z-1`,onClick:u[0]||=e=>h()}),r(`div`,{class:a([`m-auto rounded-md bg-main shadow`,p.class]),"dark:border":`~ main`},[n(t.$slots,`default`)],2)])):c(`v-if`,!0)],1024))}});export{f as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/NoteDisplay-7gBbyxSS.js b/lecture-08/assets/slidev/NoteDisplay-7gBbyxSS.js new file mode 100644 index 0000000000000000000000000000000000000000..15d12930a8c2fbc63a816553f97ed1c5e4a1acc9 --- /dev/null +++ b/lecture-08/assets/slidev/NoteDisplay-7gBbyxSS.js @@ -0,0 +1 @@ +import{B as e,Ct as t,H as n,P as r,Q as i,R as a,St as o,T as s,Z as c,_ as l,b as u,bt as d,dt as f,g as p,m,ot as h,y as g,yt as _}from"../modules/shiki-CJZsCeMT.js";import{nt as v,rt as y}from"../useNav-B0kQsolV.js";import{l as b}from"./context-DB-9afGB.js";var x=[`title`],S={key:0,"flex-auto":``},C={"text-primary":``},w={op50:``,"text-sm":``},T={key:0,absolute:``,"inset-y-0":``,"right-0":``,"w-0.5":``,"bg-primary":``,"z-1":``},E=s({__name:`ClicksSlider`,props:{clicksContext:{},readonly:{type:Boolean},active:{type:Boolean,default:!0},resettable:{type:Boolean},compact:{type:Boolean},attached:{type:Boolean}},emits:[`activate`,`reset`],setup(r,{emit:i}){let a=r,s=i,c=p(()=>a.clicksContext.total),E=p(()=>v(0,a.clicksContext.clicksStart,c.value)),D=p(()=>c.value-E.value+1),O=p({get(){return a.resettable&&!a.active||a.clicksContext.current>c.value?-1:a.clicksContext.current},set(e){if(a.resettable&&e<0){s(`reset`),a.clicksContext.current=b;return}s(`activate`),a.clicksContext.current=e}}),k=p(()=>a.resettable&&O.value<0),A=p(()=>y(E.value,c.value+1)),j=f(),M;function N(e){let t=j.value.getBoundingClientRect();return(e.clientX-t.left)/Math.max(1,t.width)}function P(e,t){if(a.readonly||!j.value||!t&&!(e.buttons&1))return;let n=N(e);if(a.resettable&&n<0){O.value=-1;return}let r=v(0,n,t?.999999:1)*D.value,i=v(0,O.value-E.value,D.value-1),o=t?E.value+Math.floor(r):O.value;!t&&r>=i+1.5?o=E.value+Math.floor(r-.5):!t&&r(e(),u(`div`,{class:d([`flex gap-1 select-none`,[r.attached?`items-end`:`items-center`,D.value&&a.clicksContext.isMounted?``:`op50`]]),title:`Clicks in this slide: ${D.value}`},[l(`div`,{class:d([`flex items-center font-mono`,[r.compact?`gap-1 min-w-0 mr0`:`gap-0.2 min-w-16 mr1`,r.attached?`h-[22px]`:``]])},[l(`div`,{class:d([`i-carbon:cursor-1 text-sm op50`,r.compact?`ml-1`:``])},null,2),O.value>=0&&O.value!==_(999999)&&r.active?(e(),u(m,{key:0},[r.compact?g(`v-if`,!0):(e(),u(`div`,S)),l(`span`,null,[l(`span`,C,t(O.value),1),s[2]||=l(`span`,{op25:``,"text-sm":``},`/`,-1),l(`span`,w,t(c.value),1)])],64)):(e(),u(`div`,{key:1,op50:``,class:d(r.compact?``:`flex-auto pl1`)},[l(`span`,{class:d(r.compact?`inline-block text-center`:``),style:o(r.compact?{width:`${String(c.value).length*2+1}ch`,marginLeft:`-0.25ch`}:void 0)},t(c.value),7)],2))],2),l(`div`,{ref_key:`sliderEl`,ref:j,relative:``,"flex-auto":``,"font-mono":``,flex:`~`,"touch-none":``,class:d([r.attached?`h-[22px]`:`h5`,k.value?`op80`:``]),onPointerdownCapture:F,onPointermove:I,onPointerup:s[0]||=e=>h(M)?M.value=void 0:M=void 0,onPointercancel:s[1]||=e=>h(M)?M.value=void 0:M=void 0},[(e(!0),u(m,null,n(A.value,n=>(e(),u(`div`,{key:n,border:`y main`,"of-hidden":``,relative:``,class:d([n===0?`border-l`:``,n===0?r.attached?`rounded-tl`:`rounded-l`:``,n===c.value?`border-r`:``,n===c.value&&+n!=+O.value?r.attached?`rounded-tr`:`rounded-r`:``,r.attached?`border-b-0`:``]),style:o({width:D.value>0?`${1/D.value*100}%`:`100%`})},[l(`div`,{absolute:``,"inset-0":``,class:d(n<=O.value&&r.active?`bg-primary op15`:``)},null,2),+n==+O.value&&r.active?(e(),u(`div`,T)):g(`v-if`,!0),l(`div`,{class:d([+n==+O.value&&r.active?`text-primary font-bold op100`:`op30`,n===c.value?``:`border-r-2 border-main`]),"w-full":``,"h-full":``,"text-xs":``,flex:``,"items-center":``,"justify-center":``,"z-1":``},t(n),3)],6))),128))],34)],10,x))}}),D=[`innerHTML`],O=[`textContent`],k=[`textContent`],A=`slidev-note-fade`,j=`slidev-note-click-mark`,M=s({__name:`NoteDisplay`,props:{class:{},noteHtml:{},note:{},highlight:{type:Boolean,default:!0},placeholder:{},clicksContext:{},autoScroll:{type:Boolean}},emits:[`markerDblclick`,`markerClick`],setup(n,{emit:o}){let s=n,m=o,h=p(()=>s.clicksContext!=null&&s.noteHtml?.includes(j)),g=f(null);function _(){if(!g.value||!h.value)return;let e=Array.from(g.value.querySelectorAll(`.${j}`)),t=new Map,n=new Map,r=0;for(let i of e){let e=Number(i.dataset.clicks);t.set(i,e);let a=i,o=i.parentElement;for(;o&&a!==g.value;)n.has(o)||n.set(o,[[null,r]]),n.get(o).push([a,e]),a=o,o=o.parentElement;r=e}let i=new Map;for(let[e,t]of n){let n=!1,r=0;for(let a of Array.from(e.childNodes)){let o=!1;for(;a===t[r+1]?.[0];)o=!0,r++;if(o)continue;let s=a;if(a.nodeType===3){if(!a.textContent?.trim())continue;s=document.createElement(`span`),s.textContent=a.textContent,e.insertBefore(s,a),a.remove()}n||=r===0,i.set(s,t[r][1])}n||(t[0][1]=-1)}return e=>{let r=s.highlight;for(let[t,i]of n)t.classList.toggle(A,r&&!i.some(([t,n])=>n===e));for(let[t,n]of i)t.classList.toggle(A,r&&n!==e);for(let[n,i]of t)n.classList.remove(A),n.classList.toggle(`${j}-past`,r&&ie+1),n.ondblclick=e=>{r&&(m(`markerDblclick`,e,i),!e.defaultPrevented&&(s.clicksContext.current=i,e.stopPropagation(),e.stopImmediatePropagation()))},n.onclick=e=>{r&&m(`markerClick`,e,i)},r&&s.autoScroll&&i===e&&n.scrollIntoView({block:`center`,behavior:`smooth`})}}let v=f();return c(()=>[s.noteHtml,s.highlight],()=>{r(()=>{v.value=_()})},{immediate:!0}),a(()=>{_()}),i(()=>{let e=s.clicksContext?.current??999999;v.value?.(e)}),(r,i)=>n.noteHtml?(e(),u(`div`,{key:0,ref_key:`noteDisplay`,ref:g,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,[s.class,h.value?`slidev-note-with-clicks`:``]]),innerHTML:n.noteHtml},null,10,D)):n.note?(e(),u(`div`,{key:1,class:d([`prose dark:prose-invert overflow-auto outline-none slidev-note`,s.class])},[l(`p`,{textContent:t(n.note)},null,8,O)],2)):(e(),u(`div`,{key:2,class:d([`prose dark:prose-invert overflow-auto outline-none opacity-50 italic select-none slidev-note`,s.class])},[l(`p`,{textContent:t(s.placeholder||`No notes.`)},null,8,k)],2))}});export{E as n,M as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/NoteEditable-qR7skroz.js b/lecture-08/assets/slidev/NoteEditable-qR7skroz.js new file mode 100644 index 0000000000000000000000000000000000000000..e1cd7e008759d3a34491f435a0504542eb3effd6 --- /dev/null +++ b/lecture-08/assets/slidev/NoteEditable-qR7skroz.js @@ -0,0 +1 @@ +import{B as e,P as t,Q as n,St as r,T as i,Z as a,b as o,bt as s,d as c,dt as l,gt as u,l as d,tt as f,v as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{C as h,k as g,o as _}from"../modules/vue-Dnfgf7Ad.js";import{t as v}from"../index-CvCioxNn.js";import{t as y}from"./NoteDisplay-7gBbyxSS.js";var b=[`placeholder`],x=i({__name:`NoteEditable`,props:{no:{type:Number,required:!0},class:{default:``},editing:{default:!1},style:{default:()=>({})},placeholder:{default:`No notes for this slide`},clicksContext:{type:Object},highlight:{default:!0},autoHeight:{default:!1}},emits:[`update:editing`,`markerDblclick`,`markerClick`],setup(i,{emit:x}){let S=i,C=x,w=h(S,`editing`,C,{passive:!0}),{info:T,update:E}=v(u(S,`no`)),D=l(``),O,{ignoreUpdates:k}=g(D,e=>{if(!w.value)return;let t=S.no;clearTimeout(O),O=setTimeout(()=>{E({note:e},t)},500)});a(()=>T.value?.note,(e=``)=>{w.value||(clearTimeout(O),k(()=>{D.value=e}))},{immediate:!0,flush:`sync`});let A=l(),j=l();n(()=>{w.value&&A.value?.focus()}),_(A,()=>{w.value=!1});function M(){!S.autoHeight||!A.value||!w.value||A.value.scrollHeight>A.value.clientHeight&&(A.value.style.height=`${A.value.scrollHeight}px`)}function N(e){w.value&&e.metaKey&&e.key===`s`&&(e.preventDefault(),E({note:D.value},S.no))}return a([D,w],()=>{t(()=>{M()})},{flush:`post`,immediate:!0}),(t,n)=>m(w)?f((e(),o(`textarea`,{key:1,ref_key:`inputEl`,ref:A,"onUpdate:modelValue":n[2]||=e=>D.value=e,class:s([`prose dark:prose-invert resize-none overflow-auto outline-none bg-transparent block border-primary border-2 slidev-note placeholder:op25`,[S.class,D.value?``:`italic`]]),style:r([S.style,j.value==null?{}:{height:`${j.value}px`}]),placeholder:i.placeholder,onKeydown:[n[3]||=c(e=>w.value=!1,[`esc`]),N]},null,46,b)),[[d,D.value]]):(e(),p(y,{key:0,class:s([`border-transparent border-2`,[S.class,D.value?``:`opacity-25 italic select-none`]]),style:r(S.style),note:D.value||i.placeholder,"note-html":m(T)?.noteHTML,"clicks-context":i.clicksContext,"auto-scroll":!i.autoHeight,highlight:S.highlight,onMarkerClick:n[0]||=(e,t)=>C(`markerClick`,e,t),onMarkerDblclick:n[1]||=(e,t)=>C(`markerDblclick`,e,t)},null,8,[`class`,`style`,`note`,`note-html`,`clicks-context`,`auto-scroll`,`highlight`]))}});export{x as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/TimerBar-DXDQLXL9.js b/lecture-08/assets/slidev/TimerBar-DXDQLXL9.js new file mode 100644 index 0000000000000000000000000000000000000000..c582904d1d04a3cba6afdf55d3391280ff7e4f56 --- /dev/null +++ b/lecture-08/assets/slidev/TimerBar-DXDQLXL9.js @@ -0,0 +1 @@ +import{B as e,C as t,H as n,St as r,T as i,a,b as o,bt as s,et as c,g as l,gt as u,lt as d,m as f,y as p,yt as m}from"../modules/shiki-CJZsCeMT.js";import{U as h,t as g,tt as _}from"../useNav-B0kQsolV.js";import{F as v}from"../modules/vue-Dnfgf7Ad.js";import{o as y}from"../index-CvCioxNn.js";var b={class:`relative flex gap-px`},x=i({__name:`CurrentProgressBar`,props:{clicksContext:{},current:{}},setup(i){let u=i,d=g(),h=l(()=>u.clicksContext??d.clicksContext.value),_=l(()=>u.current??d.currentSlideNo.value),{total:v}=d;return(i,l)=>(e(),o(`div`,b,[(e(!0),o(f,null,n(m(v)-1,n=>(e(),o(`div`,{key:n,class:s([`border-x border-b border-main h-4px transition-all`,n<_.value?`bg-primary border-primary`:``]),style:r({width:`${1/(m(v)-1)*100}%`})},[t(a,{name:`fade`},{default:c(()=>[n===_.value?(e(),o(`div`,{key:0,class:`h-full bg-primary op75 transition-all`,style:r({width:`${h.value.total===0?0:h.value.current/(h.value.total+1)*100}%`})},null,4)):p(`v-if`,!0)]),_:2},1024)],6))),128))]))}});function S(){let e=l(()=>_.timer||`stopwatch`),t=l(()=>h(_.duration).seconds),n=v(100,{controls:!0}),r=u(y,`timer`),i=l(()=>r.value?.status),a=l(()=>(n.counter.value,r.value.status===`stopped`||!r.value.startedAt?0:r.value.status===`paused`?r.value.pausedAt-r.value.startedAt:Date.now()-r.value.startedAt)),o=l(()=>a.value/1e3),s=l(()=>o.value/t.value*100),c=l(()=>{if(e.value===`stopwatch`&&(r.value.status===`stopped`||!r.value.startedAt))return{h:``,m:`-`,s:`--`,ms:`-`};let n=e.value===`countdown`?t.value*1e3-a.value:a.value,i=Math.floor(n/1e3/60/60).toString();i===`0`&&(i=``);let o=Math.floor(n/1e3/60%60).toString();i&&(o=o.padStart(2,`0`));let s=Math.floor(n/1e3%60).toString().padStart(2,`0`),c=Math.floor(n%1e3/100).toString();return{h:i,m:o,s,ms:c}});function d(){n.pause(),r.value={status:`stopped`,slides:{},startedAt:0,pausedAt:0}}function f(){r.value&&(r.value?.status===`stopped`?(r.value.status=`running`,r.value.startedAt=Date.now()):r.value.status===`paused`&&(r.value.status=`running`,r.value.startedAt=Date.now()-(r.value.pausedAt-r.value.startedAt)),n.resume())}function p(){r.value.status=`paused`,r.value.pausedAt=Date.now(),n.pause()}function m(){r.value.status===`running`?p():f()}return{state:r,status:i,timer:c,reset:d,toggle:m,resume:f,pause:p,passed:o,percentage:s,duration:t,mode:e}}var C={class:`border-b mt-px border-main relative flex h-4px`},w=i({__name:`TimerBar`,setup(t){let n=d(S()),i=l(()=>n.status===`stopped`?`op50`:n.status===`paused`?`bg-blue`:n.percentage>100?`bg-red`:n.percentage>80?`bg-yellow`:`bg-green`);return(t,a)=>(e(),o(`div`,C,[n.status===`stopped`?p(`v-if`,!0):(e(),o(`div`,{key:0,class:s([`h-4px`,i.value]),style:r({width:`${n.percentage}%`})},null,6)),p(` {{ timesplits }} `)]))}});export{S as n,x as r,w as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/VClicks-lrjw2pb1.js b/lecture-08/assets/slidev/VClicks-lrjw2pb1.js new file mode 100644 index 0000000000000000000000000000000000000000..daa1a13f62511fcbd3e22ea45f40ad7478e5dcd8 --- /dev/null +++ b/lecture-08/assets/slidev/VClicks-lrjw2pb1.js @@ -0,0 +1 @@ +import{B as e,C as t,G as n,O as r,R as i,T as a,j as o,m as s,p as c,tt as l,v as u,z as d}from"../modules/shiki-CJZsCeMT.js";import{K as f,it as p}from"../useNav-B0kQsolV.js";import{n as m}from"./context-DB-9afGB.js";import{u as h}from"../index-CvCioxNn.js";var g=a({__name:`VClickGap`,props:{size:{type:[String,Number],default:1}},setup(t){let n=t,{$clicksContext:r}=m(),a=h(),o=+n.size;return Number.isNaN(o)&&(console.warn(`[slidev] Invalid size for VClickGap: ${n.size}`),o=1),i(()=>{let e=r.currentOffset+o-1;r.register(a,{max:e,delta:o})}),d(()=>{r.unregister(a)}),(t,n)=>(e(),u(s))}}),_=[`ul`,`ol`],v=/[\s,]+/,y=a({props:{depth:{type:[Number,String],default:1},every:{type:[Number,String],default:1},at:{type:[Number,String],default:`+1`},hide:{type:Boolean,default:!1},fade:{type:Boolean,default:!1},animation:{type:[String,Array],default:void 0},handleSpecialElements:{type:Boolean,default:!0}},render(){let e=+this.every,i=f(this.at),a=typeof i==`string`,s=this.$slots.default?.();if(i==null||!s)return s;let u=n(`click`),d=(e,t)=>{let n={hide:this.hide};return typeof this.animation==`string`?this.animation.split(v).forEach(e=>{e&&(n[e]=!0)}):Array.isArray(this.animation)&&this.animation.forEach(e=>n[e]=!0),this.fade&&(n.fade=!0),l(e,[[u,t,``,n]])},m=e=>e.flatMap(e=>o(e)&&typeof e.type==`symbol`&&Array.isArray(e.children)?m(e.children):[e]);s=m(p(s));let h=(e,t=1)=>m(e).map(e=>{if(!o(e))return e;if(_.includes(e.type)&&Array.isArray(e.children)){let n=x(e.children,t+1);return r(e,{},n)}return r(e)}),y=1,b=0,x=(t,n=1)=>m(t).map(t=>{if(!o(t)||t.type===c)return t;let s=+i+Math.ceil(y++/e)-1,l;l=n<+this.depth&&Array.isArray(t.children)?r(t,{},h(t.children,n)):r(t);let u=s-b;return b=s,d(l,a?u>=0?`+${u}`:`${u}`:s)}),S=()=>t(g,{size:+i+Math.ceil((y-1)/e)-1-b});if(this.handleSpecialElements){if(s.length===1&&_.includes(s[0].type)&&Array.isArray(s[0].children))return r(s[0],{},[...x(s[0].children),S()]);if(s.length===1&&s[0].type===`table`){let e=s[0];if(Array.isArray(e.children))return r(e,{},e.children.map(e=>o(e)?e.type===`tbody`&&Array.isArray(e.children)?r(e,{},[...x(e.children),S()]):r(e):e))}}return[...x(s),S()]}});export{y as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/VerticalDivider-Bvc1MZzH.js b/lecture-08/assets/slidev/VerticalDivider-Bvc1MZzH.js new file mode 100644 index 0000000000000000000000000000000000000000..7baee7089fa1641fb3758cffac78681be2961193 --- /dev/null +++ b/lecture-08/assets/slidev/VerticalDivider-Bvc1MZzH.js @@ -0,0 +1 @@ +import{B as e,b as t}from"../modules/shiki-CJZsCeMT.js";import{t as n}from"../_plugin-vue_export-helper-BDNMzG2s.js";var r={},i={class:`w-1px opacity-10 bg-current m-1 lg:m-2`};function a(n,r){return e(),t(`div`,i)}var o=n(r,[[`render`,a]]);export{o as t}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/client-beF_Q0xG.js b/lecture-08/assets/slidev/client-beF_Q0xG.js new file mode 100644 index 0000000000000000000000000000000000000000..ca2ec9e0bc292c389225b92a7f82ce5743c3c878 --- /dev/null +++ b/lecture-08/assets/slidev/client-beF_Q0xG.js @@ -0,0 +1 @@ +import"../useNav-B0kQsolV.js";import"./context-DB-9afGB.js";import"../syncState-3Tc2ZArb.js";import"../index-CvCioxNn.js";import"../useDrawings-B2TJYfiB.js"; \ No newline at end of file diff --git a/lecture-08/assets/slidev/context-DB-9afGB.js b/lecture-08/assets/slidev/context-DB-9afGB.js new file mode 100644 index 0000000000000000000000000000000000000000..1cb693eafe4165f81dbf9cf43d1f181373cf8ac6 --- /dev/null +++ b/lecture-08/assets/slidev/context-DB-9afGB.js @@ -0,0 +1 @@ +import{dt as e,g as t,gt as n}from"../modules/shiki-CJZsCeMT.js";import{A as r,M as i}from"../modules/vue-Dnfgf7Ad.js";var a=`$$slidev-clicks-context`,o=`$$slidev-page`,s=`$$slidev-slide-element`,c=`$$slidev-slide-scale`,l=`$$slidev-context`,u=`$$slidev-route`,d=`$$slidev-render-context`,f=`$$slidev-fontmatter`,p=`$$slidev-slide-zoom`,m=`slidev-vclick-target`,h=`slidev-vclick-hidden`,g=`slidev-vclick-hidden-explicitly`,_=`slidev-vclick-current`,v=`slidev-vclick-prior`,y=`slidev-vclick-anim-`,b=999999,x=[`localhost`,`127.0.0.1`],S=[`clicks`,`clicksStart`,`disabled`,`hide`,`hideInToc`,`layout`,`level`,`preload`,`routeAlias`,`src`,`title`,`transition`,`zoom`,`dragPos`,`lang`,`clickAnimation`],C=[...S,`theme`,`titleTemplate`,`info`,`author`,`keywords`,`presenter`,`browserExporter`,`download`,`exportFilename`,`export`,`highlighter`,`lineNumbers`,`monaco`,`monacoTypesSource`,`monacoTypesAdditionalPackages`,`monacoRunAdditionalDeps`,`monacoRunUseStrict`,`remoteAssets`,`selectable`,`record`,`colorSchema`,`routerMode`,`aspectRatio`,`canvasWidth`,`themeConfig`,`favicon`,`plantUmlServer`,`fonts`,`defaults`,`drawings`,`htmlAttrs`,`mdc`,`comark`,`contextMenu`,`wakeLock`,`pwa`,`seoMeta`,`notesAutoRuby`,`magicMoveDuration`,`preloadImages`];function w(){let i=r(l),s=n(i,`nav`),m=r(a).value,h=n(m,`current`),g=r(o),_=r(d),v=r(f,{});return{$slidev:i,$nav:s,$clicksContext:m,$clicks:h,$page:g,$route:r(u,void 0),$renderContext:_,$frontmatter:v,$scale:r(c,e(1)),$zoom:r(p,t(()=>1))}}function T(e,t){return{...i(e,t===0?C:S),frontmatter:e}}export{c as _,h as a,m as c,a as d,o as f,s as g,u as h,_ as i,b as l,d as m,w as n,g as o,f as p,y as r,v as s,T as t,x as u,p as v,l as y}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/entry-C7SFAt6v.js b/lecture-08/assets/slidev/entry-C7SFAt6v.js new file mode 100644 index 0000000000000000000000000000000000000000..4c79e7e49694f2683fcec0df3d86845b2d4c09ca --- /dev/null +++ b/lecture-08/assets/slidev/entry-C7SFAt6v.js @@ -0,0 +1 @@ +import{B as e,C as t,S as n,W as r,_ as i,b as a,et as o}from"../modules/shiki-CJZsCeMT.js";import{t as s}from"../_plugin-vue_export-helper-BDNMzG2s.js";var c={},l={class:`h-full w-full flex items-center justify-center gap-5 lt-md:flex-col`};function u(s,c){let u=r(`RouterLink`);return e(),a(`div`,l,[t(u,{to:`/`,class:`page-link`},{default:o(()=>[...c[0]||=[i(`div`,{class:`i-carbon:presentation-file`},null,-1),n(` Slides `,-1)]]),_:1}),t(u,{to:`/presenter`,class:`page-link`},{default:o(()=>[...c[1]||=[i(`div`,{class:`i-carbon:user-speaker`},null,-1),n(` Presenter `,-1)]]),_:1}),t(u,{to:`/notes`,class:`page-link`},{default:o(()=>[...c[2]||=[i(`div`,{class:`i-carbon:catalog`},null,-1),n(` Notes `,-1)]]),_:1}),t(u,{to:`/overview`,class:`page-link`},{default:o(()=>[...c[3]||=[i(`div`,{class:`i-carbon:list-boxes`},null,-1),n(` Overview `,-1)]]),_:1})])}var d=s(c,[[`render`,u],[`__scopeId`,`data-v-966650ef`]]);export{d as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/notes-DR2PUT4o.js b/lecture-08/assets/slidev/notes-DR2PUT4o.js new file mode 100644 index 0000000000000000000000000000000000000000..8fa148f434a4c77eeb79a4f4c47cc435e57ec181 --- /dev/null +++ b/lecture-08/assets/slidev/notes-DR2PUT4o.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,S as r,St as i,T as a,Z as o,_ as s,b as c,dt as l,et as u,g as d,m as f,yt as p}from"../modules/shiki-CJZsCeMT.js";import{$ as m,W as h,t as g,u as _}from"../useNav-B0kQsolV.js";import{g as v}from"../modules/vue-Dnfgf7Ad.js";import{h as y,o as b}from"../index-CvCioxNn.js";import{t as x}from"./IconButton-BwA4p7Ax.js";import{t as S}from"./Modal-PBdP8Aqp.js";import{n as C,t as w}from"./NoteDisplay-7gBbyxSS.js";import{r as T,t as E}from"./TimerBar-DXDQLXL9.js";var D={class:`flex my-1`},O={class:`h-full flex flex-col`},k={class:`flex-none border-t border-main`,px3:``,py2:``},A={class:`flex-none border-t border-main`},j={class:`flex gap-1 items-center px-6 py-3`},M={key:0,class:`i-carbon:minimize`},N={key:1,class:`i-carbon:maximize`},P={class:`px2 my-auto`},F={class:`text-lg`},I={class:`opacity-50 text-sm`},L=a({__name:`notes`,setup(a){y({title:`Notes - ${m}`});let{slides:L,total:R}=g(),{isFullscreen:z,toggle:B}=_,V=l(),H=v(`slidev-notes-font-size`,18),U=d(()=>b.page),W=l(!1),G=d(()=>L.value.find(e=>e.no===U.value));o(U,()=>{V.value?.scrollTo({left:0,top:0,behavior:`smooth`}),window.scrollTo({left:0,top:0,behavior:`smooth`})});function K(){H.value+=1}function q(){--H.value}let J=d(()=>{let e=b.clicks,t=b.clicksTotal;return h(l(e),void 0,t)});return(a,o)=>(e(),c(f,null,[t(S,{modelValue:W.value,"onUpdate:modelValue":o[1]||=e=>W.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:u(()=>[o[3]||=s(`div`,{class:`flex gap-2 text-xl`},[s(`div`,{class:`i-carbon:information my-auto`}),r(` Help `)],-1),o[4]||=s(`div`,{class:`prose dark:prose-invert`},[s(`p`,null,`This is the hands-free live notes viewer.`),s(`p`,null,`It's designed to be used in a separate view or device. The progress is controlled by and auto synced with the main presenter or slide.`)],-1),s(`div`,D,[s(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>W.value=!1},` Close `)])]),_:1},8,[`modelValue`]),s(`div`,O,[t(T,{"clicks-context":J.value,current:U.value},null,8,[`clicks-context`,`current`]),t(E),s(`div`,{ref_key:`scroller`,ref:V,class:`px-5 py-3 flex-auto h-full overflow-auto`,style:i({fontSize:`${p(H)}px`})},[t(w,{note:G.value?.meta.slide.note,"note-html":G.value?.meta.slide.noteHTML,placeholder:`No notes for Slide ${U.value}.`,"clicks-context":J.value,"auto-scroll":!0},null,8,[`note`,`note-html`,`placeholder`,`clicks-context`])],4),s(`div`,k,[t(C,{"clicks-context":J.value,readonly:``},null,8,[`clicks-context`])]),s(`div`,A,[s(`div`,j,[t(x,{title:p(z)?`Close fullscreen`:`Enter fullscreen`,onClick:p(B)},{default:u(()=>[p(z)?(e(),c(`div`,M)):(e(),c(`div`,N))]),_:1},8,[`title`,`onClick`]),t(x,{title:`Increase font size`,onClick:K},{default:u(()=>[...o[5]||=[s(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1}),t(x,{title:`Decrease font size`,onClick:q},{default:u(()=>[...o[6]||=[s(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1}),t(x,{title:`Edit notes`,to:`/notes-edit`,target:`_blank`},{default:u(()=>[...o[7]||=[s(`div`,{class:`i-carbon:edit`},null,-1)]]),_:1}),t(x,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>W.value=!0},{default:u(()=>[...o[8]||=[s(`div`,{class:`i-carbon:help`},null,-1)]]),_:1}),o[9]||=s(`div`,{class:`flex-auto`},null,-1),s(`div`,P,[s(`span`,F,n(U.value),1),s(`span`,I,` / `+n(p(R)),1)])])])])],64))}});export{L as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/notes-edit-BJF3Fcbc.js b/lecture-08/assets/slidev/notes-edit-BJF3Fcbc.js new file mode 100644 index 0000000000000000000000000000000000000000..0f5d389217beb1a478e842e7dc321520dc0074f0 --- /dev/null +++ b/lecture-08/assets/slidev/notes-edit-BJF3Fcbc.js @@ -0,0 +1,2 @@ +import{B as e,C as t,S as n,T as r,_ as i,b as a,dt as o,et as s,l as c,m as l,tt as u}from"../modules/shiki-CJZsCeMT.js";import{$ as d,t as f}from"../useNav-B0kQsolV.js";import{O as p}from"../modules/vue-Dnfgf7Ad.js";import{h as m,t as h}from"../index-CvCioxNn.js";import{t as g}from"./IconButton-BwA4p7Ax.js";import{t as _}from"./Modal-PBdP8Aqp.js";var v={class:`flex my-1`},y={class:`h-full`},b={class:`slidev-glass-effect fixed bottom-5 right-5 rounded-full border border-main`},x=r({__name:`notes-edit`,setup(r){let x=/^---\s*#(\d+)\s*$/;m({title:`Notes Edit - ${d}`});let{slides:S}=f(),C=o(!1),w=o(T(S.value));function T(e){let t=[];for(let n of e)n.meta.slide.note?.trim()&&(t.push(`--- #${n.no}`),t.push(``),t.push(n.meta.slide.note),t.push(``));return t.join(` +`)}function E(e,t){let n=e.split(/^(---\s*#\d+\s*)$/gm);n.forEach((e,r)=>{let i=e.match(x);if(i){let e=Number.parseInt(i[1]),a=n[r+1].trim(),o=t.find(t=>t.no===e);o&&(o.meta.slide.note=a,h(e).update({note:a}))}})}return p(w,e=>{E(e,S.value)},{debounce:300}),(r,o)=>(e(),a(l,null,[t(_,{modelValue:C.value,"onUpdate:modelValue":o[1]||=e=>C.value=e,class:`px-6 py-4 flex flex-col gap-2`},{default:s(()=>[o[4]||=i(`div`,{class:`flex gap-2 text-xl`},[i(`div`,{class:`i-carbon:information my-auto`}),n(` Help `)],-1),o[5]||=i(`div`,{class:`prose dark:prose-invert`},[i(`p`,null,`This is the batch notes editor. You can edit the notes for all the slides at once here.`),i(`p`,null,[n(`The note for each slide are separated by `),i(`code`,null,`--- #[no]`),n(` lines, you might want to keep them while editing.`)])],-1),i(`div`,v,[i(`button`,{class:`slidev-form-button`,onClick:o[0]||=e=>C.value=!1},` Close `)])]),_:1},8,[`modelValue`]),i(`div`,y,[i(`div`,b,[t(g,{title:`Help`,class:`rounded-full`,onClick:o[2]||=e=>C.value=!0},{default:s(()=>[...o[6]||=[i(`div`,{class:`i-carbon:help text-2xl`},null,-1)]]),_:1})]),u(i(`textarea`,{"onUpdate:modelValue":o[3]||=e=>w.value=e,class:`prose dark:prose-invert resize-none p5 outline-none bg-transparent block h-full w-full! max-w-full! max-h-full! min-h-full! min-w-full!`},null,512),[[c,w.value]])])],64))}});export{x as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/overview-BMK6AjPZ.js b/lecture-08/assets/slidev/overview-BMK6AjPZ.js new file mode 100644 index 0000000000000000000000000000000000000000..3aeb1e6fb0799822f0d51d413b49925a4917bebd --- /dev/null +++ b/lecture-08/assets/slidev/overview-BMK6AjPZ.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,H as r,P as i,R as a,St as o,T as s,_ as c,b as l,bt as u,dt as d,et as f,g as p,lt as m,m as h,mt as ee,v as g,y as _,yt as v,z as te}from"../modules/shiki-CJZsCeMT.js";import{$ as ne,B as y,G as re,R as b,X as ie,Y as x,t as ae}from"../useNav-B0kQsolV.js";import{t as S}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{B as oe,V as se}from"../modules/vue-Dnfgf7Ad.js";import{l as C}from"./context-DB-9afGB.js";import{f as ce,h as le,m as ue,p as w}from"../index-CvCioxNn.js";import{n as de,r as fe}from"../modules/unplugin-icons-CStvVwzQ.js";import{t as T}from"./IconButton-BwA4p7Ax.js";import{n as E}from"./NoteDisplay-7gBbyxSS.js";import{i as pe,o as me,t as he}from"../SlideWrapper-BDw_Ew7k.js";import{t as ge}from"./NoteEditable-qR7skroz.js";var _e={class:`h-screen w-screen of-hidden flex`},ve={key:0,class:`grid grid-rows-[auto_max-content] border-r border-main select-none max-h-full h-full`},ye={class:`relative`},be={class:`absolute left-0 top-0 bottom-0 w-200 flex flex-col flex-auto items-end group p-6px md:p-10px gap-1 max-h-full of-x-visible of-y-auto`,style:{direction:`rtl`}},xe=[`onClick`],Se={p2:``,border:`t main`},Ce={class:`flex flex-col gap-1 mx-1 items-end`},we={key:0,class:`flex items-end gap-2`},Te=[`onClick`],Ee=[`onDblclick`],De={key:2,class:`select-none absolute bottom-0 right-0 bg-main rounded-tl p2 op35 text-xs`},Oe={key:1,class:`absolute z-2 top-0 right-0 px3 py1.5 border-b border-l rounded-lb bg-main/80 backdrop-blur border-main select-none`},ke={class:`text-xs op50`},D=450,O=S(s({__name:`overview`,setup(s){le({title:`Overview - ${ne}`});let S=oe(),O=se(),{openInEditor:Ae,slides:k,isEmbedded:A}=ae(),j=p(()=>S.query.mode===`preview`),M=p(()=>j.value&&A.value),N=p(()=>j.value?M.value?Math.max(0,b.width.value-16):Math.min(900,Math.max(320,b.width.value-160)):D),je=p(()=>N.value/ie.value),P=m(new Map),F=m(new Map),I=d([]),L=d(),R=d(null),z=0,B,V,H=p(()=>k.value.map(e=>Fe(e.meta?.slide?.note||``))),Me=p(()=>H.value.reduce((e,t)=>e+t,0)),Ne=p(()=>k.value.map(e=>K(e)).reduce((e,t)=>e+t,0)),Pe=p(()=>String(Math.max(1,k.value.length)).length),U=ee(),W=new WeakMap;function G(e){return W.has(e)||W.set(e,re(e,C)),W.get(e)}function K(e){return e.meta?.clicks||G(e)?.total}function q(e){U.value===e?U.value=void 0:U.value=e}function Fe(e){let t=e.match(/[\w`'\-\u0392-\u03C9\u00C0-\u00FF\u0600-\u06FF\u0400-\u04FF]+|[\u4E00-\u9FFF\u3400-\u4DBF\uF900-\uFAFF\u3040-\u309F\uAC00-\uD7AF]+/g),n=0;if(!t)return 0;for(let e=0;e=19968?n+=t[e].length:n+=1;return n}function J(){let e=window.innerHeight||document.documentElement.clientHeight,t,n=[];for(let[r,i]of P.entries()){let a=i.getBoundingClientRect(),o=Math.max(0,Math.min(a.bottom,e)-Math.max(a.top,0));o!==0&&(o>=a.height&&n.push(r),(!t||o>t.visibleHeight)&&(t={idx:r,visibleHeight:o}))}I.value=n.length?n:t?[t.idx]:[]}function Y(e){let t=document.createElement(`a`);t.target=`_blank`,t.href=x+e.slice(1),t.click()}function Ie(e){let t=new URL(x+e.slice(1),location.href).href;if(A.value){window.parent.postMessage({target:`slidev`,sender:`slidev`,type:`open-external`,url:t},`*`);return}Y(e)}function Le(e){let t=P.get(e);t&&t.scrollIntoView({behavior:`smooth`,block:`start`})}function X(e){let t=F.get(e)||P.get(e);if(!t||!L.value)return null;let n=L.value.getBoundingClientRect();return t.getBoundingClientRect().top-n.top+L.value.scrollTop}function Z(e){if(!L.value||k.value.length===0)return;let t=Math.min(Math.max(e,1),k.value.length),n=Math.floor(t)-1,r=t-(n+1),i=X(n),a=X(n+1);if(i==null)return;let o=i+(a==null?0:(a-i)*r)-L.value.clientHeight*.5;Math.abs(L.value.scrollTop-o)<1||L.value.scrollTo({top:o})}function Re(){let e=S.query.slideNo,t=Number(Array.isArray(e)?e[0]:e);return Number.isFinite(t)&&t>0?t:void 0}function Q(e){if(!M.value)return;let t=Number(e.toFixed(3)).toString();S.query.slideNo!==t&&O.replace({query:{...S.query,slideNo:t}})}function ze(){if(!L.value||k.value.length===0)return null;let e=L.value.scrollTop+L.value.clientHeight*.5,t=k.value.map((e,t)=>X(t)).filter(e=>e!=null);if(t.length===0)return null;if(t.length===1||e<=t[0])return 1;for(let n=1;n{V=void 0;let e=B;B=void 0,e!=null&&(Q(e),!(Date.now()0&&(z=Date.now()+300,B=void 0,Q(t),Z(t))}function He(e,t,n){let r=G(n);r.current=r.current===t?C:t,e.preventDefault()}function Ue(e,t){if(e.ctrlKey||e.metaKey){e.preventDefault(),Ie(y(t,!1));return}let n=t.meta?.slide;n&&window.parent.postMessage({target:`slidev`,type:`command`,command:`goto`,args:[n.filepath,n.sourceIndex]},`*`)}return a(()=>{window.addEventListener(`message`,$);let e=M.value?Re():void 0;e!=null&&(z=Date.now()+300,Z(e)),i(()=>{e!=null&&Z(e),J()})}),te(()=>{window.removeEventListener(`message`,$),V&&clearTimeout(V)}),(i,a)=>{let s=de,d=fe;return e(),l(`div`,_e,[v(A)?_(`v-if`,!0):(e(),l(`nav`,ve,[c(`div`,ye,[c(`div`,be,[(e(!0),l(h,null,r(v(k),(t,r)=>(e(),l(`div`,{key:t.no,class:`relative`,style:{direction:`ltr`}},[c(`button`,{class:u([`relative transition duration-300 w-8 h-8 rounded hover:bg-active hover:op100`,I.value.includes(r)?`op100 text-primary bg-gray:5`:`op20`]),onClick:e=>Le(r)},[c(`div`,null,n(r+1),1)],10,xe),t.meta?.slide?.title?(e(),l(`div`,{key:0,class:u([`pointer-events-none select-none absolute left-110% top-50% translate-y--50% ws-nowrap z-label px2 slidev-glass-effect transition duration-400 op0 group-hover:op100`,I.value.includes(r)?`text-primary`:`text-main important-text-op-50`])},n(t.meta?.slide?.title),3)):_(`v-if`,!0)]))),128))])]),c(`div`,Se,[v(ce)?(e(),g(T,{key:1,title:v(w)?`Dark mode`:`Light mode`,"pointer-events-none":``,op50:``},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`])):(e(),g(T,{key:0,title:v(w)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:a[0]||=e=>v(ue)()},{default:f(()=>[v(w)?(e(),g(s,{key:0})):(e(),g(d,{key:1}))]),_:1},8,[`title`]))])])),c(`main`,{ref_key:`scroller`,ref:L,class:`flex-1 h-full of-auto`,style:o(`grid-template-columns: repeat(auto-fit,minmax(${D}px,1fr))`),onScroll:Ve},[(e(!0),l(h,null,r(v(k),(r,i)=>(e(),l(`div`,{key:r.no,ref_for:!0,ref:e=>P.set(i,e),class:u([`overview-slide-block relative of-hidden flex gap-4 min-h-50`,[i===0&&!M.value?`pt2`:``,M.value?`justify-center`:`border-t border-main`]])},[M.value?_(`v-if`,!0):(e(),l(`div`,{key:0,class:u([`select-none text-right my5 flex flex-col justify-between items-end`,j.value?`w-9`:`w-13`]),style:o({height:`${je.value}px`})},[c(`div`,{class:`self-center text-3xl op20 mb2 text-center mr--14px tabular-nums`,style:o({width:`${Pe.value}ch`})},n(i+1),5),c(`div`,Ce,[t(T,{class:u([`overview-slide-action mr--4 op0`,j.value?`text-lg`:``]),title:`Play in new tab`,onClick:e=>Y(v(y)(r,!1))},{default:f(()=>[...a[4]||=[c(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`class`,`onClick`]),_(`v-if`,!0)])],6)),c(`div`,{class:u([`flex flex-col`,M.value?`my1 gap-0`:`my5 gap-2`]),style:o({width:`${N.value}px`})},[M.value?(e(),l(`div`,we,[c(`button`,{type:`button`,class:`select-none pl-1 text-lg leading-tight op60 tabular-nums hover:op90 hover:underline underline-offset-2`,onClick:e=>Ue(e,r)},n(i+1),9,Te),K(r)?(e(),g(E,{key:0,active:U.value===r,"clicks-context":G(r),resettable:``,compact:``,attached:``,class:`ml-auto w-88 min-w-[70%] max-w-[calc(100%-3rem)]`,onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[1]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`onDblclick`,`onActivate`])):_(`v-if`,!0)])):_(`v-if`,!0),c(`div`,{ref_for:!0,ref:e=>F.set(i,e),class:u([`border rounded border-main overflow-hidden bg-main h-max`,[M.value&&K(r)?`rounded-tr-0`:``,M.value?``:`select-none`]]),onDblclick:e=>!M.value&&Y(v(y)(r,!1))},[(e(),g(pe,{key:r.no,width:N.value,class:u(M.value?``:`pointer-events-none important:[&_*]:select-none`)},{default:f(()=>[t(he,{"clicks-context":G(r),route:r,"render-context":`overview`},null,8,[`clicks-context`,`route`]),t(me,{page:r.no},null,8,[`page`])]),_:2},1032,[`width`,`class`]))],42,Ee),K(r)&&!M.value?(e(),g(E,{key:1,active:U.value===r,"clicks-context":G(r),resettable:``,class:u([`ml-1 w-[calc(100%-0.25rem)]`,j.value?``:`mt-2`]),onDblclick:e=>q(r),onActivate:e=>U.value=r,onReset:a[2]||=e=>U.value=void 0},null,8,[`active`,`clicks-context`,`class`,`onDblclick`,`onActivate`])):_(`v-if`,!0)],6),j.value?_(`v-if`,!0):(e(),g(ge,{key:1,no:r.no,class:`relative z-1 max-w-250 w-250 text-lg rounded p3`,"auto-height":!0,highlight:U.value===r,editing:R.value===r.no,"clicks-context":G(r),onDblclick:e=>R.value===r.no?null:R.value=r.no,"onUpdate:editing":a[3]||=e=>R.value=null,onMarkerClick:(e,t)=>He(e,t,r)},null,8,[`no`,`highlight`,`editing`,`clicks-context`,`onDblclick`,`onMarkerClick`])),!j.value&&H.value[i]>0?(e(),l(`div`,De,n(H.value[i])+` words `,1)):_(`v-if`,!0)],2))),128))],36),v(A)?_(`v-if`,!0):(e(),l(`div`,Oe,[c(`div`,ke,n(v(k).length)+` slides · `+n(Ne.value+v(k).length-1)+` clicks · `+n(Me.value)+` words `,1)]))])}}}),[[`__scopeId`,`data-v-47f32601`]]);export{O as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/play-CBQP4AOb.js b/lecture-08/assets/slidev/play-CBQP4AOb.js new file mode 100644 index 0000000000000000000000000000000000000000..94c91f8855dbe0657a477ccb27dd4a14a5b703f7 --- /dev/null +++ b/lecture-08/assets/slidev/play-CBQP4AOb.js @@ -0,0 +1,2 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingControls-DzQSGyTT.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-CJZsCeMT.js","../modules/shiki-BrmBd2_v.css","../modules/vue-Dnfgf7Ad.js","../useDrawings-B2TJYfiB.js","../useNav-B0kQsolV.js","../_plugin-vue_export-helper-BDNMzG2s.js","./context-DB-9afGB.js","../index-CvCioxNn.js","../syncState-3Tc2ZArb.js","../index-CSMQn_X0.css","./IconButton-BwA4p7Ax.js","./VerticalDivider-Bvc1MZzH.js","../DrawingControls-Dhbx0szf.css"])))=>i.map(i=>d[i]); +import{B as e,C as t,S as n,St as r,T as i,Z as a,_ as o,b as s,bt as c,ct as l,dt as u,et as d,g as f,m as p,mt as m,ot as h,v as g,y as _,yt as v}from"../modules/shiki-CJZsCeMT.js";import{E as y,F as b,I as x,f as S,h as C,k as w,q as T,t as E,tt as D,v as O,w as k}from"../useNav-B0kQsolV.js";import{C as A,m as j}from"../modules/vue-Dnfgf7Ad.js";import{o as M}from"../index-CvCioxNn.js";import{t as N}from"../useDrawings-B2TJYfiB.js";import{t as P}from"../modules/unplugin-icons-CStvVwzQ.js";import{t as F}from"./Modal-PBdP8Aqp.js";import{i as I}from"../SlideWrapper-BDw_Ew7k.js";import{a as L,c as R,d as z,f as B,l as V,n as H,r as U,s as W,t as G,u as K}from"./shortcuts-Bt08PVJK.js";var q=2e3;function J(e){let t=f(()=>e.value&&S.value);function n(){document.body.style.cursor=`none`}function r(){document.body.style.cursor=``}let i=null;a(t,e=>{e||(r(),i&&clearTimeout(i),i=null)}),l(()=>{r(),i&&clearTimeout(i),i=null}),j(document.body,[`pointermove`,`pointerdown`],()=>{r(),i&&clearTimeout(i),i=t.value?setTimeout(n,q):null},{passive:!0})}``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href;var Y={class:`slidev-info-dialog slidev-layout flex flex-col gap-4 text-base`},X=[`innerHTML`],Z=i({__name:`InfoDialog`,props:{modelValue:{default:!1}},emits:[`update:modelValue`],setup(t,{emit:r}){let i=A(t,`modelValue`,r),a=f(()=>typeof D.info==`string`);return(t,r)=>(e(),g(F,{modelValue:v(i),"onUpdate:modelValue":r[0]||=e=>h(i)?i.value=e:null,class:`px-6 py-4`},{default:d(()=>[o(`div`,Y,[a.value?(e(),s(`div`,{key:0,class:`mb-4`,innerHTML:v(D).info},null,8,X)):_(`v-if`,!0),r[1]||=o(`a`,{href:`https://github.com/slidevjs/slidev`,target:`_blank`,class:`!opacity-100 !border-none !text-current`},[o(`div`,{class:`flex gap-1 children:my-auto`},[o(`div`,{class:`opacity-50 text-sm mr-2`},`Powered by`),o(`img`,{class:`w-5 h-5`,src:``+new URL(`../logo-BYkHSa_O.png`,import.meta.url).href,alt:`Slidev logo`}),o(`div`,{style:{color:`#2082A6`}},[o(`b`,null,`Sli`),n(`dev `)])])],-1)])]),_:1},8,[`modelValue`]))}}),Q=i({__name:`Controls`,setup(n){let{isEmbedded:r}=E(),i=!D.drawings.presenterOnly&&!r.value,a=m();i&&T(()=>import(`./DrawingControls-DzQSGyTT.js`).then(e=>e.n).then(e=>a.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]),import.meta.url);let o=m(),c=m();return(n,r)=>(e(),s(p,null,[a.value?(e(),g(v(a),{key:0})):_(`v-if`,!0),t(W),t(R),o.value?(e(),g(v(o),{key:1})):_(`v-if`,!0),c.value?(e(),g(v(c),{key:2,modelValue:v(w),"onUpdate:modelValue":r[0]||=e=>h(w)?w.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),v(D).info?(e(),g(Z,{key:3,modelValue:v(y),"onUpdate:modelValue":r[1]||=e=>h(y)?y.value=e:null},null,8,[`modelValue`])):_(`v-if`,!0),t(V)],64))}}),$={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},ee=i({__name:`PresenterMouse`,setup(n){return(n,i)=>{let a=P;return v(M).cursor?.style===`cursor`?(e(),s(`div`,$,[t(a,{class:`absolute stroke-white dark:stroke-black`,style:r({left:`${v(M).cursor.x}%`,top:`${v(M).cursor.y}%`,strokeWidth:16})},null,8,[`style`])])):_(`v-if`,!0)}}}),te=i({__name:`play`,setup(n){let{next:r,prev:i,isPrintMode:a,isPlaying:l,isEmbedded:h}=E(),{isDrawing:y}=N(),S=u();function w(e){k.value||e.button===0&&e.target?.id===`slide-container`&&(e.pageX/window.innerWidth>.5?r():i())}B(S),G(),z(),J(f(()=>l.value&&!h.value&&!k.value));let T=f(()=>O.value||k.value),D=m(),A=f(()=>{let e=``;return b.value.brightness!==x.brightness&&(e+=`brightness(${b.value.brightness}) `),b.value.contrast!==x.contrast&&(e+=`contrast(${b.value.contrast}) `),b.value.sepia!==x.sepia&&(e+=`sepia(${b.value.sepia}) `),b.value.hueRotate!==x.hueRotate&&(e+=`hue-rotate(${b.value.hueRotate}deg) `),b.value.invert&&(e+=`invert(1) `),{filter:e}});return(n,r)=>(e(),s(p,null,[o(`div`,{id:`page-root`,ref_key:`root`,ref:S,class:c([`grid`,v(C)?`grid-rows-[1fr_max-content]`:`grid-cols-[1fr_max-content]`])},[t(I,{style:{background:`var(--slidev-slide-container-background, black)`},"is-main":``,"content-style":A.value,onPointerdown:w,onContextmenu:v(K)},{default:d(()=>[t(H,{"render-context":`slide`}),t(ee),t(L)]),controls:d(()=>[v(a)?_(`v-if`,!0):(e(),s(`div`,{key:0,class:c([`absolute bottom-0 left-0 transition duration-300 opacity-0 hover:opacity-100 focus-within:opacity-100 focus-visible:opacity-100`,[T.value?`!opacity-100 right-0`:`opacity-0 p-2`,v(y)?`pointer-events-none`:``]])},[t(U,{persist:T.value},null,8,[`persist`])],2))]),_:1},8,[`content-style`,`onContextmenu`]),D.value&&v(k)?(e(),g(v(D),{key:0,resize:!0})):_(`v-if`,!0)],2),v(a)?_(`v-if`,!0):(e(),g(Q,{key:0})),r[0]||=o(`div`,{id:`twoslash-container`},null,-1)],64))}});export{te as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/presenter-BxnNsbIJ.js b/lecture-08/assets/slidev/presenter-BxnNsbIJ.js new file mode 100644 index 0000000000000000000000000000000000000000..bedb6f85389fbdd4efff12f9a7f58025b28b52dd --- /dev/null +++ b/lecture-08/assets/slidev/presenter-BxnNsbIJ.js @@ -0,0 +1 @@ +import{B as e,C as t,Ct as n,Q as r,R as i,S as a,St as o,T as s,X as c,Z as l,_ as u,b as d,bt as f,dt as p,et as m,g as h,m as ee,mt as g,ot as te,tt as _,u as v,v as y,y as b,yt as x}from"../modules/shiki-CJZsCeMT.js";import{$ as ne,O as re,W as ie,a as ae,b as S,m as oe,o as se,t as ce,w as le,x as ue}from"../useNav-B0kQsolV.js";import{t as C}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{T as w,g as T,m as E,v as D}from"../modules/vue-Dnfgf7Ad.js";import{h as de,n as O,o as k}from"../index-CvCioxNn.js";import{t as fe}from"../useDrawings-B2TJYfiB.js";import{t as pe}from"./DrawingControls-DzQSGyTT.js";import{t as A}from"./IconButton-BwA4p7Ax.js";import{n as me,t as j}from"./NoteDisplay-7gBbyxSS.js";import{n as M,r as he,t as ge}from"./TimerBar-DXDQLXL9.js";import{i as N,t as _e}from"../SlideWrapper-BDw_Ew7k.js";import"./NoteEditable-qR7skroz.js";import{a as ve,c as ye,d as be,f as xe,i as Se,l as Ce,n as we,o as Te,r as Ee,s as De,t as Oe,u as ke}from"./shortcuts-Bt08PVJK.js";var Ae=s({__name:`NoteStatic`,props:{no:{},class:{},clicksContext:{}},setup(t){let n=t,{info:r}=O(n.no);return(i,a)=>(e(),y(j,{class:f(n.class),note:x(r)?.note,"note-html":x(r)?.noteHTML,"clicks-context":t.clicksContext},null,8,[`class`,`note`,`note-html`,`clicks-context`]))}}),P={"h-full":``,"w-full":``},je={key:0,"w-full":``,"h-full":``,flex:`~ col gap-4 items-center justify-center`},Me=s({__name:`ScreenCaptureMirror`,setup(t){let n=c(`video`),r=g(null),i=g(!1);async function o(){r.value=await navigator.mediaDevices.getDisplayMedia({video:{cursor:`always`},audio:!1,selfBrowserSurface:`include`,preferCurrentTab:!1}),n.value.srcObject=r.value,n.value.play(),i.value=!0,r.value.addEventListener(`inactive`,()=>{n.value.srcObject=null,i.value=!1}),r.value.addEventListener(`ended`,()=>{n.value.srcObject=null,i.value=!1})}return(t,r)=>(e(),d(`div`,P,[_(u(`video`,{ref_key:`video`,ref:n,class:`w-full h-full object-contain`},null,512),[[v,i.value]]),i.value?b(`v-if`,!0):(e(),d(`div`,je,[r[0]||=u(`div`,{op50:``},[a(` Use screen capturing to mirror your main screen back to presenter view.`),u(`br`),a(` Click the button below and `),u(`b`,null,`select your other monitor or window`),a(`. `)],-1),u(`button`,{class:`slidev-form-button`,onClick:o},` Start Screen Mirroring `)]))]))}}),Ne={class:`w-22px cursor-pointer`},Pe={class:`group-not-hover:hidden flex flex-col items-center`},Fe={key:0,class:`i-carbon:pause text-lg`},Ie={key:1,class:`i-carbon:play`},Le={class:`text-3xl px-3 my-auto font-mono`},Re=s({__name:`TimerInlined`,setup(t){let{status:r,percentage:i,mode:a,timer:o,reset:s,toggle:c}=M(),l=h(()=>r.value===`stopped`?`op50`:r.value===`paused`?`text-blue6 dark:text-blue3`:i.value>100?`text-red6 dark:text-red3`:i.value>80?`text-yellow6 dark:text-yellow3`:`text-green6 dark:text-green3`);return(t,i)=>(e(),d(`div`,{class:f([`group flex items-center justify-center pl-4 select-none`,l.value])},[u(`div`,Ne,[u(`div`,{class:f([`group-hover:hidden text-2xl`,x(a)===`countdown`?`i-carbon:timer`:`i-carbon:time`])},null,2),u(`div`,Pe,[u(`div`,{class:`relative op-80 hover:op-100`,onClick:i[0]||=(...e)=>x(c)&&x(c)(...e)},[x(r)===`running`?(e(),d(`div`,Fe)):(e(),d(`div`,Ie))]),u(`div`,{class:`op-80 hover:op-100`,onClick:i[1]||=(...e)=>x(s)&&x(s)(...e)},[...i[2]||=[u(`div`,{class:`i-carbon:renew`},null,-1)]])])]),u(`div`,Le,[x(o).h?(e(),d(ee,{key:0},[u(`span`,null,n(x(o).h),1),i[3]||=u(`span`,{op50:``},`:`,-1)],64)):b(`v-if`,!0),u(`span`,null,n(x(o).m),1),i[4]||=u(`span`,{op50:``},`:`,-1),u(`span`,null,n(x(o).s),1)])],2))}}),ze={class:`bg-main h-full slidev-presenter grid grid-rows-[max-content_1fr] of-hidden`},Be={flex:`~ gap-4 items-center`,border:`b main`,p1:``},Ve={class:`relative grid-section next flex flex-col p-2 lg:p-4`},He={key:2,class:`h-full flex justify-center items-center`},Ue={key:3,class:`h-full grid grid-rows-[1fr_min-content]`},F=C(s({__name:`presenter`,setup(n){let a=w(),s=p(),c=p(),C=p(),O=p();Oe(),xe(s),be();let{clicksContext:j,currentSlideNo:M,currentSlideRoute:P,hasNext:je,nextRoute:Ne,slides:Pe,getPrimaryClicks:Fe}=ce(),{isDrawing:Ie}=fe();de({title:`Presenter - ${ne}`}),p(!1);let Le=h(()=>Pe.value.map(e=>{let t=p(0);return{context:ie(t,e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks),clicks:t}})),F=h(()=>j.value.currentF.value&&Le.value[F.value[0].no-1]);l(F,()=>{I.value&&F.value&&(I.value.clicks.value=F.value[1])},{immediate:!0});let L=T(`slidev-presenter-main-slide-mode`,`slides`),R=T(`slidev-presenter-notes-width`,360),z=T(`slidev-presenter-notes-row-size`,280),B=p(0),V=p(!1),H=p(!1),U=p(0),W=p(360),We=p(0),G=p(280),K={minNotesWidth:240,maxNotesWidth:720,minNotesRowSize:160,maxNotesWidthRatio:.7,maxNotesRowHeightRatio:.75},Ge=D(`(min-aspect-ratio: 1/1)`),q=D(`(max-aspect-ratio: 3/5)`),J=h(()=>S.value===1&&Ge.value),Y=h(()=>!(S.value===1&&q.value)),X=h(()=>S.value===1&&!q.value||S.value===2||S.value===3),Z=h(()=>S.value===1&&!q.value);function Ke(e){return Number.isFinite(e)?Math.max(K.minNotesWidth,Math.min(K.maxNotesWidth,Math.round(e))):K.minNotesWidth}function qe(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-U.value,i=Ke(J.value?W.value-r:W.value+r),a=Math.round(n.width*K.maxNotesWidthRatio);R.value=Math.min(i,Math.max(K.minNotesWidth,a))}function Q(e){Y.value&&e.button===0&&(e.preventDefault(),U.value=e.clientX,W.value=R.value,V.value=!0)}function $(e){return Number.isFinite(e)?Math.max(K.minNotesRowSize,Math.round(e)):K.minNotesRowSize}function Je(e){let t=c.value;if(!t)return;let n=t.getBoundingClientRect(),r=e-We.value,i=Z.value?G.value-r:G.value+r,a=Math.round(n.height*K.maxNotesRowHeightRatio);z.value=Math.min($(i),Math.max(K.minNotesRowSize,a))}function Ye(e){if(!X.value||e.button!==0)return;e.preventDefault();let t=S.value===2?s.value?.getBoundingClientRect().height:C.value?.getBoundingClientRect().height;We.value=e.clientY,G.value=$(t??z.value),H.value=!0}function Xe(){let e=O.value;e&&(B.value=Math.round(e.getBoundingClientRect().height))}function Ze(){V.value=!1,H.value=!1}function Qe(){Xe(),$e()}E(window,`pointermove`,e=>{V.value&&qe(e.clientX),H.value&&Je(e.clientY)}),E(window,`pointerup`,Ze),E(window,`pointercancel`,Ze),i(()=>{Qe()}),E(window,`resize`,()=>{Qe()});function $e(){R.value=Ke(R.value),z.value=$(z.value);let e=c.value;if(!e)return;let t=e.getBoundingClientRect(),n=Math.round(t.width*K.maxNotesWidthRatio),r=Math.round(t.height*K.maxNotesRowHeightRatio);R.value=Math.min(R.value,Math.max(K.minNotesWidth,n)),z.value=Math.min(z.value,Math.max(K.minNotesRowSize,r))}let et=g();return i(()=>{let e=Te(),t=w();r(()=>{!e.value||!t.value||Ie.value||!re.value?k.cursor=void 0:k.cursor={...e.value,style:ae.value}})}),(n,r)=>(e(),d(ee,null,[u(`div`,ze,[u(`div`,null,[t(he),t(ge)]),u(`div`,{ref_key:`gridContainer`,ref:c,class:f([`grid-container`,`layout${x(S)}`]),style:o({"--slidev-presenter-notes-width":`${x(R)}px`,"--slidev-presenter-notes-row-size":`${x(z)}px`,"--slidev-presenter-bottom-height":`${B.value}px`})},[b(` Unified vertical resizer for wide layout `),Y.value&&J.value?(e(),d(`div`,{key:0,class:`notes-vertical-resizer`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),b(` Unified vertical resizer for layout 3 `),Y.value&&x(S)===3?(e(),d(`div`,{key:1,class:`notes-vertical-resizer-left`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),u(`div`,{ref_key:`main`,ref:s,class:`relative grid-section main flex flex-col`},[u(`div`,Be,[r[3]||=u(`span`,{op50:``,px2:``},`Current`,-1),r[4]||=u(`div`,{"flex-auto":``},null,-1),t(Se,{modelValue:x(L),"onUpdate:modelValue":r[0]||=e=>te(L)?L.value=e:null,options:[{label:`Slides`,value:`slides`},{label:`Screen Mirror`,value:`mirror`}]},null,8,[`modelValue`])]),x(L)===`mirror`?(e(),y(Me,{key:0})):b(`v-if`,!0),b(` We use v-show here to still infer the clicks context `),_(t(N,{key:`main`,class:`p-2 lg:p-4 flex-auto`,"is-main":``,onContextmenu:x(ke)},{default:m(()=>[t(we,{"render-context":`presenter`}),t(ve)]),_:1},8,[`onContextmenu`]),[[v,x(L)===`slides`]]),(e(),y(me,{key:x(P)?.no,"clicks-context":x(Fe)(x(P)),class:`w-full pb2 px4 flex-none`},null,8,[`clicks-context`]))],512),u(`div`,Ve,[X.value&&x(S)===2?(e(),d(`div`,{key:0,class:`notes-row-resizer top-[-6px]`,role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,32)):b(`v-if`,!0),F.value&&I.value?(e(),y(N,{key:`next`},{default:m(()=>[(e(),y(_e,{key:F.value[0].no,"clicks-context":I.value.context,route:F.value[0],"render-context":`previewNext`},null,8,[`clicks-context`,`route`]))]),_:1})):(e(),d(`div`,He,[...r[5]||=[u(`div`,{class:`text-gray-500`},` End of the presentation `,-1)]])),r[6]||=u(`div`,{class:`absolute left-0 top-0 bg-main border-b border-r border-main px2 py1 op50 text-sm`},` Next `,-1)]),u(`div`,{ref_key:`noteSection`,ref:C,class:`relative grid-section note overflow-hidden`},[Y.value&&!J.value&&x(S)!==3?(e(),d(`div`,{key:0,class:`notes-resizer right-[-6px]`,role:`separator`,"aria-orientation":`vertical`,title:`Resize notes panel`,onPointerdown:Q},null,32)):b(`v-if`,!0),X.value&&x(S)!==2?(e(),d(`div`,{key:1,class:f([`notes-row-resizer`,Z.value?`top-[-6px]`:`bottom-[-6px]`]),role:`separator`,"aria-orientation":`horizontal`,title:`Resize notes panel height`,onPointerdown:Ye},null,34)):b(`v-if`,!0),et.value&&x(le)?(e(),y(x(et),{key:2,class:`h-full`})):(e(),d(`div`,Ue,[(e(),y(Ae,{key:`static-${x(M)}`,no:x(M),class:`w-full max-w-full h-full overflow-auto p-2 lg:p-4`,style:o({fontSize:`${x(ue)}em`}),"clicks-context":x(j)},null,8,[`no`,`style`,`clicks-context`])),r[10]||=u(`div`,{"border-t":``,"border-main":``},null,-1),u(`div`,{class:f([`py-1 px-2 text-sm transition`,x(a)?``:`op25`])},[t(A,{title:`Increase font size`,onClick:x(oe)},{default:m(()=>[...r[7]||=[u(`div`,{class:`i-carbon:zoom-in`},null,-1)]]),_:1},8,[`onClick`]),t(A,{title:`Decrease font size`,onClick:x(se)},{default:m(()=>[...r[8]||=[u(`div`,{class:`i-carbon:zoom-out`},null,-1)]]),_:1},8,[`onClick`]),b(`v-if`,!0)],2)]))],512),u(`div`,{ref_key:`bottomSection`,ref:O,class:`grid-section bottom flex`},[t(Ee,{persist:!0,class:f([`transition`,x(a)?``:`op25`])},null,8,[`class`]),r[11]||=u(`div`,{"flex-auto":``},null,-1),t(Re)],512),(e(),y(pe,{key:2}))],6)]),t(ye),t(De),t(Ce)],64))}}),[[`__scopeId`,`data-v-e7a794bf`]]);export{F as default}; \ No newline at end of file diff --git a/lecture-08/assets/slidev/shortcuts-Bt08PVJK.js b/lecture-08/assets/slidev/shortcuts-Bt08PVJK.js new file mode 100644 index 0000000000000000000000000000000000000000..7f08c8e523a223eaa9a48edbdc537ff25ded2d21 --- /dev/null +++ b/lecture-08/assets/slidev/shortcuts-Bt08PVJK.js @@ -0,0 +1,4 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DrawingLayer-CgAMPS2j.js","../modules/shiki-CJZsCeMT.js","../rolldown-runtime-hePW80VL.js","../modules/shiki-BrmBd2_v.css","./context-DB-9afGB.js","../modules/vue-Dnfgf7Ad.js","../useDrawings-B2TJYfiB.js","../useNav-B0kQsolV.js","../_plugin-vue_export-helper-BDNMzG2s.js","../index-CvCioxNn.js","../syncState-3Tc2ZArb.js","../index-CSMQn_X0.css"])))=>i.map(i=>d[i]); +import{A as e,B as t,C as n,Ct as r,D as i,H as a,J as o,K as s,M as c,N as l,Q as u,R as d,S as f,St as p,T as m,U as h,Z as g,_,a as v,b as y,bt as b,c as x,d as S,dt as C,et as w,f as T,g as E,h as D,i as ee,l as O,m as k,mt as te,n as ne,o as re,ot as ie,tt as ae,u as oe,v as A,xt as j,y as M,yt as N}from"../modules/shiki-CJZsCeMT.js";import{A as P,C as se,D as F,E as ce,F as I,G as le,I as L,L as ue,M as de,N as fe,O as pe,P as me,Q as he,R as ge,S as _e,T as R,V as ve,Y as ye,Z as be,_ as xe,a as Se,b as Ce,d as we,f as Te,g as Ee,i as De,j as z,n as Oe,nt as ke,p as Ae,q as je,r as Me,s as Ne,t as B,tt as V,u as Pe,w as Fe,y as Ie,z as Le}from"../useNav-B0kQsolV.js";import{t as Re}from"../_plugin-vue_export-helper-BDNMzG2s.js";import{C as ze,I as Be,P as Ve,T as He,V as Ue,b as We,f as Ge,m as Ke,n as H,o as qe,r as Je,s as Ye,t as U,w as Xe,y as Ze}from"../modules/vue-Dnfgf7Ad.js";import{_ as Qe,l as $e,n as et}from"./context-DB-9afGB.js";import{f as tt,i as nt,m as rt,o as it,p as at,r as ot,t as st}from"../index-CvCioxNn.js";import{t as ct}from"../useDrawings-B2TJYfiB.js";import{t as W}from"./IconButton-BwA4p7Ax.js";import{t as lt}from"./VerticalDivider-Bvc1MZzH.js";import{a as ut,i as dt,n as ft,o as pt,r as mt,t as ht}from"../SlideWrapper-BDw_Ew7k.js";function gt(e){let{next:t,nextSlide:n,prev:r,prevSlide:i}=B(),{isDrawing:a}=ct(),o=C(0),{direction:s,distanceX:c,distanceY:l}=We(e,{pointerTypes:[`touch`],onSwipeStart(){a.value||(o.value=Ve())},onSwipeEnd(){if(!o.value||a.value)return;let e=Math.abs(c.value),u=Math.abs(l.value);e/window.innerWidth>.3||e>75?s.value===`left`?t():r():(u/window.innerHeight>.4||u>200)&&(s.value===`down`?i():n())}})}function _t(){let{request:e,release:t}=Xe();g(ue,n=>{n?e(`screen`):t()},{immediate:!0})}var vt=Object.assign({}),yt=Object.assign({}),bt=Object.assign({}),xt=[Object.values(vt)[0],Object.values(yt)[0],Object.values(bt)[0]].filter(Boolean),St,Ct=()=>{if(St)return St;let{next:e,nextSlide:t,prev:n,prevSlide:r,hasNext:i,hasPrev:a,currentPage:o,total:s,isPresenter:c,enterPresenter:l,exitPresenter:u,isEmbedded:d,isPresenterAvailable:f}=B(),{drawingEnabled:p}=ct(),{isFullscreen:m,toggle:h}=Pe;return St=xt.reduce((e,t)=>t(e),E(()=>[{small:!0,icon:`i-carbon:arrow-left`,label:`Previous Click`,action:n,disabled:!a.value},{small:!0,icon:`i-carbon:arrow-right`,label:`Next Click`,action:e,disabled:!i.value},{small:!0,icon:`i-carbon:arrow-up`,label:`Previous Slide`,action:r,disabled:o.value<=1},{small:!0,icon:`i-carbon:arrow-down`,label:`Next Slide`,action:t,disabled:o.value>=s.value},`separator`,{icon:`i-carbon:text-annotation-toggle`,label:Fe.value?`Hide editor`:`Show editor`,action:()=>Fe.value=!Fe.value,show:!1},{icon:`i-carbon:pen`,label:p.value?`Hide drawing toolbar`:`Show drawing toolbar`,action:()=>p.value=!p.value},{icon:`i-carbon:apps`,label:`Show slide overview`,action:de},c.value&&{icon:`i-carbon:presentation-file`,label:`Exit Presenter Mode`,action:u},f.value&&{icon:`i-carbon:user-speaker`,label:`Enter Presenter Mode`,action:l},!d.value&&{icon:m.value?`i-carbon:minimize`:`i-carbon:maximize`,label:m.value?`Close fullscreen`:`Enter fullscreen`,action:h}].filter(Boolean)))},wt=te(null);function Tt(e,t){wt.value={x:e,y:t,items:Ct()}}function Et(){wt.value=null}function Dt(e){if(V.contextMenu!==!0&&V.contextMenu!=null&&V.contextMenu!==`build`||e.shiftKey||e.defaultPrevented)return;let{isEmbedded:t}=B();t.value||(Tt(e.pageX,e.pageY),e.preventDefault(),e.stopPropagation())}var Ot=[`title`,`onClick`],kt=[`onClick`],At={class:`mx-auto flex`},jt={key:0},Mt={class:`w-full text-xs p2`},Nt={class:`text-main text-opacity-50!`},Pt=m({__name:`ContextMenu`,setup(e){let n=C();qe(n,Et),Ke(document,`mousedown`,e=>{e.buttons&2&&Et()},{passive:!0,capture:!0});let i=E(()=>V.contextMenu!=null),o=He();g(o,e=>{e||Et()}),st(1);let{width:c,height:l}=Ge(n),u=E(()=>{let e=wt.value?.x;return e?e+c.value>ge.width.value?ge.width.value-c.value:e:0}),d=E(()=>{let e=wt.value?.y;return e?e+l.value>ge.height.value?ge.height.value-l.value:e:0});return(e,o)=>N(wt)?(t(),y(`div`,{key:0,ref_key:`container`,ref:n,style:p(`left:${u.value}px;top:${d.value}px`),class:`slidev-glass-effect fixed z-context-menu w-60 flex flex-wrap justify-items-start p-1 animate-fade-in animate-duration-100 rounded-md shadow overflow-hidden select-none`,onContextmenu:o[1]||=T(()=>{},[`prevent`]),onClick:o[2]||=(...e)=>N(Et)&&N(Et)(...e)},[(t(!0),y(k,null,a(N(wt).items.value,(e,n)=>(t(),y(k,{key:n},[e===`separator`?(t(),y(`div`,{key:n,class:`w-full my1 border-t border-main`})):e.show??!0?(t(),y(k,{key:1},[e.small?(t(),y(`div`,{key:0,class:b([`p-2 w-[40px] h-[40px] inline-block text-center cursor-pointer rounded flex`,e.disabled?`op40`:`hover:bg-active`]),title:e.label,onClick:e.action},[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))],10,Ot)):(t(),y(`div`,{key:1,class:b([`w-full grid grid-cols-[35px_1fr] p-2 pl-0 cursor-pointer rounded`,e.disabled?`op40`:`hover:bg-active`]),onClick:e.action},[_(`div`,At,[typeof e.icon==`string`?(t(),y(`div`,{key:0,class:b([e.icon,`text-1.2em ma`])},null,2)):(t(),A(s(e.icon),{key:1}))]),typeof e.label==`string`?(t(),y(`div`,jt,r(e.label),1)):(t(),A(s(e.label),{key:1}))],10,kt))],64)):M(`v-if`,!0)],64))),128)),i.value?M(`v-if`,!0):(t(),y(k,{key:0},[o[6]||=_(`div`,{class:`w-full my1 border-t border-main`},null,-1),_(`div`,Mt,[_(`div`,Nt,[o[3]||=f(` Hold `,-1),o[4]||=_(`kbd`,{class:`border px1 py0.5 border-main rounded text-primary`},`Shift`,-1),o[5]||=f(` and right click to open the native context menu `,-1),M(`v-if`,!0)])])],64))],36)):M(`v-if`,!0)}});function G(e){return Array.isArray?Array.isArray(e):Ht(e)===`[object Array]`}function Ft(e){if(typeof e==`string`)return e;if(typeof e==`bigint`)return e.toString();let t=e+``;return t==`0`&&1/e==-1/0?`-0`:t}function It(e){return e==null?``:Ft(e)}function K(e){return typeof e==`string`}function Lt(e){return typeof e==`number`}function Rt(e){return e===!0||e===!1||Bt(e)&&Ht(e)==`[object Boolean]`}function zt(e){return typeof e==`object`}function Bt(e){return zt(e)&&e!==null}function q(e){return e!=null}function Vt(e){return!e.trim().length}function Ht(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var Ut=`Incorrect 'index' type`,Wt=`Invalid doc index: must be a non-negative integer within the bounds of the docs array`,Gt=e=>`Invalid value for key ${e}`,Kt=e=>`Pattern length exceeds max of ${e}.`,qt=e=>`Missing ${e} property in key`,Jt=e=>`Property 'weight' in key '${e}' must be a positive integer`,Yt=`Fuse.match does not support useTokenSearch: token search requires corpus-level statistics (df, fieldCount) that a one-off string comparison does not have. Use new Fuse(...).search(...) instead.`,Xt=Object.prototype.hasOwnProperty,Zt=class{constructor(e){this._keys=[],this._keyMap={};let t=0;e.forEach(e=>{let n=Qt(e);this._keys.push(n),this._keyMap[n.id]=n,t+=n.weight}),this._keys.forEach(e=>{e.weight/=t})}get(e){return this._keyMap[e]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}};function Qt(e){let t=null,n=null,r=null,i=1,a=null;if(K(e)||G(e))r=e,t=$t(e),n=en(e);else{if(!Xt.call(e,`name`))throw Error(qt(`name`));let o=e.name;if(r=o,Xt.call(e,`weight`)&&e.weight!==void 0&&(i=e.weight,i<=0))throw Error(Jt(en(o)));t=$t(o),n=en(o),a=e.getFn??null}return{path:t,id:n,weight:i,src:r,getFn:a}}function $t(e){return G(e)?e:e.split(`.`)}function en(e){return G(e)?e.join(`.`):e}function tn(e,t){let n=[],r=!1,i=(e,t,a,o)=>{if(q(e)){if(!t[a])n.push(o===void 0?e:{v:e,i:o});else{let s=e[t[a]];if(!q(s))return;if(a===t.length-1&&(K(s)||Lt(s)||Rt(s)||typeof s==`bigint`))n.push(o===void 0?It(s):{v:It(s),i:o});else if(G(s)){r=!0;for(let e=0,n=s.length;ee.score===t.score?e.idx=9&&e<=13||e===32||e===160}function cn(e=1,t=3){let n=new Map,r=10**t;return{get(t){let i=0,a=!1;for(let e=0;e{this._keysMap[e.id]=t})}create(){if(this.isCreated||!this.docs.length)return;this.isCreated=!0;let e=this.docs.length;this.records=Array(e);let t=0;if(K(this.docs[0]))for(let n=0;ne&&--this.records[t].i}removeAll(e){let t=new Set;for(let n of e)Number.isInteger(n)&&n>=0&&t.add(n);if(t.size===0)return;this.records=this.records.filter(e=>!t.has(e.i));let n=Array.from(t).sort((e,t)=>e-t);for(let e of this.records){let t=0,r=n.length;for(;t>>1;n[i]t),records:this.records}}};function un(e,t,{getFn:n=J.getFn,fieldNormWeight:r=J.fieldNormWeight}={}){let i=new ln({getFn:n,fieldNormWeight:r});return i.setKeys(e.map(Qt)),i.setSources(t),i.create(),i}function dn(e,{getFn:t=J.getFn,fieldNormWeight:n=J.fieldNormWeight}={}){let{keys:r,records:i}=e,a=new ln({getFn:t,fieldNormWeight:n});return a.setKeys(r),a.setIndexRecords(i),a}function fn(e=[],t=J.minMatchCharLength){let n=[],r=-1,i=-1,a=0;for(let o=e.length;a=t&&n.push([r,i]),r=-1)}return e[a-1]&&a-r>=t&&n.push([r,a-1]),n}function pn(e,t,n,{location:r=J.location,distance:i=J.distance,threshold:a=J.threshold,findAllMatches:o=J.findAllMatches,minMatchCharLength:s=J.minMatchCharLength,includeMatches:c=J.includeMatches,ignoreLocation:l=J.ignoreLocation}={}){if(t.length>32)throw Error(Kt(32));let u=t.length,d=e.length,f=Math.max(0,Math.min(r,d)),p=a,m=f,h=(e,t)=>{let n=e/u;if(l)return n;let r=Math.abs(f-t);return i?n+r/i:r?1:n},g=s>1||c,_=g?Array(d):[],v;for(;(v=e.indexOf(t,m))>-1;){let e=h(0,v);if(p=Math.min(e,p),m=v+u,g){let e=0;for(;e=a;--r){let i=r-1,o=n[e[i]];if(c[r]=(c[r+1]<<1|1)&o,t&&(c[r]|=(y[r+1]|y[r])<<1|1|y[r+1]),c[r]&C&&(b=h(t,i),b<=p)){if(p=b,m=i,x=t,m<=f)break;a=Math.max(1,2*f-m)}}if(h(t+1,f)>p)break;y=c}if(g&&m>=0){let t=Math.min(d-1,m+u-1+x);for(let r=m;r<=t;r+=1)n[e[r]]&&(_[r]=1)}let w={isMatch:m>=0,score:Math.max(.001,b)};if(g){let e=fn(_,s);e.length?c&&(w.indices=e):w.isMatch=!1}return w}function mn(e){let t={};for(let n=0,r=e.length;ne[0]-t[0]||e[1]-t[1]);let t=[e[0]];for(let n=1,r=e.length;ne.normalize(`NFD`).replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,``).replace(_n,e=>gn[e]):e=>e,yn=class{constructor(e,{location:t=J.location,threshold:n=J.threshold,distance:r=J.distance,includeMatches:i=J.includeMatches,findAllMatches:a=J.findAllMatches,minMatchCharLength:o=J.minMatchCharLength,isCaseSensitive:s=J.isCaseSensitive,ignoreDiacritics:c=J.ignoreDiacritics,ignoreLocation:l=J.ignoreLocation}={}){if(this.options={location:t,threshold:n,distance:r,includeMatches:i,findAllMatches:a,minMatchCharLength:o,isCaseSensitive:s,ignoreDiacritics:c,ignoreLocation:l},e=s?e:e.toLowerCase(),e=c?vn(e):e,this.pattern=e,this.chunks=[],!this.pattern.length)return;let u=(e,t)=>{this.chunks.push({pattern:e,alphabet:mn(e),startIndex:t})},d=this.pattern.length;if(d>32){let e=0,t=d%32,n=d-t;for(;e{let{isMatch:m,score:h,indices:g}=pn(e,t,n,{location:i+p,distance:a,threshold:o,findAllMatches:s,minMatchCharLength:c,includeMatches:r,ignoreLocation:l});m&&(f=!0),d+=h,m&&g&&u.push(...g)});let p={isMatch:f,score:f?d/this.chunks.length:1};return f&&r&&(p.indices=hn(u)),p}},bn=new Set([`fuzzy`,`include`]);function xn(e){return e.startsWith(`inverse`)}var Sn=[{type:`exact`,multiRegex:/^="(.*)"$/,singleRegex:/^=(.*)$/,create:e=>({type:`exact`,search(t){let n=t===e;return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`include`,multiRegex:/^'"(.*)"$/,singleRegex:/^'(.*)$/,create:e=>({type:`include`,search(t){let n=0,r,i=[],a=e.length;for(;(r=t.indexOf(e,n))>-1;)n=r+a,i.push([r,n-1]);let o=!!i.length;return{isMatch:o,score:+!o,indices:i}}})},{type:`prefix-exact`,multiRegex:/^\^"(.*)"$/,singleRegex:/^\^(.*)$/,create:e=>({type:`prefix-exact`,search(t){let n=t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,e.length-1]}}})},{type:`inverse-prefix-exact`,multiRegex:/^!\^"(.*)"$/,singleRegex:/^!\^(.*)$/,create:e=>({type:`inverse-prefix-exact`,search(t){let n=!t.startsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`inverse-suffix-exact`,multiRegex:/^!"(.*)"\$$/,singleRegex:/^!(.*)\$$/,create:e=>({type:`inverse-suffix-exact`,search(t){let n=!t.endsWith(e);return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`suffix-exact`,multiRegex:/^"(.*)"\$$/,singleRegex:/^(.*)\$$/,create:e=>({type:`suffix-exact`,search(t){let n=t.endsWith(e);return{isMatch:n,score:+!n,indices:[t.length-e.length,t.length-1]}}})},{type:`inverse-exact`,multiRegex:/^!"(.*)"$/,singleRegex:/^!(.*)$/,create:e=>({type:`inverse-exact`,search(t){let n=t.indexOf(e)===-1;return{isMatch:n,score:+!n,indices:[0,t.length-1]}}})},{type:`fuzzy`,multiRegex:/^"(.*)"$/,singleRegex:/^(.*)$/,create:(e,t={})=>{let n=new yn(e,{location:t.location??J.location,threshold:t.threshold??J.threshold,distance:t.distance??J.distance,includeMatches:t.includeMatches??J.includeMatches,findAllMatches:t.findAllMatches??J.findAllMatches,minMatchCharLength:t.minMatchCharLength??J.minMatchCharLength,isCaseSensitive:t.isCaseSensitive??J.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics??J.ignoreDiacritics,ignoreLocation:t.ignoreLocation??J.ignoreLocation});return{type:`fuzzy`,search(e){return n.searchIn(e)}}}}],Cn=Sn.length,wn=`\0`,Tn=`|`;function En(e){let t=[],n=e.length,r=0;for(;r=n)break;let i=r;for(;i=n||e[t]===` `){i++;break}if(e[t]===`$`&&(t+1>=n||e[t+1]===` `)){i+=2;break}}i++}t.push(e.substring(r,i)),r=i}else{for(;i{let n=En(e.replace(/\u0000/g,`|`).trim()).filter(e=>e&&!!e.trim()),r=[];for(let e=0,i=n.length;e!!(e[Nn.AND]||e[Nn.OR]),In=e=>!!e[Pn.PATH],Ln=e=>!G(e)&&zt(e)&&!Fn(e),Rn=e=>({[Nn.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function zn(e,t,{auto:n=!0}={}){let r=e=>{if(K(e)){let r={keyId:null,pattern:e};return n&&(r.searcher=Mn(e,t)),r}let i=Object.keys(e),a=In(e);if(!a&&i.length>1&&!Fn(e))return r(Rn(e));if(Ln(e)){let r=a?e[Pn.PATH]:i[0],o=a?e[Pn.PATTERN]:e[r];if(!K(o))throw Error(Gt(r));let s={keyId:en(r),pattern:o};return n&&(s.searcher=Mn(o,t)),s}let o={children:[],operator:i[0]};return i.forEach(t=>{let n=e[t];G(n)&&n.forEach(e=>{o.children.push(r(e))})}),o};return Fn(e)||(e=Rn(e)),r(e)}function Bn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){let n=1;return e.forEach(({key:e,norm:r,score:i})=>{let a=e?e.weight:null;n*=(i===0&&a?2**-52:i)**+((a||1)*(t?1:r))}),n}function Vn(e,{ignoreFieldNorm:t=J.ignoreFieldNorm}){e.forEach(e=>{e.score=Bn(e.matches,{ignoreFieldNorm:t})})}var Hn=class{constructor(e,t){this.limit=e,this.heap=[],this.comparator=t}get size(){return this.heap.length}insert(e){this.size0;){let n=e-1>>1;if(this.comparator(t[e],t[n])<=0)break;let r=t[e];t[e]=t[n],t[n]=r,e=n}}_sinkDown(e){let t=this.heap,n=t.length,r=e;do{e=r;let i=2*e+1,a=2*e+2;if(i0&&(r=i),a0&&(r=a),r!==e){let n=t[e];t[e]=t[r],t[r]=n}}while(r!==e)}};function Un(e){let t=[];return e.matches.forEach(e=>{if(!q(e.indices)||!e.indices.length)return;let n={indices:e.indices,value:e.value};e.key&&(n.key=e.key.id),e.idx>-1&&(n.refIndex=e.idx),t.push(n)}),t}function Wn(e,t,{includeMatches:n=J.includeMatches,includeScore:r=J.includeScore}={}){return e.map(e=>{let{idx:i}=e,a={item:t[i],refIndex:i};return n&&(a.matches=Un(e)),r&&(a.score=e.score),a})}var Gn=/[\p{L}\p{M}\p{N}_]+/gu,Kn=new WeakSet;function qn(e){Kn.has(e)||(Kn.add(e),console.warn(`[Fuse] tokenize regex ${e} lacks the global flag; only the first match per text will be returned. Add the 'g' flag.`))}function Jn(e){if(typeof e==`function`){let t=!1;return n=>{let r=e(n);if(!t&&(t=!0,!Array.isArray(r)||r.some(e=>typeof e!=`string`)))throw Error(`[Fuse] tokenize function must return string[]; received ${Array.isArray(r)?`array containing non-strings`:typeof r}.`);return r}}return e instanceof RegExp?(e.global||qn(e),t=>t.match(e)||[]):e=>e.match(Gn)||[]}function Yn({isCaseSensitive:e=!1,ignoreDiacritics:t=!1,tokenize:n}={}){let r=Jn(n);return{tokenize(n){return e||(n=n.toLowerCase()),t&&(n=vn(n)),r(n)}}}var Xn=class{static condition(e,t){return t.useTokenSearch}constructor(e,t){this.options=t,this.analyzer=Yn({isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,tokenize:t.tokenize});let n=this.analyzer.tokenize(e),{df:r,fieldCount:i}=t._invertedIndex;this.termSearchers=[],this.idfWeights=[];for(let e of n){this.termSearchers.push(new yn(e,{location:t.location,threshold:t.threshold,distance:t.distance,includeMatches:t.includeMatches,findAllMatches:t.findAllMatches,minMatchCharLength:t.minMatchCharLength,isCaseSensitive:t.isCaseSensitive,ignoreDiacritics:t.ignoreDiacritics,ignoreLocation:!0}));let n=r.get(e)||0,a=Math.log(1+(i-n+.5)/(n+.5));this.idfWeights.push(a)}this.combineAll=t.tokenMatch===`all`,this.numTerms=this.termSearchers.length,this.useMask=this.numTerms<=31}searchIn(e){if(!this.termSearchers.length)return{isMatch:!1,score:1};let t=[],n=0,r=0,i=0,a=0,o=this.combineAll&&!this.useMask?new Set:null;for(let s=0;s0?1-n/r:0,c={isMatch:!0,score:Math.max(.001,s)};return this.options.includeMatches&&t.length&&(c.indices=hn(t)),this.combineAll&&(this.useMask?c.matchedMask=a:c.matchedTerms=o,c.termCount=this.numTerms),c}};function Zn(e,t,n,r){let i=r.tokenize(t);if(!i.length)return;e.fieldCount++,e.docFieldCount.set(n,(e.docFieldCount.get(n)||0)+1);let a=new Set(i),o=e.docTermFieldHits.get(n);o||(o=new Map,e.docTermFieldHits.set(n,o));for(let t of a)o.set(t,(o.get(t)||0)+1),e.df.set(t,(e.df.get(t)||0)+1)}function Qn(e,t,n,r){let{i,v:a,$:o}=t;if(a!==void 0){Zn(e,a,i,r);return}if(o)for(let t=0;te-t);for(let t of n)tr(e,t);let r=e=>{let t=0,r=n.length;for(;t>>1;n[i]i?r(t):t,n);e.docFieldCount=a;let o=new Map;for(let[t,n]of e.docTermFieldHits)o.set(t>i?r(t):t,n);e.docTermFieldHits=o}var Y=class{constructor(e,t,n){this.options={...J,...t},this.options.useExtendedSearch,this.options.useTokenSearch,this._keyStore=new Zt(this.options.keys),this._docs=e,this._myIndex=null,this._invertedIndex=null,this.setCollection(e,n),this._lastQuery=null,this._lastSearcher=null}_getSearcher(e){if(this._lastQuery===e)return this._lastSearcher;let t=Mn(e,this._invertedIndex?{...this.options,_invertedIndex:this._invertedIndex}:this.options);return this._lastQuery=e,this._lastSearcher=t,t}setCollection(e,t){if(this._docs=e,t&&!(t instanceof ln))throw Error(Ut);if(this._myIndex=t||un(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight}),this.options.useTokenSearch){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});this._invertedIndex=$n(this._myIndex.records,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}add(e){if(!q(e))return;this._docs.push(e);let t=this._myIndex.add(e,this._docs.length-1);if(this._invertedIndex&&t){let e=Yn({isCaseSensitive:this.options.isCaseSensitive,ignoreDiacritics:this.options.ignoreDiacritics,tokenize:this.options.tokenize});er(this._invertedIndex,t,this._myIndex.keys.length,e)}this._invalidateSearcherCache()}remove(e=()=>!1){let t=[],n=[];for(let r=0,i=this._docs.length;r!e.has(n)),this._myIndex.removeAll(n),this._invalidateSearcherCache()}return t}removeAt(e){if(!Number.isInteger(e)||e<0||e>=this._docs.length)throw Error(Wt);this._invertedIndex&&nr(this._invertedIndex,[e]);let t=this._docs.splice(e,1)[0];return this._myIndex.removeAt(e),this._invalidateSearcherCache(),t}_invalidateSearcherCache(){this._lastQuery=null,this._lastSearcher=null}getIndex(){return this._myIndex}_normalizedKeys(){return this._myIndex.keys.map(e=>this._keyStore.get(e.id)||e)}search(e,t){let{limit:n=-1}=t||{},{includeMatches:r,includeScore:i,shouldSort:a,sortFn:o,ignoreFieldNorm:s}=this.options;if(K(e)&&!e.trim()){let e=this._docs.map((e,t)=>({item:e,refIndex:t}));return Lt(n)&&n>-1&&(e=e.slice(0,n)),e}let c=a&&Lt(n)&&n>0&&K(e),l=o,u=(e,t)=>l(e,t)||e.idx-t.idx,d;if(c){let t=new Hn(n,u);K(this._docs[0])?this._searchStringList(e,{heap:t,ignoreFieldNorm:s}):this._searchObjectList(e,{heap:t,ignoreFieldNorm:s}),d=t.extractSorted()}else d=K(e)?K(this._docs[0])?this._searchStringList(e):this._searchObjectList(e):this._searchLogical(e),Vn(d,{ignoreFieldNorm:s}),a&&d.sort(K(e)?u:l),Lt(n)&&n>-1&&(d=d.slice(0,n));return Wn(d,this._docs,{includeMatches:r,includeScore:i})}_searchStringList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=t?null:[];return a.forEach(({v:e,i:a,n:s})=>{if(!q(e))return;let c=r.searchIn(e);if(c.isMatch){let r={score:c.score,value:e,norm:s,indices:c.indices};i&&(r.matchedMask=c.matchedMask,r.matchedTerms=c.matchedTerms,r.termCount=c.termCount);let l=[r];if(!i||this._coversAllTokens(l)){let r={item:e,idx:a,matches:l};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):o.push(r)}}}),o}_searchLogical(e){let t=zn(e,this.options),n=this._normalizedKeys(),r=(e,t,i)=>{if(!(`children`in e)){let{keyId:r,searcher:a}=e,o;return r===null?(o=[],n.forEach((e,n)=>{o.push(...this._findMatches({key:e,value:t[n],searcher:a}))})):o=this._findMatches({key:this._keyStore.get(r),value:this._myIndex.getValueForItemAtKeyId(t,r),searcher:a}),o&&o.length?[{idx:i,item:t,matches:o}]:[]}let{children:a,operator:o}=e,s=[];for(let e=0,n=a.length;e{if(q(e)){let i=r(t,e,n);i.length&&(a.has(n)||(a.set(n,{idx:n,item:e,matches:[]}),o.push(a.get(n))),i.forEach(({matches:e})=>{a.get(n).matches.push(...e)}))}}),o}_searchObjectList(e,{heap:t,ignoreFieldNorm:n}={}){let r=this._getSearcher(e),i=this.options.useTokenSearch&&this.options.tokenMatch===`all`,{records:a}=this._myIndex,o=this._normalizedKeys(),s=t?null:[];return a.forEach(({$:e,i:a})=>{if(!q(e))return;let c=[],l=!1,u=!1;if(o.forEach((t,n)=>{let i=this._findMatches({key:t,value:e[n],searcher:r});i.length?(c.push(...i),i[0].hasInverse&&(u=!0)):l=!0}),!(u&&l)&&c.length&&(!i||this._coversAllTokens(c))){let r={idx:a,item:e,matches:c};t?(r.score=Bn(r.matches,{ignoreFieldNorm:n}),t.insert(r)):s.push(r)}}),s}_findMatches({key:e,value:t,searcher:n}){if(!q(t))return[];let r=[];if(G(t))t.forEach(({v:t,i,n:a})=>{if(!q(t))return;let o=n.searchIn(t);if(o.isMatch){let n={score:o.score,key:e,value:t,idx:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(n.matchedMask=o.matchedMask,n.matchedTerms=o.matchedTerms,n.termCount=o.termCount),r.push(n)}});else{let{v:i,n:a}=t,o=n.searchIn(i);if(o.isMatch){let t={score:o.score,key:e,value:i,norm:a,indices:o.indices,hasInverse:o.hasInverse};o.termCount!==void 0&&(t.matchedMask=o.matchedMask,t.matchedTerms=o.matchedTerms,t.termCount=o.termCount),r.push(t)}}return r}_coversAllTokens(e){let t=e.length?e[0].termCount:void 0;if(t===void 0)return!0;if(t<=31){let n=0;for(let t=0;tjn(e))};var rr=Y,ir={key:0},ar={key:1},or={key:2},sr={key:3},cr={key:4},lr={key:5},ur={key:6},dr={key:7},fr={key:8},pr={key:9},mr={key:10},hr={key:11},gr={key:12},_r={key:13},vr={key:14},yr={key:15},br={key:16},xr={key:17},Sr={key:18},Cr={key:19},wr={key:20},Tr={key:21},Er={key:22},Dr={key:23},Or={key:24},kr={key:25},Ar={key:26},jr={key:27},Mr={key:28},Nr={key:29},Pr={key:30},Fr={key:31},Ir={key:32},Lr={key:33},Rr={key:34},zr={key:35},Br={key:36},Vr={key:37},Hr={key:38},Ur={key:39},Wr={key:40},Gr={key:41},Kr={key:42},qr={key:43},Jr={key:44},Yr={key:45},Xr={key:46},Zr={key:47},Qr={key:48},$r={key:49},ei={key:50},ti={key:51},ni={key:52},ri={key:53},ii={key:54},ai={key:55},oi={key:56},si={key:57},ci={key:58},li={key:59},ui={key:60},di={key:61},fi={key:62},pi={key:63},mi={key:64},hi={key:65},gi={key:66},_i={key:67},vi={key:68},yi={key:69},bi={key:70},xi={key:71},Si={key:72},Ci={key:73},wi={key:74},Ti={key:75},Ei={key:76},Di={key:77},Oi={key:78},ki={key:79},Ai={key:80},ji={key:81},Mi={key:82},Ni={key:83},Pi={key:84},Fi={key:85},Ii={key:86},Li={key:87},Ri={key:88},zi={key:89},Bi={key:90},Vi={key:91},Hi={key:92},Ui={key:93},Wi={key:94},Gi={key:95},Ki={key:96},qi={key:97},Ji={key:98},Yi={key:99},Xi={key:100},Zi={key:101},Qi={key:102},$i={key:103},ea={key:104},ta=m({__name:`title-renderer`,props:{no:{}},setup(e){let n=e,{$page:r}=et(),i=E(()=>+(n.no??r.value));return(e,n)=>(t(),y(`div`,null,[i.value===1?(t(),y(`p`,ir,`Deep Reinforcement Learning`)):i.value===2?(t(),y(`p`,ar,`Today, in seven parts`)):i.value===3?(t(),y(`p`,or,`In words: Today, in seven parts`)):i.value===4?(t(),y(`p`,sr,`Learning from a score`)):i.value===5?(t(),y(`p`,cr,`A game with no instructions`)):i.value===6?(t(),y(`p`,lr,`In words: A game with no instructions`)):i.value===7?(t(),y(`p`,ur,`The agent–environment loop`)):i.value===8?(t(),y(`p`,dr,`In words: The agent–environment loop`)):i.value===9?(t(),y(`p`,fr,`Not learning from labels`)):i.value===10?(t(),y(`p`,pr,`In words: Not learning from labels`)):i.value===11?(t(),y(`p`,mr,`The robot and its charger`)):i.value===12?(t(),y(`p`,hr,`In words: The robot and its charger`)):i.value===13?(t(),y(`p`,gr,`Poll: which one is reinforcement learning?`)):i.value===14?(t(),y(`p`,_r,`In words: which one is reinforcement learning?`)):i.value===15?(t(),y(`p`,vr,`The world as an MDP`)):i.value===16?(t(),y(`p`,yr,`An episode is a chain of states, actions and rewards`)):i.value===17?(t(),y(`p`,br,`In words: An episode is a chain of states, actions and rewards`)):i.value===18?(t(),y(`p`,xr,`The rule of the world: p(s′, r | s, a)`)):i.value===19?(t(),y(`p`,Sr,`Reading the equation: the rule of the world`)):i.value===20?(t(),y(`p`,Cr,`In words: The rule of the world: p(s′, r | s, a)`)):i.value===21?(t(),y(`p`,wr,`Refresher: an expected value is a weighted average`)):i.value===22?(t(),y(`p`,Tr,`In words: Refresher: an expected value is a weighted average`)):i.value===23?(t(),y(`p`,Er,`Some tasks end, some never do`)):i.value===24?(t(),y(`p`,Dr,`In words: Some tasks end, some never do`)):i.value===25?(t(),y(`p`,Or,`The return and the discount`)):i.value===26?(t(),y(`p`,kr,`The return: add up what is still to come`)):i.value===27?(t(),y(`p`,Ar,`Reading the equation: the return`)):i.value===28?(t(),y(`p`,jr,`In words: The return: add up what is still to come`)):i.value===29?(t(),y(`p`,Mr,`Why discount? So the robot hurries`)):i.value===30?(t(),y(`p`,Nr,`In words: Why discount? So the robot hurries`)):i.value===31?(t(),y(`p`,Pr,`Going deeper: a reward now beats a reward later`)):i.value===32?(t(),y(`p`,Fr,`In words: Going deeper: a reward now beats a reward later`)):i.value===33?(t(),y(`p`,Ir,`The return, one step at a time`)):i.value===34?(t(),y(`p`,Lr,`In words: The return, one step at a time`)):i.value===35?(t(),y(`p`,Rr,`Policy and value`)):i.value===36?(t(),y(`p`,zr,`A policy: what to do in each cell`)):i.value===37?(t(),y(`p`,Br,`In words: A policy: what to do in each cell`)):i.value===38?(t(),y(`p`,Vr,`The value of a cell: v(s)`)):i.value===39?(t(),y(`p`,Hr,`Reading the equation: the value of a cell`)):i.value===40?(t(),y(`p`,Ur,`In words: The value of a cell: v(s)`)):i.value===41?(t(),y(`p`,Wr,`The value of a move: q(s, a)`)):i.value===42?(t(),y(`p`,Gr,`In words: The value of a move: q(s, a)`)):i.value===43?(t(),y(`p`,Kr,`The Bellman equation`)):i.value===44?(t(),y(`p`,qr,`Reading the equation: the Bellman equation`)):i.value===45?(t(),y(`p`,Jr,`In words: The Bellman equation`)):i.value===46?(t(),y(`p`,Yr,`Value iteration: sweep until nothing changes`)):i.value===47?(t(),y(`p`,Xr,`In words: Value iteration: sweep until nothing changes`)):i.value===48?(t(),y(`p`,Zr,`The catch: value iteration needs the map`)):i.value===49?(t(),y(`p`,Qr,`In words: The catch: value iteration needs the map`)):i.value===50?(t(),y(`p`,$r,`Q-learning: no map needed`)):i.value===51?(t(),y(`p`,ei,`Plan with a map, or learn from experience`)):i.value===52?(t(),y(`p`,ti,`In words: Plan with a map, or learn from experience`)):i.value===53?(t(),y(`p`,ni,`Start with a table of guesses`)):i.value===54?(t(),y(`p`,ri,`In words: Start with a table of guesses`)):i.value===55?(t(),y(`p`,ii,`Explore or exploit?`)):i.value===56?(t(),y(`p`,ai,`In words: Explore or exploit?`)):i.value===57?(t(),y(`p`,oi,`ε-greedy: mostly the best, sometimes random`)):i.value===58?(t(),y(`p`,si,`In words: ε-greedy: mostly the best, sometimes random`)):i.value===59?(t(),y(`p`,ci,`The target: Bellman, with a real move`)):i.value===60?(t(),y(`p`,li,`In words: The target: Bellman, with a real move`)):i.value===61?(t(),y(`p`,ui,`The Q-learning update`)):i.value===62?(t(),y(`p`,di,`Reading the equation: the Q-learning update`)):i.value===63?(t(),y(`p`,fi,`In words: The Q-learning update`)):i.value===64?(t(),y(`p`,pi,`Three updates by hand`)):i.value===65?(t(),y(`p`,mi,`In words: Three updates by hand`)):i.value===66?(t(),y(`p`,hi,`Watch the robot learn`)):i.value===67?(t(),y(`p`,gi,`In words: Watch the robot learn`)):i.value===68?(t(),y(`p`,_i,`Poll: one fall, and then?`)):i.value===69?(t(),y(`p`,vi,`In words: one fall, and then?`)):i.value===70?(t(),y(`p`,yi,`Going deeper: why Q-learning is called off-policy`)):i.value===71?(t(),y(`p`,bi,`In words: Going deeper: why Q-learning is called off-policy`)):i.value===72?(t(),y(`p`,xi,`Deep Q-networks`)):i.value===73?(t(),y(`p`,Si,`When the table gets too big`)):i.value===74?(t(),y(`p`,Ci,`In words: When the table gets too big`)):i.value===75?(t(),y(`p`,wi,`A network instead of a table`)):i.value===76?(t(),y(`p`,Ti,`In words: A network instead of a table`)):i.value===77?(t(),y(`p`,Ei,`Going deeper: the network that played Atari`)):i.value===78?(t(),y(`p`,Di,`In words: Going deeper: the network that played Atari`)):i.value===79?(t(),y(`p`,Oi,`Two problems when a network learns from its own moves`)):i.value===80?(t(),y(`p`,ki,`In words: Two problems when a network learns from its own moves`)):i.value===81?(t(),y(`p`,Ai,`Fix 1: experience replay`)):i.value===82?(t(),y(`p`,ji,`In words: Fix 1: experience replay`)):i.value===83?(t(),y(`p`,Mi,`Fix 2: a target network`)):i.value===84?(t(),y(`p`,Ni,`In words: Fix 2: a target network`)):i.value===85?(t(),y(`p`,Pi,`The DQN loss`)):i.value===86?(t(),y(`p`,Fi,`Reading the equation: the DQN loss`)):i.value===87?(t(),y(`p`,Ii,`In words: The DQN loss`)):i.value===88?(t(),y(`p`,Li,`The DQN loop, stage by stage`)):i.value===89?(t(),y(`p`,Ri,`In words: The DQN loop, stage by stage`)):i.value===90?(t(),y(`p`,zi,`In PyTorch: the network and the action`)):i.value===91?(t(),y(`p`,Bi,`In words: In PyTorch: the network and the action`)):i.value===92?(t(),y(`p`,Vi,`In PyTorch: the replay buffer`)):i.value===93?(t(),y(`p`,Hi,`In words: In PyTorch: the replay buffer`)):i.value===94?(t(),y(`p`,Ui,`In PyTorch: one training step`)):i.value===95?(t(),y(`p`,Wi,`In words: In PyTorch: one training step`)):i.value===96?(t(),y(`p`,Gi,`Going deeper: the whole loop, on CartPole`)):i.value===97?(t(),y(`p`,Ki,`In words: Going deeper: the whole loop, on CartPole`)):i.value===98?(t(),y(`p`,qi,`What DQN achieved, and where it stops`)):i.value===99?(t(),y(`p`,Ji,`In words: What DQN achieved, and where it stops`)):i.value===100?(t(),y(`p`,Yi,`Recap`)):i.value===101?(t(),y(`p`,Xi,`Four ideas, one robot`)):i.value===102?(t(),y(`p`,Zi,`In words: Four ideas, one robot`)):i.value===103?(t(),y(`p`,Qi,`Reading and things to try`)):i.value===104?(t(),y(`p`,$i,`In words: Reading and things to try`)):i.value===105?(t(),y(`p`,ea,`Questions?`)):M(`v-if`,!0)]))}}),na={class:`bg-main transform`,shadow:`~`,p:`x-4 y-2`,border:`~ transparent rounded dark:main`},ra=[`value`,`disabled`],ia={table:``,"w-full":``,"border-collapse":``},aa=[`border`,`onClick`],oa={"text-right":``,op50:``,"text-sm":``,"table-cell":``,"py-2":``,"pl-4":``,"pr-3":``,"vertical-middle":``},sa=Re(m({__name:`Goto`,setup(e){let i=C(),o=C(),s=C(),c=C(),l=C(``),u=C(0),{go:d,slides:f}=B();function p(e){return e!=null}let m=E(()=>new rr(f.value.map(e=>e.meta?.slide).filter(p),{keys:[`no`,`title`],threshold:.3,shouldSort:!0,minMatchCharLength:1})),h=E(()=>l.value.startsWith(`/`)?l.value.substring(1):l.value),v=E(()=>h.value?m.value.search(h.value).map(e=>e.item):[]),x=E(()=>!!v.value.length);function w(){if(x.value){let e=v.value.at(u.value||0);e&&d(e.no)}D()}function D(){l.value=``,R.value=!1}function ee(e){e.preventDefault(),u.value++,u.value>=v.value.length&&(u.value=0),te()}function O(e){e.preventDefault(),u.value--,u.value<=-2&&(u.value=v.value.length-1),te()}function te(){let e=c.value?.[u.value];e&&s.value&&(e.offsetTop+e.offsetHeight>s.value.offsetHeight+s.value.scrollTop?s.value.scrollTo({behavior:`smooth`,top:e.offsetTop+e.offsetHeight-s.value.offsetHeight+1}):e.offsetTop{e?(l.value=``,u.value=0,setTimeout(()=>o.value?.focus(),0)):o.value?.blur()}),g(Me,()=>{i.value?.contains(Me.value)||D()}),(e,d)=>(t(),y(`div`,{id:`slidev-goto-dialog`,ref_key:`container`,ref:i,class:b([`fixed right-5 transition-all`,N(R)?`top-5`:`-top-20 op0 pointer-events-none`]),"w-90":``,"max-w-90":``,"min-w-90":``},[_(`div`,na,[_(`input`,{id:`slidev-goto-input`,ref_key:`input`,ref:o,value:l.value,type:`text`,disabled:!N(R),class:b([`outline-none bg-transparent`,{"text-red-400":!x.value&&l.value}]),placeholder:`Goto...`,onKeydown:[S(w,[`enter`]),S(D,[`escape`]),S(ee,[`down`]),S(O,[`up`])],onInput:ne},null,42,ra)]),N(R)&&v.value.length>0?(t(),y(`div`,{key:0,ref_key:`list`,ref:s,class:`autocomplete-list`,shadow:`~`,border:`~ transparent rounded dark:main`},[_(`ul`,ia,[(t(!0),y(k,null,a(v.value,(e,i)=>(t(),y(`li`,{ref_for:!0,ref_key:`items`,ref:c,key:e.id,role:`button`,tabindex:`0`,"cursor-pointer":``,hover:`op100`,"table-row":``,"items-center":``,border:i===0?void 0:`t main`,class:b(u.value===i?`bg-active op100`:`op80`),onClick:T(t=>re(e.no),[`stop`,`prevent`])},[_(`div`,oa,r(e.no),1),n(N(ta),{"table-cell":``,"py-2":``,"pr-4":``,"w-full":``,no:e.no},null,8,[`no`])],10,aa))),128))])],512)):M(`v-if`,!0)],2))}}),[[`__scopeId`,`data-v-61e41ebd`]]),ca=C(1),la=E(()=>ve.value.length),X=C(0),ua=C(0);function da(){X.value>ca.value&&--X.value}function fa(){X.valueca.value){let e=X.value-ua.value;ela.value&&(e=la.value),X.value=e}}var ha=[`onClick`],ga={class:`text-green font-bold`},_a={class:`opacity-50`},va={key:1,class:`opacity-50`},ya={class:`fixed top-4 right-4 z-modal text-gray-400 flex flex-col items-center gap-2`},ba=128,xa=32,Sa=m({__name:`QuickOverview`,setup(e){let{currentSlideNo:i,go:o,slides:s}=B();function c(){F.value=!1}function l(e){o(e),c()}function d(e){return e===X.value}let f=De.smaller(`xs`),m=De.smaller(`sm`),h=E(()=>f.value?ge.width.value-ba:m.value?(ge.width.value-ba-xa)/2:300),g=E(()=>Math.floor((ge.width.value-ba)/(h.value+xa))),x=C(``);return Ke(`keypress`,e=>{if(!F.value){x.value=``;return}if(e.key===`Enter`){e.preventDefault(),x.value?(l(+x.value),x.value=``):l(X.value);return}let t=Number.parseInt(e.key.replace(/\D/g,``));if(Number.isNaN(t)){x.value=``;return}if(!x.value&&t===0)return;if(x.value+=String(t),+x.value>s.value.length){x.value=``;return}let n=s.value.findIndex(e=>`/${e.no}`===x.value);n!==-1&&(X.value=n+1),x.value*10>s.value.length&&(l(+x.value),x.value=``)}),u(()=>{X.value=i.value,ua.value=g.value}),(e,i)=>(t(),y(k,null,[n(v,{"enter-active-class":`duration-150 ease-out`,"enter-from-class":`opacity-0 scale-102 !backdrop-blur-0px`,"leave-active-class":`duration-200 ease-in`,"leave-to-class":`opacity-0 scale-102 !backdrop-blur-0px`},{default:w(()=>[N(F)?(t(),y(`div`,{key:0,class:`fixed left-0 right-0 top-0 h-[calc(var(--vh,1vh)*100)] z-modal bg-main !bg-opacity-75 p-16 py-20 overflow-y-auto backdrop-blur-5px select-none`,onClick:c},[_(`div`,{class:`grid gap-y-4 gap-x-8 w-full`,style:p(`grid-template-columns: repeat(auto-fit,minmax(${h.value}px,1fr))`)},[(t(!0),y(k,null,a(N(s),(e,i)=>(t(),y(`div`,{key:e.no,class:`relative`},[_(`div`,{class:b([`inline-block border rounded overflow-hidden bg-main hover:border-primary transition`,d(i+1)||N(X)===i+1?`border-primary`:`border-main`]),onClick:t=>l(e.no)},[(t(),A(dt,{key:e.no,no:e.no,"use-snapshot":!0,width:h.value,class:`pointer-events-none`},{default:w(()=>[n(ht,{"clicks-context":N(le)(e,N($e)),route:e,"render-context":`overview`},null,8,[`clicks-context`,`route`]),n(pt,{page:e.no},null,8,[`page`])]),_:2},1032,[`no`,`width`]))],10,ha),_(`div`,{class:`absolute top-0`,style:p(`left: ${h.value+5}px`)},[x.value&&String(i+1).startsWith(x.value)?(t(),y(k,{key:0},[_(`span`,ga,r(x.value),1),_(`span`,_a,r(String(i+1).slice(x.value.length)),1)],64)):(t(),y(`span`,va,r(i+1),1))],4)]))),128))],4)])):M(`v-if`,!0)]),_:1}),ae(_(`div`,ya,[n(W,{title:`Close`,class:`text-2xl`,onClick:c},{default:w(()=>[...i[0]||=[_(`div`,{class:`i-carbon:close`},null,-1)]]),_:1}),(t(),A(W,{key:0,as:`a`,title:`Slides Overview`,target:`_blank`,href:`${N(ye)}overview`,"tab-index":`-1`,class:`text-2xl`},{default:w(()=>[...i[1]||=[_(`div`,{class:`i-carbon:list-boxes`},null,-1)]]),_:1},8,[`href`])),M(`v-if`,!0)],512),[[oe,N(F)]])],64))}});function Ca(){let e=Ze();return E(()=>{let t=ut.value?.getBoundingClientRect();if(!t)return;let n=(e.x.value-t.left)/t.width*100,r=(e.y.value-t.top)/t.height*100;if(!(n<0||n>100||r<0||r>100))return{x:n,y:r}})}var wa={key:0,class:`absolute top-0 left-0 right-0 bottom-0 pointer-events-none text-xl`},Ta=Re(m({__name:`LaserPointer`,setup(e){let n=Ca(),{isPresenter:r}=B(),i=E(()=>!r.value&&it.cursor?.style===`laser`?it.cursor:Se.value===`laser`?n.value:null);return d(()=>{u(()=>{document.body.classList.toggle(`slidev-self-laser-active`,Se.value===`laser`&&!!i.value)})}),(e,n)=>i.value?(t(),y(`div`,wa,[_(`div`,{class:`laser-pointer`,style:p({left:`${i.value.x}%`,top:`${i.value.y}%`})},null,4)])):M(`v-if`,!0)}}),[[`__scopeId`,`data-v-1d1438ab`]]),Ea={render:()=>[]},Da={key:0,class:`bg-main text-main shadow-xl absolute bottom-10 left-0 z-menu py2`,border:`~ main rounded-md`},Oa=m({__name:`MenuButton`,props:{modelValue:{default:!1},disabled:{default:!1}},setup(e,{emit:n}){let r=ze(e,`modelValue`,n,{passive:!0}),i=C();return qe(i,()=>{r.value=!1}),(n,a)=>(t(),y(`div`,{ref_key:`el`,ref:i,class:`flex relative`},[_(`button`,{class:b({disabled:e.disabled}),onClick:a[0]||=e=>r.value=!N(r)},[h(n.$slots,`button`,{value:N(r),class:b({disabled:e.disabled})})],2),(t(),A(D,null,[N(r)?(t(),y(`div`,Da,[h(n.$slots,`menu`)])):M(`v-if`,!0)],1024))],512))}}),ka={border:`~ main rounded`,flex:`~ gap-2 items-center`,relative:``,"h-5":``,"w-5":``,"p0.5":``,"hover:bg-active":``,p1:``},Aa=[`disabled`],ja=m({__name:`FormCheckbox`,props:c({disabled:{type:Boolean}},{modelValue:{type:Boolean,type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=o(e,`modelValue`);return(r,i)=>(t(),y(`div`,ka,[_(`div`,{"i-ri-check-line":``,class:b(n.value?``:`op0`)},null,2),ae(_(`input`,{"onUpdate:modelValue":i[0]||=e=>n.value=e,type:`checkbox`,absolute:``,"inset-0":``,"opacity-10":``,disabled:e.disabled},null,8,Aa),[[x,n.value]])]))}}),Ma={"w-30":``,"h-8":``,flex:`~ gap-1 items-center`},Na={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},Pa={key:0,"w-1.5":``,"h-1.5":``,"bg-primary":``,rounded:``,absolute:``,"top-0":``,"right--2":``},Fa=[`innerHTML`],Z=m({__name:`FormItem`,props:{title:{},nested:{type:[Boolean,Number]},div:{type:Boolean},description:{},dot:{type:Boolean}},emits:[`reset`],setup(e,{emit:n}){let i=n;function a(){i(`reset`)}return(n,i)=>(t(),A(s(e.div?`div`:`label`),{flex:`~ row gap-2 items-center`,"select-none":``},{default:w(()=>[_(`div`,Ma,[e.nested?(t(),y(`div`,{key:0,"i-ri-corner-down-right-line":``,op40:``,style:p(typeof e.nested==`number`?{marginLeft:`${e.nested*.5+.5}rem`}:{marginLeft:`0.25rem`})},null,4)):M(`v-if`,!0),e.description?(t(),A(N(ne),{key:2,distance:`10`},{popper:w(()=>[_(`div`,{"text-sm":``,"min-w-90":``,innerHTML:e.description},null,8,Fa)]),default:w(()=>[_(`div`,{op75:``,"text-right":``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,Pa)):M(`v-if`,!0)],32)]),_:1})):(t(),y(`div`,{key:1,op75:``,relative:``,onDblclick:a},[f(r(e.title)+` `,1),e.dot?(t(),y(`div`,Na)):M(`v-if`,!0)],32))]),h(n.$slots,`default`)]),_:3}))}}),Ia={relative:``,"h-22px":``},La={key:0,"pointer-events-none":``,absolute:``,"right-1":``,"top-0.5":``,"text-xs":``,op25:``},Ra=m({__name:`FormSlider`,props:c({max:{},min:{},step:{},unit:{},default:{}},{modelValue:{type:Number},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let n=e,i=o(e,`modelValue`);return(a,o)=>(t(),y(k,null,[_(`div`,{relative:``,"h-22px":``,"w-60":``,"flex-auto":``,onDblclick:o[1]||=e=>n.default===void 0?null:i.value=n.default},[ae(_(`input`,l({"onUpdate:modelValue":o[0]||=e=>i.value=e,type:`range`,class:`slider`},n,{absolute:``,"bottom-0":``,"left-0":``,"right-0":``,"top-0":``,"z-10":``,"w-full":``,"align-top":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.default==null?M(`v-if`,!0):(t(),y(`span`,{key:0,border:`r main`,absolute:``,"bottom-0":``,"top-0":``,"h-full":``,"w-1px":``,op75:``,style:p({left:`${(n.default-e.min)/(e.max-e.min)*100}%`})},null,4))],32),_(`div`,Ia,[ae(_(`input`,l({"onUpdate:modelValue":o[2]||=e=>i.value=e,type:`number`},n,{border:`~ main rounded`,m0:``,"w-20":``,"bg-gray:5":``,pl2:``,"align-top":``,"text-sm":``}),null,16),[[O,i.value,void 0,{number:!0}]]),n.unit?(t(),y(`span`,La,r(n.unit),1)):M(`v-if`,!0)])],64))}}),za={error:0,client:60,Light:60,Dark:240};function Ba(e,t=1){if(za[e])return Va(za[e],t);let n=0;for(let t=0;t!n.text||n.color===!1?{}:{color:typeof n.color==`number`?Va(n.color):Ba(n.text),background:typeof n.color==`number`?Va(n.color,.1):Ba(n.text,.1)}),a=E(()=>(n.size||`sm`)===`sm`?`px-1.5 text-11px leading-1.6em`:``);return(o,c)=>(t(),A(s(e.as||`span`),{"ws-nowrap":``,rounded:``,class:b(a.value),style:p(i.value)},{default:w(()=>[h(o.$slots,`default`,{},()=>[_(`span`,{textContent:r(n.text)},null,8,Ha)])]),_:3},8,[`class`,`style`]))}}),Wa={flex:`~ gap-1 items-center`,rounded:``,"bg-gray:4":``,p1:``,"m--1":``},Ga=m({__name:`SegmentControl`,props:{options:{},modelValue:{}},emits:[`update:modelValue`],setup(e){return(n,r)=>(t(),y(`div`,Wa,[(t(!0),y(k,null,a(e.options,r=>(t(),A(Ua,{key:r.value,class:b([`px-2 py-1 text-xs font-mono`,r.value===e.modelValue?``:`op50`]),color:r.value===e.modelValue,"aria-pressed":r.value===e.modelValue,size:`none`,text:r.label,as:`button`,onClick:e=>n.$emit(`update:modelValue`,r.value)},null,8,[`class`,`color`,`aria-pressed`,`text`,`onClick`]))),128))]))}}),Ka={"text-sm":``,"select-none":``,flex:`~ col gap-1`,"min-w-30":``,px4:``},qa=m({__name:`Settings`,setup(e){let{isPresenter:r}=B(),{isSupported:i}=Xe();return(e,a)=>(t(),y(`div`,Ka,[n(Z,{title:`Invert`,dot:N(I).invert!==N(L).invert,onReset:a[1]||=e=>N(I).invert=N(L).invert},{default:w(()=>[n(ja,{modelValue:N(I).invert,"onUpdate:modelValue":a[0]||=e=>N(I).invert=e},null,8,[`modelValue`])]),_:1},8,[`dot`]),n(Z,{title:`Brightness`,dot:N(I).brightness!==N(L).brightness,onReset:a[3]||=e=>N(I).brightness=N(L).brightness},{default:w(()=>[n(Ra,{modelValue:N(I).brightness,"onUpdate:modelValue":a[2]||=e=>N(I).brightness=e,max:1.5,min:.5,step:.02,default:N(L).brightness},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Contrast`,dot:N(I).contrast!==N(L).contrast,onReset:a[5]||=e=>N(I).contrast=N(L).contrast},{default:w(()=>[n(Ra,{modelValue:N(I).contrast,"onUpdate:modelValue":a[4]||=e=>N(I).contrast=e,max:1.5,min:.5,step:.02,default:N(L).contrast},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Saturation`,dot:N(I).saturate!==N(L).saturate,onReset:a[7]||=e=>N(I).saturate=N(L).saturate},{default:w(()=>[n(Ra,{modelValue:N(I).saturate,"onUpdate:modelValue":a[6]||=e=>N(I).saturate=e,max:1.5,min:.5,step:.02,default:N(L).saturate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Sepia`,dot:N(I).sepia!==N(L).sepia,onReset:a[9]||=e=>N(I).sepia=N(L).sepia},{default:w(()=>[n(Ra,{modelValue:N(I).sepia,"onUpdate:modelValue":a[8]||=e=>N(I).sepia=e,max:2,min:-2,step:.02,default:N(L).sepia},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),n(Z,{title:`Hue Rotate`,dot:N(I).hueRotate!==N(L).hueRotate,onReset:a[11]||=e=>N(I).hueRotate=N(L).hueRotate},{default:w(()=>[n(Ra,{modelValue:N(I).hueRotate,"onUpdate:modelValue":a[10]||=e=>N(I).hueRotate=e,max:180,min:-180,step:.1,default:N(L).hueRotate},null,8,[`modelValue`,`default`])]),_:1},8,[`dot`]),a[16]||=_(`div`,{class:`h-1px opacity-5 bg-current w-full my2`},null,-1),n(Z,{title:`Cursor Style`},{default:w(()=>[n(Ga,{modelValue:N(Se),"onUpdate:modelValue":a[12]||=e=>ie(Se)?Se.value=e:null,options:[{label:`Cursor`,value:`cursor`},{label:`Laser`,value:`laser`}]},null,8,[`modelValue`])]),_:1}),N(r)?M(`v-if`,!0):(t(),A(Z,{key:0,title:`Slide Scale`},{default:w(()=>[n(Ga,{modelValue:N(P),"onUpdate:modelValue":a[13]||=e=>ie(P)?P.value=e:null,options:[{label:`Fit`,value:0},{label:`1:1`,value:1}]},null,8,[`modelValue`])]),_:1})),N(i)?(t(),A(Z,{key:1,title:`Wake Lock`},{default:w(()=>[n(ja,{modelValue:N(ue),"onUpdate:modelValue":a[14]||=e=>ie(ue)?ue.value=e:null},null,8,[`modelValue`])]),_:1})):M(`v-if`,!0),N(r)?M(`v-if`,!0):(t(),A(Z,{key:2,title:`Hide Idle Cursor`},{default:w(()=>[n(ja,{modelValue:N(Te),"onUpdate:modelValue":a[15]||=e=>ie(Te)?Te.value=e:null},null,8,[`modelValue`])]),_:1}))]))}}),Ja={class:`select-list`},Ya={class:`title`},Xa={class:`items`},Za=[`onClick`],Qa=Re(m({__name:`SelectList`,props:{modelValue:{type:[Object,String,Number,Boolean]},title:{type:String},items:{type:Array}},setup(e,{emit:n}){let i=ze(e,`modelValue`,n,{passive:!0});return(n,o)=>(t(),y(`div`,Ja,[_(`div`,Ya,r(e.title),1),_(`div`,Xa,[(t(!0),y(k,null,a(e.items,e=>(t(),y(`div`,{key:e.value,class:b([`item`,{active:N(i)===e.value}]),onClick:()=>{i.value=e.value,e.onClick?.()}},[_(`div`,{class:b([`i-carbon:checkmark text-green-500 mya`,{"opacity-0":N(i)!==e.value}])},null,2),_(`div`,{class:b({"opacity-50":N(i)!==e.value})},r(e.display||e.value),3)],10,Za))),128))])]))}}),[[`__scopeId`,`data-v-aa3b28a6`]]),$a={"text-sm":``,flex:`~ col gap-2`},eo={px3:``,"ws-nowrap":``},to={"font-bold":``,"text-primary":``},no=m({__name:`SyncControls`,setup(e){let{isPresenter:i}=B(),a=E({get:()=>i.value?z.value.presenterReceive:z.value.viewerReceive,set(e){i.value?z.value.presenterReceive=e:z.value.viewerReceive=e}}),o=E({get:()=>i.value?z.value.presenterSend:z.value.viewerSend,set(e){i.value?z.value.presenterSend=e:z.value.viewerSend=e}}),s=E({get:()=>a.value&&o.value?`bidirectional`:a.value&&!o.value?`receive-only`:!a.value&&o.value?`send-only`:`off`,set(e){switch(e){case`bidirectional`:a.value=!0,o.value=!0;break;case`receive-only`:a.value=!0,o.value=!1;break;case`send-only`:a.value=!1,o.value=!0;break;case`off`:a.value=!1,o.value=!1}}});return(e,c)=>(t(),A(Oa,null,{button:w(()=>[n(W,{title:`Change sync settings`},{default:w(()=>[_(`div`,{class:b([`i-ph:arrow-up-bold mx--1.2 scale-x-80`,o.value?`text-green6 dark:text-green`:`op30`])},null,2),_(`div`,{class:b([`i-ph:arrow-down-bold mx--1.2 scale-x-80`,a.value?`text-green6 dark:text-green`:`op30`])},null,2)]),_:1})]),menu:w(()=>[_(`div`,$a,[_(`div`,eo,[c[1]||=_(`span`,{op75:``},`Slides navigation syncing for `,-1),_(`span`,to,r(N(i)?`presenter`:`viewer`),1)]),c[2]||=_(`div`,{class:`h-1px opacity-10 bg-current w-full`},null,-1),n(Qa,{modelValue:s.value,"onUpdate:modelValue":c[0]||=e=>s.value=e,title:`Sync Mode`,items:[{value:`bidirectional`,display:`Bidirectional Sync`},{value:`receive-only`,display:`Receive Only`},{value:`send-only`,display:`Send Only`},{value:`off`,display:`Disable`}]},null,8,[`modelValue`])])]),_:1}))}}),ro={key:0,class:`i-carbon:minimize`},io={key:1,class:`i-carbon:maximize`},ao={key:0,class:`i-carbon-moon`},oo={key:1,class:`i-carbon-sun`},so={key:0,class:`i-carbon-magic-wand-filled color-red-600 dark:color-red-400`},co={key:1,class:`i-carbon-magic-wand`},lo={key:0,class:`i-ph-cursor-fill`},uo={key:1,class:`i-ph-cursor-duotone`},fo={key:0,"w-2":``,"h-2":``,"bg-primary":``,"rounded-full":``,absolute:``,"top-0.5":``,"right-0.5":``},po={class:`px2 my-auto`},mo={class:`text-lg`},ho={class:`opacity-50 text-sm`},go=m({__name:`NavControls`,props:{persist:{default:!1}},setup(e){let i=e,{currentSlideNo:a,hasNext:o,hasPrev:s,isEmbedded:c,isPresenter:l,isPresenterAvailable:u,next:d,prev:m,total:h,enterPresenter:g,exitPresenter:v}=B(),{brush:x,drawingEnabled:S}=ct(),T=De.smaller(`md`),{isFullscreen:D,toggle:ee}=Pe,O=C();function ne(){O.value&&Me.value&&O.value.contains(Me.value)&&Me.value.blur()}let re=E(()=>i.persist?`text-$slidev-controls-foreground bg-transparent`:`rounded-md bg-main shadow-xl border border-main`),ie=te();return(e,i)=>(t(),y(`nav`,{ref_key:`root`,ref:O,class:`flex flex-col`},[_(`div`,{class:b([`flex flex-wrap-reverse text-xl gap-0.5 p-1 lg:p-2`,re.value]),onMouseleave:ne},[N(c)?M(`v-if`,!0):(t(),A(W,{key:0,title:N(D)?`Close fullscreen`:`Enter fullscreen`,onClick:N(ee)},{default:w(()=>[N(D)?(t(),y(`div`,ro)):(t(),y(`div`,io))]),_:1},8,[`title`,`onClick`])),n(W,{disabled:!N(s),title:`Go to previous slide`,onClick:N(m)},{default:w(()=>[...i[6]||=[_(`div`,{class:`i-carbon:arrow-left`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),n(W,{disabled:!N(o),title:`Go to next slide`,onClick:N(d)},{default:w(()=>[...i[7]||=[_(`div`,{class:`i-carbon:arrow-right`},null,-1)]]),_:1},8,[`disabled`,`onClick`]),N(c)?M(`v-if`,!0):(t(),A(W,{key:1,title:`Show slide overview`,onClick:i[0]||=e=>N(de)()},{default:w(()=>[...i[8]||=[_(`div`,{class:`i-carbon:apps`},null,-1)]]),_:1})),N(tt)?M(`v-if`,!0):(t(),A(W,{key:2,title:N(at)?`Switch to light mode theme`:`Switch to dark mode theme`,onClick:i[1]||=e=>N(rt)()},{default:w(()=>[N(at)?(t(),y(`div`,ao)):(t(),y(`div`,oo))]),_:1},8,[`title`])),n(lt),N(c)?M(`v-if`,!0):(t(),y(k,{key:3},[!N(l)&&!N(T)&&ie.value?(t(),y(k,{key:0},[n(N(ie)),n(lt)],64)):M(`v-if`,!0),N(l)?(t(),A(W,{key:1,title:N(Se)===`laser`?N(pe)?`Disable laser pointer`:`Enable laser pointer`:N(pe)?`Hide presenter cursor`:`Show presenter cursor`,active:N(pe),onClick:i[2]||=e=>N(fe)()},{default:w(()=>[N(Se)===`laser`?(t(),y(k,{key:0},[N(pe)?(t(),y(`div`,so)):(t(),y(`div`,co))],64)):(t(),y(k,{key:1},[N(pe)?(t(),y(`div`,lo)):(t(),y(`div`,uo))],64))]),_:1},8,[`title`,`active`])):M(`v-if`,!0),!N(V).drawings.presenterOnly||N(l)?(t(),A(W,{key:2,class:`relative`,title:N(S)?`Hide drawing toolbar`:`Show drawing toolbar`,active:N(S),onClick:i[3]||=e=>S.value=!N(S)},{default:w(()=>[i[9]||=_(`div`,{class:`i-carbon:pen`},null,-1),N(S)?(t(),y(`div`,{key:0,class:`absolute left-1 right-1 bottom-0 h-0.7 rounded-full`,style:p({background:N(x).color})},null,4)):M(`v-if`,!0)]),_:1},8,[`title`,`active`])):M(`v-if`,!0),n(lt),N(l)?(t(),A(W,{key:3,title:`Play Mode`,onClick:N(v)},{default:w(()=>[...i[10]||=[_(`div`,{class:`i-carbon:presentation-file`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),N(u)?(t(),A(W,{key:4,title:`Presenter Mode`,onClick:N(g)},{default:w(()=>[...i[11]||=[_(`div`,{class:`i-carbon:user-speaker`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0),M(`v-if`,!0)],64)),(t(),y(k,{key:4},[N(V).download?(t(),A(W,{key:0,title:`Download as PDF`,onClick:N(nt)},{default:w(()=>[...i[13]||=[_(`div`,{class:`i-carbon:download`},null,-1)]]),_:1},8,[`onClick`])):M(`v-if`,!0)],64)),M(`v-if`,!0),!N(l)&&N(V).info&&!N(c)?(t(),A(W,{key:6,title:`Show info`,onClick:i[5]||=e=>ce.value=!N(ce)},{default:w(()=>[...i[15]||=[_(`div`,{class:`i-carbon:information`},null,-1)]]),_:1})):M(`v-if`,!0),N(c)?M(`v-if`,!0):(t(),y(k,{key:7},[n(lt),N(l)?(t(),A(W,{key:0,title:`Toggle Presenter Layout`,class:`aspect-ratio-initial flex items-center`,onClick:N(me)},{default:w(()=>[i[16]||=_(`div`,{class:`i-carbon:template`},null,-1),f(` `+r(N(Ce)),1)]),_:1},8,[`onClick`])):M(`v-if`,!0),(t(),A(no,{key:1})),n(Oa,null,{button:w(({value:e})=>[n(W,{title:`More Options`,active:e},{default:w(()=>[i[17]||=_(`div`,{class:`i-carbon:settings-adjust`},null,-1),N(we)?(t(),y(`div`,fo)):M(`v-if`,!0)]),_:1},8,[`active`])]),menu:w(()=>[n(qa)]),_:1})],64)),N(c)?M(`v-if`,!0):(t(),A(lt,{key:8})),_(`div`,po,[_(`span`,mo,r(N(a)),1),_(`span`,ho,` / `+r(N(h)),1)]),n(N(Ea))],34)],512))}}),_o=new Set,vo=new Set,yo=/\/$/;function bo(e){return e.startsWith(`http`)||e.startsWith(`//`)?e:`${`./`.replace(yo,``)}${e.startsWith(`/`)?e:`/${e}`}`}var xo=2,So=new Map,Co=C(0),wo=C(0),To=E(()=>wo.value===0?1:Co.value/wo.value);E(()=>To.value>=1);function Eo(e){let t=bo(e);if(_o.has(t)||vo.has(t))return;vo.add(t);let n=new Image;n.onload=()=>{vo.delete(t),_o.add(t),So.delete(t),Co.value=_o.size},n.onerror=()=>{vo.delete(t);let n=So.get(t)??0;n{let e=r.value;if(!e?.length)return;let t=new Set;for(let n of e)for(let e of n.meta?.slide?.images??[])t.add(bo(e));wo.value=t.size}),u(()=>{let i=e.value,o=r.value;if(!i||!o?.length)return;Do(i),Do(t.value),Do(n.value);let s=i.no-1;for(let e=1;e<=a;e++){let t=s+e;t{let t=r.value,n=setTimeout(()=>{if(t?.length)for(let e of t)Do(e)},3e3);e(()=>clearTimeout(n))})}function ko(){let e=Ue(),t=C(!1),n,r,i=typeof document<`u`&&`startViewTransition`in document;return e.beforeResolve((e,a)=>{let o=Le(a.params.no)?.meta,s=Le(e.params.no)?.meta,c=o?.slide?.no,l=s?.slide?.no;if((c!=null&&l!=null&&c!==l&&((c{n=e,r=t}),d,f=new Promise(e=>d=e);return setTimeout(()=>{document.startViewTransition(()=>(d(),u))},50),f}),i&&e.afterEach(()=>{n?.(),r?.()}),t}var Ao=[`data-drag-id`],Q=10,$=10,jo=`absolute border border-gray bg-gray dark:border-gray-500 dark:bg-gray-800 bg-opacity-30 `,Mo=20,No=m({__name:`DragControl`,props:{data:{}},setup(n){let{dragId:r,zoom:a,autoHeight:o,x0:s,y0:c,width:l,height:d,rotate:f,isArrow:m}=n.data,h=e(Qe,C(1)),g=E(()=>h.value*a.value),{left:v,top:x}=ot(),S=m?-1/0:40,w=E(()=>f.value*Math.PI/180),T=E(()=>Math.sin(w.value)),D=E(()=>Math.cos(w.value)),ee=E(()=>l.value*D.value+d.value*T.value),O=E(()=>l.value*T.value+d.value*D.value),te=E(()=>s.value-ee.value/2),ne=E(()=>c.value-O.value/2),re=E(()=>s.value+ee.value/2),ie=E(()=>c.value+O.value/2),ae=E(()=>m&&l.value<0),oe=E(()=>m&&d.value<0),A=null;function P(e){if(e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=e.target.getBoundingClientRect(),n=l.value*D.value-d.value*T.value,r=l.value*T.value+d.value*D.value,i=l.value*D.value+d.value*T.value,a=-l.value*T.value+d.value*D.value;A={x0:s.value,y0:c.value,width:l.value,height:d.value,rotate:f.value,dx0:e.clientX-(t.left+t.right)/2,dy0:e.clientY-(t.top+t.bottom)/2,ltx:s.value-n/2,lty:c.value-r/2,rtx:s.value+i/2,rty:c.value-a/2,lbx:s.value-i/2,lby:c.value+a/2,rbx:s.value+n/2,rby:c.value+r/2},e.currentTarget.setPointerCapture(e.pointerId)}function se(e){if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value,n=(e.clientY-x.value-A.dy0)/g.value;s.value=ke(t,-ee.value/2+$,he.value+ee.value/2-$),c.value=ke(n,-O.value/2+$,be.value+O.value/2-$)}function F(e){A&&=(e.preventDefault(),e.stopPropagation(),null)}function ce(e,t){return{onPointerdown:P,onPointermove:n=>{if(!A||n.buttons!==1)return;n.preventDefault(),n.stopPropagation();let r=(n.clientX-v.value)/g.value,i=(n.clientY-x.value)/g.value,{ltx:a,lty:o,rtx:u,rty:f,lbx:p,lby:m,rbx:h,rby:_}=A,y=A.width/A.height,b=Math.max(S,S*y);function C(e,t){if(n.shiftKey){let n=Math.max(e,t*y,b);return{w:n,h:n/y}}return{w:Math.max(e,S),h:Math.max(t,S)}}if(e){if(t){let{w:e,h:t}=C((h-r)*D.value+(_-i)*T.value,-(h-r)*T.value+(_-i)*D.value);r=h-e*D.value+t*T.value,i=_-e*T.value-t*D.value}else{let{w:e,h:t}=C((u-r)*D.value-(i-f)*T.value,(u-r)*T.value+(i-f)*D.value);r=u-e*D.value-t*T.value,i=f-e*T.value+t*D.value}}else if(t){let{w:e,h:t}=C((r-p)*D.value-(m-i)*T.value,(r-p)*T.value+(m-i)*D.value);r=p+e*D.value+t*T.value,i=m+e*T.value-t*D.value}else{let{w:e,h:t}=C((r-a)*D.value+(i-o)*T.value,-(r-a)*T.value+(i-o)*D.value);r=a+e*D.value-t*T.value,i=o+e*T.value+t*D.value}e?t?(s.value=(r+h)/2,c.value=(i+_)/2,l.value=(h-r)*D.value+(_-i)*T.value,d.value=-(h-r)*T.value+(_-i)*D.value):(s.value=(r+u)/2,c.value=(i+f)/2,l.value=(u-r)*D.value-(i-f)*T.value,d.value=(u-r)*T.value+(i-f)*D.value):t?(s.value=(r+p)/2,c.value=(i+m)/2,l.value=(r-p)*D.value-(m-i)*T.value,d.value=(r-p)*T.value+(m-i)*D.value):(s.value=(r+a)/2,c.value=(i+o)/2,l.value=(r-a)*D.value+(i-o)*T.value,d.value=-(r-a)*T.value+(i-o)*D.value)},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===ae.value?void 0:`0`,right:e===ae.value?`0`:void 0,top:t===oe.value?void 0:`0`,bottom:t===oe.value?`0`:void 0,cursor:m?`move`:+e+ +t==1?`nesw-resize`:`nwse-resize`,borderRadius:m?`50%`:void 0},class:jo}}function I(e){return{onPointerdown:P,onPointermove:t=>{if(!A||t.buttons!==1)return;t.preventDefault(),t.stopPropagation();let n=(t.clientX-v.value)/g.value,r=(t.clientY-x.value)/g.value,{ltx:i,lty:a,rtx:o,rty:u,lbx:f,lby:p,rbx:m,rby:h}=A;if(e===`l`){let e=(o+m)/2,t=(u+h)/2;l.value=Math.max((e-n)*D.value+(t-r)*T.value,S),s.value=e-l.value*D.value/2,c.value=t-l.value*T.value/2}else if(e===`r`){let e=(i+f)/2,t=(a+p)/2;l.value=Math.max((n-e)*D.value+(r-t)*T.value,S),s.value=e+l.value*D.value/2,c.value=t+l.value*T.value/2}else if(e===`t`){let e=(f+m)/2,t=(p+h)/2;d.value=Math.max((t-r)*D.value-(e-n)*T.value,S),s.value=e+d.value*T.value/2,c.value=t-d.value*D.value/2}else if(e===`b`){let e=(i+o)/2,t=(a+u)/2;d.value=Math.max((r-t)*D.value-(n-e)*T.value,S),s.value=e-d.value*T.value/2,c.value=t+d.value*D.value/2}},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:e===`l`?`0`:e===`r`?`100%`:`50%`,top:e===`t`?`0`:e===`b`?`100%`:`50%`,cursor:`lr`.includes(e)?`ew-resize`:`ns-resize`,borderRadius:`50%`},class:jo}}function le(){return{onPointerdown:P,onPointermove:e=>{if(!A||e.buttons!==1)return;e.preventDefault(),e.stopPropagation();let t=(e.clientX-v.value-A.dx0)/g.value-Q/4,n=(e.clientY-x.value-A.dy0)/g.value-Q/4,r=Math.atan2(n-c.value,t-s.value)*180/Math.PI+90;for(let e of[0,90,180,270,360])if(Math.abs(r-e)<5){r=e%360;break}f.value=r},onPointerup:F,style:{width:`${Q}px`,height:`${Q}px`,margin:`-${Q/2}px`,left:`50%`,top:`-20px`,cursor:`grab`,borderRadius:`50%`},class:jo}}let L={immediate:!1,immediateCallback:!1},ue=Be(()=>{re.value<=$||s.value--},Mo,L),de=Be(()=>{te.value>=he.value-$||s.value++},Mo,L),fe=Be(()=>{ie.value<=$||c.value--},Mo,L),pe=Be(()=>{ne.value>=be.value-$||c.value++},Mo,L);return u(()=>{function e(e,t){Ie[e].value?t.resume():t.pause()}e(`left`,ue),e(`right`,de),e(`up`,fe),e(`down`,pe)}),(e,n)=>Number.isFinite(N(s))?(t(),y(`div`,{key:0,id:`drag-control-container`,"data-drag-id":N(r),style:p({position:`absolute`,zIndex:100,left:`${N(a)*(N(s)-Math.abs(N(l))/2)}px`,top:`${N(a)*(N(c)-Math.abs(N(d))/2)}px`,width:`${N(a)*Math.abs(N(l))}px`,height:`${N(a)*Math.abs(N(d))}px`,transformOrigin:`center center`,transform:`rotate(${N(f)}deg)`}),onPointerdown:P,onPointermove:se,onPointerup:F},[_(`div`,{class:b([`absolute inset-0 z-nav dark:b-gray-400`,N(m)?``:`b b-dark`])},[N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(ce(!0,!0))),null,16),_(`div`,j(i(ce(!1,!1))),null,16),N(m)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(ce(!0,!1))),null,16),_(`div`,j(i(ce(!1,!0))),null,16)],64))],64)),N(m)?M(`v-if`,!0):(t(),y(k,{key:1},[_(`div`,j(i(I(`l`))),null,16),_(`div`,j(i(I(`r`))),null,16),N(o)?M(`v-if`,!0):(t(),y(k,{key:0},[_(`div`,j(i(I(`t`))),null,16),_(`div`,j(i(I(`b`))),null,16)],64)),_(`div`,j(i(le())),null,16),_(`div`,{class:`absolute -top-15px w-0 b b-dashed b-dark dark:b-gray-400`,style:p({left:`calc(50% - 1px)`,height:N(o)?`14px`:`10px`})},null,4)],64))],2)],44,Ao)):M(`v-if`,!0)}}),Po=Re(m({__name:`SlidesShow`,props:{renderContext:{}},setup(e){let{currentSlideRoute:r,currentTransition:i,getPrimaryClicks:o,prevRoute:c,nextRoute:d,slides:f,isPrintMode:p,isPrintWithClicks:m,clicksDirection:h,printRange:g}=B();function _(e){e.meta.preload!==!1&&(e.meta.__preloaded=!0,e.load())}u(()=>{_(r.value),_(c.value),_(d.value)}),u(e=>{let t=f.value,n=setTimeout(()=>{t.forEach(_)},3e3);e(()=>clearTimeout(n))}),Oo(r,c,d,f);let v=ko(),b=te();je(()=>import(`./DrawingLayer-CgAMPS2j.js`).then(e=>b.value=e.default),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11]),import.meta.url);let x=E(()=>p.value?g.value.map(e=>f.value[e-1]):f.value.filter(e=>e.meta?.__preloaded||e===r.value));function S(){Ae.value=!0,ee()}return(c,u)=>(t(),y(k,null,[M(` Global Bottom `),n(N(ft)),M(` Slides `),(t(),A(s(N(v)&&!N(p)&&!N(Ae)&&!N(Ne)?`div`:re),l(N(Ae)||N(Ne)||N(p)?{}:N(i),{id:`slideshow`,tag:`div`,class:{"slidev-nav-go-forward":N(h)>0,"slidev-nav-go-backward":N(h)<0},onAfterLeave:S}),{default:w(()=>[(t(!0),y(k,null,a(x.value,n=>ae((t(),A(ht,{key:n.no,"clicks-context":N(p)&&!N(m)?N(le)(n,N($e)):N(o)(n),route:n,"render-context":e.renderContext},null,8,[`clicks-context`,`route`,`render-context`])),[[oe,n===N(r)]])),128))]),_:1},16,[`class`])),N(Oe)?(t(),A(No,{key:0,data:N(Oe)},null,8,[`data`])):M(`v-if`,!0),M(` Global Top `),n(N(mt)),b.value?(t(),A(N(b),{key:1})):M(`v-if`,!0)],64))}}),[[`__scopeId`,`data-v-835d2635`]]),Fo=Object.assign({}),Io=Object.assign({}),Lo=Object.assign({}),Ro=[Object.values(Fo)[0],Object.values(Io)[0],Object.values(Lo)[0]].filter(Boolean);function zo(){let{go:e,goFirst:t,goLast:n,next:r,nextSlide:i,prev:a,prevSlide:o}=B(),{drawingEnabled:s}=ct(),{escape:c,space:l,shift:u,left:d,right:f,up:p,down:m,enter:h,d:g,g:_,o:v,"`":y}=Ie,b={next:r,prev:a,nextSlide:i,prevSlide:o,go:e,goFirst:t,goLast:n,downloadPDF:nt,toggleDark:rt,toggleOverview:de,toggleDrawing:()=>s.value=!s.value,escapeOverview:()=>F.value=!1,showGotoDialog:()=>R.value=!R.value},x=U(H(F),H(Oe)),S=[{name:`next_space`,key:U(l,H(u)),fn:r,autoRepeat:!0},{name:`prev_space`,key:U(l,u),fn:a,autoRepeat:!0},{name:`next_right`,key:U(f,H(u),x),fn:r,autoRepeat:!0},{name:`prev_left`,key:U(d,H(u),x),fn:a,autoRepeat:!0},{name:`next_page_key`,key:`pageDown`,fn:r,autoRepeat:!0},{name:`prev_page_key`,key:`pageUp`,fn:a,autoRepeat:!0},{name:`next_down`,key:U(m,x),fn:i,autoRepeat:!0},{name:`prev_up`,key:U(p,x),fn:o,autoRepeat:!0},{name:`next_shift`,key:U(f,u),fn:i,autoRepeat:!0},{name:`prev_shift`,key:U(d,u),fn:o,autoRepeat:!0},{name:`toggle_dark`,key:U(g,H(s)),fn:rt},{name:`toggle_overview`,key:U(Je(v,y),H(s)),fn:de},{name:`hide_overview`,key:U(c,H(s)),fn:()=>F.value=!1},{name:`goto`,key:U(_,H(s)),fn:()=>R.value=!R.value},{name:`next_overview`,key:U(f,F),fn:fa},{name:`prev_overview`,key:U(d,F),fn:da},{name:`up_overview`,key:U(p,F),fn:pa},{name:`down_overview`,key:U(m,F),fn:ma},{name:`goto_from_overview`,key:U(h,F),fn:()=>{e(X.value),F.value=!1}}],C=new Set(S.map(e=>e.name));for(let e of Ro)S=e(b,S);if(S.filter(e=>e.name&&C.has(e.name)).length===0){let e=[`========== WARNING ==========`,`defineShortcutsSetup did not return any of the base shortcuts.`,`See https://sli.dev/custom/config-shortcuts.html for migration.`,`If it is intentional, return at least one shortcut with one of the base names (e.g. name:"goto").`].join(` + +`);alert(e),console.warn(e)}return S}function Bo(){let{isPrintMode:e}=B(),t=U(H(Ee),H(xe),H(e),_e,H(se)),n=zo();new Map(n.map(e=>[e.key,e])).forEach(e=>{e.fn&&r(e.key,e.fn,e.autoRepeat)}),i(`f`,()=>Pe.toggle());function r(e,n,r=!1){typeof e==`string`&&(e=Ie[e]);let i=U(e,t),a=0,o,s=()=>{if(clearTimeout(o),!i.value){a=0;return}r&&(o=setTimeout(s,Math.max(1e3-a*250,150)),a++),n()};return g(i,s,{flush:`sync`})}function i(e,n){return Ye(e,e=>{t.value&&(e.repeat||n())})}}export{Ta as a,sa as c,_t as d,gt as f,Ga as i,Pt as l,Po as n,Ca as o,go as r,Sa as s,Bo as t,Dt as u}; \ No newline at end of file diff --git a/lecture-08/assets/syncState-3Tc2ZArb.js b/lecture-08/assets/syncState-3Tc2ZArb.js new file mode 100644 index 0000000000000000000000000000000000000000..7794b717327092940b94b7656a001e0380a9332e --- /dev/null +++ b/lecture-08/assets/syncState-3Tc2ZArb.js @@ -0,0 +1 @@ +import{Z as e,dt as t,ht as n,lt as r}from"./modules/shiki-CJZsCeMT.js";function i(){return Math.random().toString(36).replace(/[^a-z]+/g,``).substr(2,10)}function a(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!1})}var o=r([{channels:[],enabled:!0,init(e,t,r,i=!1){let a;if(!i)a=new BroadcastChannel(e),a.addEventListener(`message`,e=>t(e.data)),this.channels.push(a);else if(i){this.listener=function(n){n&&n.key===e&&n.newValue&&t(JSON.parse(n.newValue))},window.addEventListener(`storage`,this.listener);let n=window.localStorage.getItem(e);n&&t(JSON.parse(n))}return(t,r=!1)=>{this.enabled&&(!i&&a&&!r&&a.postMessage(n(t)),i&&!r&&window.localStorage.setItem(e,JSON.stringify(t)))}},disable(){this.enabled=!1,this.channels.forEach(e=>e.close()),this.listener&&window.removeEventListener(`storage`,this.listener)}}]),s=new Map,c=t({});function l(t,i,a=!1){let l=[],u=!1,d=!1,f,p,m=r(i);function h(e){l.push(e)}function g(e,t){m[e]!==t&&(clearTimeout(f),u=!0,m[e]=t,f=setTimeout(()=>u=!1,0))}function _(e){u||(clearTimeout(p),d=!0,Object.entries(e).forEach(([e,t])=>{m[e]=t}),p=setTimeout(()=>d=!1,0))}function v(t){s.set(t,{onUpdate:_,persist:a,state:m}),c.value[t]=o.map(e=>e.init(t,_,m,a)).filter(e=>!!e);function r(){c.value[t].forEach(e=>e?.(n(m),d)),u||l.forEach(e=>e(m))}e(m,r,{deep:!0})}return{init:v,onPatch:h,onUpdate:_,patch:g,state:m}}export{a as n,i as r,l as t}; \ No newline at end of file diff --git a/lecture-08/assets/useDrawings-B2TJYfiB.js b/lecture-08/assets/useDrawings-B2TJYfiB.js new file mode 100644 index 0000000000000000000000000000000000000000..4ba07ec90ad134c83113a704baf4763292d7e162 --- /dev/null +++ b/lecture-08/assets/useDrawings-B2TJYfiB.js @@ -0,0 +1 @@ +import{P as e,Z as t,dt as n,g as r,lt as i,st as a}from"./modules/shiki-CJZsCeMT.js";import{g as o,t as s,tt as c}from"./useNav-B0kQsolV.js";import{D as l,g as u}from"./modules/vue-Dnfgf7Ad.js";import{c as d,l as f,s as p}from"./index-CvCioxNn.js";var m=()=>({emit(e,...t){for(let n=this.events[e]||[],r=0,i=n.length;r{this.events[e]=this.events[e]?.filter(e=>t!==e)}}});function h(e,t){return e-t}function g(e){return e<0?-1:1}function _(e){return[Math.abs(e),g(e)]}function v(){let e=()=>((1+Math.random())*65536|0).toString(16).substring(1);return`${e()+e()}-${e()}-${e()}-${e()}-${e()}${e()}${e()}`}var y=2;function b(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,`defs`),r=document.createElementNS(`http://www.w3.org/2000/svg`,`marker`),i=document.createElementNS(`http://www.w3.org/2000/svg`,`path`);return i.setAttribute(`fill`,t),r.setAttribute(`id`,e),r.setAttribute(`viewBox`,`0 -5 10 10`),r.setAttribute(`refX`,`5`),r.setAttribute(`refY`,`0`),r.setAttribute(`markerWidth`,`4`),r.setAttribute(`markerHeight`,`4`),r.setAttribute(`orient`,`auto`),i.setAttribute(`d`,`M0,-5L10,0L0,5`),r.appendChild(i),n.appendChild(r),n}function x(e,t){let n=e.x-t.x,r=e.y-t.y;return n*n+r*r}function S(e,t,n){let r=t.x,i=t.y,a=n.x-r,o=n.y-i;if(a!==0||o!==0){let t=((e.x-r)*a+(e.y-i)*o)/(a*a+o*o);t>1?(r=n.x,i=n.y):t>0&&(r+=a*t,i+=o*t)}return a=e.x-r,o=e.y-i,a*a+o*o}function C(e,t){let n=e[0],r=[n],i;for(let a=1,o=e.length;at&&(r.push(i),n=i);return n!==i&&i&&r.push(i),r}function w(e,t,n,r,i){let a=r,o=0;for(let r=t+1;ra&&(o=r,a=i)}a>r&&(o-t>1&&w(e,t,o,r,i),i.push(e[o]),n-o>1&&w(e,o,n,r,i))}function T(e,t){let n=e.length-1,r=[e[0]];return w(e,0,n,t,r),r.push(e[n]),r}function E(e,t,n=!1){if(e.length<=2)return e;let r=t===void 0?1:t*t;return e=n?e:C(e,r),e=T(e,r),e}var D=class{constructor(e){this.drauu=e,this.event=void 0,this.point=void 0,this.start=void 0,this.el=null}onSelected(e){}onUnselected(){}onStart(e){}onMove(e){return!1}onEnd(e){}get brush(){return this.drauu.brush}get shiftPressed(){return this.drauu.shiftPressed}get altPressed(){return this.drauu.altPressed}get svgElement(){return this.drauu.el}getMousePosition(e){let t=this.drauu.el,n=this.drauu.options.cssZoom??1,r=this.drauu.options.coordinateScale??1,i=this.drauu.options.offset??{x:0,y:0};if(this.drauu.options.coordinateTransform===!1){let t=this.drauu.el.getBoundingClientRect();return{x:(e.pageX/n-t.left+i.x)*r,y:(e.pageY/n-t.top+i.y)*r,pressure:e.pressure}}{let a=this.drauu.svgPoint;a.x=e.clientX/n+i.x,a.y=e.clientY/n+i.y;let o=a.matrixTransform(t.getScreenCTM()?.inverse());return{x:o.x*r,y:o.y*r,pressure:e.pressure}}}createElement(e,t){let n=document.createElementNS(`http://www.w3.org/2000/svg`,e),r=t?{...this.brush,...t}:this.brush;return n.setAttribute(`fill`,r.fill??`transparent`),n.setAttribute(`stroke`,r.color),n.setAttribute(`stroke-width`,r.size.toString()),n.setAttribute(`stroke-linecap`,`round`),r.dasharray&&n.setAttribute(`stroke-dasharray`,r.dasharray),n}attr(e,t){this.el.setAttribute(e,typeof t==`string`?t:t.toFixed(y))}_setEvent(e){this.event=e,this.point=this.getMousePosition(e)}_eventDown(e){return this._setEvent(e),this.start=this.point,this.onStart(this.point)}_eventMove(e){return this._setEvent(e),this.onMove(this.point)}_eventUp(e){return this._setEvent(e),this.onEnd(this.point)}},O=class e extends D{constructor(...e){super(...e),this.points=[],this.count=0}onStart(e){if(this.el=this.createElement(`path`,{fill:`transparent`}),this.points=[e],this.brush.arrowEnd){this.arrowId=v();let e=b(this.arrowId,this.brush.color);this.el.appendChild(e)}return this.el}onMove(t){return this.el||this.onStart(t),this.points[this.points.length-1]!==t&&(this.points.push(t),this.count+=1),this.count>5&&(this.points=E(this.points,1,!0),this.count=0),this.attr(`d`,e.toSvgData(this.points)),!0}onEnd(){let t=this.el;if(this.el=null,!t)return!1;if(t.setAttribute(`d`,e.toSvgData(E(this.points,1,!0))),!t.getTotalLength()){let{x:e,y:n}=this.points[0],r=this.brush.size/2;t.setAttribute(`d`,`M ${e-r} ${n} a ${r},${r} 0 1,0 ${r*2},0 a ${r},${r} 0 1,0 ${-r*2},0`),t.setAttribute(`fill`,this.brush.color),t.setAttribute(`stroke-width`,`0`)}return!0}static line(e,t){let n=t.x-e.x,r=t.y-e.y;return{length:Math.sqrt(n**2+r**2),angle:Math.atan2(r,n)}}static controlPoint(t,n,r,i){let a=n||t,o=r||t,s=e.line(a,o),c=s.angle+(i?Math.PI:0),l=s.length*.2;return{x:t.x+Math.cos(c)*l,y:t.y+Math.sin(c)*l}}static bezierCommand(t,n,r){let i=e.controlPoint(r[n-1],r[n-2],t),a=e.controlPoint(t,r[n-1],r[n+1],!0);return`C ${i.x.toFixed(y)},${i.y.toFixed(y)} ${a.x.toFixed(y)},${a.y.toFixed(y)} ${t.x.toFixed(y)},${t.y.toFixed(y)}`}static toSvgData(t){return t.reduce((t,n,r,i)=>r===0?`M ${n.x.toFixed(y)},${n.y.toFixed(y)}`:`${t} ${e.bezierCommand(n,r,i)}`,``)}},k=class extends D{onStart(e){return this.el=this.createElement(`ellipse`),this.attr(`cx`,e.x),this.attr(`cy`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`cx`,this.start.x),this.attr(`cy`,this.start.y),this.attr(`rx`,t),this.attr(`ry`,r);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`cx`,(e+a)/2),this.attr(`cy`,(o+s)/2),this.attr(`rx`,(a-e)/2),this.attr(`ry`,(s-o)/2)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}},A=class extends D{constructor(...e){super(...e),this.pathSubFactor=20,this.pathFragments=[],this._erased=[]}onSelected(e){let t=(e,n)=>{if(e&&e.length)for(let r=0;re.forEach(e=>this.drauu._restoreNode(e)),redo:()=>e.forEach(e=>this.drauu._removeNode(e))}}checkAndEraseElement(){if(this.pathFragments.length)for(let e=0;e!this._erased.includes(e.element))),this._erased.length>0}lineLineIntersect(e,t){let n=e.x1,r=e.x2,i=t.x1,a=t.x2,o=e.y1,s=e.y2,c=t.y1,l=t.y2,u=(n-r)*(c-l)-(o-s)*(i-a),d=(n*s-o*r)*(i-a)-(n-r)*(i*l-c*a),f=(n*s-o*r)*(c-l)-(o-s)*(i*l-c*a),p=(e,t,n)=>e>=t&&e<=n||e>=n&&e<=t;if(u===0)return!1;{let e={x:d/u,y:f/u};return p(e.x,n,r)&&p(e.y,o,s)&&p(e.x,i,a)&&p(e.y,c,l)}}},j=class extends D{onStart(e){if(this.el=this.createElement(`line`,{fill:`transparent`}),this.attr(`x1`,e.x),this.attr(`y1`,e.y),this.attr(`x2`,e.x),this.attr(`y2`,e.y),this.brush.arrowEnd){let e=v(),t=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return t.append(b(e,this.brush.color)),t.append(this.el),this.attr(`marker-end`,`url(#${e})`),t}return this.el}onMove(e){if(!this.el)return!1;let{x:t,y:n}=e;if(this.shiftPressed){let r=e.x-this.start.x,i=e.y-this.start.y;if(i!==0){let e=r/i;e=Math.round(e),Math.abs(e)<=1?(t=this.start.x+i*e,n=this.start.y+i):(t=this.start.x+r,n=this.start.y)}}return this.altPressed?(this.attr(`x1`,this.start.x*2-t),this.attr(`y1`,this.start.y*2-n),this.attr(`x2`,t),this.attr(`y2`,n)):(this.attr(`x1`,this.start.x),this.attr(`y1`,this.start.y),this.attr(`x2`,t),this.attr(`y2`,n)),!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(e.getTotalLength()<5)return!1}catch{return!1}return!0}},M=class extends D{onStart(e){return this.el=this.createElement(`rect`),this.brush.cornerRadius&&(this.attr(`rx`,this.brush.cornerRadius),this.attr(`ry`,this.brush.cornerRadius)),this.attr(`x`,e.x),this.attr(`y`,e.y),this.el}onMove(e){if(!this.el||!this.start)return!1;let[t,n]=_(e.x-this.start.x),[r,i]=_(e.y-this.start.y);if(this.shiftPressed){let e=Math.min(t,r);t=e,r=e}if(this.altPressed)this.attr(`x`,this.start.x-t),this.attr(`y`,this.start.y-r),this.attr(`width`,t*2),this.attr(`height`,r*2);else{let[e,a]=[this.start.x,this.start.x+t*n].sort(h),[o,s]=[this.start.y,this.start.y+r*i].sort(h);this.attr(`x`,e),this.attr(`y`,o),this.attr(`width`,a-e),this.attr(`height`,s-o)}return!0}onEnd(){let e=this.el;if(this.el=null,!e)return!1;try{if(!e.getTotalLength())return!1}catch{return!1}return!0}};function N(e,t,n,r=e=>e){return e*r(.5-t*(.5-n))}function P(e){return[-e[0],-e[1]]}function F(e,t){return[e[0]+t[0],e[1]+t[1]]}function I(e,t){return[e[0]-t[0],e[1]-t[1]]}function L(e,t){return[e[0]*t,e[1]*t]}function R(e,t){return[e[0]/t,e[1]/t]}function z(e){return[e[1],-e[0]]}function B(e,t){return e[0]*t[0]+e[1]*t[1]}function V(e,t){return e[0]===t[0]&&e[1]===t[1]}function H(e){return Math.hypot(e[0],e[1])}function U(e){return e[0]*e[0]+e[1]*e[1]}function W(e,t){return U(I(e,t))}function G(e){return R(e,H(e))}function K(e,t){return Math.hypot(e[1]-t[1],e[0]-t[0])}function q(e,t,n){let r=Math.sin(n),i=Math.cos(n),a=e[0]-t[0],o=e[1]-t[1],s=a*i-o*r,c=a*r+o*i;return[s+t[0],c+t[1]]}function J(e,t,n){return F(e,L(I(t,e),n))}function Y(e,t,n){return F(e,L(t,n))}var{min:X,PI:Z}=Math,Q=.275,$=Z+1e-4;function ee(e,t={}){let{size:n=16,smoothing:r=.5,thinning:i=.5,simulatePressure:a=!0,easing:o=e=>e,start:s={},end:c={},last:l=!1}=t,{cap:u=!0,easing:d=e=>e*(2-e)}=s,{cap:f=!0,easing:p=e=>--e*e*e+1}=c;if(e.length===0||n<=0)return[];let m=e[e.length-1].runningLength,h=s.taper===!1?0:s.taper===!0?Math.max(n,m):s.taper,g=c.taper===!1?0:c.taper===!0?Math.max(n,m):c.taper,_=(n*r)**2,v=[],y=[],b=e.slice(0,10).reduce((e,t)=>{let r=t.pressure;if(a){let i=X(1,t.distance/n);r=X(1,e+(X(1,1-i)-e)*(i*Q))}return(e+r)/2},e[0].pressure),x=N(n,i,e[e.length-1].pressure,o),S,C=e[0].vector,w=e[0].point,T=w,E=w,D=T,O=!1;for(let t=0;t_)&&(v.push(E),w=E),D=F(s,R),(t<=1||W(T,D)>_)&&(y.push(D),T=D),b=r,C=c}let k=e[0].point.slice(0,2),A=e.length>1?e[e.length-1].point.slice(0,2):F(e[0].point,[1,1]),j=[],M=[];if(e.length===1){if(!(h||g)||l){let e=Y(k,G(z(I(k,A))),-(S||x)),t=[];for(let n=1/13,r=n;r<=1;r+=n)t.push(q(e,k,$*2*r));return t}}else{if(!(h||g&&e.length===1)){if(u)for(let e=1/13,t=e;t<=1;t+=e){let e=q(y[0],k,$*t);j.push(e)}else{let e=I(v[0],y[0]),t=L(e,.5),n=L(e,.51);j.push(I(k,t),I(k,n),F(k,n),F(k,t))}}let t=z(P(e[e.length-1].vector));if(g||h&&e.length===1)M.push(A);else if(f){let e=Y(A,t,x);for(let t=1/29,n=t;n<1;n+=t)M.push(q(e,A,$*3*n))}else M.push(F(A,L(t,x)),F(A,L(t,x*.99)),I(A,L(t,x*.99)),I(A,L(t,x)))}return v.concat(M,y.reverse(),j)}function te(e,t={}){let{streamline:n=.5,size:r=16,last:i=!1}=t;if(e.length===0)return[];let a=.15+(1-n)*.85,o=Array.isArray(e[0])?e:e.map(({x:e,y:t,pressure:n=.5})=>[e,t,n]);if(o.length===2){let e=o[1];o=o.slice(0,-1);for(let t=1;t<5;t++)o.push(J(o[0],e,t/4))}o.length===1&&(o=[...o,[...F(o[0],[1,1]),...o[0].slice(2)]]);let s=[{point:[o[0][0],o[0][1]],pressure:o[0][2]>=0?o[0][2]:.25,vector:[1,1],distance:0,runningLength:0}],c=!1,l=0,u=s[0],d=o.length-1;for(let e=1;e=0?o[e][2]:.5,vector:G(I(u.point,t)),distance:n,runningLength:l},s.push(u)}return s[0].vector=s[1]?.vector||[0,0],s}function ne(e,t={}){return ee(te(e,t),t)}var re=class e extends D{constructor(...e){super(...e),this.points=[]}onStart(e){return this.el=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),this.points=[e],this.attr(`fill`,this.brush.color),this.attr(`d`,this.getSvgData(this.points)),this.el}onMove(e){return this.el||this.onStart(e),this.points[this.points.length-1]!==e&&this.points.push(e),this.attr(`d`,this.getSvgData(this.points)),!0}onEnd(){let e=this.el;return this.el=null,!!e}getSvgData(t){return e.getSvgData(t,this.brush)}static getSvgData(e,t){let n=ne(e,{size:t.size,thinning:.9,simulatePressure:!1,start:{taper:5},end:{taper:5},...t.stylusOptions});if(!n.length)return``;let r=n.reduce((e,[t,n],r,i)=>{let[a,o]=i[(r+1)%i.length];return e.push(t,n,(t+a)/2,(n+o)/2),e},[`M`,...n[0],`Q`]);return r.push(`Z`),r.map(e=>typeof e==`number`?e.toFixed(2):e).join(` `)}};function ie(e){return{draw:new O(e),stylus:new re(e),line:new j(e),rectangle:new M(e),ellipse:new k(e),eraseLine:new A(e)}}var ae=class{constructor(e={}){this.options=e,this.el=null,this.svgPoint=null,this.eventEl=null,this.shiftPressed=!1,this.altPressed=!1,this.drawing=!1,this._emitter=m(),this._originalPointerId=null,this._models=ie(this),this._opStack=[],this._opIndex=0,this._disposables=[],this._elements=[],this.options.brush||(this.options.brush={color:`black`,size:3,mode:`stylus`}),e.el&&this.mount(e.el,e.eventTarget,e.window)}get model(){return this._models[this.mode]}get mounted(){return!!this.el}get mode(){return this.options.brush.mode||`stylus`}set mode(e){this._models[this.mode].onUnselected(),this.options.brush.mode=e,this.model.onSelected(this.el)}get brush(){return this.options.brush}set brush(e){this.options.brush=e}resolveSelector(e){return typeof e==`string`?document.querySelector(e):e||null}mount(e,t,n=window){if(this.el)throw Error(`[drauu] already mounted, unmount previous target first`);if(this.el=this.resolveSelector(e),!this.el)throw Error(`[drauu] target element not found`);if(this.el.tagName.toLocaleLowerCase()!==`svg`)throw Error(`[drauu] can only mount to a SVG element`);if(!this.el.createSVGPoint)throw Error(`[drauu] SVG element must be create by document.createElementNS('http://www.w3.org/2000/svg', 'svg')`);this.svgPoint=this.el.createSVGPoint();let r=this.resolveSelector(t)||this.el,i=this.eventStart.bind(this),a=this.eventMove.bind(this),o=this.eventEnd.bind(this),s=this.eventKeyboard.bind(this),c=this.touchMove.bind(this);r.addEventListener(`pointerdown`,i,{passive:!1}),n.addEventListener(`pointermove`,a,{passive:!1}),n.addEventListener(`pointerup`,o,{passive:!1}),n.addEventListener(`pointercancel`,o,{passive:!1}),n.addEventListener(`keydown`,s,!1),n.addEventListener(`keyup`,s,!1),n.addEventListener(`touchmove`,c,{passive:!1}),this._disposables.push(()=>{r.removeEventListener(`pointerdown`,i),n.removeEventListener(`pointermove`,a),n.removeEventListener(`pointerup`,o),n.removeEventListener(`pointercancel`,o),n.removeEventListener(`keydown`,s,!1),n.removeEventListener(`keyup`,s,!1),n.removeEventListener(`touchmove`,c)}),this._emitter.emit(`mounted`)}unmount(){this._disposables.forEach(e=>e()),this._disposables.length=0,this._elements.length=0,this.el=null,this._emitter.emit(`unmounted`)}on(e,t){return this._emitter.on(e,t)}undo(){return!this.canUndo()||this.drawing?!1:(this._opStack[--this._opIndex].undo(),this._emitter.emit(`changed`),!0)}redo(){return!this.canRedo()||this.drawing?!1:(this._opStack[this._opIndex++].redo(),this._emitter.emit(`changed`),!0)}canRedo(){return this._opIndex0}eventMove(e){!this.acceptsInput(e)||!this.drawing||this.model._eventMove(e)&&(e.stopPropagation(),e.preventDefault(),this._emitter.emit(`changed`))}eventStart(e){this.acceptsInput(e)&&(e.stopPropagation(),e.preventDefault(),this._currentNode&&this.cancel(),this.drawing=!0,this._originalPointerId=e.pointerId,this._emitter.emit(`start`),this._currentNode=this.model._eventDown(e),this._currentNode&&this.mode!==`eraseLine`&&this.el.appendChild(this._currentNode),this._emitter.emit(`changed`))}eventEnd(e){if(!this.acceptsInput(e)||!this.drawing)return;let t=this.model._eventUp(e);if(!t)this.cancel();else if(t===!0){let e=this._currentNode;e&&(this._appendNode(e),this.commit({undo:()=>this._removeNode(e),redo:()=>this._restoreNode(e)}))}else this.commit(t);this.drawing=!1,this._emitter.emit(`end`),this._emitter.emit(`changed`),this._originalPointerId=null}touchMove(e){Array.from(e.touches).some(e=>e.touchType===`stylus`&&e.identifier===this._originalPointerId)&&e.preventDefault()}acceptsInput(e){return(!this.options.acceptsInputTypes||this.options.acceptsInputTypes.includes(e.pointerType))&&!(this._originalPointerId&&this._originalPointerId!==e.pointerId)}eventKeyboard(e){(this.shiftPressed!==e.shiftKey||this.altPressed!==e.altKey)&&(this.shiftPressed=e.shiftKey,this.altPressed=e.altKey,this.model.point&&this.model.onMove(this.model.point)&&this._emitter.emit(`changed`))}commit(e){this._opStack.length=this._opIndex,this._opStack.push(e),this._opIndex++;let t=this._currentNode;this._currentNode=void 0,this._emitter.emit(`committed`,t)}clear(){this._opStack.length=0,this._opIndex=0,this._elements=[],this.cancel(),this.el.innerHTML=``,this._emitter.emit(`changed`)}cancel(){this._currentNode&&(this.el.removeChild(this._currentNode),this._currentNode=void 0,this._emitter.emit(`canceled`))}dump(){return this.el.innerHTML}load(e){this.clear(),this.el.innerHTML=e}_appendNode(e){let t=this._elements.at(-1);t?t.after(e):this.el.append(e);let n=this._elements.push(e)-1;e.dataset.drauu_index=n.toString()}_removeNode(e){e.remove(),this._elements[+e.dataset.drauu_index]=null}_restoreNode(e){let t=+e.dataset.drauu_index;this._elements[t]=e;for(let n=t-1;n>=0;n--){let t=this._elements[n];if(t){t.after(e);return}}this.el.prepend(e)}};function oe(e){return new ae(e)}var se=l(()=>{let{currentSlideNo:l,isPresenter:m}=s(),h=[`#ff595e`,`#ffca3a`,`#8ac926`,`#1982c4`,`#6a4c93`,`#ffffff`,`#000000`],g=u(`slidev-drawing-enabled`,!1),_=u(`slidev-drawing-pinned`,!1),v=u(`slidev-drawing-brush`,{color:h[0],size:4,mode:`stylus`}),y=n(!1),b=n(!1),x=n(!1),S=n(!1),C=n(`stylus`),w=r(()=>c.drawings.syncAll||m.value),T=!1,E=r({get(){return C.value},set(e){C.value=e,e===`arrow`?(O.mode=`line`,v.value.arrowEnd=!0):(O.mode=e,v.value.arrowEnd=!1)}}),D=i({brush:v,acceptsInputTypes:r(()=>g.value&&(!c.drawings.presenterOnly||m.value)?void 0:[`pen`]),coordinateTransform:!1}),O=a(oe(D));function k(){O.clear(),w.value&&f(l.value,``)}function A(){x.value=O.canRedo(),b.value=O.canUndo(),S.value=!!O.el?.children.length}function j(e){T=!0;let t=p[e||l.value];t==null?O.clear():O.load(t),A(),T=!1}return O.on(`changed`,()=>{if(A(),!T){let e=O.dump(),t=l.value;(p[t]||``)!==e&&w.value&&f(t,O.dump())}}),d(e=>{T=!0,e[l.value]!=null&&O.load(e[l.value]||``),T=!1,A()}),e(()=>{t(l,()=>{O.mounted&&j()},{immediate:!0})}),O.on(`start`,()=>y.value=!0),O.on(`end`,()=>y.value=!1),window.addEventListener(`keydown`,e=>{if(!g.value||o.value)return;let t=!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey,n=!0;e.code===`KeyZ`&&(e.ctrlKey||e.metaKey)?e.shiftKey?O.redo():O.undo():e.code===`Escape`?g.value=!1:e.code===`KeyL`&&t?E.value=`line`:e.code===`KeyA`&&t?E.value=`arrow`:e.code===`KeyS`&&t?E.value=`stylus`:e.code===`KeyR`&&t?E.value=`rectangle`:e.code===`KeyE`&&t?E.value=`ellipse`:e.code===`KeyC`&&t?k():e.code.startsWith(`Digit`)&&t&&+e.code[5]<=h.length?v.value.color=h[e.code[5]-1]:n=!1,n&&(e.preventDefault(),e.stopPropagation())},!1),{brush:v,brushColors:h,canClear:S,canRedo:x,canUndo:b,clear:k,drauu:O,drauuOptions:D,drawingEnabled:g,drawingMode:E,drawingPinned:_,drawingState:p,isDrawing:y,loadCanvas:j}});export{se as t}; \ No newline at end of file diff --git a/lecture-08/assets/useNav-B0kQsolV.js b/lecture-08/assets/useNav-B0kQsolV.js new file mode 100644 index 0000000000000000000000000000000000000000..2fca4602681a5bcb312a2b4824507dc1e9f56241 --- /dev/null +++ b/lecture-08/assets/useNav-B0kQsolV.js @@ -0,0 +1,279 @@ +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./md-DFkbKXSo.js","./modules/shiki-CJZsCeMT.js","./rolldown-runtime-hePW80VL.js","./modules/shiki-BrmBd2_v.css","./_plugin-vue_export-helper-BDNMzG2s.js","./slidev/context-DB-9afGB.js","./modules/vue-Dnfgf7Ad.js","./GridWorld-D5i5gg4u.js","./useReinforcement-11RE6Te1.js","./GridWorld-CYBTngYz.css","./md-CYXxUBJM.css","./md-pFjrzahN2.js","./default-DMdSOhJT.js","./DeckFooter-BmHxwiXu.js","./slidev/client-beF_Q0xG.js","./syncState-3Tc2ZArb.js","./index-CvCioxNn.js","./index-CSMQn_X0.css","./useDrawings-B2TJYfiB.js","./DeckFooter-B6vKMo6W.css","./default-DFJXHcku.css","./RlGlyph-i3WvlmEb.js","./RlGlyph-DU7BVq-e.css","./md-DHODWU9R.js","./md-DPJgeVRt2.js","./section-CqA-0pFf.js","./section-BZ9Dfv_4.css","./md-GvEn7lJR.js","./slidev/VClicks-lrjw2pb1.js","./md-DOVVkhja.js","./md-D78P-CVF.js","./md-BTt_dRtv2.js","./md-DF15gv0p2.js","./md-Cpligg9D.js","./md-BjLiGZe7.js","./md-BoUgDoJP.js","./md-YUWOF7of.js","./PollSlide-CA6YXjEC.js","./PollSlide-C7CHIzYm.css","./md-TKUiOOmA.js","./md-Bz5Zd8AS.js","./md-CO0h-U_E.js","./md-qI5Gn-4r.js","./md-l6R6jPGW.js","./slidev/KaTexBlockWrapper-CQp3FXpQ.js","./md-DxEIUlRz.js","./md-Bu3XUXeA.js","./md-DwcCo75s.js","./md-C9dA0XC0.js","./md-X6pHqlXs.js","./md-DImml7fy2.js","./md-WQ4TFyjA.js","./md-Q973zyBX.js","./md-D7EmREcg2.js","./md-C4XXUyXo2.js","./md-B9C145sD2.js","./WidgetFrame-DHgK6j2H.js","./WidgetFrame-Czwyd28V.css","./Slider-C2M0Z0oG.js","./Slider-BO0rW71G.css","./interactive-LBJsATV-.js","./interactive-D_LX0oud.css","./md-Ddtfqral.css","./md-Bx6ObLYd2.js","./md-Crf0QqO82.js","./md-ClcrnWUb.js","./md-BY5B4RFF2.js","./md-CChtMD7Z2.js","./md-C_djKWOA2.js","./md-BuPoDN-Y2.js","./md-C0kU9PLe2.js","./md-DGATRVqO.js","./md-CBwC-ryo2.js","./md-Ck5yC0i3.js","./md-X2RPTEil.js","./md-C76Txys_.js","./md-3KgA1lqP.js","./md-oSmNAz51.js","./md-F2Pj1FPG.js","./md-DN8ICbIE.js","./StepButton-DD4XxENU.js","./StepButton-C1ItLUkw.css","./md-yQZmZhEY.css","./md-BX1wWMGz.js","./md-0nitP_As.js","./md-CF_gH_Jj.js","./md-DVi-Y4NQ.js","./md-CB5a4GuA.js","./md-C0YOeXvT.js","./md-BsteAPDC.js","./md-Bnu9_G7n.js","./md-Du9GpJ-U.js","./md-6UsQlhb2.js","./md-Y9Z16ykm.js","./md-BaRMbteD.css","./md-B2pb5v7i.js","./md-B_GRqzbq.js","./md-BIV2xOUh.js","./md-tZ6pTJCu.js","./md-CPYeSP9D.js","./md-6ZLa4d3p.js","./md-dqR9EYFU.js","./md-L4CkW1kN.js","./md-erOyj-pS.js","./md-CWs17cl1.css","./md-CYCyDfm-.js","./md-CsoOjhyB.js","./md-DCerl4UZ.js","./md-CAqxjDRd.js","./md-BEVP4TeY.js","./md-DWRKYI2u.js","./md-DMm0v4Wk.js","./md-VBnw9usT2.js","./md-v7LlsJSs2.js","./md-BIjZR-bS2.js","./md-DMlixF1K2.js","./Citation-CcKhBxpe.js","./Citation-rca7ok54.css","./md-jnqVVH902.js","./md-B1kgcJx92.js","./md-BisM1Pr82.js","./md-BDiz7f2n2.js","./md-DS5J4mOQ2.js","./md-k6-o3Hlb2.js","./md-D1L04-qD2.js","./md-D5t4UeSE2.js","./md-BhP8iVpu2.js","./md-DYp24jFE2.js","./md-Btp4CswY2.js","./DqnFlow-DlxgPWo3.js","./DqnFlow-B46GQSY5.css","./md-CpVN8xTF2.js","./md-CP-vwJrb2.js","./slidev/CodeBlockWrapper-CIZDS6En.js","./modules/unplugin-icons-CStvVwzQ.js","./md-D1KIzLUZ2.js","./md-D0OYH0b_2.js","./md-Da8Z3odW2.js","./md-rreJmcjE.js","./md-CjjLEPPa.js","./md-Bp475Uqt.js","./md-DoGnq9kW.js","./md-DQyimKj3.js","./md-B4imawcw.js","./md-hTSgqenN.js","./md-C_I7xfx4.js","./md-DglvD3Oh.js","./md-Czq6p3v9.js","./md-DhZ23yU-.css","./md-es6QvLJL.js","./md-MeEdeYS7.js","./md-DE2QGCpb.css"])))=>i.map(i=>d[i]); +import{B as e,Ct as t,P as n,R as r,T as i,Z as a,_ as o,at as s,b as c,dt as l,ft as u,g as d,ht as ee,k as f,lt as p,m as te,mt as m,vt as ne,w as re,y as ie,yt as ae,z as oe}from"./modules/shiki-CJZsCeMT.js";import{t as se}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{A as ce,B as le,D as ue,E as de,L as fe,V as pe,_ as me,a as he,c as ge,g as h,h as _e,j as ve,l as ye}from"./modules/vue-Dnfgf7Ad.js";import{l as be,y as xe}from"./slidev/context-DB-9afGB.js";function Se(e,t,n){return Math.min(n,Math.max(t,e))}function Ce(...e){return Te(e).reduce((e,t)=>e+t,0)}function we(e){return e??=[],Array.isArray(e)?e:[e]}function Te(e){return we(e).flat(1)}function Ee(e){return Array.from(new Set(e))}function De(...e){let t,n,r;e.length===1?(t=0,r=1,[n]=e):[t,n,r=1]=e;let i=[],a=t;for(;at(e,n)).filter(Oe))}var g={theme:`dl2026`,title:`Deep Reinforcement Learning`,titleTemplate:`%s - Slidev`,addons:[`dl2026`],remoteAssets:!1,monaco:!0,monacoTypesSource:`local`,monacoTypesAdditionalPackages:[],monacoTypesIgnorePackages:[],monacoRunAdditionalDeps:[],monacoRunUseStrict:!0,download:`./slides.pdf`,export:{},info:`

PGR207 Deep Learning 2026 — Lecture 08

+`,highlighter:`shiki`,twoslash:!0,lineNumbers:!1,colorSchema:`auto`,routerMode:`hash`,aspectRatio:1.7777777777777777,canvasWidth:980,exportFilename:``,selectable:!1,themeConfig:{courseCode:`PGR207`,lecture:`08`,lectureTitle:`Deep Reinforcement Learning`},fonts:{sans:[`"Inter"`,`ui-sans-serif`,`system-ui`,`-apple-system`,`BlinkMacSystemFont`,`"Segoe UI"`,`Roboto`,`"Helvetica Neue"`,`Arial`,`"Noto Sans"`,`sans-serif`,`"Apple Color Emoji"`,`"Segoe UI Emoji"`,`"Segoe UI Symbol"`,`"Noto Color Emoji"`],serif:[`"Source Serif 4"`,`ui-serif`,`Georgia`,`Cambria`,`"Times New Roman"`,`Times`,`serif`],mono:[`"JetBrains Mono"`,`ui-monospace`,`SFMono-Regular`,`Menlo`,`Monaco`,`Consolas`,`"Liberation Mono"`,`"Courier New"`,`monospace`],webfonts:[`Inter`,`Source Serif 4`,`JetBrains Mono`],provider:`google`,local:[],italic:!1,weights:[`200`,`400`,`600`]},favicon:`https://cdn.jsdelivr.net/gh/slidevjs/slidev/assets/favicon.png`,drawings:{enabled:!0,persist:!1,presenterOnly:!1,syncAll:!0},plantUmlServer:`https://www.plantuml.com/plantuml`,codeCopy:!0,magicMoveCopy:!0,author:`Vajira Thambawita`,record:`dev`,css:`unocss`,presenter:!0,browserExporter:`dev`,htmlAttrs:{},transition:`slide-left`,editor:!0,mcp:!0,contextMenu:null,wakeLock:!0,pwa:!1,mdc:!0,comark:!1,seoMeta:{},notesAutoRuby:{},duration:`30min`,timer:`stopwatch`,magicMoveDuration:800,preloadImages:!0,clickAnimation:``,layout:`title`,courseCode:`PGR207`,lecture:`08`,email:`vajira@simula.no`,slidesTitle:`Deep Reinforcement Learning - Slidev`},Ae=`build`,je=d(()=>g.aspectRatio),Me=d(()=>g.canvasWidth),Ne=d(()=>Math.ceil(Me.value/je.value)),Pe=d(()=>ke(g.themeConfig||{},(e,t)=>[`--slidev-theme-${e}`,t])),Fe=g.slidesTitle,Ie=`./#/`,Le=`modulepreload`,Re=function(e,t){return new URL(e,t).href},ze={},_=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Re(t,n),t=s(t),t in ze)return;ze[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Le,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};function Be(e){if(e===!1||e===`false`)return null;if(e==null||e===!0||e===`true`)return`+1`;if(typeof e==`string`&&`+-`.includes(e[0]))return e;let t=+e;return Number.isNaN(t)?(console.error(`Invalid "at" prop value: ${e}`),null):t<=0?(console.warn(`[Slidev] "at" prop value must be greater than 0, but got ${e}, has been set to 1`),1):t}function Ve(e){return Array.isArray(e)?[Be(e[0]),Be(e[1])]:null}function He(e,t=0,n){let i=l(!1),a=new Map,o=new Map,c={get current(){return Se(+e.value,t,c.total)},set current(n){e.value=i.value?Se(n,t,c.total):n},clicksStart:t,get relativeSizeMap(){return a},get maxMap(){return o},get isMounted(){return i.value},setup(){r(()=>{i.value=!0,o=u(o),s(e)||(c.current=e.value)}),oe(()=>{i.value=!1,a=new Map,o=new Map})},calculateSince(e,t=1){let n=Be(e);if(n==null)return null;let r,i,a;if(typeof n==`string`){let e=c.currentOffset,o=+n;r=e+o,i=e+o+t-1,a=o+t-1}else r=n,i=n+t-1,a=0;return{start:r,end:1/0,max:i,delta:a,currentOffset:d(()=>c.current-r),isCurrent:d(()=>c.current===r),isActive:d(()=>c.current>=r)}},calculateRange(e){let t=Ve(e);if(t==null)return null;let[n,r]=t,i,a,o;return typeof n==`string`?(i=c.currentOffset+ +n,o=+n):(i=n,o=0),typeof r==`string`?(a=i+ +r,o+=+r):a=r,{start:i,end:a,max:a,delta:o,currentOffset:d(()=>c.current-i),isCurrent:d(()=>c.current===i),isActive:d(()=>i<=c.current&&c.currentne(t),e=>{r.value=Math.max(e,n)}),He(r,n,e?.meta?.clicks)}var We=/[a-z]/i;function Ge(e){if(typeof e==`number`)return{seconds:e,relative:!1};let t=e.startsWith(`+`);t&&(e=e.slice(1));let n=0;if(e.includes(`:`)){let t=e.split(`:`).map(Number),r=0,i=0,a=0;if(t.length===3)r=t[0],i=t[1],a=t[2];else if(t.length===2)i=t[0],a=t[1];else if(t.length===1)a=t[0];else throw TypeError(`Invalid timestamp format`);if(Number.isNaN(r)||Number.isNaN(i)||Number.isNaN(a))throw TypeError(`Invalid timestamp format`);n=(r||0)*3600+(i||0)*60+(a||0)}else if(!We.test(e))n=Number(e);else{let t={s:1,sec:1,secs:1,m:60,min:60,mins:60,h:3600,hr:3600,hrs:3600,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2629746,months:2629746,year:31556952,years:31556952},r=/([\d.]+)([a-z]+)/gi,i=e.matchAll(r);if(i)for(let e of i){let r=Number(e[1]);if(Number.isNaN(r))throw TypeError(`Invalid timestamp value: ${e[1]}`);let i=e[2].toLowerCase();if(!(i in t))throw TypeError(`Invalid timestamp unit: ${i}`);n+=r*t[i]}let a=e.replace(r,``).trim();if(a)throw TypeError(`Unknown timestamp remaining: ${a}`)}return{seconds:n,relative:t}}function Ke(e,t){if(!t||t===`all`||t===`*`)return De(1,e+1);if(t===`none`)return[];let n=[];for(let r of t.split(/[,;]/g))if(!r.includes(`-`))n.push(+r);else{let[t,i]=r.split(`-`,2);n.push(...De(+t,i?+i+1:e+1))}return Ee(n).filter(t=>t<=e).sort((e,t)=>e-t)}var qe={},Je={class:`px-4 py-10 text-center text-red-700 dark:text-red-500 font-bold font-mono`};function Ye(n,r){return e(),c(`div`,Je,t(`Failed to fetch this slide. Please check your network connection.`))}var v=se(qe,[[`render`,Ye]]),Xe={class:`h-full w-full flex items-center justify-center gap-2 slidev-slide-loading`},Ze=i({__name:`SlideLoading`,setup(t){let n=l(!1);return r(()=>{setTimeout(()=>{n.value=!0},200)}),(t,r)=>(e(),c(`div`,Xe,[n.value?(e(),c(te,{key:0},[r[0]||=o(`div`,{class:`i-svg-spinners-90-ring-with-bg text-xl`},null,-1),r[1]||=o(`div`,null,`Loading slide...`,-1)],64)):ie(`v-if`,!0)]))}}),y=p({theme:`dl2026`,addons:[`dl2026`],title:`Deep Reinforcement Learning`,info:`PGR207 Deep Learning 2026 — Lecture 08`,author:`Vajira Thambawita`,routerMode:`hash`,transition:`slide-left`,mdc:!0,themeConfig:{courseCode:`PGR207`,lecture:`08`,lectureTitle:`Deep Reinforcement Learning`},layout:`title`,courseCode:`PGR207`,lecture:`08`,email:`vajira@simula.no`}),Qe=u({get layout(){return y.layout},get transition(){return y.transition},get class(){return y.class},get clicks(){return y.clicks},get name(){return y.name},get preload(){return y.preload},slide:{content:``,revision:`-b5ef7j`,frontmatterRaw:`theme: dl2026 +addons: + - dl2026 +title: Deep Reinforcement Learning +info: PGR207 Deep Learning 2026 — Lecture 08 +author: Vajira Thambawita +routerMode: hash +transition: slide-left +mdc: true +themeConfig: + courseCode: PGR207 + lecture: "08" + lectureTitle: Deep Reinforcement Learning +layout: title +courseCode: PGR207 +lecture: "08" +email: vajira@simula.no +`,note:``,title:`Deep Reinforcement Learning`,index:0,noteHTML:``,images:[],raw:``,frontmatter:y,filepath:``,start:0,sourceIndex:0,id:0,no:1},__clicksContext:null,__preloaded:!1}),b=p({layout:`default`,core:!0,title:`Today, in seven parts`}),$e=u({get layout(){return b.layout},get transition(){return b.transition},get class(){return b.class},get clicks(){return b.clicks},get name(){return b.name},get preload(){return b.preload},slide:{content:``,revision:`etweuc`,frontmatterRaw:`layout: default +core: true +title: Today, in seven parts +`,note:``,title:`Today, in seven parts`,index:1,noteHTML:``,images:[],raw:``,frontmatter:b,filepath:``,start:51,sourceIndex:1,id:1,no:2},__clicksContext:null,__preloaded:!1}),x=p({layout:`default`,title:`In words: Today, in seven parts`}),et=u({get layout(){return x.layout},get transition(){return x.transition},get class(){return x.class},get clicks(){return x.clicks},get name(){return x.name},get preload(){return x.preload},slide:{content:``,revision:`h8ic2w`,frontmatterRaw:`layout: default +title: "In words: Today, in seven parts" +`,note:``,title:`In words: Today, in seven parts`,index:2,noteHTML:``,images:[],raw:``,frontmatter:x,filepath:``,start:117,sourceIndex:2,id:2,no:3},__clicksContext:null,__preloaded:!1}),S=p({layout:`section`,index:`00`}),tt=u({get layout(){return S.layout},get transition(){return S.transition},get class(){return S.class},get clicks(){return S.clicks},get name(){return S.name},get preload(){return S.preload},slide:{content:``,revision:`-6p0p5k`,frontmatterRaw:`layout: section +index: "00" +`,note:``,title:`Learning from a score`,level:1,index:3,noteHTML:``,images:[],raw:``,frontmatter:S,filepath:``,start:143,sourceIndex:3,id:3,no:4},__clicksContext:null,__preloaded:!1}),C=p({layout:`default`,core:!0,title:`A game with no instructions`}),nt=u({get layout(){return C.layout},get transition(){return C.transition},get class(){return C.class},get clicks(){return C.clicks},get name(){return C.name},get preload(){return C.preload},slide:{content:``,revision:`-29a0cc`,frontmatterRaw:`layout: default +core: true +title: A game with no instructions +`,note:``,title:`A game with no instructions`,index:4,noteHTML:``,images:[],raw:``,frontmatter:C,filepath:``,start:164,sourceIndex:4,id:4,no:5},__clicksContext:null,__preloaded:!1}),w=p({layout:`default`,title:`In words: A game with no instructions`}),rt=u({get layout(){return w.layout},get transition(){return w.transition},get class(){return w.class},get clicks(){return w.clicks},get name(){return w.name},get preload(){return w.preload},slide:{content:``,revision:`-d82bu8`,frontmatterRaw:`layout: default +title: "In words: A game with no instructions" +`,note:``,title:`In words: A game with no instructions`,index:5,noteHTML:``,images:[],raw:``,frontmatter:w,filepath:``,start:243,sourceIndex:5,id:5,no:6},__clicksContext:null,__preloaded:!1}),T=p({layout:`default`,core:!0,title:`The agent–environment loop`}),it=u({get layout(){return T.layout},get transition(){return T.transition},get class(){return T.class},get clicks(){return T.clicks},get name(){return T.name},get preload(){return T.preload},slide:{content:``,revision:`jrx619`,frontmatterRaw:`layout: default +core: true +title: The agent–environment loop +`,note:``,title:`The agent–environment loop`,index:6,noteHTML:``,images:[],raw:``,frontmatter:T,filepath:``,start:268,sourceIndex:6,id:6,no:7},__clicksContext:null,__preloaded:!1}),E=p({layout:`default`,title:`In words: The agent–environment loop`}),at=u({get layout(){return E.layout},get transition(){return E.transition},get class(){return E.class},get clicks(){return E.clicks},get name(){return E.name},get preload(){return E.preload},slide:{content:``,revision:`do22kj`,frontmatterRaw:`layout: default +title: "In words: The agent–environment loop" +`,note:``,title:`In words: The agent–environment loop`,index:7,noteHTML:``,images:[],raw:``,frontmatter:E,filepath:``,start:366,sourceIndex:7,id:7,no:8},__clicksContext:null,__preloaded:!1}),D=p({layout:`default`,core:!0,title:`Not learning from labels`}),ot=u({get layout(){return D.layout},get transition(){return D.transition},get class(){return D.class},get clicks(){return D.clicks},get name(){return D.name},get preload(){return D.preload},slide:{content:``,revision:`-fx3xsq`,frontmatterRaw:`layout: default +core: true +title: Not learning from labels +`,note:``,title:`Not learning from labels`,index:8,noteHTML:``,images:[],raw:``,frontmatter:D,filepath:``,start:393,sourceIndex:8,id:8,no:9},__clicksContext:null,__preloaded:!1}),O=p({layout:`default`,title:`In words: Not learning from labels`}),st=u({get layout(){return O.layout},get transition(){return O.transition},get class(){return O.class},get clicks(){return O.clicks},get name(){return O.name},get preload(){return O.preload},slide:{content:``,revision:`-nzjw8u`,frontmatterRaw:`layout: default +title: "In words: Not learning from labels" +`,note:``,title:`In words: Not learning from labels`,index:9,noteHTML:``,images:[],raw:``,frontmatter:O,filepath:``,start:468,sourceIndex:9,id:9,no:10},__clicksContext:null,__preloaded:!1}),k=p({layout:`default`,core:!0,title:`The robot and its charger`}),ct=u({get layout(){return k.layout},get transition(){return k.transition},get class(){return k.class},get clicks(){return k.clicks},get name(){return k.name},get preload(){return k.preload},slide:{content:``,revision:`24xsaf`,frontmatterRaw:`layout: default +core: true +title: The robot and its charger +`,note:``,title:`The robot and its charger`,index:10,noteHTML:``,images:[],raw:``,frontmatter:k,filepath:``,start:495,sourceIndex:10,id:10,no:11},__clicksContext:null,__preloaded:!1}),A=p({layout:`default`,title:`In words: The robot and its charger`}),lt=u({get layout(){return A.layout},get transition(){return A.transition},get class(){return A.class},get clicks(){return A.clicks},get name(){return A.name},get preload(){return A.preload},slide:{content:``,revision:`-2btoea`,frontmatterRaw:`layout: default +title: "In words: The robot and its charger" +`,note:``,title:`In words: The robot and its charger`,index:11,noteHTML:``,images:[],raw:``,frontmatter:A,filepath:``,start:552,sourceIndex:11,id:11,no:12},__clicksContext:null,__preloaded:!1}),j=p({layout:`default`,title:`Poll: which one is reinforcement learning?`}),ut=u({get layout(){return j.layout},get transition(){return j.transition},get class(){return j.class},get clicks(){return j.clicks},get name(){return j.name},get preload(){return j.preload},slide:{content:``,revision:`-96yniq`,frontmatterRaw:`layout: default +title: "Poll: which one is reinforcement learning?" +`,note:``,title:`Poll: which one is reinforcement learning?`,index:12,noteHTML:``,images:[],raw:``,frontmatter:j,filepath:``,start:578,sourceIndex:12,id:12,no:13},__clicksContext:null,__preloaded:!1}),M=p({layout:`default`,title:`In words: which one is reinforcement learning?`}),dt=u({get layout(){return M.layout},get transition(){return M.transition},get class(){return M.class},get clicks(){return M.clicks},get name(){return M.name},get preload(){return M.preload},slide:{content:``,revision:`kqzzje`,frontmatterRaw:`layout: default +title: "In words: which one is reinforcement learning?" +`,note:``,title:`In words: which one is reinforcement learning?`,index:13,noteHTML:``,images:[],raw:``,frontmatter:M,filepath:``,start:638,sourceIndex:13,id:13,no:14},__clicksContext:null,__preloaded:!1}),N=p({layout:`section`,index:`01`}),ft=u({get layout(){return N.layout},get transition(){return N.transition},get class(){return N.class},get clicks(){return N.clicks},get name(){return N.name},get preload(){return N.preload},slide:{content:``,revision:`-8ci08v`,frontmatterRaw:`layout: section +index: "01" +`,note:``,title:`The world as an MDP`,level:1,index:14,noteHTML:``,images:[],raw:``,frontmatter:N,filepath:``,start:667,sourceIndex:14,id:14,no:15},__clicksContext:null,__preloaded:!1}),P=p({layout:`default`,core:!0,title:`An episode is a chain of states, actions and rewards`,clicks:5}),pt=u({get layout(){return P.layout},get transition(){return P.transition},get class(){return P.class},get clicks(){return P.clicks},get name(){return P.name},get preload(){return P.preload},slide:{content:``,revision:`-dulopn`,frontmatterRaw:`layout: default +core: true +title: An episode is a chain of states, actions and rewards +clicks: 5 +`,note:``,title:`An episode is a chain of states, actions and rewards`,index:15,noteHTML:``,images:[],raw:``,frontmatter:P,filepath:``,start:689,sourceIndex:15,id:15,no:16},__clicksContext:null,__preloaded:!1}),F=p({layout:`default`,title:`In words: An episode is a chain of states, actions and rewards`}),mt=u({get layout(){return F.layout},get transition(){return F.transition},get class(){return F.class},get clicks(){return F.clicks},get name(){return F.name},get preload(){return F.preload},slide:{content:``,revision:`na3eqd`,frontmatterRaw:`layout: default +title: "In words: An episode is a chain of states, actions and rewards" +`,note:``,title:`In words: An episode is a chain of states, actions and rewards`,index:16,noteHTML:``,images:[],raw:``,frontmatter:F,filepath:``,start:764,sourceIndex:16,id:16,no:17},__clicksContext:null,__preloaded:!1}),I=p({layout:`default`,core:!0,title:`The rule of the world: p(s′, r | s, a)`}),ht=u({get layout(){return I.layout},get transition(){return I.transition},get class(){return I.class},get clicks(){return I.clicks},get name(){return I.name},get preload(){return I.preload},slide:{content:``,revision:`nibqdv`,frontmatterRaw:`layout: default +core: true +title: "The rule of the world: p(s′, r | s, a)" +`,note:``,title:`The rule of the world: p(s′, r | s, a)`,index:17,noteHTML:``,images:[],raw:``,frontmatter:I,filepath:``,start:792,sourceIndex:17,id:17,no:18},__clicksContext:null,__preloaded:!1}),L=p({layout:`default`,title:`Reading the equation: the rule of the world`}),gt=u({get layout(){return L.layout},get transition(){return L.transition},get class(){return L.class},get clicks(){return L.clicks},get name(){return L.name},get preload(){return L.preload},slide:{content:``,revision:`zb8df6`,frontmatterRaw:`layout: default +title: "Reading the equation: the rule of the world" +`,note:``,title:`Reading the equation: the rule of the world`,index:18,noteHTML:``,images:[],raw:``,frontmatter:L,filepath:``,start:860,sourceIndex:18,id:18,no:19},__clicksContext:null,__preloaded:!1}),R=p({layout:`default`,title:`In words: The rule of the world: p(s′, r | s, a)`}),_t=u({get layout(){return R.layout},get transition(){return R.transition},get class(){return R.class},get clicks(){return R.clicks},get name(){return R.name},get preload(){return R.preload},slide:{content:``,revision:`gl1qax`,frontmatterRaw:`layout: default +title: "In words: The rule of the world: p(s′, r | s, a)" +`,note:``,title:`In words: The rule of the world: p(s′, r | s, a)`,index:19,noteHTML:``,images:[],raw:``,frontmatter:R,filepath:``,start:932,sourceIndex:19,id:19,no:20},__clicksContext:null,__preloaded:!1}),z=p({layout:`default`,title:`Refresher: an expected value is a weighted average`}),vt=u({get layout(){return z.layout},get transition(){return z.transition},get class(){return z.class},get clicks(){return z.clicks},get name(){return z.name},get preload(){return z.preload},slide:{content:``,revision:`o21acc`,frontmatterRaw:`layout: default +title: "Refresher: an expected value is a weighted average" +`,note:``,title:`Refresher: an expected value is a weighted average`,index:20,noteHTML:``,images:[],raw:``,frontmatter:z,filepath:``,start:958,sourceIndex:20,id:20,no:21},__clicksContext:null,__preloaded:!1}),B=p({layout:`default`,title:`In words: Refresher: an expected value is a weighted average`}),yt=u({get layout(){return B.layout},get transition(){return B.transition},get class(){return B.class},get clicks(){return B.clicks},get name(){return B.name},get preload(){return B.preload},slide:{content:``,revision:`-wzq1gg`,frontmatterRaw:`layout: default +title: "In words: Refresher: an expected value is a weighted average" +`,note:``,title:`In words: Refresher: an expected value is a weighted average`,index:21,noteHTML:``,images:[],raw:``,frontmatter:B,filepath:``,start:1021,sourceIndex:21,id:21,no:22},__clicksContext:null,__preloaded:!1}),V=p({layout:`default`,title:`Some tasks end, some never do`}),bt=u({get layout(){return V.layout},get transition(){return V.transition},get class(){return V.class},get clicks(){return V.clicks},get name(){return V.name},get preload(){return V.preload},slide:{content:``,revision:`-2z7jqb`,frontmatterRaw:`layout: default +title: Some tasks end, some never do +`,note:``,title:`Some tasks end, some never do`,index:22,noteHTML:``,images:[],raw:``,frontmatter:V,filepath:``,start:1048,sourceIndex:22,id:22,no:23},__clicksContext:null,__preloaded:!1}),H=p({layout:`default`,title:`In words: Some tasks end, some never do`}),xt=u({get layout(){return H.layout},get transition(){return H.transition},get class(){return H.class},get clicks(){return H.clicks},get name(){return H.name},get preload(){return H.preload},slide:{content:``,revision:`-y92uus`,frontmatterRaw:`layout: default +title: "In words: Some tasks end, some never do" +`,note:``,title:`In words: Some tasks end, some never do`,index:23,noteHTML:``,images:[],raw:``,frontmatter:H,filepath:``,start:1102,sourceIndex:23,id:23,no:24},__clicksContext:null,__preloaded:!1}),U=p({layout:`section`,index:`02`}),St=u({get layout(){return U.layout},get transition(){return U.transition},get class(){return U.class},get clicks(){return U.clicks},get name(){return U.name},get preload(){return U.preload},slide:{content:``,revision:`-qsjk1d`,frontmatterRaw:`layout: section +index: "02" +`,note:``,title:`The return and the discount`,level:1,index:24,noteHTML:``,images:[],raw:``,frontmatter:U,filepath:``,start:1127,sourceIndex:24,id:24,no:25},__clicksContext:null,__preloaded:!1}),W=p({layout:`default`,core:!0,title:`The return: add up what is still to come`,clicks:4}),Ct=u({get layout(){return W.layout},get transition(){return W.transition},get class(){return W.class},get clicks(){return W.clicks},get name(){return W.name},get preload(){return W.preload},slide:{content:``,revision:`smtuyn`,frontmatterRaw:`layout: default +core: true +title: "The return: add up what is still to come" +clicks: 4 +`,note:``,title:`The return: add up what is still to come`,index:25,noteHTML:``,images:[],raw:``,frontmatter:W,filepath:``,start:1148,sourceIndex:25,id:25,no:26},__clicksContext:null,__preloaded:!1}),G=p({layout:`default`,title:`Reading the equation: the return`}),wt=u({get layout(){return G.layout},get transition(){return G.transition},get class(){return G.class},get clicks(){return G.clicks},get name(){return G.name},get preload(){return G.preload},slide:{content:``,revision:`6fxtuq`,frontmatterRaw:`layout: default +title: "Reading the equation: the return" +`,note:``,title:`Reading the equation: the return`,index:26,noteHTML:``,images:[],raw:``,frontmatter:G,filepath:``,start:1206,sourceIndex:26,id:26,no:27},__clicksContext:null,__preloaded:!1}),K=p({layout:`default`,title:`In words: The return: add up what is still to come`}),Tt=u({get layout(){return K.layout},get transition(){return K.transition},get class(){return K.class},get clicks(){return K.clicks},get name(){return K.name},get preload(){return K.preload},slide:{content:``,revision:`-f3l2jr`,frontmatterRaw:`layout: default +title: "In words: The return: add up what is still to come" +`,note:``,title:`In words: The return: add up what is still to come`,index:27,noteHTML:``,images:[],raw:``,frontmatter:K,filepath:``,start:1266,sourceIndex:27,id:27,no:28},__clicksContext:null,__preloaded:!1}),q=p({layout:`interactive`,core:!0,heading:`Why discount? So the robot hurries`,title:`Why discount? So the robot hurries`,"aside-width":`16rem`}),Et=u({get layout(){return q.layout},get transition(){return q.transition},get class(){return q.class},get clicks(){return q.clicks},get name(){return q.name},get preload(){return q.preload},slide:{content:``,revision:`6yxmoi`,frontmatterRaw:`layout: interactive +core: true +heading: "Why discount? So the robot hurries" +title: "Why discount? So the robot hurries" +aside-width: 16rem +`,note:``,title:`Why discount? So the robot hurries`,index:28,noteHTML:``,images:[],raw:``,frontmatter:q,filepath:``,start:1291,sourceIndex:28,id:28,no:29},__clicksContext:null,__preloaded:!1}),J=p({layout:`default`,title:`In words: Why discount? So the robot hurries`}),Dt=u({get layout(){return J.layout},get transition(){return J.transition},get class(){return J.class},get clicks(){return J.clicks},get name(){return J.name},get preload(){return J.preload},slide:{content:``,revision:`-s1puen`,frontmatterRaw:`layout: default +title: "In words: Why discount? So the robot hurries" +`,note:``,title:`In words: Why discount? So the robot hurries`,index:29,noteHTML:``,images:[],raw:``,frontmatter:J,filepath:``,start:1344,sourceIndex:29,id:29,no:30},__clicksContext:null,__preloaded:!1}),Y=p({layout:`default`,title:`Going deeper: a reward now beats a reward later`}),Ot=u({get layout(){return Y.layout},get transition(){return Y.transition},get class(){return Y.class},get clicks(){return Y.clicks},get name(){return Y.name},get preload(){return Y.preload},slide:{content:``,revision:`-9bqz6f`,frontmatterRaw:`layout: default +title: "Going deeper: a reward now beats a reward later" +`,note:``,title:`Going deeper: a reward now beats a reward later`,index:30,noteHTML:``,images:[],raw:``,frontmatter:Y,filepath:``,start:1370,sourceIndex:30,id:30,no:31},__clicksContext:null,__preloaded:!1}),kt=p({layout:`default`,title:`In words: Going deeper: a reward now beats a reward later`}),At=u({get layout(){return kt.layout},get transition(){return kt.transition},get class(){return kt.class},get clicks(){return kt.clicks},get name(){return kt.name},get preload(){return kt.preload},slide:{content:``,revision:`-jo1w9w`,frontmatterRaw:`layout: default +title: "In words: Going deeper: a reward now beats a reward later" +`,note:``,title:`In words: Going deeper: a reward now beats a reward later`,index:31,noteHTML:``,images:[],raw:``,frontmatter:kt,filepath:``,start:1437,sourceIndex:31,id:31,no:32},__clicksContext:null,__preloaded:!1}),jt=p({layout:`default`,core:!0,title:`The return, one step at a time`}),Mt=u({get layout(){return jt.layout},get transition(){return jt.transition},get class(){return jt.class},get clicks(){return jt.clicks},get name(){return jt.name},get preload(){return jt.preload},slide:{content:``,revision:`18knwe`,frontmatterRaw:`layout: default +core: true +title: The return, one step at a time +`,note:``,title:`The return, one step at a time`,index:32,noteHTML:``,images:[],raw:``,frontmatter:jt,filepath:``,start:1461,sourceIndex:32,id:32,no:33},__clicksContext:null,__preloaded:!1}),Nt=p({layout:`default`,title:`In words: The return, one step at a time`}),Pt=u({get layout(){return Nt.layout},get transition(){return Nt.transition},get class(){return Nt.class},get clicks(){return Nt.clicks},get name(){return Nt.name},get preload(){return Nt.preload},slide:{content:``,revision:`cxbejs`,frontmatterRaw:`layout: default +title: "In words: The return, one step at a time" +`,note:``,title:`In words: The return, one step at a time`,index:33,noteHTML:``,images:[],raw:``,frontmatter:Nt,filepath:``,start:1537,sourceIndex:33,id:33,no:34},__clicksContext:null,__preloaded:!1}),Ft=p({layout:`section`,index:`03`}),It=u({get layout(){return Ft.layout},get transition(){return Ft.transition},get class(){return Ft.class},get clicks(){return Ft.clicks},get name(){return Ft.name},get preload(){return Ft.preload},slide:{content:``,revision:`veqdsp`,frontmatterRaw:`layout: section +index: "03" +`,note:``,title:`Policy and value`,level:1,index:34,noteHTML:``,images:[],raw:``,frontmatter:Ft,filepath:``,start:1564,sourceIndex:34,id:34,no:35},__clicksContext:null,__preloaded:!1}),Lt=p({layout:`default`,core:!0,title:`A policy: what to do in each cell`}),Rt=u({get layout(){return Lt.layout},get transition(){return Lt.transition},get class(){return Lt.class},get clicks(){return Lt.clicks},get name(){return Lt.name},get preload(){return Lt.preload},slide:{content:``,revision:`-93ui4n`,frontmatterRaw:`layout: default +core: true +title: "A policy: what to do in each cell" +`,note:``,title:`A policy: what to do in each cell`,index:35,noteHTML:``,images:[],raw:``,frontmatter:Lt,filepath:``,start:1585,sourceIndex:35,id:35,no:36},__clicksContext:null,__preloaded:!1}),zt=p({layout:`default`,title:`In words: A policy: what to do in each cell`}),Bt=u({get layout(){return zt.layout},get transition(){return zt.transition},get class(){return zt.class},get clicks(){return zt.clicks},get name(){return zt.name},get preload(){return zt.preload},slide:{content:``,revision:`eu9sur`,frontmatterRaw:`layout: default +title: "In words: A policy: what to do in each cell" +`,note:``,title:`In words: A policy: what to do in each cell`,index:36,noteHTML:``,images:[],raw:``,frontmatter:zt,filepath:``,start:1648,sourceIndex:36,id:36,no:37},__clicksContext:null,__preloaded:!1}),Vt=p({layout:`default`,core:!0,title:`The value of a cell: v(s)`}),Ht=u({get layout(){return Vt.layout},get transition(){return Vt.transition},get class(){return Vt.class},get clicks(){return Vt.clicks},get name(){return Vt.name},get preload(){return Vt.preload},slide:{content:``,revision:`-rinoxm`,frontmatterRaw:`layout: default +core: true +title: "The value of a cell: v(s)" +`,note:``,title:`The value of a cell: v(s)`,index:37,noteHTML:``,images:[],raw:``,frontmatter:Vt,filepath:``,start:1673,sourceIndex:37,id:37,no:38},__clicksContext:null,__preloaded:!1}),Ut=p({layout:`default`,title:`Reading the equation: the value of a cell`}),Wt=u({get layout(){return Ut.layout},get transition(){return Ut.transition},get class(){return Ut.class},get clicks(){return Ut.clicks},get name(){return Ut.name},get preload(){return Ut.preload},slide:{content:``,revision:`-jn2ljs`,frontmatterRaw:`layout: default +title: "Reading the equation: the value of a cell" +`,note:``,title:`Reading the equation: the value of a cell`,index:38,noteHTML:``,images:[],raw:``,frontmatter:Ut,filepath:``,start:1734,sourceIndex:38,id:38,no:39},__clicksContext:null,__preloaded:!1}),Gt=p({layout:`default`,title:`In words: The value of a cell: v(s)`}),Kt=u({get layout(){return Gt.layout},get transition(){return Gt.transition},get class(){return Gt.class},get clicks(){return Gt.clicks},get name(){return Gt.name},get preload(){return Gt.preload},slide:{content:``,revision:`4dxmq6`,frontmatterRaw:`layout: default +title: "In words: The value of a cell: v(s)" +`,note:``,title:`In words: The value of a cell: v(s)`,index:39,noteHTML:``,images:[],raw:``,frontmatter:Gt,filepath:``,start:1781,sourceIndex:39,id:39,no:40},__clicksContext:null,__preloaded:!1}),qt=p({layout:`default`,core:!0,title:`The value of a move: q(s, a)`}),Jt=u({get layout(){return qt.layout},get transition(){return qt.transition},get class(){return qt.class},get clicks(){return qt.clicks},get name(){return qt.name},get preload(){return qt.preload},slide:{content:``,revision:`5zx98d`,frontmatterRaw:`layout: default +core: true +title: "The value of a move: q(s, a)" +`,note:``,title:`The value of a move: q(s, a)`,index:40,noteHTML:``,images:[],raw:``,frontmatter:qt,filepath:``,start:1806,sourceIndex:40,id:40,no:41},__clicksContext:null,__preloaded:!1}),Yt=p({layout:`default`,title:`In words: The value of a move: q(s, a)`}),Xt=u({get layout(){return Yt.layout},get transition(){return Yt.transition},get class(){return Yt.class},get clicks(){return Yt.clicks},get name(){return Yt.name},get preload(){return Yt.preload},slide:{content:``,revision:`rqs9r6`,frontmatterRaw:`layout: default +title: "In words: The value of a move: q(s, a)" +`,note:``,title:`In words: The value of a move: q(s, a)`,index:41,noteHTML:``,images:[],raw:``,frontmatter:Yt,filepath:``,start:1879,sourceIndex:41,id:41,no:42},__clicksContext:null,__preloaded:!1}),Zt=p({layout:`default`,core:!0,title:`The Bellman equation`,clicks:5}),Qt=u({get layout(){return Zt.layout},get transition(){return Zt.transition},get class(){return Zt.class},get clicks(){return Zt.clicks},get name(){return Zt.name},get preload(){return Zt.preload},slide:{content:``,revision:`gb0pi2`,frontmatterRaw:`layout: default +core: true +title: The Bellman equation +clicks: 5 +`,note:``,title:`The Bellman equation`,index:42,noteHTML:``,images:[],raw:``,frontmatter:Zt,filepath:``,start:1905,sourceIndex:42,id:42,no:43},__clicksContext:null,__preloaded:!1}),$t=p({layout:`default`,title:`Reading the equation: the Bellman equation`}),en=u({get layout(){return $t.layout},get transition(){return $t.transition},get class(){return $t.class},get clicks(){return $t.clicks},get name(){return $t.name},get preload(){return $t.preload},slide:{content:``,revision:`-c2j47p`,frontmatterRaw:`layout: default +title: "Reading the equation: the Bellman equation" +`,note:``,title:`Reading the equation: the Bellman equation`,index:43,noteHTML:``,images:[],raw:``,frontmatter:$t,filepath:``,start:1987,sourceIndex:43,id:43,no:44},__clicksContext:null,__preloaded:!1}),tn=p({layout:`default`,title:`In words: The Bellman equation`}),nn=u({get layout(){return tn.layout},get transition(){return tn.transition},get class(){return tn.class},get clicks(){return tn.clicks},get name(){return tn.name},get preload(){return tn.preload},slide:{content:``,revision:`vj22bs`,frontmatterRaw:`layout: default +title: "In words: The Bellman equation" +`,note:``,title:`In words: The Bellman equation`,index:44,noteHTML:``,images:[],raw:``,frontmatter:tn,filepath:``,start:2070,sourceIndex:44,id:44,no:45},__clicksContext:null,__preloaded:!1}),rn=p({layout:`interactive`,core:!0,heading:`Value iteration: sweep until nothing changes`,title:`Value iteration: sweep until nothing changes`,"aside-width":`15rem`,clicks:4}),an=u({get layout(){return rn.layout},get transition(){return rn.transition},get class(){return rn.class},get clicks(){return rn.clicks},get name(){return rn.name},get preload(){return rn.preload},slide:{content:``,revision:`-r59nqy`,frontmatterRaw:`layout: interactive +core: true +heading: "Value iteration: sweep until nothing changes" +title: "Value iteration: sweep until nothing changes" +aside-width: 15rem +clicks: 4 +`,note:``,title:`Value iteration: sweep until nothing changes`,index:45,noteHTML:``,images:[],raw:``,frontmatter:rn,filepath:``,start:2095,sourceIndex:45,id:45,no:46},__clicksContext:null,__preloaded:!1}),on=p({layout:`default`,title:`In words: Value iteration: sweep until nothing changes`}),sn=u({get layout(){return on.layout},get transition(){return on.transition},get class(){return on.class},get clicks(){return on.clicks},get name(){return on.name},get preload(){return on.preload},slide:{content:``,revision:`-k6hb2c`,frontmatterRaw:`layout: default +title: "In words: Value iteration: sweep until nothing changes" +`,note:``,title:`In words: Value iteration: sweep until nothing changes`,index:46,noteHTML:``,images:[],raw:``,frontmatter:on,filepath:``,start:2148,sourceIndex:46,id:46,no:47},__clicksContext:null,__preloaded:!1}),cn=p({layout:`default`,core:!0,title:`The catch: value iteration needs the map`}),ln=u({get layout(){return cn.layout},get transition(){return cn.transition},get class(){return cn.class},get clicks(){return cn.clicks},get name(){return cn.name},get preload(){return cn.preload},slide:{content:``,revision:`no2pwt`,frontmatterRaw:`layout: default +core: true +title: "The catch: value iteration needs the map" +`,note:``,title:`The catch: value iteration needs the map`,index:47,noteHTML:``,images:[],raw:``,frontmatter:cn,filepath:``,start:2177,sourceIndex:47,id:47,no:48},__clicksContext:null,__preloaded:!1}),un=p({layout:`default`,title:`In words: The catch: value iteration needs the map`}),dn=u({get layout(){return un.layout},get transition(){return un.transition},get class(){return un.class},get clicks(){return un.clicks},get name(){return un.name},get preload(){return un.preload},slide:{content:``,revision:`-tgmvu3`,frontmatterRaw:`layout: default +title: "In words: The catch: value iteration needs the map" +`,note:``,title:`In words: The catch: value iteration needs the map`,index:48,noteHTML:``,images:[],raw:``,frontmatter:un,filepath:``,start:2239,sourceIndex:48,id:48,no:49},__clicksContext:null,__preloaded:!1}),fn=p({layout:`section`,index:`04`}),pn=u({get layout(){return fn.layout},get transition(){return fn.transition},get class(){return fn.class},get clicks(){return fn.clicks},get name(){return fn.name},get preload(){return fn.preload},slide:{content:``,revision:`-jczy8n`,frontmatterRaw:`layout: section +index: "04" +`,note:``,title:`Q-learning: no map needed`,level:1,index:49,noteHTML:``,images:[],raw:``,frontmatter:fn,filepath:``,start:2266,sourceIndex:49,id:49,no:50},__clicksContext:null,__preloaded:!1}),mn=p({layout:`default`,core:!0,title:`Plan with a map, or learn from experience`}),hn=u({get layout(){return mn.layout},get transition(){return mn.transition},get class(){return mn.class},get clicks(){return mn.clicks},get name(){return mn.name},get preload(){return mn.preload},slide:{content:``,revision:`-hu9bm9`,frontmatterRaw:`layout: default +core: true +title: Plan with a map, or learn from experience +`,note:``,title:`Plan with a map, or learn from experience`,index:50,noteHTML:``,images:[],raw:``,frontmatter:mn,filepath:``,start:2289,sourceIndex:50,id:50,no:51},__clicksContext:null,__preloaded:!1}),gn=p({layout:`default`,title:`In words: Plan with a map, or learn from experience`}),_n=u({get layout(){return gn.layout},get transition(){return gn.transition},get class(){return gn.class},get clicks(){return gn.clicks},get name(){return gn.name},get preload(){return gn.preload},slide:{content:``,revision:`kvxfri`,frontmatterRaw:`layout: default +title: "In words: Plan with a map, or learn from experience" +`,note:``,title:`In words: Plan with a map, or learn from experience`,index:51,noteHTML:``,images:[],raw:``,frontmatter:gn,filepath:``,start:2365,sourceIndex:51,id:51,no:52},__clicksContext:null,__preloaded:!1}),vn=p({layout:`default`,core:!0,title:`Start with a table of guesses`}),yn=u({get layout(){return vn.layout},get transition(){return vn.transition},get class(){return vn.class},get clicks(){return vn.clicks},get name(){return vn.name},get preload(){return vn.preload},slide:{content:``,revision:`88fupb`,frontmatterRaw:`layout: default +core: true +title: Start with a table of guesses +`,note:``,title:`Start with a table of guesses`,index:52,noteHTML:``,images:[],raw:``,frontmatter:vn,filepath:``,start:2388,sourceIndex:52,id:52,no:53},__clicksContext:null,__preloaded:!1}),bn=p({layout:`default`,title:`In words: Start with a table of guesses`}),xn=u({get layout(){return bn.layout},get transition(){return bn.transition},get class(){return bn.class},get clicks(){return bn.clicks},get name(){return bn.name},get preload(){return bn.preload},slide:{content:``,revision:`-ot16uq`,frontmatterRaw:`layout: default +title: "In words: Start with a table of guesses" +`,note:``,title:`In words: Start with a table of guesses`,index:53,noteHTML:``,images:[],raw:``,frontmatter:bn,filepath:``,start:2459,sourceIndex:53,id:53,no:54},__clicksContext:null,__preloaded:!1}),Sn=p({layout:`default`,core:!0,title:`Explore or exploit?`}),Cn=u({get layout(){return Sn.layout},get transition(){return Sn.transition},get class(){return Sn.class},get clicks(){return Sn.clicks},get name(){return Sn.name},get preload(){return Sn.preload},slide:{content:``,revision:`-d5r5ki`,frontmatterRaw:`layout: default +core: true +title: Explore or exploit? +`,note:``,title:`Explore or exploit?`,index:54,noteHTML:``,images:[],raw:``,frontmatter:Sn,filepath:``,start:2485,sourceIndex:54,id:54,no:55},__clicksContext:null,__preloaded:!1}),wn=p({layout:`default`,title:`In words: Explore or exploit?`}),Tn=u({get layout(){return wn.layout},get transition(){return wn.transition},get class(){return wn.class},get clicks(){return wn.clicks},get name(){return wn.name},get preload(){return wn.preload},slide:{content:``,revision:`-z34ab7`,frontmatterRaw:`layout: default +title: "In words: Explore or exploit?" +`,note:``,title:`In words: Explore or exploit?`,index:55,noteHTML:``,images:[],raw:``,frontmatter:wn,filepath:``,start:2546,sourceIndex:55,id:55,no:56},__clicksContext:null,__preloaded:!1}),En=p({layout:`interactive`,core:!0,heading:`ε-greedy: mostly the best, sometimes random`,title:`ε-greedy: mostly the best, sometimes random`,"aside-width":`16rem`}),Dn=u({get layout(){return En.layout},get transition(){return En.transition},get class(){return En.class},get clicks(){return En.clicks},get name(){return En.name},get preload(){return En.preload},slide:{content:``,revision:`-mav4l9`,frontmatterRaw:`layout: interactive +core: true +heading: "ε-greedy: mostly the best, sometimes random" +title: "ε-greedy: mostly the best, sometimes random" +aside-width: 16rem +`,note:``,title:`ε-greedy: mostly the best, sometimes random`,index:56,noteHTML:``,images:[],raw:``,frontmatter:En,filepath:``,start:2571,sourceIndex:56,id:56,no:57},__clicksContext:null,__preloaded:!1}),On=p({layout:`default`,title:`In words: ε-greedy: mostly the best, sometimes random`}),kn=u({get layout(){return On.layout},get transition(){return On.transition},get class(){return On.class},get clicks(){return On.clicks},get name(){return On.name},get preload(){return On.preload},slide:{content:``,revision:`-vch5g8`,frontmatterRaw:`layout: default +title: "In words: ε-greedy: mostly the best, sometimes random" +`,note:``,title:`In words: ε-greedy: mostly the best, sometimes random`,index:57,noteHTML:``,images:[],raw:``,frontmatter:On,filepath:``,start:2631,sourceIndex:57,id:57,no:58},__clicksContext:null,__preloaded:!1}),An=p({layout:`default`,core:!0,title:`The target: Bellman, with a real move`}),jn=u({get layout(){return An.layout},get transition(){return An.transition},get class(){return An.class},get clicks(){return An.clicks},get name(){return An.name},get preload(){return An.preload},slide:{content:``,revision:`-7nwttn`,frontmatterRaw:`layout: default +core: true +title: "The target: Bellman, with a real move" +`,note:``,title:`The target: Bellman, with a real move`,index:58,noteHTML:``,images:[],raw:``,frontmatter:An,filepath:``,start:2657,sourceIndex:58,id:58,no:59},__clicksContext:null,__preloaded:!1}),Mn=p({layout:`default`,title:`In words: The target: Bellman, with a real move`}),Nn=u({get layout(){return Mn.layout},get transition(){return Mn.transition},get class(){return Mn.class},get clicks(){return Mn.clicks},get name(){return Mn.name},get preload(){return Mn.preload},slide:{content:``,revision:`4os9qq`,frontmatterRaw:`layout: default +title: "In words: The target: Bellman, with a real move" +`,note:``,title:`In words: The target: Bellman, with a real move`,index:59,noteHTML:``,images:[],raw:``,frontmatter:Mn,filepath:``,start:2718,sourceIndex:59,id:59,no:60},__clicksContext:null,__preloaded:!1}),Pn=p({layout:`default`,core:!0,title:`The Q-learning update`}),Fn=u({get layout(){return Pn.layout},get transition(){return Pn.transition},get class(){return Pn.class},get clicks(){return Pn.clicks},get name(){return Pn.name},get preload(){return Pn.preload},slide:{content:``,revision:`-lnspp5`,frontmatterRaw:`layout: default +core: true +title: The Q-learning update +`,note:``,title:`The Q-learning update`,index:60,noteHTML:``,images:[],raw:``,frontmatter:Pn,filepath:``,start:2744,sourceIndex:60,id:60,no:61},__clicksContext:null,__preloaded:!1}),In=p({layout:`default`,core:!0,title:`Reading the equation: the Q-learning update`}),Ln=u({get layout(){return In.layout},get transition(){return In.transition},get class(){return In.class},get clicks(){return In.clicks},get name(){return In.name},get preload(){return In.preload},slide:{content:``,revision:`57pguq`,frontmatterRaw:`layout: default +core: true +title: "Reading the equation: the Q-learning update" +`,note:``,title:`Reading the equation: the Q-learning update`,index:61,noteHTML:``,images:[],raw:``,frontmatter:In,filepath:``,start:2816,sourceIndex:61,id:61,no:62},__clicksContext:null,__preloaded:!1}),Rn=p({layout:`default`,title:`In words: The Q-learning update`}),zn=u({get layout(){return Rn.layout},get transition(){return Rn.transition},get class(){return Rn.class},get clicks(){return Rn.clicks},get name(){return Rn.name},get preload(){return Rn.preload},slide:{content:``,revision:`st3n6p`,frontmatterRaw:`layout: default +title: "In words: The Q-learning update" +`,note:``,title:`In words: The Q-learning update`,index:62,noteHTML:``,images:[],raw:``,frontmatter:Rn,filepath:``,start:2876,sourceIndex:62,id:62,no:63},__clicksContext:null,__preloaded:!1}),Bn=p({layout:`default`,title:`Three updates by hand`}),Vn=u({get layout(){return Bn.layout},get transition(){return Bn.transition},get class(){return Bn.class},get clicks(){return Bn.clicks},get name(){return Bn.name},get preload(){return Bn.preload},slide:{content:``,revision:`nawzi1`,frontmatterRaw:`layout: default +title: Three updates by hand +`,note:``,title:`Three updates by hand`,index:63,noteHTML:``,images:[],raw:``,frontmatter:Bn,filepath:``,start:2902,sourceIndex:63,id:63,no:64},__clicksContext:null,__preloaded:!1}),Hn=p({layout:`default`,title:`In words: Three updates by hand`}),Un=u({get layout(){return Hn.layout},get transition(){return Hn.transition},get class(){return Hn.class},get clicks(){return Hn.clicks},get name(){return Hn.name},get preload(){return Hn.preload},slide:{content:``,revision:`sf16c6`,frontmatterRaw:`layout: default +title: "In words: Three updates by hand" +`,note:``,title:`In words: Three updates by hand`,index:64,noteHTML:``,images:[],raw:``,frontmatter:Hn,filepath:``,start:2968,sourceIndex:64,id:64,no:65},__clicksContext:null,__preloaded:!1}),Wn=p({layout:`interactive`,core:!0,heading:`Watch the robot learn`,title:`Watch the robot learn`,"aside-width":`15rem`}),Gn=u({get layout(){return Wn.layout},get transition(){return Wn.transition},get class(){return Wn.class},get clicks(){return Wn.clicks},get name(){return Wn.name},get preload(){return Wn.preload},slide:{content:``,revision:`wddh65`,frontmatterRaw:`layout: interactive +core: true +heading: Watch the robot learn +title: Watch the robot learn +aside-width: 15rem +`,note:``,title:`Watch the robot learn`,index:65,noteHTML:``,images:[],raw:``,frontmatter:Wn,filepath:``,start:2995,sourceIndex:65,id:65,no:66},__clicksContext:null,__preloaded:!1}),Kn=p({layout:`default`,title:`In words: Watch the robot learn`}),qn=u({get layout(){return Kn.layout},get transition(){return Kn.transition},get class(){return Kn.class},get clicks(){return Kn.clicks},get name(){return Kn.name},get preload(){return Kn.preload},slide:{content:``,revision:`-1b3h2d`,frontmatterRaw:`layout: default +title: "In words: Watch the robot learn" +`,note:``,title:`In words: Watch the robot learn`,index:66,noteHTML:``,images:[],raw:``,frontmatter:Kn,filepath:``,start:3063,sourceIndex:66,id:66,no:67},__clicksContext:null,__preloaded:!1}),Jn=p({layout:`default`,core:!0,title:`Poll: one fall, and then?`}),Yn=u({get layout(){return Jn.layout},get transition(){return Jn.transition},get class(){return Jn.class},get clicks(){return Jn.clicks},get name(){return Jn.name},get preload(){return Jn.preload},slide:{content:``,revision:`-lfs95j`,frontmatterRaw:`layout: default +core: true +title: "Poll: one fall, and then?" +`,note:``,title:`Poll: one fall, and then?`,index:67,noteHTML:``,images:[],raw:``,frontmatter:Jn,filepath:``,start:3090,sourceIndex:67,id:67,no:68},__clicksContext:null,__preloaded:!1}),Xn=p({layout:`default`,title:`In words: one fall, and then?`}),Zn=u({get layout(){return Xn.layout},get transition(){return Xn.transition},get class(){return Xn.class},get clicks(){return Xn.clicks},get name(){return Xn.name},get preload(){return Xn.preload},slide:{content:``,revision:`-7mv5x1`,frontmatterRaw:`layout: default +title: "In words: one fall, and then?" +`,note:``,title:`In words: one fall, and then?`,index:68,noteHTML:``,images:[],raw:``,frontmatter:Xn,filepath:``,start:3156,sourceIndex:68,id:68,no:69},__clicksContext:null,__preloaded:!1}),Qn=p({layout:`default`,title:`Going deeper: why Q-learning is called off-policy`}),$n=u({get layout(){return Qn.layout},get transition(){return Qn.transition},get class(){return Qn.class},get clicks(){return Qn.clicks},get name(){return Qn.name},get preload(){return Qn.preload},slide:{content:``,revision:`-th9s0c`,frontmatterRaw:`layout: default +title: "Going deeper: why Q-learning is called off-policy" +`,note:``,title:`Going deeper: why Q-learning is called off-policy`,index:69,noteHTML:``,images:[],raw:``,frontmatter:Qn,filepath:``,start:3182,sourceIndex:69,id:69,no:70},__clicksContext:null,__preloaded:!1}),er=p({layout:`default`,title:`In words: Going deeper: why Q-learning is called off-policy`}),tr=u({get layout(){return er.layout},get transition(){return er.transition},get class(){return er.class},get clicks(){return er.clicks},get name(){return er.name},get preload(){return er.preload},slide:{content:``,revision:`dymq8x`,frontmatterRaw:`layout: default +title: "In words: Going deeper: why Q-learning is called off-policy" +`,note:``,title:`In words: Going deeper: why Q-learning is called off-policy`,index:70,noteHTML:``,images:[],raw:``,frontmatter:er,filepath:``,start:3242,sourceIndex:70,id:70,no:71},__clicksContext:null,__preloaded:!1}),nr=p({layout:`section`,index:`05`}),rr=u({get layout(){return nr.layout},get transition(){return nr.transition},get class(){return nr.class},get clicks(){return nr.clicks},get name(){return nr.name},get preload(){return nr.preload},slide:{content:``,revision:`-n2ujvt`,frontmatterRaw:`layout: section +index: "05" +`,note:``,title:`Deep Q-networks`,level:1,index:71,noteHTML:``,images:[],raw:``,frontmatter:nr,filepath:``,start:3267,sourceIndex:71,id:71,no:72},__clicksContext:null,__preloaded:!1}),ir=p({layout:`default`,core:!0,title:`When the table gets too big`}),ar=u({get layout(){return ir.layout},get transition(){return ir.transition},get class(){return ir.class},get clicks(){return ir.clicks},get name(){return ir.name},get preload(){return ir.preload},slide:{content:``,revision:`3l04m9`,frontmatterRaw:`layout: default +core: true +title: When the table gets too big +`,note:``,title:`When the table gets too big`,index:72,noteHTML:``,images:[],raw:``,frontmatter:ir,filepath:``,start:3289,sourceIndex:72,id:72,no:73},__clicksContext:null,__preloaded:!1}),or=p({layout:`default`,title:`In words: When the table gets too big`}),sr=u({get layout(){return or.layout},get transition(){return or.transition},get class(){return or.class},get clicks(){return or.clicks},get name(){return or.name},get preload(){return or.preload},slide:{content:``,revision:`8yclrn`,frontmatterRaw:`layout: default +title: "In words: When the table gets too big" +`,note:``,title:`In words: When the table gets too big`,index:73,noteHTML:``,images:[],raw:``,frontmatter:or,filepath:``,start:3351,sourceIndex:73,id:73,no:74},__clicksContext:null,__preloaded:!1}),cr=p({layout:`default`,core:!0,title:`A network instead of a table`}),lr=u({get layout(){return cr.layout},get transition(){return cr.transition},get class(){return cr.class},get clicks(){return cr.clicks},get name(){return cr.name},get preload(){return cr.preload},slide:{content:``,revision:`-3g77og`,frontmatterRaw:`layout: default +core: true +title: A network instead of a table +`,note:``,title:`A network instead of a table`,index:74,noteHTML:``,images:[],raw:``,frontmatter:cr,filepath:``,start:3375,sourceIndex:74,id:74,no:75},__clicksContext:null,__preloaded:!1}),ur=p({layout:`default`,title:`In words: A network instead of a table`}),dr=u({get layout(){return ur.layout},get transition(){return ur.transition},get class(){return ur.class},get clicks(){return ur.clicks},get name(){return ur.name},get preload(){return ur.preload},slide:{content:``,revision:`dnqw52`,frontmatterRaw:`layout: default +title: "In words: A network instead of a table" +`,note:``,title:`In words: A network instead of a table`,index:75,noteHTML:``,images:[],raw:``,frontmatter:ur,filepath:``,start:3451,sourceIndex:75,id:75,no:76},__clicksContext:null,__preloaded:!1}),fr=p({layout:`default`,title:`Going deeper: the network that played Atari`}),pr=u({get layout(){return fr.layout},get transition(){return fr.transition},get class(){return fr.class},get clicks(){return fr.clicks},get name(){return fr.name},get preload(){return fr.preload},slide:{content:``,revision:`-i8iz6d`,frontmatterRaw:`layout: default +title: "Going deeper: the network that played Atari" +`,note:``,title:`Going deeper: the network that played Atari`,index:76,noteHTML:``,images:[],raw:``,frontmatter:fr,filepath:``,start:3477,sourceIndex:76,id:76,no:77},__clicksContext:null,__preloaded:!1}),mr=p({layout:`default`,title:`In words: Going deeper: the network that played Atari`}),hr=u({get layout(){return mr.layout},get transition(){return mr.transition},get class(){return mr.class},get clicks(){return mr.clicks},get name(){return mr.name},get preload(){return mr.preload},slide:{content:``,revision:`-l4k7m2`,frontmatterRaw:`layout: default +title: "In words: Going deeper: the network that played Atari" +`,note:``,title:`In words: Going deeper: the network that played Atari`,index:77,noteHTML:``,images:[],raw:``,frontmatter:mr,filepath:``,start:3535,sourceIndex:77,id:77,no:78},__clicksContext:null,__preloaded:!1}),gr=p({layout:`default`,core:!0,title:`Two problems when a network learns from its own moves`}),_r=u({get layout(){return gr.layout},get transition(){return gr.transition},get class(){return gr.class},get clicks(){return gr.clicks},get name(){return gr.name},get preload(){return gr.preload},slide:{content:``,revision:`jjwosg`,frontmatterRaw:`layout: default +core: true +title: Two problems when a network learns from its own moves +`,note:``,title:`Two problems when a network learns from its own moves`,index:78,noteHTML:``,images:[],raw:``,frontmatter:gr,filepath:``,start:3562,sourceIndex:78,id:78,no:79},__clicksContext:null,__preloaded:!1}),vr=p({layout:`default`,title:`In words: Two problems when a network learns from its own moves`}),yr=u({get layout(){return vr.layout},get transition(){return vr.transition},get class(){return vr.class},get clicks(){return vr.clicks},get name(){return vr.name},get preload(){return vr.preload},slide:{content:``,revision:`-abcg03`,frontmatterRaw:`layout: default +title: "In words: Two problems when a network learns from its own moves" +`,note:``,title:`In words: Two problems when a network learns from its own moves`,index:79,noteHTML:``,images:[],raw:``,frontmatter:vr,filepath:``,start:3634,sourceIndex:79,id:79,no:80},__clicksContext:null,__preloaded:!1}),br=p({layout:`default`,core:!0,title:`Fix 1: experience replay`}),xr=u({get layout(){return br.layout},get transition(){return br.transition},get class(){return br.class},get clicks(){return br.clicks},get name(){return br.name},get preload(){return br.preload},slide:{content:``,revision:`-urocv7`,frontmatterRaw:`layout: default +core: true +title: "Fix 1: experience replay" +`,note:``,title:`Fix 1: experience replay`,index:80,noteHTML:``,images:[],raw:``,frontmatter:br,filepath:``,start:3660,sourceIndex:80,id:80,no:81},__clicksContext:null,__preloaded:!1}),Sr=p({layout:`default`,title:`In words: Fix 1: experience replay`}),Cr=u({get layout(){return Sr.layout},get transition(){return Sr.transition},get class(){return Sr.class},get clicks(){return Sr.clicks},get name(){return Sr.name},get preload(){return Sr.preload},slide:{content:``,revision:`xb016a`,frontmatterRaw:`layout: default +title: "In words: Fix 1: experience replay" +`,note:``,title:`In words: Fix 1: experience replay`,index:81,noteHTML:``,images:[],raw:``,frontmatter:Sr,filepath:``,start:3740,sourceIndex:81,id:81,no:82},__clicksContext:null,__preloaded:!1}),wr=p({layout:`default`,core:!0,title:`Fix 2: a target network`}),Tr=u({get layout(){return wr.layout},get transition(){return wr.transition},get class(){return wr.class},get clicks(){return wr.clicks},get name(){return wr.name},get preload(){return wr.preload},slide:{content:``,revision:`p337tc`,frontmatterRaw:`layout: default +core: true +title: "Fix 2: a target network" +`,note:``,title:`Fix 2: a target network`,index:82,noteHTML:``,images:[],raw:``,frontmatter:wr,filepath:``,start:3765,sourceIndex:82,id:82,no:83},__clicksContext:null,__preloaded:!1}),Er=p({layout:`default`,title:`In words: Fix 2: a target network`}),Dr=u({get layout(){return Er.layout},get transition(){return Er.transition},get class(){return Er.class},get clicks(){return Er.clicks},get name(){return Er.name},get preload(){return Er.preload},slide:{content:``,revision:`soxbwq`,frontmatterRaw:`layout: default +title: "In words: Fix 2: a target network" +`,note:``,title:`In words: Fix 2: a target network`,index:83,noteHTML:``,images:[],raw:``,frontmatter:Er,filepath:``,start:3838,sourceIndex:83,id:83,no:84},__clicksContext:null,__preloaded:!1}),Or=p({layout:`default`,core:!0,title:`The DQN loss`}),kr=u({get layout(){return Or.layout},get transition(){return Or.transition},get class(){return Or.class},get clicks(){return Or.clicks},get name(){return Or.name},get preload(){return Or.preload},slide:{content:``,revision:`-awy7b6`,frontmatterRaw:`layout: default +core: true +title: The DQN loss +`,note:``,title:`The DQN loss`,index:84,noteHTML:``,images:[],raw:``,frontmatter:Or,filepath:``,start:3864,sourceIndex:84,id:84,no:85},__clicksContext:null,__preloaded:!1}),Ar=p({layout:`default`,title:`Reading the equation: the DQN loss`}),jr=u({get layout(){return Ar.layout},get transition(){return Ar.transition},get class(){return Ar.class},get clicks(){return Ar.clicks},get name(){return Ar.name},get preload(){return Ar.preload},slide:{content:``,revision:`-cip95z`,frontmatterRaw:`layout: default +title: "Reading the equation: the DQN loss" +`,note:``,title:`Reading the equation: the DQN loss`,index:85,noteHTML:``,images:[],raw:``,frontmatter:Ar,filepath:``,start:3950,sourceIndex:85,id:85,no:86},__clicksContext:null,__preloaded:!1}),Mr=p({layout:`default`,title:`In words: The DQN loss`}),Nr=u({get layout(){return Mr.layout},get transition(){return Mr.transition},get class(){return Mr.class},get clicks(){return Mr.clicks},get name(){return Mr.name},get preload(){return Mr.preload},slide:{content:``,revision:`psy0fr`,frontmatterRaw:`layout: default +title: "In words: The DQN loss" +`,note:``,title:`In words: The DQN loss`,index:86,noteHTML:``,images:[],raw:``,frontmatter:Mr,filepath:``,start:4004,sourceIndex:86,id:86,no:87},__clicksContext:null,__preloaded:!1}),Pr=p({layout:`interactive`,core:!0,heading:`The DQN loop, stage by stage`,title:`The DQN loop, stage by stage`,"aside-width":`13rem`,clicks:8}),Fr=u({get layout(){return Pr.layout},get transition(){return Pr.transition},get class(){return Pr.class},get clicks(){return Pr.clicks},get name(){return Pr.name},get preload(){return Pr.preload},slide:{content:``,revision:`nwz4h7`,frontmatterRaw:`layout: interactive +core: true +heading: The DQN loop, stage by stage +title: The DQN loop, stage by stage +aside-width: 13rem +clicks: 8 +`,note:``,title:`The DQN loop, stage by stage`,index:87,noteHTML:``,images:[],raw:``,frontmatter:Pr,filepath:``,start:4029,sourceIndex:87,id:87,no:88},__clicksContext:null,__preloaded:!1}),Ir=p({layout:`default`,title:`In words: The DQN loop, stage by stage`}),Lr=u({get layout(){return Ir.layout},get transition(){return Ir.transition},get class(){return Ir.class},get clicks(){return Ir.clicks},get name(){return Ir.name},get preload(){return Ir.preload},slide:{content:``,revision:`fvwgr7`,frontmatterRaw:`layout: default +title: "In words: The DQN loop, stage by stage" +`,note:``,title:`In words: The DQN loop, stage by stage`,index:88,noteHTML:``,images:[],raw:``,frontmatter:Ir,filepath:``,start:4090,sourceIndex:88,id:88,no:89},__clicksContext:null,__preloaded:!1}),Rr=p({layout:`default`,core:!0,title:`In PyTorch: the network and the action`}),zr=u({get layout(){return Rr.layout},get transition(){return Rr.transition},get class(){return Rr.class},get clicks(){return Rr.clicks},get name(){return Rr.name},get preload(){return Rr.preload},slide:{content:``,revision:`o3t5x8`,frontmatterRaw:`layout: default +core: true +title: "In PyTorch: the network and the action" +`,note:``,title:`In PyTorch: the network and the action`,index:89,noteHTML:``,images:[],raw:``,frontmatter:Rr,filepath:``,start:4117,sourceIndex:89,id:89,no:90},__clicksContext:null,__preloaded:!1}),Br=p({layout:`default`,title:`In words: In PyTorch: the network and the action`}),Vr=u({get layout(){return Br.layout},get transition(){return Br.transition},get class(){return Br.class},get clicks(){return Br.clicks},get name(){return Br.name},get preload(){return Br.preload},slide:{content:``,revision:`c6kwx2`,frontmatterRaw:`layout: default +title: "In words: In PyTorch: the network and the action" +`,note:``,title:`In words: In PyTorch: the network and the action`,index:90,noteHTML:``,images:[],raw:``,frontmatter:Br,filepath:``,start:4176,sourceIndex:90,id:90,no:91},__clicksContext:null,__preloaded:!1}),Hr=p({layout:`default`,title:`In PyTorch: the replay buffer`}),Ur=u({get layout(){return Hr.layout},get transition(){return Hr.transition},get class(){return Hr.class},get clicks(){return Hr.clicks},get name(){return Hr.name},get preload(){return Hr.preload},slide:{content:``,revision:`lhy646`,frontmatterRaw:`layout: default +title: "In PyTorch: the replay buffer" +`,note:``,title:`In PyTorch: the replay buffer`,index:91,noteHTML:``,images:[],raw:``,frontmatter:Hr,filepath:``,start:4200,sourceIndex:91,id:91,no:92},__clicksContext:null,__preloaded:!1}),Wr=p({layout:`default`,title:`In words: In PyTorch: the replay buffer`}),Gr=u({get layout(){return Wr.layout},get transition(){return Wr.transition},get class(){return Wr.class},get clicks(){return Wr.clicks},get name(){return Wr.name},get preload(){return Wr.preload},slide:{content:``,revision:`-ca6ufk`,frontmatterRaw:`layout: default +title: "In words: In PyTorch: the replay buffer" +`,note:``,title:`In words: In PyTorch: the replay buffer`,index:92,noteHTML:``,images:[],raw:``,frontmatter:Wr,filepath:``,start:4260,sourceIndex:92,id:92,no:93},__clicksContext:null,__preloaded:!1}),Kr=p({layout:`default`,core:!0,title:`In PyTorch: one training step`}),qr=u({get layout(){return Kr.layout},get transition(){return Kr.transition},get class(){return Kr.class},get clicks(){return Kr.clicks},get name(){return Kr.name},get preload(){return Kr.preload},slide:{content:``,revision:`-gcthx4`,frontmatterRaw:`layout: default +core: true +title: "In PyTorch: one training step" +`,note:``,title:`In PyTorch: one training step`,index:93,noteHTML:``,images:[],raw:``,frontmatter:Kr,filepath:``,start:4284,sourceIndex:93,id:93,no:94},__clicksContext:null,__preloaded:!1}),Jr=p({layout:`default`,title:`In words: In PyTorch: one training step`}),Yr=u({get layout(){return Jr.layout},get transition(){return Jr.transition},get class(){return Jr.class},get clicks(){return Jr.clicks},get name(){return Jr.name},get preload(){return Jr.preload},slide:{content:``,revision:`5so07c`,frontmatterRaw:`layout: default +title: "In words: In PyTorch: one training step" +`,note:``,title:`In words: In PyTorch: one training step`,index:94,noteHTML:``,images:[],raw:``,frontmatter:Jr,filepath:``,start:4347,sourceIndex:94,id:94,no:95},__clicksContext:null,__preloaded:!1}),Xr=p({layout:`default`,title:`Going deeper: the whole loop, on CartPole`}),Zr=u({get layout(){return Xr.layout},get transition(){return Xr.transition},get class(){return Xr.class},get clicks(){return Xr.clicks},get name(){return Xr.name},get preload(){return Xr.preload},slide:{content:``,revision:`-ol5b57`,frontmatterRaw:`layout: default +title: "Going deeper: the whole loop, on CartPole" +`,note:``,title:`Going deeper: the whole loop, on CartPole`,index:95,noteHTML:``,images:[],raw:``,frontmatter:Xr,filepath:``,start:4373,sourceIndex:95,id:95,no:96},__clicksContext:null,__preloaded:!1}),Qr=p({layout:`default`,title:`In words: Going deeper: the whole loop, on CartPole`}),$r=u({get layout(){return Qr.layout},get transition(){return Qr.transition},get class(){return Qr.class},get clicks(){return Qr.clicks},get name(){return Qr.name},get preload(){return Qr.preload},slide:{content:``,revision:`-yeqamr`,frontmatterRaw:`layout: default +title: "In words: Going deeper: the whole loop, on CartPole" +`,note:``,title:`In words: Going deeper: the whole loop, on CartPole`,index:96,noteHTML:``,images:[],raw:``,frontmatter:Qr,filepath:``,start:4445,sourceIndex:96,id:96,no:97},__clicksContext:null,__preloaded:!1}),ei=p({layout:`default`,core:!0,title:`What DQN achieved, and where it stops`}),ti=u({get layout(){return ei.layout},get transition(){return ei.transition},get class(){return ei.class},get clicks(){return ei.clicks},get name(){return ei.name},get preload(){return ei.preload},slide:{content:``,revision:`-v5cb2x`,frontmatterRaw:`layout: default +core: true +title: What DQN achieved, and where it stops +`,note:``,title:`What DQN achieved, and where it stops`,index:97,noteHTML:``,images:[],raw:``,frontmatter:ei,filepath:``,start:4471,sourceIndex:97,id:97,no:98},__clicksContext:null,__preloaded:!1}),X=p({layout:`default`,title:`In words: What DQN achieved, and where it stops`}),ni=u({get layout(){return X.layout},get transition(){return X.transition},get class(){return X.class},get clicks(){return X.clicks},get name(){return X.name},get preload(){return X.preload},slide:{content:``,revision:`-rsxflw`,frontmatterRaw:`layout: default +title: "In words: What DQN achieved, and where it stops" +`,note:``,title:`In words: What DQN achieved, and where it stops`,index:98,noteHTML:``,images:[],raw:``,frontmatter:X,filepath:``,start:4543,sourceIndex:98,id:98,no:99},__clicksContext:null,__preloaded:!1}),ri=p({layout:`section`,index:`06`}),ii=u({get layout(){return ri.layout},get transition(){return ri.transition},get class(){return ri.class},get clicks(){return ri.clicks},get name(){return ri.name},get preload(){return ri.preload},slide:{content:``,revision:`xabb7e`,frontmatterRaw:`layout: section +index: "06" +`,note:``,title:`Recap`,level:1,index:99,noteHTML:``,images:[],raw:``,frontmatter:ri,filepath:``,start:4567,sourceIndex:99,id:99,no:100},__clicksContext:null,__preloaded:!1}),ai=p({layout:`default`,core:!0,title:`Four ideas, one robot`}),oi=u({get layout(){return ai.layout},get transition(){return ai.transition},get class(){return ai.class},get clicks(){return ai.clicks},get name(){return ai.name},get preload(){return ai.preload},slide:{content:``,revision:`-o1lt6r`,frontmatterRaw:`layout: default +core: true +title: Four ideas, one robot +`,note:``,title:`Four ideas, one robot`,index:100,noteHTML:``,images:[],raw:``,frontmatter:ai,filepath:``,start:4583,sourceIndex:100,id:100,no:101},__clicksContext:null,__preloaded:!1}),si=p({layout:`default`,title:`In words: Four ideas, one robot`}),ci=u({get layout(){return si.layout},get transition(){return si.transition},get class(){return si.class},get clicks(){return si.clicks},get name(){return si.name},get preload(){return si.preload},slide:{content:``,revision:`-igdftc`,frontmatterRaw:`layout: default +title: "In words: Four ideas, one robot" +`,note:``,title:`In words: Four ideas, one robot`,index:101,noteHTML:``,images:[],raw:``,frontmatter:si,filepath:``,start:4658,sourceIndex:101,id:101,no:102},__clicksContext:null,__preloaded:!1}),li=p({layout:`default`,title:`Reading and things to try`}),ui=u({get layout(){return li.layout},get transition(){return li.transition},get class(){return li.class},get clicks(){return li.clicks},get name(){return li.name},get preload(){return li.preload},slide:{content:``,revision:`dq8pvq`,frontmatterRaw:`layout: default +title: Reading and things to try +`,note:``,title:`Reading and things to try`,index:102,noteHTML:``,images:[],raw:``,frontmatter:li,filepath:``,start:4684,sourceIndex:102,id:102,no:103},__clicksContext:null,__preloaded:!1}),di=p({layout:`default`,title:`In words: Reading and things to try`}),fi=u({get layout(){return di.layout},get transition(){return di.transition},get class(){return di.class},get clicks(){return di.clicks},get name(){return di.name},get preload(){return di.preload},slide:{content:``,revision:`3ins9j`,frontmatterRaw:`layout: default +title: "In words: Reading and things to try" +`,note:``,title:`In words: Reading and things to try`,index:103,noteHTML:``,images:[],raw:``,frontmatter:di,filepath:``,start:4741,sourceIndex:103,id:103,no:104},__clicksContext:null,__preloaded:!1}),pi=p({layout:`end`,email:`vajira@simula.no`}),mi=u({get layout(){return pi.layout},get transition(){return pi.transition},get class(){return pi.class},get clicks(){return pi.clicks},get name(){return pi.name},get preload(){return pi.preload},slide:{content:``,revision:`-d3vbrx`,frontmatterRaw:`layout: end +email: vajira@simula.no +`,note:``,title:`Questions?`,level:1,index:104,noteHTML:``,images:[],raw:``,frontmatter:pi,filepath:``,start:4766,sourceIndex:104,id:104,no:105},__clicksContext:null,__preloaded:!1}),Z=Array(105),Q=(e,t)=>re({loader:t,delay:300,loadingComponent:Ze,errorComponent:v,onError:t=>console.error(`Failed to load slide `+(e+1),t)}),hi=async()=>{try{return Z[0]??=await _(()=>import(`./md-DFkbKXSo.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},gi=async()=>{try{return Z[1]??=await _(()=>import(`./md-pFjrzahN2.js`),__vite__mapDeps([11,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_i=async()=>{try{return Z[2]??=await _(()=>import(`./md-DHODWU9R.js`),__vite__mapDeps([23,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},vi=async()=>{try{return Z[3]??=await _(()=>import(`./md-DPJgeVRt2.js`),__vite__mapDeps([24,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},yi=async()=>{try{return Z[4]??=await _(()=>import(`./md-GvEn7lJR.js`),__vite__mapDeps([27,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},bi=async()=>{try{return Z[5]??=await _(()=>import(`./md-DOVVkhja.js`),__vite__mapDeps([29,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xi=async()=>{try{return Z[6]??=await _(()=>import(`./md-D78P-CVF.js`),__vite__mapDeps([30,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Si=async()=>{try{return Z[7]??=await _(()=>import(`./md-BTt_dRtv2.js`),__vite__mapDeps([31,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ci=async()=>{try{return Z[8]??=await _(()=>import(`./md-DF15gv0p2.js`),__vite__mapDeps([32,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wi=async()=>{try{return Z[9]??=await _(()=>import(`./md-Cpligg9D.js`),__vite__mapDeps([33,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ti=async()=>{try{return Z[10]??=await _(()=>import(`./md-BjLiGZe7.js`),__vite__mapDeps([34,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ei=async()=>{try{return Z[11]??=await _(()=>import(`./md-BoUgDoJP.js`),__vite__mapDeps([35,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Di=async()=>{try{return Z[12]??=await _(()=>import(`./md-YUWOF7of.js`),__vite__mapDeps([36,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22,37,28,38]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Oi=async()=>{try{return Z[13]??=await _(()=>import(`./md-TKUiOOmA.js`),__vite__mapDeps([39,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ki=async()=>{try{return Z[14]??=await _(()=>import(`./md-Bz5Zd8AS.js`),__vite__mapDeps([40,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ai=async()=>{try{return Z[15]??=await _(()=>import(`./md-CO0h-U_E.js`),__vite__mapDeps([41,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ji=async()=>{try{return Z[16]??=await _(()=>import(`./md-qI5Gn-4r.js`),__vite__mapDeps([42,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Mi=async()=>{try{return Z[17]??=await _(()=>import(`./md-l6R6jPGW.js`),__vite__mapDeps([43,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ni=async()=>{try{return Z[18]??=await _(()=>import(`./md-DxEIUlRz.js`),__vite__mapDeps([45,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pi=async()=>{try{return Z[19]??=await _(()=>import(`./md-Bu3XUXeA.js`),__vite__mapDeps([46,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fi=async()=>{try{return Z[20]??=await _(()=>import(`./md-DwcCo75s.js`),__vite__mapDeps([47,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ii=async()=>{try{return Z[21]??=await _(()=>import(`./md-C9dA0XC0.js`),__vite__mapDeps([48,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Li=async()=>{try{return Z[22]??=await _(()=>import(`./md-X6pHqlXs.js`),__vite__mapDeps([49,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ri=async()=>{try{return Z[23]??=await _(()=>import(`./md-DImml7fy2.js`),__vite__mapDeps([50,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},zi=async()=>{try{return Z[24]??=await _(()=>import(`./md-WQ4TFyjA.js`),__vite__mapDeps([51,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Bi=async()=>{try{return Z[25]??=await _(()=>import(`./md-Q973zyBX.js`),__vite__mapDeps([52,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Vi=async()=>{try{return Z[26]??=await _(()=>import(`./md-D7EmREcg2.js`),__vite__mapDeps([53,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Hi=async()=>{try{return Z[27]??=await _(()=>import(`./md-C4XXUyXo2.js`),__vite__mapDeps([54,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ui=async()=>{try{return Z[28]??=await _(()=>import(`./md-B9C145sD2.js`),__vite__mapDeps([55,1,2,3,4,5,6,8,28,16,15,17,56,57,58,59,60,13,14,18,19,61,62]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wi=async()=>{try{return Z[29]??=await _(()=>import(`./md-Bx6ObLYd2.js`),__vite__mapDeps([63,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Gi=async()=>{try{return Z[30]??=await _(()=>import(`./md-Crf0QqO82.js`),__vite__mapDeps([64,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ki=async()=>{try{return Z[31]??=await _(()=>import(`./md-ClcrnWUb.js`),__vite__mapDeps([65,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},qi=async()=>{try{return Z[32]??=await _(()=>import(`./md-BY5B4RFF2.js`),__vite__mapDeps([66,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ji=async()=>{try{return Z[33]??=await _(()=>import(`./md-CChtMD7Z2.js`),__vite__mapDeps([67,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Yi=async()=>{try{return Z[34]??=await _(()=>import(`./md-C_djKWOA2.js`),__vite__mapDeps([68,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Xi=async()=>{try{return Z[35]??=await _(()=>import(`./md-BuPoDN-Y2.js`),__vite__mapDeps([69,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Zi=async()=>{try{return Z[36]??=await _(()=>import(`./md-C0kU9PLe2.js`),__vite__mapDeps([70,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Qi=async()=>{try{return Z[37]??=await _(()=>import(`./md-DGATRVqO.js`),__vite__mapDeps([71,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},$i=async()=>{try{return Z[38]??=await _(()=>import(`./md-CBwC-ryo2.js`),__vite__mapDeps([72,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ea=async()=>{try{return Z[39]??=await _(()=>import(`./md-Ck5yC0i3.js`),__vite__mapDeps([73,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ta=async()=>{try{return Z[40]??=await _(()=>import(`./md-X2RPTEil.js`),__vite__mapDeps([74,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},na=async()=>{try{return Z[41]??=await _(()=>import(`./md-C76Txys_.js`),__vite__mapDeps([75,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ra=async()=>{try{return Z[42]??=await _(()=>import(`./md-3KgA1lqP.js`),__vite__mapDeps([76,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ia=async()=>{try{return Z[43]??=await _(()=>import(`./md-oSmNAz51.js`),__vite__mapDeps([77,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},aa=async()=>{try{return Z[44]??=await _(()=>import(`./md-F2Pj1FPG.js`),__vite__mapDeps([78,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},oa=async()=>{try{return Z[45]??=await _(()=>import(`./md-DN8ICbIE.js`),__vite__mapDeps([79,1,2,3,4,5,6,8,7,9,28,16,15,17,56,57,60,13,14,18,19,61,80,81,82]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},sa=async()=>{try{return Z[46]??=await _(()=>import(`./md-BX1wWMGz.js`),__vite__mapDeps([83,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ca=async()=>{try{return Z[47]??=await _(()=>import(`./md-0nitP_As.js`),__vite__mapDeps([84,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},la=async()=>{try{return Z[48]??=await _(()=>import(`./md-CF_gH_Jj.js`),__vite__mapDeps([85,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ua=async()=>{try{return Z[49]??=await _(()=>import(`./md-DVi-Y4NQ.js`),__vite__mapDeps([86,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},da=async()=>{try{return Z[50]??=await _(()=>import(`./md-CB5a4GuA.js`),__vite__mapDeps([87,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fa=async()=>{try{return Z[51]??=await _(()=>import(`./md-C0YOeXvT.js`),__vite__mapDeps([88,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},pa=async()=>{try{return Z[52]??=await _(()=>import(`./md-BsteAPDC.js`),__vite__mapDeps([89,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ma=async()=>{try{return Z[53]??=await _(()=>import(`./md-Bnu9_G7n.js`),__vite__mapDeps([90,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ha=async()=>{try{return Z[54]??=await _(()=>import(`./md-Du9GpJ-U.js`),__vite__mapDeps([91,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ga=async()=>{try{return Z[55]??=await _(()=>import(`./md-6UsQlhb2.js`),__vite__mapDeps([92,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},_a=async()=>{try{return Z[56]??=await _(()=>import(`./md-Y9Z16ykm.js`),__vite__mapDeps([93,1,2,3,4,5,6,8,28,16,15,17,56,57,58,59,60,13,14,18,19,61,94]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},va=async()=>{try{return Z[57]??=await _(()=>import(`./md-B2pb5v7i.js`),__vite__mapDeps([95,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ya=async()=>{try{return Z[58]??=await _(()=>import(`./md-B_GRqzbq.js`),__vite__mapDeps([96,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ba=async()=>{try{return Z[59]??=await _(()=>import(`./md-BIV2xOUh.js`),__vite__mapDeps([97,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},xa=async()=>{try{return Z[60]??=await _(()=>import(`./md-tZ6pTJCu.js`),__vite__mapDeps([98,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Sa=async()=>{try{return Z[61]??=await _(()=>import(`./md-CPYeSP9D.js`),__vite__mapDeps([99,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ca=async()=>{try{return Z[62]??=await _(()=>import(`./md-6ZLa4d3p.js`),__vite__mapDeps([100,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},wa=async()=>{try{return Z[63]??=await _(()=>import(`./md-dqR9EYFU.js`),__vite__mapDeps([101,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ta=async()=>{try{return Z[64]??=await _(()=>import(`./md-L4CkW1kN.js`),__vite__mapDeps([102,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ea=async()=>{try{return Z[65]??=await _(()=>import(`./md-erOyj-pS.js`),__vite__mapDeps([103,1,2,3,4,5,6,8,7,9,28,16,15,17,56,57,58,59,60,13,14,18,19,61,80,81,104]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Da=async()=>{try{return Z[66]??=await _(()=>import(`./md-CYCyDfm-.js`),__vite__mapDeps([105,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Oa=async()=>{try{return Z[67]??=await _(()=>import(`./md-CsoOjhyB.js`),__vite__mapDeps([106,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,37,28,38]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ka=async()=>{try{return Z[68]??=await _(()=>import(`./md-DCerl4UZ.js`),__vite__mapDeps([107,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Aa=async()=>{try{return Z[69]??=await _(()=>import(`./md-CAqxjDRd.js`),__vite__mapDeps([108,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ja=async()=>{try{return Z[70]??=await _(()=>import(`./md-BEVP4TeY.js`),__vite__mapDeps([109,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ma=async()=>{try{return Z[71]??=await _(()=>import(`./md-DWRKYI2u.js`),__vite__mapDeps([110,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Na=async()=>{try{return Z[72]??=await _(()=>import(`./md-DMm0v4Wk.js`),__vite__mapDeps([111,1,2,3,5,6,7,4,8,9,12,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Pa=async()=>{try{return Z[73]??=await _(()=>import(`./md-VBnw9usT2.js`),__vite__mapDeps([112,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Fa=async()=>{try{return Z[74]??=await _(()=>import(`./md-v7LlsJSs2.js`),__vite__mapDeps([113,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ia=async()=>{try{return Z[75]??=await _(()=>import(`./md-BIjZR-bS2.js`),__vite__mapDeps([114,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},La=async()=>{try{return Z[76]??=await _(()=>import(`./md-DMlixF1K2.js`),__vite__mapDeps([115,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28,116,117]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ra=async()=>{try{return Z[77]??=await _(()=>import(`./md-jnqVVH902.js`),__vite__mapDeps([118,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},za=async()=>{try{return Z[78]??=await _(()=>import(`./md-B1kgcJx92.js`),__vite__mapDeps([119,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ba=async()=>{try{return Z[79]??=await _(()=>import(`./md-BisM1Pr82.js`),__vite__mapDeps([120,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Va=async()=>{try{return Z[80]??=await _(()=>import(`./md-BDiz7f2n2.js`),__vite__mapDeps([121,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ha=async()=>{try{return Z[81]??=await _(()=>import(`./md-DS5J4mOQ2.js`),__vite__mapDeps([122,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ua=async()=>{try{return Z[82]??=await _(()=>import(`./md-k6-o3Hlb2.js`),__vite__mapDeps([123,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Wa=async()=>{try{return Z[83]??=await _(()=>import(`./md-D1L04-qD2.js`),__vite__mapDeps([124,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ga=async()=>{try{return Z[84]??=await _(()=>import(`./md-D5t4UeSE2.js`),__vite__mapDeps([125,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,44]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ka=async()=>{try{return Z[85]??=await _(()=>import(`./md-BhP8iVpu2.js`),__vite__mapDeps([126,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},qa=async()=>{try{return Z[86]??=await _(()=>import(`./md-DYp24jFE2.js`),__vite__mapDeps([127,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ja=async()=>{try{return Z[87]??=await _(()=>import(`./md-Btp4CswY2.js`),__vite__mapDeps([128,1,2,3,5,6,60,4,13,14,15,16,17,18,19,61,129,130]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Ya=async()=>{try{return Z[88]??=await _(()=>import(`./md-CpVN8xTF2.js`),__vite__mapDeps([131,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Xa=async()=>{try{return Z[89]??=await _(()=>import(`./md-CP-vwJrb2.js`),__vite__mapDeps([132,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22,133,134]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Za=async()=>{try{return Z[90]??=await _(()=>import(`./md-D1KIzLUZ2.js`),__vite__mapDeps([135,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},Qa=async()=>{try{return Z[91]??=await _(()=>import(`./md-D0OYH0b_2.js`),__vite__mapDeps([136,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,133,134]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},$a=async()=>{try{return Z[92]??=await _(()=>import(`./md-Da8Z3odW2.js`),__vite__mapDeps([137,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},eo=async()=>{try{return Z[93]??=await _(()=>import(`./md-rreJmcjE.js`),__vite__mapDeps([138,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,129,130,133,134]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},to=async()=>{try{return Z[94]??=await _(()=>import(`./md-CjjLEPPa.js`),__vite__mapDeps([139,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},no=async()=>{try{return Z[95]??=await _(()=>import(`./md-Bp475Uqt.js`),__vite__mapDeps([140,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,133,134]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ro=async()=>{try{return Z[96]??=await _(()=>import(`./md-DoGnq9kW.js`),__vite__mapDeps([141,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},io=async()=>{try{return Z[97]??=await _(()=>import(`./md-DQyimKj3.js`),__vite__mapDeps([142,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,28,116,117]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},ao=async()=>{try{return Z[98]??=await _(()=>import(`./md-B4imawcw.js`),__vite__mapDeps([143,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},oo=async()=>{try{return Z[99]??=await _(()=>import(`./md-hTSgqenN.js`),__vite__mapDeps([144,1,2,3,5,6,21,4,22,25,26]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},so=async()=>{try{return Z[100]??=await _(()=>import(`./md-C_I7xfx4.js`),__vite__mapDeps([145,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20,21,22]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},co=async()=>{try{return Z[101]??=await _(()=>import(`./md-DglvD3Oh.js`),__vite__mapDeps([146,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},lo=async()=>{try{return Z[102]??=await _(()=>import(`./md-Czq6p3v9.js`),__vite__mapDeps([147,1,2,3,4,5,6,7,8,9,12,13,14,15,16,17,18,19,20,148]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},uo=async()=>{try{return Z[103]??=await _(()=>import(`./md-es6QvLJL.js`),__vite__mapDeps([149,1,2,3,5,6,12,4,13,14,15,16,17,18,19,20]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},fo=async()=>{try{return Z[104]??=await _(()=>import(`./md-MeEdeYS7.js`),__vite__mapDeps([150,1,2,3,4,5,6,21,22,151]),import.meta.url)}catch(e){return console.error(`slide failed to load`,e),v}},po=[{no:1,meta:Qe,load:hi,component:Q(0,hi)},{no:2,meta:$e,load:gi,component:Q(1,gi)},{no:3,meta:et,load:_i,component:Q(2,_i)},{no:4,meta:tt,load:vi,component:Q(3,vi)},{no:5,meta:nt,load:yi,component:Q(4,yi)},{no:6,meta:rt,load:bi,component:Q(5,bi)},{no:7,meta:it,load:xi,component:Q(6,xi)},{no:8,meta:at,load:Si,component:Q(7,Si)},{no:9,meta:ot,load:Ci,component:Q(8,Ci)},{no:10,meta:st,load:wi,component:Q(9,wi)},{no:11,meta:ct,load:Ti,component:Q(10,Ti)},{no:12,meta:lt,load:Ei,component:Q(11,Ei)},{no:13,meta:ut,load:Di,component:Q(12,Di)},{no:14,meta:dt,load:Oi,component:Q(13,Oi)},{no:15,meta:ft,load:ki,component:Q(14,ki)},{no:16,meta:pt,load:Ai,component:Q(15,Ai)},{no:17,meta:mt,load:ji,component:Q(16,ji)},{no:18,meta:ht,load:Mi,component:Q(17,Mi)},{no:19,meta:gt,load:Ni,component:Q(18,Ni)},{no:20,meta:_t,load:Pi,component:Q(19,Pi)},{no:21,meta:vt,load:Fi,component:Q(20,Fi)},{no:22,meta:yt,load:Ii,component:Q(21,Ii)},{no:23,meta:bt,load:Li,component:Q(22,Li)},{no:24,meta:xt,load:Ri,component:Q(23,Ri)},{no:25,meta:St,load:zi,component:Q(24,zi)},{no:26,meta:Ct,load:Bi,component:Q(25,Bi)},{no:27,meta:wt,load:Vi,component:Q(26,Vi)},{no:28,meta:Tt,load:Hi,component:Q(27,Hi)},{no:29,meta:Et,load:Ui,component:Q(28,Ui)},{no:30,meta:Dt,load:Wi,component:Q(29,Wi)},{no:31,meta:Ot,load:Gi,component:Q(30,Gi)},{no:32,meta:At,load:Ki,component:Q(31,Ki)},{no:33,meta:Mt,load:qi,component:Q(32,qi)},{no:34,meta:Pt,load:Ji,component:Q(33,Ji)},{no:35,meta:It,load:Yi,component:Q(34,Yi)},{no:36,meta:Rt,load:Xi,component:Q(35,Xi)},{no:37,meta:Bt,load:Zi,component:Q(36,Zi)},{no:38,meta:Ht,load:Qi,component:Q(37,Qi)},{no:39,meta:Wt,load:$i,component:Q(38,$i)},{no:40,meta:Kt,load:ea,component:Q(39,ea)},{no:41,meta:Jt,load:ta,component:Q(40,ta)},{no:42,meta:Xt,load:na,component:Q(41,na)},{no:43,meta:Qt,load:ra,component:Q(42,ra)},{no:44,meta:en,load:ia,component:Q(43,ia)},{no:45,meta:nn,load:aa,component:Q(44,aa)},{no:46,meta:an,load:oa,component:Q(45,oa)},{no:47,meta:sn,load:sa,component:Q(46,sa)},{no:48,meta:ln,load:ca,component:Q(47,ca)},{no:49,meta:dn,load:la,component:Q(48,la)},{no:50,meta:pn,load:ua,component:Q(49,ua)},{no:51,meta:hn,load:da,component:Q(50,da)},{no:52,meta:_n,load:fa,component:Q(51,fa)},{no:53,meta:yn,load:pa,component:Q(52,pa)},{no:54,meta:xn,load:ma,component:Q(53,ma)},{no:55,meta:Cn,load:ha,component:Q(54,ha)},{no:56,meta:Tn,load:ga,component:Q(55,ga)},{no:57,meta:Dn,load:_a,component:Q(56,_a)},{no:58,meta:kn,load:va,component:Q(57,va)},{no:59,meta:jn,load:ya,component:Q(58,ya)},{no:60,meta:Nn,load:ba,component:Q(59,ba)},{no:61,meta:Fn,load:xa,component:Q(60,xa)},{no:62,meta:Ln,load:Sa,component:Q(61,Sa)},{no:63,meta:zn,load:Ca,component:Q(62,Ca)},{no:64,meta:Vn,load:wa,component:Q(63,wa)},{no:65,meta:Un,load:Ta,component:Q(64,Ta)},{no:66,meta:Gn,load:Ea,component:Q(65,Ea)},{no:67,meta:qn,load:Da,component:Q(66,Da)},{no:68,meta:Yn,load:Oa,component:Q(67,Oa)},{no:69,meta:Zn,load:ka,component:Q(68,ka)},{no:70,meta:$n,load:Aa,component:Q(69,Aa)},{no:71,meta:tr,load:ja,component:Q(70,ja)},{no:72,meta:rr,load:Ma,component:Q(71,Ma)},{no:73,meta:ar,load:Na,component:Q(72,Na)},{no:74,meta:sr,load:Pa,component:Q(73,Pa)},{no:75,meta:lr,load:Fa,component:Q(74,Fa)},{no:76,meta:dr,load:Ia,component:Q(75,Ia)},{no:77,meta:pr,load:La,component:Q(76,La)},{no:78,meta:hr,load:Ra,component:Q(77,Ra)},{no:79,meta:_r,load:za,component:Q(78,za)},{no:80,meta:yr,load:Ba,component:Q(79,Ba)},{no:81,meta:xr,load:Va,component:Q(80,Va)},{no:82,meta:Cr,load:Ha,component:Q(81,Ha)},{no:83,meta:Tr,load:Ua,component:Q(82,Ua)},{no:84,meta:Dr,load:Wa,component:Q(83,Wa)},{no:85,meta:kr,load:Ga,component:Q(84,Ga)},{no:86,meta:jr,load:Ka,component:Q(85,Ka)},{no:87,meta:Nr,load:qa,component:Q(86,qa)},{no:88,meta:Fr,load:Ja,component:Q(87,Ja)},{no:89,meta:Lr,load:Ya,component:Q(88,Ya)},{no:90,meta:zr,load:Xa,component:Q(89,Xa)},{no:91,meta:Vr,load:Za,component:Q(90,Za)},{no:92,meta:Ur,load:Qa,component:Q(91,Qa)},{no:93,meta:Gr,load:$a,component:Q(92,$a)},{no:94,meta:qr,load:eo,component:Q(93,eo)},{no:95,meta:Yr,load:to,component:Q(94,to)},{no:96,meta:Zr,load:no,component:Q(95,no)},{no:97,meta:$r,load:ro,component:Q(96,ro)},{no:98,meta:ti,load:io,component:Q(97,io)},{no:99,meta:ni,load:ao,component:Q(98,ao)},{no:100,meta:ii,load:oo,component:Q(99,oo)},{no:101,meta:oi,load:so,component:Q(100,so)},{no:102,meta:ci,load:co,component:Q(101,co)},{no:103,meta:ui,load:lo,component:Q(102,lo)},{no:104,meta:fi,load:uo,component:Q(103,uo)},{no:105,meta:mi,load:fo,component:Q(104,fo)}],$=m(po);function mo(e,t,{mode:r=`replace`}={}){let i=pe();return d({get(){let n=i.currentRoute.value.query[e];return n==null?t??null:Array.isArray(n)?n.filter(Boolean):n},set(a){n(()=>{(i.currentRoute.value.query[e]??t?.toString())!==a.toString()&&i[ae(r)]({query:{...i.currentRoute.value.query,[e]:`${a}`===t?void 0:a}})})}})}function ho(e,t,n=!1){let r=e.meta.slide?.frontmatter.routeAlias??e.no;return n?`/export/${r}`:t?`/presenter/${r}`:`/${r}`}function go(e){return $.value.find(t=>t.no===+e||t.meta.slide?.frontmatter.routeAlias===e)}function _o(e,t,n=!1){return(typeof e==`number`||typeof e==`string`)&&(e=go(e)),ho(e,t,n)}var vo={"slide-left":`slide-left | slide-right`,"slide-right":`slide-right | slide-left`,"slide-up":`slide-up | slide-down`,"slide-down":`slide-down | slide-up`};function yo(e,t=!1){if(!e||(typeof e==`string`&&(e={name:e}),!e.name))return;let n=e.name.includes(`|`)?e.name:vo[e.name]||e.name;if(n.includes(`|`)){let[e,r]=n.split(`|`).map(e=>e.trim());n=t?r:e}if(n)return{...e,name:n}}function bo(e,t,n){let r=e>0?n?.meta?.transition:t?.meta?.transition;return r||=g.transition||void 0,yo(r,e<0)}var xo=l(!1),So=l(!1),Co=l(!1),wo=l(!1),To=l(!1),Eo=l(!1),Do=l(!0),Oo=p(new Set),ko=d(()=>Oo.size>0),Ao=ye({xs:460,...he}),jo=de(),Mo=me(),No=d(()=>jo.height.value-jo.width.value/je.value>120),Po=_e(ve?document.body:null),Fo=ge(),Io=d(()=>[`INPUT`,`TEXTAREA`].includes(Fo.value?.tagName||``)),Lo=d(()=>[`BUTTON`,`A`].includes(Fo.value?.tagName||``));h(`slidev-camera`,`default`,{listenToStorageChanges:!1}),h(`slidev-mic`,`default`,{listenToStorageChanges:!1});var Ro=h(`slidev-scale`,0),zo=h(`slidev-wake-lock`,!0),Bo=h(`slidev-hide-cursor-idle`,!0);h(`slidev-skip-export-pdf-tip`,!1),h(`slidev-export-capture-delay`,400,{listenToStorageChanges:!1});var Vo=h(`slidev-presenter-cursor`,!0,{listenToStorageChanges:!1}),Ho=h(`slidev-cursor-style`,`cursor`,{listenToStorageChanges:!1});function Uo(){Vo.value=!Vo.value}var Wo=h(`slidev-show-editor`,!1,{listenToStorageChanges:!1}),Go=h(`slidev-editor-vertical`,!1,{listenToStorageChanges:!1}),Ko=h(`slidev-editor-width`,ve?window.innerWidth*.4:318,{listenToStorageChanges:!1}),qo=h(`slidev-editor-height`,ve?window.innerHeight*.4:300,{listenToStorageChanges:!1}),Jo=m(null),Yo=h(`slidev-presenter-font-size`,1,{listenToStorageChanges:!1}),Xo=h(`slidev-presenter-layout`,1,{listenToStorageChanges:!1}),Zo={invert:!1,contrast:1,brightness:1,hueRotate:0,saturate:1,sepia:0},Qo=h(`slidev-viewer-css-filter`,Zo,{listenToStorageChanges:!1,mergeDefaults:!0,deep:!0}),$o=d(()=>Object.keys(Zo).some(e=>Qo.value[e]!==Zo[e]));function es(){Xo.value+=1,Xo.value>3&&(Xo.value=1)}function ts(){Yo.value=Math.min(2,Yo.value+.1)}function ns(){Yo.value=Math.max(.5,Yo.value-.1)}var rs=fe(wo),is=h(`slidev-sync-directions`,{viewerSend:!0,viewerReceive:!0,presenterSend:!0,presenterReceive:!0},{listenToStorageChanges:!1,mergeDefaults:!0});function as(e,t,n=1){let r=t.meta.slide.level??n;r&&r>n&&e.length>0?as(e[e.length-1].children,t,n+1):e.push({no:t.no,children:[],level:n,titleLevel:r,path:_o(t.meta.slide?.frontmatter?.routeAlias??t.no,!1),hideInToc:!!t.meta?.slide?.frontmatter?.hideInToc,title:t.meta?.slide?.title})}function os(e,t,n=!1,r,i){return e.map(e=>{let a={...e,active:e.no===i?.value,hasActiveParent:n};return a.children.length>0&&(a.children=os(a.children,t,a.active||a.hasActiveParent,a,i)),r&&(a.active||a.activeParent)&&(r.activeParent=!0),a})}function ss(e,t=1){return e.filter(e=>!e.hideInToc).map(e=>({...e,children:ss(e.children,t+1)}))}function cs(e,t,n){let r=d(()=>e.value.filter(e=>e.meta?.slide?.title).reduce((e,t)=>(as(e,t),e),[])),i=d(()=>os(r.value,n.value,void 0,void 0,t));return d(()=>ss(i.value))}function ls(e,t,n=l(0),r,i,o){let s=d(()=>$.value.length),c=l(0),u=l(0),ee=d(()=>_o(e.value,r.value)),f=d(()=>e.value.no),p=d(()=>e.value.meta?.layout||(f.value===1?`cover`:`default`)),te=d(()=>e.value.meta.slide.frontmatter),m=d(()=>t.value.current),ne=d(()=>t.value.clicksStart),re=d(()=>t.value.total),ie=d(()=>$.value[Math.min($.value.length,f.value+1)-1]),ae=d(()=>$.value[Math.max(1,f.value-1)-1]),oe=d(()=>f.value<$.value.length||m.valuef.value>1||m.value>0),ce=d(()=>i.value?void 0:bo(c.value,e.value,ae.value));a(e,(e,t)=>{c.value=e.no-t.no});async function le(e){return!1}let ue=cs($,f,e);async function de(){u.value=1,re.value<=n.value?await pe():n.value+=1}async function fe(){u.value=-1,n.value<=ne.value?await me(!0):--n.value}async function pe(e=!1){u.value=1,f.value<$.value.length&&await h(f.value+1,e&&!i.value?be:void 0)}async function me(e=!1){u.value=-1,f.value>1&&await h(f.value-1,e&&!i.value?be:void 0)}function he(){return h(1)}function ge(){return h(s.value)}async function h(e,t=0,i=!1){To.value=!1;let a=f.value!==e,s=t!==n.value,c=go(e)?.meta,l=c?.slide?.frontmatter.clicksStart??0;t=Se(t,l,c?.__clicksContext?.total??999999),(i||a||s)&&await o?.push({path:_o(e,r.value,o.currentRoute.value.name===`export`),query:{...o.currentRoute.value.query,clicks:t===0?void 0:t.toString(),embedded:location.search.includes(`embedded`)?`true`:void 0}})}function _e(){o?.push({path:_o(f.value,!0),query:{...o.currentRoute.value.query}})}function ve(){o?.push({path:_o(f.value,!1),query:{...o.currentRoute.value.query}})}return{slides:$,total:s,currentPath:ee,currentSlideNo:f,currentPage:f,currentSlideRoute:e,currentLayout:p,currentFrontmatter:te,currentTransition:ce,clicksDirection:u,nextRoute:ie,prevRoute:ae,clicksContext:t,clicks:m,clicksStart:ne,clicksTotal:re,hasNext:oe,hasPrev:se,tocTree:ue,navDirection:c,openInEditor:le,next:de,prev:fe,go:h,goLast:ge,goFirst:he,nextSlide:pe,prevSlide:me,enterPresenter:_e,exitPresenter:ve}}var us=ue(()=>{let e=pe(),t=le(),n=d(()=>(e?.currentRoute?.value?.query,new URLSearchParams(location.search))),r=d(()=>n.value.has(`print`)||t.name===`export`),i=l(n.value.get(`print`)===`clicks`),a=d(()=>n.value.has(`embedded`)),o=d(()=>t.name===`play`),s=d(()=>t.name===`presenter`),c=d(()=>t.name===`notes`),u=d(()=>!s.value&&(!g.remote||n.value.get(`password`)===g.remote)),ee=d(()=>!!t.params.no),f=d(()=>ee.value?go(t.params.no)?.no??1:1),p=d(()=>$.value[f.value-1]),te=l(Ke($.value.length,t?.query?.range)),m=mo(`clicks`,`0`),ne=d(()=>ie(p.value)),re=d({get(){let e=+(m.value||0);return Number.isNaN(e)&&(e=0),e},set(e){To.value=!1,m.value=e.toString()}});function ie(e){if(e?.meta?.__clicksContext)return e.meta.__clicksContext;let t=e.no,n=He(d({get(){return f.value===t?Math.max(+(m.value??0),n.clicksStart):f.value>t?be:n.clicksStart},set(e){f.value===t&&(m.value=e.toString())}}),e?.meta.slide?.frontmatter.clicksStart??0,e?.meta.clicks);return e?.meta&&(e.meta.__clicksContext=n),n}return{router:e,currentRoute:d(()=>t),isPrintMode:r,isPrintWithClicks:i,isEmbedded:a,isPlaying:o,isPresenter:s,isNotesViewer:c,isPresenterAvailable:u,hasPrimarySlide:ee,currentSlideNo:f,currentSlideRoute:p,clicksContext:ne,queryClicksRaw:m,queryClicks:re,printRange:te,getPrimaryClicks:ie}}),ds=ue(()=>{let e=us(),t=pe(),n=ls(e.currentSlideRoute,e.clicksContext,e.queryClicks,e.isPresenter,e.isPrintMode,t);return a([n.total,e.currentRoute],async()=>{let t=e.currentRoute.value.params.no;e.hasPrimarySlide.value&&!go(t)&&(t&&t!==`index.html`?await n.go(n.total.value,0,!0):await n.go(1,0,!0))},{flush:`pre`,immediate:!0}),{...n,...e}});function fs(){let e=ds(),t=f()?ce(xe,void 0):void 0;if(!t)return e;let n=ee(t).nav;return{...e,...n}}export{Fe as $,Ro as A,_o as B,ko as C,wo as D,So as E,Qo as F,Ue as G,Ke as H,Zo as I,Ae as J,Be as K,zo as L,rs as M,Uo as N,Vo as O,es as P,Me as Q,jo as R,Do as S,Co as T,Ge as U,$ as V,He as W,je as X,Ie as Y,Ne as Z,Lo as _,Ho as a,Xo as b,qo as c,$o as d,Pe as et,Bo as f,Io as g,Go as h,Ao as i,we as it,is as j,xo as k,Ko as l,ts as m,Jo as n,Se as nt,ns as o,To as p,_ as q,Fo as r,De as rt,Eo as s,fs as t,g as tt,Po as u,No as v,Wo as w,Yo as x,Mo as y,go as z}; \ No newline at end of file diff --git a/lecture-08/assets/useReinforcement-11RE6Te1.js b/lecture-08/assets/useReinforcement-11RE6Te1.js new file mode 100644 index 0000000000000000000000000000000000000000..44a7cda74f45a8059bba3018afe6508dcdf95aa7 --- /dev/null +++ b/lecture-08/assets/useReinforcement-11RE6Te1.js @@ -0,0 +1 @@ +function e(e){let t=e>>>0||1;return()=>(t=Math.imul(t,1664525)+1013904223>>>0,t/2**32)}var t=.9,n=[`up`,`down`,`left`,`right`],r=[[-1,0],[1,0],[0,-1],[0,1]],i=[`↑`,`↓`,`←`,`→`],a=e=>Math.floor(e/3),o=e=>e%3;function s(e){return e===7?`START`:e===2?`charger`:e===4?`hole`:`(${a(e)+1},${o(e)+1})`}var c=e=>e===2||e===4;function l(e,t){let n=a(e)+r[t][0],i=o(e)+r[t][1];if(n<0||n>=3||i<0||i>=3)return{next:e,reward:0,done:!1};let s=n*3+i;return s===2?{next:s,reward:5,done:!0}:s===4?{next:s,reward:-10,done:!0}:{next:s,reward:0,done:!1}}function u(e,t=7){let n=[t],r=[],i=t;for(let t of e){let e=l(i,t);if(n.push(e.next),r.push(e.reward),i=e.next,e.done)break}return{cells:n,rewards:r}}function d(e,n=t){return e.reduce((e,t,r)=>e+t*n**r,0)}var f=[{name:`short way`,actions:[3,0,0]},{name:`long way`,actions:[2,0,0,3,3]},{name:`into the hole`,actions:[0]}];function p(e,n,r,i=t){let a=l(n,r);return a.reward+(a.done?0:i*e[a.next])}function m(e,n=t){let r=[Array(9).fill(0)];for(let t=0;tc(r)?0:Math.max(...[0,1,2,3].map(t=>p(e,r,t,n)))))}return r}function h(e,n=t){return e.map((t,r)=>[0,1,2,3].map(t=>c(r)?0:p(e,r,t,n)))}function g(e){let t=Math.max(...e);return e.flatMap((e,n)=>Math.abs(e-t)<1e-9?[n]:[])}function _(e,t){let n=g(e);return e.map((r,i)=>t/e.length+(n.includes(i)?(1-t)/n.length:0))}var v=[[0],[3,0,0],[3,0,0]];function y(n){let{updates:r,alpha:i=.5,gamma:a=t,eps:o=.2,seed:s=8,script:c=v,maxLen:u=20}=n,d=e(s),f=Array.from({length:9},()=>[0,0,0,0]),p=[],m=0;for(;p.lengthe.slice())}),e=c.next,c.done||t&&n===t.length-1)break}}return p}export{g as a,_ as c,h as d,y as f,e as g,u as h,t as i,c as l,m,i as n,s as o,l as p,f as r,d as s,n as t,p as u}; \ No newline at end of file diff --git a/lecture-08/class/404.html b/lecture-08/class/404.html new file mode 100644 index 0000000000000000000000000000000000000000..e4ad600efaeb9cbc4e0cc449dbecaac708209a09 --- /dev/null +++ b/lecture-08/class/404.html @@ -0,0 +1,30 @@ + + + + + +Deep Reinforcement Learning (class) - Slidev + + + + + + + + + + + + + + + + + + + +
+
+ + + diff --git a/lecture-08/class/_redirects b/lecture-08/class/_redirects new file mode 100644 index 0000000000000000000000000000000000000000..bdc8a08e90af7526ac48238e8fbb2f0f26121fa3 --- /dev/null +++ b/lecture-08/class/_redirects @@ -0,0 +1 @@ +./* ./index.html 200 diff --git a/lecture-08/class/assets/404-bkedjYjP.css b/lecture-08/class/assets/404-bkedjYjP.css new file mode 100644 index 0000000000000000000000000000000000000000..0b95cae68cb7a9eeaa0fecc385b94688be2b2945 --- /dev/null +++ b/lecture-08/class/assets/404-bkedjYjP.css @@ -0,0 +1 @@ +.page-link[data-v-b584852f]{background-color:#9ca3af1a;border-radius:.25rem;padding:.5rem 1rem}.page-link[data-v-b584852f]:hover{background-color:#9ca3af33} diff --git a/lecture-08/class/assets/DeckFooter-B6vKMo6W.css b/lecture-08/class/assets/DeckFooter-B6vKMo6W.css new file mode 100644 index 0000000000000000000000000000000000000000..bd00073f9a4233c8d949a2f8f1202003aec12052 --- /dev/null +++ b/lecture-08/class/assets/DeckFooter-B6vKMo6W.css @@ -0,0 +1 @@ +.dl-footer[data-v-fe908050]{letter-spacing:.04em;color:var(--dl-muted);pointer-events:none;justify-content:space-between;align-items:center;gap:1rem;font-size:.72rem;display:flex;position:absolute;bottom:1rem;left:3rem;right:3rem}.dl-footer__left[data-v-fe908050]{align-items:center;gap:.4rem;min-width:0;display:flex}.dl-footer__code[data-v-fe908050]{color:var(--dl-accent);font-weight:700}.dl-footer__sep[data-v-fe908050]{opacity:.5}.dl-footer__title[data-v-fe908050]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.dl-footer__right[data-v-fe908050]{font-variant-numeric:tabular-nums;flex-shrink:0} diff --git a/lecture-08/class/assets/DeckFooter-CbTeAfrH.js b/lecture-08/class/assets/DeckFooter-CbTeAfrH.js new file mode 100644 index 0000000000000000000000000000000000000000..d254eea9e6ca0f5fc2e73cac41307c3d7f612d8c --- /dev/null +++ b/lecture-08/class/assets/DeckFooter-CbTeAfrH.js @@ -0,0 +1 @@ +import{B as e,Ct as t,T as n,_ as r,b as i,g as a,y as o,yt as s}from"./modules/shiki-CJZsCeMT.js";import{t as c}from"./useNav-Dgiecl_f.js";import{t as l}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as u}from"./slidev/context-DB-9afGB.js";import"./slidev/client-C0yocKIh.js";var d={class:`dl-footer`},f={class:`dl-footer__left`},p={key:0,class:`dl-footer__code`},m={key:1,class:`dl-footer__sep`},h={key:2},g={key:3,class:`dl-footer__sep`},_={key:4,class:`dl-footer__title`},v={class:`dl-footer__right`},y=l(n({__name:`DeckFooter`,setup(n){let{$slidev:l}=u(),y=c(),b=a(()=>l?.themeConfigs??{}),x=a(()=>b.value.courseCode??``),S=a(()=>b.value.lecture??``),C=a(()=>b.value.lectureTitle??``);return(n,a)=>(e(),i(`footer`,d,[r(`div`,f,[x.value?(e(),i(`span`,p,t(x.value),1)):o(`v-if`,!0),S.value?(e(),i(`span`,m,`·`)):o(`v-if`,!0),S.value?(e(),i(`span`,h,`Lecture `+t(S.value),1)):o(`v-if`,!0),C.value?(e(),i(`span`,g,`·`)):o(`v-if`,!0),C.value?(e(),i(`span`,_,t(C.value),1)):o(`v-if`,!0)]),r(`div`,v,t(s(y).currentPage.value)+` / `+t(s(y).total.value),1)]))}}),[[`__scopeId`,`data-v-fe908050`]]);export{y as t}; \ No newline at end of file diff --git a/lecture-08/class/assets/DqnFlow-B46GQSY5.css b/lecture-08/class/assets/DqnFlow-B46GQSY5.css new file mode 100644 index 0000000000000000000000000000000000000000..7484197616e87335c383798311c898581a2308f9 --- /dev/null +++ b/lecture-08/class/assets/DqnFlow-B46GQSY5.css @@ -0,0 +1 @@ +.dl-dqn[data-v-10cdf00f]{width:100%;max-width:42rem;margin:0}.dl-dqn svg[data-v-10cdf00f]{width:100%;height:auto}.dl-dqn g[data-v-10cdf00f]{transition:opacity .25s}.dl-dqn__env[data-v-10cdf00f]{fill:color-mix(in srgb, var(--dl-enc) 14%, var(--dl-bg));stroke:var(--dl-enc);stroke-width:1.8px}.dl-dqn__box[data-v-10cdf00f]{fill:var(--dl-surface);stroke:var(--dl-border);stroke-width:1.6px}.dl-dqn__box.is-accent[data-v-10cdf00f]{stroke:var(--dl-accent)}.dl-dqn__row[data-v-10cdf00f]{fill:var(--dl-bg);stroke:var(--dl-border)}.dl-dqn__row.is-pick[data-v-10cdf00f]{fill:var(--dl-accent-soft);stroke:var(--dl-accent)}.dl-dqn__net[data-v-10cdf00f]{fill:var(--dl-accent-soft);stroke:var(--dl-accent);stroke-width:1.8px}.dl-dqn__net.is-target[data-v-10cdf00f]{fill:color-mix(in srgb, var(--dl-q) 12%, var(--dl-bg));stroke:var(--dl-q)}.dl-dqn__loss[data-v-10cdf00f]{fill:var(--dl-bg);stroke:var(--dl-heading);stroke-width:1.8px}.dl-dqn__lab[data-v-10cdf00f]{fill:var(--dl-heading);font-size:13px;font-weight:600}.dl-dqn__in[data-v-10cdf00f]{fill:var(--dl-accent-strong);font-size:13px;font-weight:700}.dl-dqn__in.is-target[data-v-10cdf00f]{fill:var(--dl-q)}.dl-dqn__small[data-v-10cdf00f]{fill:var(--dl-muted);font-size:11px}.dl-dqn__tiny[data-v-10cdf00f]{fill:var(--dl-muted);font-size:9px}.dl-dqn__small.is-current[data-v-10cdf00f]{fill:var(--dl-k);font-weight:600}.dl-dqn__small.is-target[data-v-10cdf00f]{fill:var(--dl-q);font-weight:600}.dl-dqn__small.is-bad[data-v-10cdf00f]{fill:var(--dl-danger);font-weight:600}.dl-dqn__arrow[data-v-10cdf00f]{fill:none;stroke:var(--dl-body);stroke-width:1.8px}.dl-dqn__arrow.is-current[data-v-10cdf00f]{stroke:var(--dl-k);stroke-width:2.4px}.dl-dqn__arrow.is-target[data-v-10cdf00f]{stroke:var(--dl-q);stroke-width:2.4px}.dl-dqn__grad[data-v-10cdf00f]{fill:none;stroke:var(--dl-danger);stroke-width:2px;stroke-dasharray:5 3}.dl-dqn__copy[data-v-10cdf00f]{fill:none;stroke:var(--dl-body);stroke-width:1.8px;stroke-dasharray:6 4}.dl-dqn__head[data-v-10cdf00f]{fill:var(--dl-body)}.dl-dqn__head.is-current[data-v-10cdf00f]{fill:var(--dl-k)}.dl-dqn__head.is-target[data-v-10cdf00f]{fill:var(--dl-q)}.dl-dqn__head.is-bad[data-v-10cdf00f]{fill:var(--dl-danger)}.dl-dqn__cap[data-v-10cdf00f]{color:var(--dl-body);min-height:1.3rem;margin-top:.3rem;font-size:.85rem} diff --git a/lecture-08/class/assets/DqnFlow-DlxgPWo3.js b/lecture-08/class/assets/DqnFlow-DlxgPWo3.js new file mode 100644 index 0000000000000000000000000000000000000000..90e00cd051e227e733386acc22caee3d42e53023 --- /dev/null +++ b/lecture-08/class/assets/DqnFlow-DlxgPWo3.js @@ -0,0 +1 @@ +import{B as e,Ct as t,H as n,St as r,T as i,_ as a,b as o,bt as s,g as c,m as l,q as u,y as d,yt as f}from"./modules/shiki-CJZsCeMT.js";import{t as p}from"./_plugin-vue_export-helper-BDNMzG2s.js";import{n as m}from"./slidev/context-DB-9afGB.js";var h={class:`dl-dqn`},g={viewBox:`0 0 680 318`,role:`img`,"aria-label":`The deep Q-network training loop: environment, replay buffer, batch, Q-network, target network and loss`},_=[`id`],v=[`id`],y=[`id`],b=[`id`],x=[`y`],S=[`marker-end`],C=[`marker-end`],w=[`marker-end`],T=[`marker-end`],E=[`marker-end`],D=[`marker-end`],O=[`marker-end`],k=[`marker-end`],A=[`marker-end`],j={class:`dl-dqn__cap`},M=p(i({__name:`DqnFlow`,props:{step:{default:0}},setup(i){let{$slidev:p,$nav:M,$clicksContext:N,$clicks:P,$page:F,$renderContext:I,$frontmatter:L}=m(),R=i,z=u(),B=[`The whole loop. Acting and learning run side by side.`,`1 · The Q-network picks an action (ε-greedy). The environment returns a reward and the next state.`,`2 · The move (s, a, r, s′) is stored in the replay buffer.`,`3 · A random batch of stored moves is drawn — not the latest ones.`,`4 · The Q-network predicts Q(s, a) for each move in the batch.`,`5 · The target network gives max Q(s′, ·). Target = r + γ · max.`,`6 · Loss = mean of (target − predicted)² over the batch.`,`7 · Backpropagation updates the Q-network. The target network does not change.`,`8 · Every T steps, copy the Q-network's weights into the target network.`],V=(...e)=>({opacity:R.step===0||e.includes(R.step)?1:.18}),H=c(()=>B[Math.min(8,Math.max(0,R.step))]);return(i,c)=>(e(),o(`figure`,h,[(e(),o(`svg`,g,[a(`defs`,null,[a(`marker`,{id:`dq-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[0]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head`},null,-1)]],8,_),a(`marker`,{id:`dqc-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[1]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-current`},null,-1)]],8,v),a(`marker`,{id:`dqt-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[2]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-target`},null,-1)]],8,y),a(`marker`,{id:`dqb-${f(z)}`,markerWidth:`7`,markerHeight:`7`,refX:`6`,refY:`3.5`,orient:`auto`},[...c[3]||=[a(`path`,{d:`M0 0 L7 3.5 L0 7 z`,class:`dl-dqn__head is-bad`},null,-1)]],8,b)]),d(` environment `),a(`g`,{style:r(V(1,2))},[...c[4]||=[a(`rect`,{x:`14`,y:`20`,width:`132`,height:`60`,rx:`10`,class:`dl-dqn__env`},null,-1),a(`text`,{x:`80`,y:`46`,"text-anchor":`middle`,class:`dl-dqn__lab`},`environment`,-1),a(`text`,{x:`80`,y:`64`,"text-anchor":`middle`,class:`dl-dqn__small`},`the robot's floor`,-1)]],4),d(` replay buffer `),a(`g`,{style:r(V(2,3))},[c[5]||=a(`rect`,{x:`236`,y:`14`,width:`168`,height:`96`,rx:`6`,class:`dl-dqn__box`},null,-1),c[6]||=a(`text`,{x:`320`,y:`31`,"text-anchor":`middle`,class:`dl-dqn__lab`},`replay buffer`,-1),(e(),o(l,null,n(4,e=>a(`rect`,{key:e,x:`248`,y:38+(e-1)*17,width:`144`,height:`13`,rx:`2`,class:s([`dl-dqn__row`,{"is-pick":e===2||e===4}])},null,10,x)),64)),c[7]||=a(`text`,{x:`320`,y:`48`,"text-anchor":`middle`,class:`dl-dqn__tiny`},`(s, a, r, s′)`,-1)],4),d(` batch `),a(`g`,{style:r(V(3,4,5))},[...c[8]||=[a(`rect`,{x:`490`,y:`30`,width:`150`,height:`56`,rx:`6`,class:`dl-dqn__box is-accent`},null,-1),a(`text`,{x:`565`,y:`48`,"text-anchor":`middle`,class:`dl-dqn__lab`},`random batch`,-1),a(`rect`,{x:`502`,y:`56`,width:`126`,height:`11`,rx:`2`,class:`dl-dqn__row is-pick`},null,-1),a(`rect`,{x:`502`,y:`70`,width:`126`,height:`11`,rx:`2`,class:`dl-dqn__row is-pick`},null,-1)]],4),d(` Q-network `),a(`g`,{style:r(V(1,4,7,8))},[...c[9]||=[a(`polygon`,{points:`190,168 320,184 320,240 190,256`,class:`dl-dqn__net`},null,-1),a(`text`,{x:`255`,y:`210`,"text-anchor":`middle`,class:`dl-dqn__in`},`Q-network`,-1),a(`text`,{x:`255`,y:`226`,"text-anchor":`middle`,class:`dl-dqn__small`},`weights w`,-1)]],4),d(` target network `),a(`g`,{style:r(V(5,8))},[...c[10]||=[a(`polygon`,{points:`470,168 600,184 600,240 470,256`,class:`dl-dqn__net is-target`},null,-1),a(`text`,{x:`535`,y:`210`,"text-anchor":`middle`,class:`dl-dqn__in is-target`},`target network`,-1),a(`text`,{x:`535`,y:`226`,"text-anchor":`middle`,class:`dl-dqn__small`},`weights w⁻ (frozen)`,-1)]],4),d(` loss `),a(`g`,{style:r(V(6,7))},[...c[11]||=[a(`circle`,{cx:`395`,cy:`286`,r:`22`,class:`dl-dqn__loss`},null,-1),a(`text`,{x:`395`,y:`291`,"text-anchor":`middle`,class:`dl-dqn__lab`},`MSE`,-1)]],4),d(` 1: act `),a(`g`,{style:r(V(1))},[a(`path`,{d:`M190 200 C110 200, 80 150, 80 88`,class:`dl-dqn__arrow is-current`,"marker-end":`url(#dqc-${f(z)})`},null,8,S),c[12]||=a(`text`,{x:`40`,y:`150`,class:`dl-dqn__small is-current`},`action a`,-1),c[13]||=a(`text`,{x:`40`,y:`164`,class:`dl-dqn__small`},`(ε-greedy)`,-1)],4),d(` 2: store `),a(`g`,{style:r(V(2))},[a(`path`,{d:`M148 50 H230`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,C),c[14]||=a(`text`,{x:`189`,y:`42`,"text-anchor":`middle`,class:`dl-dqn__small`},`store`,-1)],4),d(` 3: sample `),a(`g`,{style:r(V(3))},[a(`path`,{d:`M406 60 H484`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,w),c[15]||=a(`text`,{x:`445`,y:`52`,"text-anchor":`middle`,class:`dl-dqn__small`},`sample`,-1)],4),d(` 4: batch s, a → Q-net `),a(`g`,{style:r(V(4))},[a(`path`,{d:`M520 88 C470 130, 330 120, 290 166`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,T),c[16]||=a(`text`,{x:`402`,y:`134`,"text-anchor":`middle`,class:`dl-dqn__small`},`s, a`,-1),a(`path`,{d:`M322 230 C350 250, 362 266, 372 278`,class:`dl-dqn__arrow is-current`,"marker-end":`url(#dqc-${f(z)})`},null,8,E),c[17]||=a(`text`,{x:`366`,y:`306`,"text-anchor":`end`,class:`dl-dqn__small is-current`},`predicted Q(s, a)`,-1)],4),d(` 5: batch s′, r → target `),a(`g`,{style:r(V(5))},[a(`path`,{d:`M590 88 V164`,class:`dl-dqn__arrow`,"marker-end":`url(#dq-${f(z)})`},null,8,D),c[18]||=a(`text`,{x:`598`,y:`130`,class:`dl-dqn__small`},`s′, r`,-1),a(`path`,{d:`M470 236 C450 258, 432 274, 418 280`,class:`dl-dqn__arrow is-target`,"marker-end":`url(#dqt-${f(z)})`},null,8,O),c[19]||=a(`text`,{x:`442`,y:`296`,class:`dl-dqn__small is-target`},`target r + γ max Q(s′, ·)`,-1)],4),d(` 7: backprop `),a(`g`,{style:r(V(7))},[a(`path`,{d:`M374 296 C300 312, 230 300, 224 262`,class:`dl-dqn__grad`,"marker-end":`url(#dqb-${f(z)})`},null,8,k),c[20]||=a(`text`,{x:`150`,y:`300`,class:`dl-dqn__small is-bad`},`backprop → w`,-1)],4),d(` 8: copy `),a(`g`,{style:r(V(8))},[a(`path`,{d:`M322 196 H464`,class:`dl-dqn__copy`,"marker-end":`url(#dq-${f(z)})`},null,8,A),c[21]||=a(`text`,{x:`393`,y:`190`,"text-anchor":`middle`,class:`dl-dqn__small`},`copy w → w⁻ every T steps`,-1)],4)])),a(`figcaption`,j,t(H.value),1)]))}}),[[`__scopeId`,`data-v-10cdf00f`]]);export{M as t}; \ No newline at end of file diff --git a/lecture-08/class/assets/DrawingControls-Dhbx0szf.css b/lecture-08/class/assets/DrawingControls-Dhbx0szf.css new file mode 100644 index 0000000000000000000000000000000000000000..85375579327c847940a8710fedd96a5b987c16c1 --- /dev/null +++ b/lecture-08/class/assets/DrawingControls-Dhbx0szf.css @@ -0,0 +1 @@ +.v-popper--theme-dropdown .v-popper__arrow-inner{border-color:#9ca3af33}