<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhisar Choubey</title>
    <description>The latest articles on DEV Community by Abhisar Choubey (@sighkickk).</description>
    <link>https://dev.to/sighkickk</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3542710%2F837d7689-46cb-4c45-bdfe-4dad8d9e65aa.png</url>
      <title>DEV Community: Abhisar Choubey</title>
      <link>https://dev.to/sighkickk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sighkickk"/>
    <language>en</language>
    <item>
      <title>Building a Multi-Agent AI Cricket Simulator in Vanilla JS</title>
      <dc:creator>Abhisar Choubey</dc:creator>
      <pubDate>Sun, 17 May 2026 12:03:12 +0000</pubDate>
      <link>https://dev.to/sighkickk/building-a-multi-agent-ai-cricket-simulator-in-vanilla-js-4dba</link>
      <guid>https://dev.to/sighkickk/building-a-multi-agent-ai-cricket-simulator-in-vanilla-js-4dba</guid>
      <description>&lt;p&gt;&lt;strong&gt;"How I built a high-performance Sports HUD simulating cricket strategy using Google Gemini at GDG Cloud Pune Hackathon with mentors &lt;a class="mentioned-user" href="https://dev.to/pratik_kale"&gt;@pratik_kale&lt;/a&gt; &amp;amp; &lt;a class="mentioned-user" href="https://dev.to/antrixsh_gupta"&gt;@antrixsh_gupta&lt;/a&gt; "&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  tags: "javascript, ai, webdev, gemini"
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Forkzen" rel="noopener noreferrer"&gt;
        Forkzen
      &lt;/a&gt; / &lt;a href="https://github.com/Forkzen/CaptainCool" rel="noopener noreferrer"&gt;
        CaptainCool
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Captains HUD: AI-Powered Cricket Strategy Simulator&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Demo Video Link - &lt;a href="https://youtu.be/VudXVtMESMY" rel="nofollow noopener noreferrer"&gt;https://youtu.be/VudXVtMESMY&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Overview&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;Captains HUD (formerly "Captain Cool") is an interactive, AI-driven web application that simulates high-pressure cricket match scenarios. Users can input a specific match situation (e.g., "19th over, 24 runs to win, heavy dew"), and the application uses Google's Gemini AI to generate strategic decisions, simulate a multi-agent debate, and deliver dynamic live commentary.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Problem Statement&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;The goal was to build an application that could demonstrate multi-agent AI interactions in a fun, relatable context. Cricket strategy, with its diverse captaincy styles and high-pressure scenarios, provided the perfect backdrop. The application needed to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Emulate the distinct personalities of legendary Indian cricket captains: MS Dhoni (calm/methodical), Virat Kohli (aggressive/passionate), Rohit Sharma (tactical/flexible), and Gautam Gambhir (intense/match-up driven).&lt;/li&gt;
&lt;li&gt;Use a multi-agent architecture (Strategist, Devil's Advocate, Commentator, and Stats Analyst) to debate the scenario.&lt;/li&gt;
&lt;li&gt;Present the data in a minimalist, broadcast-style "Sports HUD"…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Forkzen/CaptainCool" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Have you ever wondered how different cricket captains would handle the exact same high-pressure situation? Would MS Dhoni's ice-cool logic prevail, or would Virat Kohli's sheer aggression win the day?&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/VudXVtMESMY"&gt;
  &lt;/iframe&gt;
&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://captain-cool.vercel.app" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;captain-cool.vercel.app&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I decided to find out by building &lt;strong&gt;Captains HUD&lt;/strong&gt;, a multi-agent AI simulator powered by Google Gemini! 🏏🤖&lt;/p&gt;

&lt;h2&gt;
  
  
  The Concept
&lt;/h2&gt;

&lt;p&gt;The idea was to create a "Sports Broadcast HUD" where different AI agents debate cricket strategy in real-time. I wanted an architecture that included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Stats Analyst&lt;/strong&gt;: Evaluates pitch conditions and calculates a "Pressure Index".&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Strategist&lt;/strong&gt;: Takes on the persona of a famous captain (Dhoni, Kohli, Rohit, or Gambhir) and makes a tactical call.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Devil's Advocate&lt;/strong&gt;: A critical agent that finds the fatal flaw in the Strategist's plan.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Commentary Desk&lt;/strong&gt;: Dynamic play-by-play commentary from legends like Harsha Bhogle and Ravi Shastri.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Tech Stack
&lt;/h2&gt;

&lt;p&gt;To keep things lightning-fast and visually striking, I avoided heavy frameworks and stuck to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Vanilla HTML/CSS/JS&lt;/strong&gt;: For a pure, responsive broadcast HUD.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Google GenAI SDK&lt;/strong&gt;: To interact with the Gemini models.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Canvas Confetti&lt;/strong&gt;: For some explosive visual feedback! 🎉&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The "Mega-Prompt" Optimization
&lt;/h2&gt;

&lt;p&gt;Initially, I had each agent calling the Gemini API sequentially. This created latency and quickly hit Free Tier rate limits. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The Solution:&lt;/strong&gt; I refactored the backend into a single "Mega-Prompt" using strictly structured JSON schema output. I asked the AI to simulate the &lt;em&gt;entire&lt;/em&gt; debate in one go, returning a JSON object containing the internal monologue, the decision, the challenge, the rebuttal, and the final commentary. &lt;/p&gt;

&lt;p&gt;On the frontend, I simply staggered the rendering of this JSON payload using &lt;code&gt;setTimeout&lt;/code&gt; delays. The result? A single API call that &lt;em&gt;feels&lt;/em&gt; like a live, real-time debate to the user!&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;Building this project taught me that you don't always need complex orchestration frameworks for multi-agent systems. Sometimes, a well-crafted prompt with strict JSON schemas and clever frontend staggering can create a highly immersive AI experience.&lt;/p&gt;

&lt;p&gt;If you're building an AI app, focus on the user's &lt;em&gt;perception&lt;/em&gt; of the AI thinking! Simple CSS animations and delayed rendering can turn static text generation into a thrilling live event.&lt;/p&gt;

&lt;p&gt;Have you built any fun multi-agent systems? Let me know in the comments!&lt;/p&gt;

</description>
      <category>gdgcloudpune</category>
      <category>gdgpune</category>
      <category>buildwithai</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
