🏏 Captain Cool — AI That Thinks Like an IPL Captain
What happens when you combine cricket strategy, multi-agent reasoning, and the Google Gemini ecosystem in a 3-hour hackathon sprint?
You get Captain Cool — an AI-powered IPL match strategist where multiple Gemini agents debate tactical cricket decisions like a real dressing room before making the final captain’s call.
Instead of building a generic chatbot with cricket terminology sprinkled on top, we wanted to simulate something much closer to a real IPL strategy room:
- analysts studying matchups,
- captains balancing risk,
- assistant coaches challenging decisions,
- and commentators explaining the logic to fans.
Built entirely on the Google AI ecosystem, Captain Cool became our attempt at turning agentic AI into a tactical cricket brain.
⚡ The Core Idea
During an IPL match, captains constantly make micro-decisions:
- Who bowls the next over?
- Should the spinner continue despite dew?
- Is it the right moment for the Impact Player?
- Do we attack or delay Bumrah’s final over?
- Which field setup reduces boundary probability?
Captain Cool processes the live match state and lets multiple AI agents argue over the best tactical decision before producing a final recommendation.
The result feels surprisingly close to a real cricket strategy meeting.
🧠 Multi-Agent Architecture
Instead of relying on a single prompt, we decomposed the system into specialized Gemini-powered agents.
🕵️ Match Analyst Agent
Responsible for:
- venue conditions
- batter vs bowler matchups
- dew impact
- phase analysis
- tactical statistics
This agent also performs tool execution to fetch structured cricket insights.
💡 Strategist Agent
The “captain brain” of the system.
Inspired by tactical IPL leadership styles, this agent:
- proposes bowling changes,
- plans death overs,
- controls field aggression,
- and balances risk vs reward.
🔥 Devil’s Advocate Agent
This became the most interesting part of the project.
Its sole responsibility:
challenge the strategist.
Example:
“If we use Bumrah now, who controls the 19th over against Tim David?”
This created genuine multi-agent reasoning instead of fake roleplay.
🎙️ Commentator Agent
The final layer converts raw AI logic into human cricket language.
Instead of:
“Probability optimization suggests pace utilization.”
The system explains:
“The pitch is gripping slightly, so bowling pace-off cutters into the surface makes more tactical sense than feeding spin into the arc.”
This dramatically improved explainability.
🔄 The Agentic Debate Loop
Our orchestration flow:
Match State
↓
Analyst Agent
↓
Strategist Proposal
↓
Devil’s Advocate Critique
↓
Strategist Revision
↓
Commentator Explanation
↓
Final Captain's Call
The important part:
the disagreement is visible.
We intentionally expose the internal tactical debate instead of hiding the reasoning.
🛠️ Tech Stack
AI & Agent Layer
- Google Gemini API
-
google-genaiSDK - Multi-agent orchestration inspired by Google ADK
- Gemini function/tool calling
Backend
- Python
- FastAPI
- Pydantic
Frontend
- Streamlit dashboard
- Custom dark-mode tactical UI
Development Workflow
- Built using Google Antigravity
- AI-assisted vibe coding
- Autonomous file scaffolding and iteration
🏏 Example Match Scenario
We tested Captain Cool using a pressure scenario:
Match Situation
- RCB vs PBKS
- 150/2 after 14.2 overs
- Virat Kohli on strike
- Chahal bowling
- Heavy dew expected later
📊 Analyst Insight
The Match Analyst agent triggered tool execution and identified:
- Kohli performs strongly against traditional spin,
- but his scoring rate drops against googly-heavy leg-spin variations on slower surfaces.
🧠 Internal Debate
Strategist
“Attack with leg-spin now before the dew settles in.”
Devil’s Advocate
“Risky. If Kohli survives the first six balls, the short boundary becomes a major issue.”
Strategist Revision
“Fair. We hold the spinner back for one over and use hard-length pace into the surface first.”
🏆 Final Captain’s Call
“Bring back the pace bowler from the Pavilion End. Use cross-seam hard lengths into the pitch and protect square boundaries. Delay spin until the new batter arrives.”
⚡ Biggest Learnings
The most interesting realization from this build:
Multi-agent systems feel dramatically more intelligent when disagreement is visible.
The Devil’s Advocate agent consistently improved decisions by forcing counterfactual thinking.
Instead of:
“one smart AI”
the project started feeling like:
“a real strategy room.”
🚀 Future Improvements
If we continue developing Captain Cool, the next additions would be:
- Live Cricbuzz/ESPN integration
- Real-time win probability engine
- Voice commentary using Gemini Live API
- Memory across overs
- Multimodal pitch image analysis
- Full Google ADK orchestration
📂 GitHub Repository
👉 https://github.com/So-rush/captain-cool[](url)
🏏 Final Thoughts
Cricket is ultimately a captain’s game.
Captain Cool was our attempt to explore what happens when tactical sports intelligence meets agentic AI reasoning inside the Google Gemini ecosystem.
And honestly…
watching AI agents argue about death-over bowling plans was way more fun than expected. 🏆





















