import{s as Tt,a as Mt,n as Lt,o as St}from"../chunks/scheduler.505acc25.js";import{S as Ht,i as yt,e as o,s as i,c as k,h as kt,a,d as n,b as s,f as pt,g as E,j as p,k as m,l as Et,m as l,n as q,t as j,o as A,p as I}from"../chunks/index.b1175496.js";import{C as qt,H as rt}from"../chunks/Heading.eda51538.js";import{E as jt}from"../chunks/MermaidChart.svelte_svelte_type_style_lang.ea377ea6.js";function At(ft){let g,O,z,R,u,G,h,J,w,mt="现在是时候战斗了！⚡️",N,c,U,$,gt='如果你不想构建自己的智能体，只是好奇智能体在宝可梦中的战斗潜力。我们正在<a href="https://www.twitch.tv/jofthomas" rel="nofollow">twitch</a>上主持一个自动化直播',B,r,ut,D,_,ht="要在直播中与智能体战斗，你可以：",K,v,wt="说明：",Q,x,ct=`<li>前往 <strong>Pokémon Showdown Space</strong> ：<a href="https://huggingface.co/spaces/Jofthomas/Pokemon_showdown" rel="nofollow">链接在此</a></li> <li><strong>选择你的名称</strong>（右上角）。</li> <li>找到<strong>当前智能体的用户名</strong>。检查：
<ul><li><strong>直播显示</strong>：<a href="https://www.twitch.tv/jofthomas" rel="nofollow">链接在此</a></li></ul></li> <li>在 Showdown Space 上<strong>搜索</strong>该用户名并<strong>发送战斗邀请</strong>。</li>`,V,d,$t="<em>注意</em>：一次只有一个智能体在线！确保你有正确的名称。",W,C,X,P,_t="如果你已经从上一节创建了自己的宝可梦战斗智能体，你可能想知道：<strong>我如何测试它与其他智能体的对抗？</strong>让我们找出答案！",Y,b,vt='我们为此目的构建了一个专门的<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents" rel="nofollow">Hugging Face Space</a>：',Z,f,xt,tt,M,dt="这个 Space 连接到我们自己的<strong>Pokémon Showdown 服务器</strong>，你的智能体可以在那里与其他智能体进行史诗般的 AI 驱动战斗。",et,T,nt,L,Ct="按照这些步骤在竞技场中让你的智能体活跃起来：",lt,S,Pt=`<li><p><strong>复制 Space</strong>
点击 Space 右上角菜单中的三个点，选择”复制此 Space”。</p></li> <li><p><strong>将你的智能体代码添加到<code>agent.py</code></strong>
打开文件并粘贴你的智能体实现。你可以遵循这个<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/agents.py" rel="nofollow">示例</a>或查看<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/tree/main" rel="nofollow">项目结构</a>获取指导。</p></li> <li><p><strong>在<code>app.py</code>中注册你的智能体</strong>
将你的智能体名称和逻辑添加到下拉菜单。参考<a href="https://huggingface.co/spaces/PShowdown/pokemon_agents/blob/main/app.py" rel="nofollow">这个片段</a>获取灵感。</p></li> <li><p><strong>选择你的智能体</strong>
添加后，你的智能体将在”选择智能体”下拉菜单中显示。从列表中选择它！✅</p></li> <li><p><strong>输入你的 Pokémon Showdown 用户名</strong>
确保用户名与 iframe 的<strong>“选择名称”</strong>输入中显示的匹配。你也可以连接你的官方账户。</p></li> <li><p><strong>点击”发送战斗邀请”</strong>
你的智能体将向选定的对手发送邀请。它应该出现在屏幕上！</p></li> <li><p><strong>接受战斗并享受战斗！</strong>
让战斗开始！愿最聪明的智能体获胜</p></li>`,it,H,bt="准备看到你的创作在行动中吗？让 AI 对决开始！🥊",st,y,ot,F,at;return u=new qt({props:{containerStyle:"float: right; margin-left: 10px; display: inline-flex; position: relative; z-index: 10;"}}),h=new rt({props:{title:"启动你的宝可梦战斗智能体",local:"启动你的宝可梦战斗智能体",headingTag:"h1"}}),c=new rt({props:{title:"与直播智能体战斗！",local:"与直播智能体战斗",headingTag:"h2"}}),C=new rt({props:{title:"宝可梦战斗智能体挑战者",local:"宝可梦战斗智能体挑战者",headingTag:"h2"}}),T=new rt({props:{title:"如何启动你的智能体",local:"如何启动你的智能体",headingTag:"h3"}}),y=new jt({props:{source:"https://github.com/huggingface/agents-course/blob/main/units/zh-CN/bonus-unit3/launching_agent_battle.mdx"}}),{c(){g=o("meta"),O=i(),z=o("p"),R=i(),k(u.$$.fragment),G=i(),k(h.$$.fragment),J=i(),w=o("p"),w.textContent=mt,N=i(),k(c.$$.fragment),U=i(),$=o("p"),$.innerHTML=gt,B=i(),r=o("iframe"),D=i(),_=o("p"),_.textContent=ht,K=i(),v=o("p"),v.textContent=wt,Q=i(),x=o("ol"),x.innerHTML=ct,V=i(),d=o("p"),d.innerHTML=$t,W=i(),k(C.$$.fragment),X=i(),P=o("p"),P.innerHTML=_t,Y=i(),b=o("p"),b.innerHTML=vt,Z=i(),f=o("iframe"),tt=i(),M=o("p"),M.innerHTML=dt,et=i(),k(T.$$.fragment),nt=i(),L=o("p"),L.textContent=Ct,lt=i(),S=o("ol"),S.innerHTML=Pt,it=i(),H=o("p"),H.textContent=bt,st=i(),k(y.$$.fragment),ot=i(),F=o("p"),this.h()},l(t){const e=kt("svelte-u9bgzb",document.head);g=a(e,"META",{name:!0,content:!0}),e.forEach(n),O=s(t),z=a(t,"P",{}),pt(z).forEach(n),R=s(t),E(u.$$.fragment,t),G=s(t),E(h.$$.fragment,t),J=s(t),w=a(t,"P",{"data-svelte-h":!0}),p(w)!=="svelte-cncyok"&&(w.textContent=mt),N=s(t),E(c.$$.fragment,t),U=s(t),$=a(t,"P",{"data-svelte-h":!0}),p($)!=="svelte-eq4dnb"&&($.innerHTML=gt),B=s(t),r=a(t,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),pt(r).forEach(n),D=s(t),_=a(t,"P",{"data-svelte-h":!0}),p(_)!=="svelte-1necnyq"&&(_.textContent=ht),K=s(t),v=a(t,"P",{"data-svelte-h":!0}),p(v)!=="svelte-mbgccs"&&(v.textContent=wt),Q=s(t),x=a(t,"OL",{"data-svelte-h":!0}),p(x)!=="svelte-1uchbqq"&&(x.innerHTML=ct),V=s(t),d=a(t,"P",{"data-svelte-h":!0}),p(d)!=="svelte-15ilt7m"&&(d.innerHTML=$t),W=s(t),E(C.$$.fragment,t),X=s(t),P=a(t,"P",{"data-svelte-h":!0}),p(P)!=="svelte-10cjr3r"&&(P.innerHTML=_t),Y=s(t),b=a(t,"P",{"data-svelte-h":!0}),p(b)!=="svelte-65d4sx"&&(b.innerHTML=vt),Z=s(t),f=a(t,"IFRAME",{src:!0,frameborder:!0,width:!0,height:!0}),pt(f).forEach(n),tt=s(t),M=a(t,"P",{"data-svelte-h":!0}),p(M)!=="svelte-tgjq6s"&&(M.innerHTML=dt),et=s(t),E(T.$$.fragment,t),nt=s(t),L=a(t,"P",{"data-svelte-h":!0}),p(L)!=="svelte-1wgxbwf"&&(L.textContent=Ct),lt=s(t),S=a(t,"OL",{"data-svelte-h":!0}),p(S)!=="svelte-1chnai2"&&(S.innerHTML=Pt),it=s(t),H=a(t,"P",{"data-svelte-h":!0}),p(H)!=="svelte-d852lv"&&(H.textContent=bt),st=s(t),E(y.$$.fragment,t),ot=s(t),F=a(t,"P",{}),pt(F).forEach(n),this.h()},h(){m(g,"name","hf:doc:metadata"),m(g,"content",It),Mt(r.src,ut="https://jofthomas-twitch-streaming.hf.space")||m(r,"src",ut),m(r,"frameborder","0"),m(r,"width","1200"),m(r,"height","600"),Mt(f.src,xt="https://pshowdown-pokemon-agents.hf.space")||m(f,"src",xt),m(f,"frameborder","0"),m(f,"width","1200"),m(f,"height","600")},m(t,e){Et(document.head,g),l(t,O,e),l(t,z,e),l(t,R,e),q(u,t,e),l(t,G,e),q(h,t,e),l(t,J,e),l(t,w,e),l(t,N,e),q(c,t,e),l(t,U,e),l(t,$,e),l(t,B,e),l(t,r,e),l(t,D,e),l(t,_,e),l(t,K,e),l(t,v,e),l(t,Q,e),l(t,x,e),l(t,V,e),l(t,d,e),l(t,W,e),q(C,t,e),l(t,X,e),l(t,P,e),l(t,Y,e),l(t,b,e),l(t,Z,e),l(t,f,e),l(t,tt,e),l(t,M,e),l(t,et,e),q(T,t,e),l(t,nt,e),l(t,L,e),l(t,lt,e),l(t,S,e),l(t,it,e),l(t,H,e),l(t,st,e),q(y,t,e),l(t,ot,e),l(t,F,e),at=!0},p:Lt,i(t){at||(j(u.$$.fragment,t),j(h.$$.fragment,t),j(c.$$.fragment,t),j(C.$$.fragment,t),j(T.$$.fragment,t),j(y.$$.fragment,t),at=!0)},o(t){A(u.$$.fragment,t),A(h.$$.fragment,t),A(c.$$.fragment,t),A(C.$$.fragment,t),A(T.$$.fragment,t),A(y.$$.fragment,t),at=!1},d(t){t&&(n(O),n(z),n(R),n(G),n(J),n(w),n(N),n(U),n($),n(B),n(r),n(D),n(_),n(K),n(v),n(Q),n(x),n(V),n(d),n(W),n(X),n(P),n(Y),n(b),n(Z),n(f),n(tt),n(M),n(et),n(nt),n(L),n(lt),n(S),n(it),n(H),n(st),n(ot),n(F)),n(g),I(u,t),I(h,t),I(c,t),I(C,t),I(T,t),I(y,t)}}}const It='{"title":"启动你的宝可梦战斗智能体","local":"启动你的宝可梦战斗智能体","sections":[{"title":"与直播智能体战斗！","local":"与直播智能体战斗","sections":[],"depth":2},{"title":"宝可梦战斗智能体挑战者","local":"宝可梦战斗智能体挑战者","sections":[{"title":"如何启动你的智能体","local":"如何启动你的智能体","sections":[],"depth":3}],"depth":2}],"depth":1}';function zt(ft){return St(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Jt extends Ht{constructor(g){super(),yt(this,g,zt,At,Tt,{})}}export{Jt as component};
