<?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: Gaurav Shinde</title>
    <description>The latest articles on DEV Community by Gaurav Shinde (@gaurav_shinde_7b5a0679994).</description>
    <link>https://dev.to/gaurav_shinde_7b5a0679994</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%2F3936266%2F08f6be43-e198-45f5-9da7-2f4155db0453.png</url>
      <title>DEV Community: Gaurav Shinde</title>
      <link>https://dev.to/gaurav_shinde_7b5a0679994</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gaurav_shinde_7b5a0679994"/>
    <language>en</language>
    <item>
      <title>Captain Cool: Building an Enterprise Multi-Agent IPL Match Strategist with Google Gemini 🏏🏆</title>
      <dc:creator>Gaurav Shinde</dc:creator>
      <pubDate>Sun, 17 May 2026 12:53:13 +0000</pubDate>
      <link>https://dev.to/gaurav_shinde_7b5a0679994/captain-cool-building-an-enterprise-multi-agent-ipl-match-strategist-with-google-gemini-4h6m</link>
      <guid>https://dev.to/gaurav_shinde_7b5a0679994/captain-cool-building-an-enterprise-multi-agent-ipl-match-strategist-with-google-gemini-4h6m</guid>
      <description>&lt;p&gt;🌟 Introduction: The High-Stakes World of T20 Cricket&lt;br&gt;
In the ultra-competitive arena of the Indian Premier League (IPL), matches are won and lost in the margins. A single tactical miscalculation—bowling a spinner in the death overs against a power-hitter, misplacing a fielder at cow corner, or misjudging the heavy dew factor—can alter the fate of a championship.&lt;/p&gt;

&lt;p&gt;While modern IPL franchises employ armies of data analysts, real-time tactical decision-making in the dugout remains incredibly stressful. Captains must synthesize vast amounts of historical data, pitch conditions, and gut instinct in seconds.&lt;/p&gt;

&lt;p&gt;To solve this, we built Captain Cool—an enterprise-grade, virtual IPL captain powered by a multi-agent Google Gemini AI think-tank. Designed for the Google Build with AI Hackathon (#gdgcloudpune), Captain Cool simulates an elite dugout debate in real-time to deliver the ultimate tactical call.&lt;/p&gt;

&lt;p&gt;🧠 The Core Innovation: Multi-Agent Debate Loop&lt;br&gt;
Single-prompt LLMs often suffer from "sycophancy"—they agree with whatever parameters the user inputs without challenging underlying assumptions. In cricket strategy, blind agreement is a recipe for disaster.&lt;/p&gt;

&lt;p&gt;To build a robust tactical engine, Captain Cool implements an advanced Multi-Agent Debate Architecture using four autonomous Gemini 3.1 Flash Lite agents orchestrated via a sequential LangChain-style debate loop:&lt;/p&gt;

&lt;p&gt;[ Live Cricbuzz Scraper / Form Input ]&lt;br&gt;
                 │&lt;br&gt;
                 ▼&lt;br&gt;
 📊 Agent 1: Stats Analyst (Tool Calling)&lt;br&gt;
                 │&lt;br&gt;
                 ▼&lt;br&gt;
 🎯 Agent 2: Strategist (Initial Call)&lt;br&gt;
                 │&lt;br&gt;
                 ▼&lt;br&gt;
 ⚔️ Agent 3: Devil's Advocate (Dissent &amp;amp; Challenge)&lt;br&gt;
                 │&lt;br&gt;
                 ▼&lt;br&gt;
 💪 Agent 2: Strategist (Revised Defense)&lt;br&gt;
                 │&lt;br&gt;
                 ▼&lt;br&gt;
 🎙️ Agent 4: Match Commentator (Final Verdict &amp;amp; Confidence %)&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;📊 The Stats Analyst (Tool-Calling Head)
Acting as the head of data intelligence, this agent is equipped with custom JavaScript tools to fetch real-time match context:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;getWinProbability(): Calculates dynamic win percentages based on target, balls remaining, and wickets.&lt;br&gt;
getPlayerProfile(): Pulls elite batting/bowling stats (strike rates, death over economy, weakness against spin/pace).&lt;br&gt;
getPitchAssessment(): Evaluates venue history (Wankhede dew, Chepauk turn) and current phase dynamics.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;🎯 The Strategist (Tactical Captain)&lt;br&gt;
Taking the data report from the Stats Analyst, the Strategist formulates the initial over-by-over plan, selecting the ideal bowler, field placements, and bowling lines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;⚔️ The Devil’s Advocate (Opposition Analyst)&lt;br&gt;
This is where the magic happens. The Devil's Advocate is strictly instructed to act as the opposition head coach. It inspects the Strategist's plan, identifies glaring tactical blind spots (e.g., "You're bowling Bumrah now, but who bowls the 20th over?" or "Kohli loves stepping out to spin, your mid-off is too deep"), and aggressively challenges the captain.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;🎙️ The Match Commentator (Broadcast Verdict)&lt;br&gt;
Finally, the Commentator observes the debate, synthesizes the opposing viewpoints, and delivers an official broadcast-quality verdict complete with a calculated Tactical Confidence Percentage.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;🚀 Key Technical Features&lt;br&gt;
🔴 1. Automated Live Cricbuzz Web Scraper&lt;br&gt;
To ensure the AI operates on absolute real-time data, we built a native Node.js web scraper directly into the Stats Analyst agent.&lt;/p&gt;

&lt;p&gt;How it works: When a user pastes a live Cricbuzz match URL, the backend instantly fetches the live HTML, strips out all DOM overhead, extracts the pure live scorecard and commentary text (up to 15KB), and injects it into Gemini's context window.&lt;br&gt;
Absolute Truth: The AI is instructed to treat this scraped live Cricbuzz data as the primary source of truth, overriding any conflicting manual form inputs.&lt;br&gt;
📍 2. Interactive 2D/3D Fielding Oval&lt;br&gt;
Field placements are critical to T20 bowling plans. We implemented a custom, interactive top-down cricket ground UI directly in the command console.&lt;/p&gt;

&lt;p&gt;Users can click anywhere on the grass to place up to 9 fielders.&lt;br&gt;
Using advanced polar coordinate math, the frontend instantly calculates the exact cricket position clicked (e.g., Deep Point, Slips / Gully, Cow Corner, Short Fine Leg).&lt;br&gt;
This exact fielding list is fed into the AI prompts, allowing the agents to analyze physical field gaps and suggest bowling lines to match!&lt;br&gt;
🌌 3. Cinematic 3D Enterprise UI (Vercel/Apple Inspired)&lt;br&gt;
We elevated the application from a standard dashboard into an immersive, executive-grade sports broadcast platform:&lt;/p&gt;

&lt;p&gt;Photorealistic Championship Trophy: Replaced cartoon emojis with a hyper-realistic 3D golden championship trophy cup rendered with professional studio lighting.&lt;br&gt;
3D Mouse Parallax: As users move their cursor across the screen, background glassmorphism stat cards (⚡ REQ RATE: 12.5 RPO, 🎯 MATCHUP INTEL) and geometric rings shift at varying speeds, creating a stunning illusion of multi-layered depth.&lt;br&gt;
Auto-Scroll Choreography: Clicking Analyze &amp;amp; Decide ignites a glowing neon progress bar and smoothly auto-scrolls down into the Live Debate Arena, spotlighting each agent card as it slides up with 3D tilt effects.&lt;br&gt;
🛠️ Tech Stack &amp;amp; Architecture&lt;br&gt;
AI Engine: Google Gemini 3.1 Flash Lite (via @google/genai SDK)&lt;br&gt;
Backend: Node.js, Express.js, native fetch HTML scraping&lt;br&gt;
Frontend: HTML5, Vanilla JavaScript, CSS3 (Glassmorphism, 3D Perspective Transforms, CSS Grid/Flexbox)&lt;br&gt;
Version Control: Git &amp;amp; GitHub&lt;br&gt;
🏆 Conclusion &amp;amp; Hackathon Journey&lt;br&gt;
Building Captain Cool for the Google Build with AI Hackathon (#gdgcloudpune) was an incredible journey in exploring the power of agentic workflows. By combining tool-calling, multi-agent debate, live web scraping, and premium 3D UI design, we demonstrated how Gemini can transform complex sports analytics into an engaging, real-time decision-making platform.&lt;/p&gt;

&lt;p&gt;🔗 Check out the Project:&lt;br&gt;
GitHub Repository: &lt;a href="https://github.com/gauravshinde2162006-hash/Captain-cool" rel="noopener noreferrer"&gt;https://github.com/gauravshinde2162006-hash/Captain-cool&lt;/a&gt;&lt;br&gt;
We would love to hear your thoughts, feedback, and tactical ideas in the comments below! 👇&lt;/p&gt;

&lt;p&gt;Built with ❤️ for #gdgcloudpune&lt;/p&gt;

</description>
      <category>devto</category>
    </item>
  </channel>
</rss>
