A learning repository focused on applying Machine Learning techniques to League of Legends professional match analysis. This project demonstrates real-world ML applications in esports analytics, including win probability prediction, teamfight detection, player positioning analysis, and strategic decision-making.
This repository serves as an educational platform for understanding how Machine Learning can be applied to competitive gaming data. Using real League of Legends esports match data (JSONL format), the project implements various ML models and algorithms to analyze gameplay patterns, predict outcomes, and provide tactical insights.
- Logistic Regression: Win probability prediction based on game state features
- Graph Neural Networks (GNN): Team synergy analysis and player relationship modeling
- Markov Chains: Game state transitions and flow analysis
- Contextual Analysis: Understanding game nuances (tempo, gold distribution, objective control)
- Real-time Prediction: Teamfight detection and next objective forecasting
- Win Probability Calculator: Real-time prediction using multiple game features (gold, kills, objectives, vision)
- Teamfight Analyzer: Detects and evaluates teamfights with outcome predictions
- Skill Tracker: Monitors champion ability cooldowns and usage patterns
- Tactical Positioning: Recommends optimal player positioning based on matchups and game state
- Vision Analysis: Evaluates ward placement value and strategic importance
- GNN-based Synergy: Analyzes champion combinations and team composition effectiveness
JSONL Events → Preprocessing → Feature Extraction → ML Models → Predictions
- Data Ingestion: Parses League of Legends esports event data (RFC461 schema)
- Feature Engineering: Extracts relevant features (gold diff, kill diff, objectives, vision)
- Model Training: Trains on historical match data
- Real-time Analysis: Provides live predictions and insights during match replay
/ml/services: ML service implementations (teamfight analyzer, GNN, contextual analyzer)/core/pipelines: Data preprocessing and feature extraction pipelines/core/data: Type definitions for game events and match state/components: React components for visualization (minimap, overlays, charts)/state: State management using Zustand with State Pattern
- Node.js 20+
- npm or yarn
# Clone the repository
git clone <repository-url>
cd analysis
# Install dependencies
npm install
# Run development server
npm run devVisit http://localhost:3000 to see the application.
- Upload a League of Legends esports JSONL file
- The system will:
- Parse match events
- Train ML models on historical data
- Provide real-time analysis and predictions
- Visualize player positions, teamfights, and strategic recommendations
Uses multiple weighted features:
- Gold difference (30% weight)
- Kill difference (20% weight)
- Tower difference (25% weight)
- Dragon control (15% weight)
- Baron control (10% weight)
- Vision control (5% weight)
Identifies teamfights based on:
- Player proximity (< 2500 units)
- Minimum participants (3+ per team)
- Recent kills in area
- Duration threshold
- Game Phase Detection: Early/Mid/Late game classification
- Game Style: Bloodbath, Normal, Slow, or Passive
- Tempo Advantage: Measures proactive vs reactive playstyle
- Gold Distribution: Analyzes resource allocation efficiency
- Ward Value: Calculates strategic and informational value of vision
- Node Features: Player stats (health, level, position, gold)
- Edge Types: Teammate, proximity, and enemy relationships
- Message Passing: 3 iterations of information propagation
- Applications: Synergy scoring, decision quality analysis
- Framework: Next.js 15 with React 19
- Language: TypeScript
- Styling: TailwindCSS
- Animation: Framer Motion
- State Management: Zustand
- Data Source: Data Dragon API + Esports JSONL data
This repository demonstrates:
- Feature Engineering: Extracting meaningful features from raw game data
- Model Training: Implementing and training ML models from scratch
- Real-time Inference: Applying models to live/replay data
- Data Visualization: Presenting complex ML insights in an intuitive UI
- Domain Knowledge: Combining ML with game-specific understanding
- Software Architecture: Structuring a complex ML application
The project uses League of Legends esports data in JSONL format with RFC461 schema:
champion_kill: Kill events with participants and damage breakdownbuilding_kill: Tower/inhibitor destructionelite_monster_kill: Dragon/Baron/Herald killsskill_used: Champion ability usage with cooldownsward_placed: Vision control eventsstats_update: Periodic game state snapshots
- Deep Learning models (LSTM for sequence prediction)
- Reinforcement Learning for optimal decision-making
- Computer Vision for minimap analysis
- Advanced feature engineering (wave state, jungle pathing)
- Multi-game training dataset
- Model performance metrics and validation
This is an educational project. League of Legends and all related content are trademarks of Riot Games.
This is a learning repository. Feel free to fork, experiment, and learn from the code!
For questions or discussions about ML in esports, feel free to open an issue.
Note: This project is for educational purposes to demonstrate ML applications in gaming analytics. It uses publicly available esports data.