<?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: Aditya Anarase</title>
    <description>The latest articles on DEV Community by Aditya Anarase (@aditya_anarase_c62d2dd4dc).</description>
    <link>https://dev.to/aditya_anarase_c62d2dd4dc</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%2F3936264%2F6da6b681-1679-4d9c-9235-5d9d2911c487.jpg</url>
      <title>DEV Community: Aditya Anarase</title>
      <link>https://dev.to/aditya_anarase_c62d2dd4dc</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/aditya_anarase_c62d2dd4dc"/>
    <language>en</language>
    <item>
      <title>Captain Cool AI — Building a Multi-Agent IPL Strategy Engine with Google Gemini 2.5</title>
      <dc:creator>Aditya Anarase</dc:creator>
      <pubDate>Sun, 17 May 2026 12:59:11 +0000</pubDate>
      <link>https://dev.to/aditya_anarase_c62d2dd4dc/captain-cool-ai-building-a-multi-agent-ipl-strategy-engine-with-google-gemini-25-59a4</link>
      <guid>https://dev.to/aditya_anarase_c62d2dd4dc/captain-cool-ai-building-a-multi-agent-ipl-strategy-engine-with-google-gemini-25-59a4</guid>
      <description>&lt;h1&gt;
  
  
  Captain Cool AI — Building a Multi-Agent IPL Strategy Engine with Google Gemini 2.5
&lt;/h1&gt;

&lt;p&gt;Cricket is a captain’s game.&lt;/p&gt;

&lt;p&gt;In the IPL, tactical decisions change matches ball-by-ball:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Who bowls the next over?&lt;/li&gt;
&lt;li&gt;Should spin continue under dew?&lt;/li&gt;
&lt;li&gt;When should the Impact Player be used?&lt;/li&gt;
&lt;li&gt;Should the captain attack or defend the boundary?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We wanted to build an AI system that thinks like a real IPL captain.&lt;/p&gt;

&lt;p&gt;So we built &lt;strong&gt;Captain Cool AI&lt;/strong&gt; — a multi-agent IPL tactical command center powered entirely by the Google Gemini ecosystem.&lt;/p&gt;

&lt;p&gt;Instead of creating a generic cricket chatbot, we designed a system where multiple AI agents debate strategy like a real dugout before committing to a final tactical call.&lt;/p&gt;




&lt;h1&gt;
  
  
  The Idea
&lt;/h1&gt;

&lt;p&gt;The goal was simple:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Simulate how elite IPL captains think under pressure.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Captain Cool AI allows users to input:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;current score&lt;/li&gt;
&lt;li&gt;overs&lt;/li&gt;
&lt;li&gt;wickets&lt;/li&gt;
&lt;li&gt;target&lt;/li&gt;
&lt;li&gt;pitch conditions&lt;/li&gt;
&lt;li&gt;dew factor&lt;/li&gt;
&lt;li&gt;bowling options&lt;/li&gt;
&lt;li&gt;batting pair&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Runs a multi-agent tactical debate&lt;/li&gt;
&lt;li&gt;Challenges decisions internally&lt;/li&gt;
&lt;li&gt;Calculates probabilities&lt;/li&gt;
&lt;li&gt;Explains the final strategy in authentic cricket language&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The result feels less like an AI assistant and more like an IPL strategy war room.&lt;/p&gt;




&lt;h1&gt;
  
  
  Tech Stack
&lt;/h1&gt;

&lt;p&gt;We built the entire system on Google’s AI ecosystem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Core Stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;TailwindCSS&lt;/li&gt;
&lt;li&gt;FastAPI&lt;/li&gt;
&lt;li&gt;Google Gemini 2.5 Flash&lt;/li&gt;
&lt;li&gt;Google Gemini 2.5 Pro&lt;/li&gt;
&lt;li&gt;Google ADK&lt;/li&gt;
&lt;li&gt;Gemini Function Calling&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Architecture Overview
&lt;/h1&gt;

&lt;p&gt;Captain Cool AI uses a multi-agent architecture where every agent has:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;its own role&lt;/li&gt;
&lt;li&gt;its own system prompt&lt;/li&gt;
&lt;li&gt;independent Gemini calls&lt;/li&gt;
&lt;li&gt;tactical specialization&lt;/li&gt;
&lt;li&gt;shared contextual memory&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  The 4 AI Agents
&lt;/h1&gt;

&lt;h2&gt;
  
  
  1. Match Analyst Agent
&lt;/h2&gt;

&lt;p&gt;The Match Analyst acts like a Moneyball-style cricket strategist.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;analyze batter vs bowler matchups&lt;/li&gt;
&lt;li&gt;calculate pressure index&lt;/li&gt;
&lt;li&gt;evaluate pitch behavior&lt;/li&gt;
&lt;li&gt;estimate win probability&lt;/li&gt;
&lt;li&gt;identify tactical trends&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hardik Pandya strikes at 192 against pace-on deliveries in death overs but drops significantly against wide yorkers.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  2. Tactical Captain Agent
&lt;/h2&gt;

&lt;p&gt;This agent behaves like a calm IPL captain under pressure.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;decide bowling changes&lt;/li&gt;
&lt;li&gt;recommend field placements&lt;/li&gt;
&lt;li&gt;suggest Impact Player timing&lt;/li&gt;
&lt;li&gt;manage over-by-over tactics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bring Pathirana now and force Hardik to access the off-side boundary.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Devil’s Advocate Agent
&lt;/h2&gt;

&lt;p&gt;This was the most important part of the system.&lt;/p&gt;

&lt;p&gt;Instead of blindly agreeing, this agent aggressively challenges tactical decisions.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;expose tactical risks&lt;/li&gt;
&lt;li&gt;question emotional decisions&lt;/li&gt;
&lt;li&gt;propose alternative strategies&lt;/li&gt;
&lt;li&gt;force revisions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Saving Rashid for over 19 is dangerous because dew will reduce grip significantly.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This creates genuine agentic behavior instead of fake multi-role prompting.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Commentary Expert Agent
&lt;/h2&gt;

&lt;p&gt;The final agent explains the tactical decision like a live cricket commentator.&lt;/p&gt;

&lt;p&gt;Responsibilities:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;convert tactical reasoning into fan-friendly commentary&lt;/li&gt;
&lt;li&gt;explain why-this-not-that&lt;/li&gt;
&lt;li&gt;summarize risk/reward tradeoffs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“This is classic death-over manipulation. The captain is forcing the batter to hit against the angle under pressure.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Multi-Agent Tactical Debate
&lt;/h1&gt;

&lt;p&gt;The core innovation was the debate loop.&lt;/p&gt;

&lt;p&gt;Instead of using a single Gemini prompt pretending to be multiple agents, we implemented a real reasoning workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Match Analyst evaluates conditions&lt;/li&gt;
&lt;li&gt;Tactical Captain proposes a strategy&lt;/li&gt;
&lt;li&gt;Devil’s Advocate critiques the plan&lt;/li&gt;
&lt;li&gt;Tactical Captain revises or defends&lt;/li&gt;
&lt;li&gt;Commentary Expert explains the final decision&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This created tactical discussions that felt surprisingly authentic.&lt;/p&gt;




&lt;h1&gt;
  
  
  Shared Match Memory
&lt;/h1&gt;

&lt;p&gt;We implemented shared contextual memory across all agents.&lt;/p&gt;

&lt;p&gt;The system tracks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;previous overs&lt;/li&gt;
&lt;li&gt;batter momentum&lt;/li&gt;
&lt;li&gt;bowler rhythm&lt;/li&gt;
&lt;li&gt;yorker success rate&lt;/li&gt;
&lt;li&gt;pressure moments&lt;/li&gt;
&lt;li&gt;tactical patterns&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This allows agents to reference earlier events naturally.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Siraj missed yorkers in the previous over, so the captain should avoid repeating the same plan.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Gemini Tool Calling
&lt;/h1&gt;

&lt;p&gt;To make the system truly agentic, we integrated Gemini function calling with tactical tools.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools Used
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Win Probability Engine
&lt;/h3&gt;

&lt;p&gt;Calculates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;win probability&lt;/li&gt;
&lt;li&gt;projected score&lt;/li&gt;
&lt;li&gt;pressure index&lt;/li&gt;
&lt;li&gt;momentum shifts&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Matchup Analyzer
&lt;/h3&gt;

&lt;p&gt;Evaluates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;batter vs bowler records&lt;/li&gt;
&lt;li&gt;spin vs pace effectiveness&lt;/li&gt;
&lt;li&gt;death-over strike rates&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Pitch &amp;amp; Dew Analyzer
&lt;/h3&gt;

&lt;p&gt;Analyzes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dew conditions&lt;/li&gt;
&lt;li&gt;pitch slowdown&lt;/li&gt;
&lt;li&gt;venue behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These tools allowed agents to reason using real tactical data instead of static prompting.&lt;/p&gt;




&lt;h1&gt;
  
  
  Live Match Scraper
&lt;/h1&gt;

&lt;p&gt;One of the most exciting features was the live match scraper.&lt;/p&gt;

&lt;p&gt;Users can paste:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cricbuzz URLs&lt;/li&gt;
&lt;li&gt;ESPN Cricinfo URLs&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The system then:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;fetches live match content&lt;/li&gt;
&lt;li&gt;extracts score/state using Gemini&lt;/li&gt;
&lt;li&gt;auto-populates the tactical dashboard&lt;/li&gt;
&lt;li&gt;starts tactical analysis instantly&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This made the experience feel like a real AI-powered IPL command center.&lt;/p&gt;




&lt;h1&gt;
  
  
  Tactical Realism
&lt;/h1&gt;

&lt;p&gt;We wanted every output to feel like real cricket intelligence.&lt;/p&gt;

&lt;p&gt;So the system generates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;bowling changes&lt;/li&gt;
&lt;li&gt;field placements&lt;/li&gt;
&lt;li&gt;tactical intent&lt;/li&gt;
&lt;li&gt;counterfactual reasoning&lt;/li&gt;
&lt;li&gt;alternative rejected strategies&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bowling Rashid now improves win probability from 61% to 68% because dew may reduce spin grip later.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Field setups are also generated dynamically:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;deep square leg&lt;/li&gt;
&lt;li&gt;long-off back&lt;/li&gt;
&lt;li&gt;third-man fine&lt;/li&gt;
&lt;li&gt;cover inside the ring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This made the strategies feel much closer to actual IPL captaincy.&lt;/p&gt;




&lt;h1&gt;
  
  
  Captaincy Personality Modes
&lt;/h1&gt;

&lt;p&gt;We added different captain personalities to simulate tactical styles.&lt;/p&gt;

&lt;p&gt;Modes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dhoni Mode&lt;/li&gt;
&lt;li&gt;Rohit Mode&lt;/li&gt;
&lt;li&gt;Gambhir Mode&lt;/li&gt;
&lt;li&gt;Cummins Mode&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each mode changes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;aggression level&lt;/li&gt;
&lt;li&gt;bowling strategy&lt;/li&gt;
&lt;li&gt;field placement logic&lt;/li&gt;
&lt;li&gt;tactical tone&lt;/li&gt;
&lt;li&gt;risk appetite&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This added personality and realism to the system.&lt;/p&gt;




&lt;h1&gt;
  
  
  Frontend Experience
&lt;/h1&gt;

&lt;p&gt;The UI was designed to feel like:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;an IPL tactical command center&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;instead of:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;a generic AI chatbot.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We built:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;live tactical debate timeline&lt;/li&gt;
&lt;li&gt;streaming agent responses&lt;/li&gt;
&lt;li&gt;confidence meters&lt;/li&gt;
&lt;li&gt;win probability cards&lt;/li&gt;
&lt;li&gt;premium dark sports analytics UI&lt;/li&gt;
&lt;li&gt;command-center aesthetics&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was immersion and realism.&lt;/p&gt;




&lt;h1&gt;
  
  
  Example Tactical Scenario
&lt;/h1&gt;

&lt;p&gt;Scenario:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;MI need 24 off 10&lt;/li&gt;
&lt;li&gt;Hardik Pandya on strike&lt;/li&gt;
&lt;li&gt;Heavy dew&lt;/li&gt;
&lt;li&gt;Pathirana has one over remaining&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Tactical Captain
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Bring Pathirana now with wide yorkers.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Devil’s Advocate
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Hardik targets pace-on deliveries. Jadeja may force mistimed lofts.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Final Decision
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“Use Pathirana with deep third and long-off protection.”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Commentary Expert
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;“This is classic death-over manipulation under pressure.”&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h1&gt;
  
  
  Challenges
&lt;/h1&gt;

&lt;p&gt;Some of the biggest engineering challenges included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;creating believable tactical debate&lt;/li&gt;
&lt;li&gt;maintaining shared memory&lt;/li&gt;
&lt;li&gt;coordinating multiple Gemini agents&lt;/li&gt;
&lt;li&gt;balancing realism with speed&lt;/li&gt;
&lt;li&gt;designing cricket-authentic explanations&lt;/li&gt;
&lt;li&gt;building smooth orchestration workflows&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Final Thoughts
&lt;/h1&gt;

&lt;p&gt;Captain Cool AI was built around one question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“What would a great IPL captain do next?”&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By combining:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Google Gemini 2.5&lt;/li&gt;
&lt;li&gt;multi-agent orchestration&lt;/li&gt;
&lt;li&gt;tactical explainability&lt;/li&gt;
&lt;li&gt;live match parsing&lt;/li&gt;
&lt;li&gt;shared contextual memory&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;we created an AI-powered IPL strategy engine capable of debating cricket tactics like a real IPL dugout.&lt;/p&gt;

&lt;p&gt;This project showed how agentic AI systems can move far beyond chatbots into collaborative tactical intelligence systems.&lt;/p&gt;




&lt;h1&gt;
  
  
  GitHub Repository
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://github.com/Aditya-Anarse/captain-cool-aii.git" rel="noopener noreferrer"&gt;https://github.com/Aditya-Anarse/captain-cool-aii.git&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Built With
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Google Gemini 2.5&lt;/li&gt;
&lt;li&gt;Google ADK&lt;/li&gt;
&lt;li&gt;Next.js&lt;/li&gt;
&lt;li&gt;FastAPI&lt;/li&gt;
&lt;li&gt;TailwindCSS&lt;/li&gt;
&lt;li&gt;Gemini Function Calling&lt;/li&gt;
&lt;/ul&gt;

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