Inspiration

Professional esports coaching relies on manual VOD review and stat compilation. The GRID Data API provides structured match JSON that contains draft sequences, player stats, and objective events. The gap between that raw data and usable coaching/scouting output is where this project operates.A comprehensive end-to-end platform for professional esports teams and fans, powered by AI and machine learning. Nexus Commander bridges the gap between raw telemetry data and high-level strategic insights.

Nexus Commander is a Python platform that ingests GRID Data API match JSON files and runs four analysis pipelines on the parsed data. The data layer reads 19 JSON files, parses seriesState.games into typed dataclasses (MatchMetadata, DraftData, PlayerStats, TeamStats), and builds a Pandas DataFrame. An orchestrator class (NexusCommander) initialises all components in a fixed sequence and exposes a unified interface.

It is designed to give professional esports teams and coaches a competitive edge through:

  • AI-Powered Analysis: Strategic insights from match telemetry data
  • Automated Scouting: Generate comprehensive opponent reports in seconds
  • Draft Assistance: GNN-based champion draft predictions and recommendations
  • Fan Engagement: Interactive mini-games for community engagement

Target audience

Primary users: esports coaching staff and analysts who need to process opponent match data before a match. Secondary: esports content platforms adding interactive fan features. The system reads match JSON files at startup, builds internal data structures once, and serves queries and game sessions from those structures for the lifetime of the process.

What it does

It parses GRID match data and runs four pipelines: strategic coaching queries (gold, macro, player, pattern analysis), opponent scouting report generation (10 sections), draft win-probability prediction with ranked pick/ban recommendations, and a turn-based draft game where moves are scored against those same recommendations. All four pipelines share the same parsed dataset and champion graph.

Key Features

Unified Data Pipeline: Ingest and process GRID Data API match JSONs
Strategic AI Coach: Answers complex questions about team performance
Scouting Reports: 10-page professional opponent dossiers generated automatically
Draft Predictor: Real-time win probability and pick/ban recommendations
Draft Master Game: Fan-facing competitive mini-game

Functionality

  • JSON file discovery and parsing — reads matchID_*.json via glob, parses seriesState.games[0]
  • Draft sequence extraction — parses draftActions[] into bans and picks keyed by team_id and sequenceNumber
  • Player stat extraction — kills, deaths, assists, gold, CS, wards, vision_score, damage per player per match
  • Team objective extraction — baron_kills, dragon_kills, herald_kills, tower_kills per team per match
  • DataFrame creation — Pandas DataFrame with one row per team per match, picks and bans as comma-joined strings
  • Gold deficit analysis — compares bot-lane CS, deaths, gold; returns root-cause list
  • Macro pattern flagging — compares objective counts between teams; returns CoachingInsight with priority
  • Player micro analysis — evaluates KDA and death count for a named player in a given match
  • Signature pattern detection — counts pick and ban frequency across last N matches for a team
  • 10-section scouting report — executive summary, record, draft pool, macro, player profiles, signatures, weaknesses, head-to-head, counter-strategies, takeaways
  • Scouting report text export — writes formatted text file
  • Champion graph construction — synergy and counter matrices from match histories, ≥3 co-occurrence threshold
  • Win probability prediction — weighted sum of champion power, team synergy, counter advantage
  • Pick/ban recommendations — ranks available champions by power + synergy × 0.3 + counter × 0.4
  • 20-phase draft game — player vs AI turn loop with phase descriptions
  • Difficulty-filtered hints — easy (5), medium (3), hard (1), pro (0) recommendations shown
  • AI opponent — picks from its own recommendation list, randomness scope set by difficulty
  • Move scoring — ranks player's choice against recommendations, applies time bonus and streak/combo mechanics
  • Achievement system — 8 conditions checked: first_blood, combo_master, synergy_king, counter_strike, speedster, flawless, comeback_kid, draft_god
  • Final rating — Legendary / Master / Diamond / Platinum / Gold based on total score
  • Leaderboard — in-memory, sorted by total score, returns top N completed games
  • Flask REST API — 17 routes, CORS enabled, JSON request/response
  • Standalone web interface — single HTML file, all game and draft logic in JavaScript, no server required
  • Test suite — 6 tests: data loading, AI coach, scouting report, drafting assistant, draft master game, full integration

How we built it

Built in Python using dataclasses for typed data structures, NumPy for vector operations in the prediction layer, Pandas for DataFrame creation, and Flask for the REST API. The core algorithm is a champion relationship graph built from pairwise win-rate statistics: a synergy matrix (teammate co-occurrence win-rate deviation) and a counter matrix (head-to-head win rates), both with a minimum 3-game sample threshold. Win probability is a weighted sum of champion power, synergy, and counter advantage. The web interface is a single HTML/CSS/JS file with no external dependencies. Databases: in-memory dicts (knowledge base, active games, leaderboard), file system (GRID JSON input, scouting report text output).

Challenges we ran into

The GRID JSON schema is nested (seriesState → games → teams → players/objectives) and one file contained concatenated JSON requiring error handling. The synergy matrix requires a minimum sample threshold — without it, single-game matchups produce noise. Replicating the Python scoring formulas in the standalone JavaScript frontend required exact alignment of the same weighted calculations.

Accomplishments that we're proud of

The platform parses 19 GRID match files, extracts 79 champions across 11 teams, and runs all four components without errors. The champion graph builds synergy and counter matrices from historical data. The scouting report pipeline produces 10-section structured output. The game engine runs a full 20-phase draft sequence with scoring, achievements, and AI responses. All 6 tests pass.

What we learned

Structured match data from APIs like GRID contains enough information to build champion relationship graphs without access to item builds or in-game telemetry. Keyword-based query routing works when the query space is bounded but fails on queries outside the defined patterns. The minimum-sample threshold in graph construction is the single most impactful parameter — it determines how much of the champion pool has usable edges.

What's next for Nexus Commander The Unified AI-Esports Intelligence Platform

Integrate live GRID API streaming via Apache Pulsar for real-time draft support. Persist game and leaderboard data to Firebase instead of in-memory storage.

Built With

  • anthropic-api-(claude)
  • apache-pulsar
  • aws-step-functions
  • collections.defaultdict
  • css3
  • dataclasses
  • firebase
  • flask
  • flask-(rest-api-server)
  • flask-cors
  • glob
  • google-bigquery
  • google-gemini-api
  • graph-based-scoring
  • grid-data-api
  • html5
  • javascript-(es6+)
  • json
  • keyword-routing
  • mlconfig
  • numpy
  • pandas
  • pathlib
  • pinecone
  • python
  • python-dotenv
  • weighted-sum-prediction.-llmconfig
Share this project:

Updates