Inspiration

Cricket is more than just a game; it's an emotion. However, looking at static scoreboards can be monotonous. I wanted to bridge the gap between real-time sports data and conversational AI. As a first-year university student stepping into the world of artificial intelligence and web development, I wanted to build something that pushes the boundaries of a standard web app. Having recently built my foundational knowledge in AI, my goal was to create a dynamic, voice-enabled tactician that doesn't just read scores, but analyzes the match like a real commentator.

What it doesTactician AI is a 3D-animated, voice-enabled intelligent cricket agent. It fetches real-time cricket data and feeds it to Google's Gemini AI to generate contextual match insights, strategic analysis, and summaries.Immersive UI: Features a 3D animated interface with seamless Dark/Light modes for an engaging user experience.Voice Agent: Uses Edge-TTS/gTTS to speak the AI-generated commentary out loud, providing a hands-free experience.Strategic Intelligence: Instead of just saying "Score is 120/2", the AI analyzes the required run rate, player partnerships, and predicts momentum shifts.To ensure accurate strategic context, the AI internally processes the match momentum using a weighted confidence algorithm and standard cricket metrics. For example, the Required Run Rate (RRR) is calculated and analyzed dynamically:$$RRR = \frac{\text{Runs Required}}{\text{Overs Remaining}}$$The AI's momentum confidence score $C$ evaluates $n$ different match variables (like wickets in hand, current run rate):$$C = \sum_{i=1}^{n} w_i \cdot x_i$$

How I built it

The project follows a decoupled client-server architecture: The Backend (Python/FastAPI): I built a robust backend using FastAPI and Uvicorn. It acts as the brain, fetching live cricket data from RapidAPI and sending precise prompts to the Google Gemini API via LangChain. The generated text is then converted to speech using edge-tts.

The Frontend (React/Vite): The client-side is a high-performance React application built with Vite and Tailwind CSS. It handles the 3D animations and the dynamic dark/light mode state management, rendering the AI's responses in real-time.

Challenges we ran into

Building the logic was exciting, but deployment tested my limits! I faced significant hurdles managing dependencies and configuring deployment environments. Transitioning a hybrid project (Python backend + Next/Vite frontend) to cloud infrastructure led to "Command Not Found" and environment path errors. I had to deeply understand how build machines operate, ultimately deciding to decouple the deployment—hosting the Python FastAPI backend completely independently on Render, and keeping the frontend purely as a Vite build.

Accomplishments that we're proud of

Successfully integrating Google Gemini to act as a domain-specific expert rather than a generic chatbot.

Creating a visually stunning 3D UI that actually feels alive while interacting with the user.

Overcoming severe deployment and continuous integration roadblocks right before the deadline.

What I have learned

This project was a massive learning curve. I deepened my understanding of combining large language models with real-time dynamic APIs. I also learned the hard way about DevOps, the strict environments of cloud deployment platforms, and how to effectively manage Cross-Origin Resource Sharing (CORS) between decoupled frontends and backends.

What's next for Tactician AI

In the future, I plan to integrate predictive ML models to forecast match outcomes dynamically, add multi-language voice support, and expand the AI's knowledge base to cover historical cricket statistics for deeper comparative analysis.

Built With

Share this project:

Updates