A submission for simulating cricket strategy using Google Gemini at Agentic Hackathon at GDG Cloud Pune with mentors @pratik_kale & @antrixsh_gupta
🏏 Captain Cool — The Multi-Agent IPL Match Strategist
A pure vanilla, zero-dependency AI orchestrator built on the Google Gemini tech stack for the Agentic Hackathon.
Overview
Cricket is a captain's game. To win an IPL match, you need to read the pitch, analyze the stats, anticipate the opponent, and make a gut call. "Captain Cool" is an AI-powered IPL Match Strategist that orchestrates four distinct AI agents in a real-time debate loop to make the ultimate tactical decision.
🤖 Agent Architecture
Our system uses a sequential reasoning loop built on ADK principles:
- 📊 Stats Analyst (Tool User): Uses Gemini Function Calling to query the
getVenueContexttool, retrieving real-time data on dew factor, pitch behavior, and average scores for the selected stadium. - ♟️ Strategist: Takes the match context and Analyst's data to propose a highly tactical, data-driven move (e.g., "Bowl the left-arm spinner now because the RHB strike rate against…
Overview
Cricket is a captain's game. To win an IPL match, you need to read the pitch, analyze the stats, anticipate the opponent, and make a gut call. "Captain Cool" is an AI-powered IPL Match Strategist built entirely on the Google Gemini tech stack.
Instead of a single prompt, Captain Cool orchestrates four distinct AI agents using principles from the Agent Development Kit (ADK) in a real-time debate loop.
Architecture & Agent Roles
Our multi-agent system uses a sequential reasoning loop:
Stats Analyst (Tool User): Uses Gemini Function Calling to query the
getVenueContexttool, retrieving real-time-ish data on dew factor, pitch behavior, and average scores for the selected venue.Strategist: Takes the match context and Analyst's data to propose a highly tactical, data-driven move (e.g., "Bowl the left-arm spinner now because the RHB strike rate against SLA is low").
Devil's Advocate: Critiques the Strategist and points out the risks and flaws in the proposed plan.
The Captain (Final Call): Reads the debate and makes the final gut decision. The output is delivered in authentic cricket dressing-room terminology.
Tech Stack & Hackathon Requirements Met
- AI / LLM: Google Gemini (
gemini-2.5-pro&gemini-2.5-flash) - SDK:
@google/genai(Official JS/TS SDK loaded natively via ESM) - Framework & Orchestration: Built with ADK principles for multi-agent architecture
- Multimodal Flair: UI cover art generated using Google's Imagen 3 / Lyria ecosystem
- IDE: Vibe-coded entirely using Google Antigravity in a 3-hour session
- Frontend: Pure Vanilla HTML/CSS/JS with zero dependencies
How It Meets the Hard Requirements
- Three or more distinct agents: Yes — Analyst, Strategist, Advocate, Captain.
- Real Tool Call: The Analyst uses Gemini Function Calling (
getVenueContext) to pull pitch stats. - Multi-Turn Reasoning Loop: Strategist proposes → Advocate critiques → Captain resolves.
- Explainability in Cricket Jargon: The Captain's prompt forces authentic cricket terminology like "leggie", "death overs", and "turning track" instead of ML jargon.
Prompts Used (Snippet)
Devil's Advocate:
"You are the Devil's Advocate. Your job is to critique the Strategist's proposal. Point out the risks and why it might backfire. Keep your response concise and direct. Do not write huge paragraphs."
Captain:
"You are MS Dhoni / Rohit Sharma (Captain Cool). Make the final decision based on the debate. Explain your reasoning using authentic dressing-room cricket terminology like 'leggie' and 'death overs'. Keep your final decision short, authoritative, and to the point."
Running it locally
Since this project was built without Next.js or heavy frameworks, running it is simple:
- Double-click
index.htmlto open it in your browser. - Enter your Gemini API key in the UI.
- Input the match state and click "Execute Agent Strategy".
No npm install or servers required. It works end-to-end directly in the browser using the @google/genai library via ESM.
Vibe-coded in 3 hours using Google Antigravity.

Top comments (0)