EE P 596 Final Project Autumn 2025
This project builds a context-aware deep learning model that evaluates how historically favorable a player–champion–team configuration is within professional League of Legends.
Using match data from 2019–2024, the model predicts win probability and produces a continuous favorability score derived from learned embeddings and contextual features.
The goal is not to estimate intrinsic skill, but to quantify how effective a specific configuration has historically been based on the model’s understanding of player tendencies, champion synergies, and team contexts.
├── README.md
├── requirements.txt
├── src/
│ ├── main.py # Entry point of the program
│ ├── utils.py # Any helper functions
│ ├── model.py # Model definition
├── checkpoints/
├── demo/ # Full original .ipynb
└── results/
Professional League of Legends is highly contextual:
player impact depends on role, champion, team identity, region strength, and draft strategy.
Traditional metrics (KDA, DPM, gold diff) fail to capture:
- role expectations
- synergy with champion picks
- team style
- region/tournament strength
- per-player historical tendencies
This model uses:
- Embeddings for player, champion, team, role, league, tournament
- Normalized per-player performance stats (role-aware normalization)
- Team aggregate features
- A deep MLP with BatchNorm + Dropout
- Two model heads (win-probability + latent performance signal)
Then, for each configuration:
- The model classifies a win/loss while simultaneously a producing continuous score that reflects, what the model thinks is, how impactful a player was to a winning outcome of a match.
- Historical probabilities are aggregated.
- The aggregated values are scaled to produce a 0–100 favorability score.
This score answers:
"How historically favorable is this player–champion–team configuration?"
Source: League of Legends Esports Player Game Data (2019-2024)
- ~370,000 per-player samples originally
- Filtered to retain players with ≥ 50 games, yielding ~325,000 samples
- ~1950 unique professional players
- All numerical stats normalized per role (removes role bias)
- Categorical features encoded for embeddings
- Numeric team aggregates calculated
- Train/val/test split is time-aware
Raw data is not included in this repository. Due to this dataset requiring a subscribtion to access, only the two neccessary files are contained in the folder that requires a @uw.edu email to access. Access to this folder will be removed by the end of the year (2025). Dataset link: [Drive Folder] ! If you have trouble accessing this please notify me immediately.
Follow these steps to install dependencies and run the project. Or jump to the "Demo" section and run the project via the original .ipynb (suggested).
Linux/macOS:
python -m venv .venv
source .venv/bin/activate
Windows:
python -m venv .venv
./.venv/Scripts/Activate.ps1
pip install --upgrade pip wheel setuptools
pip install -r requirements.txt
CPU only
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
GPU (CUDA 11.8 example):
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
python src/main.py
After running main.py, users should expect:
- Console logs showing epoch‑by‑epoch training and validation loss/accuracy.
- A final printed evaluation summary on the test set.
- A saved checkpoint at:
checkpoints/best_model.pt
- Metrics and plots saved in:
results/
The model combines embedding layers (for categorical features) with a feed-forward MLP classifier.
- 64d players (highest complexity)
- 32d champions (mid complexity)
- 8-16d contextual embeddings
Why this size?
These sizes were selected after experimentation. The original larger configuration (256 → 128 → 64) exhibited rapid overfitting and triggered early stopping within only a few epochs. Reducing the network width improved generalization by lowering total parameter count and producing a better balance between embedding capacity and dense-layer expressiveness.
Activation Function:
ReLU – standard, stable, fast-converging for embeddings + MLPs.
Dropout: 0.3
Helps regularization but kept small because embeddings already act as regularizers.
Optimizer: Adam
Works well for sparse + dense mixed inputs
Learning Rate: 1e-4
Keeps both the MLP and embeddings smoother with more stable training
Batch Size: 256
Efficient training, smooth gradient estimates
Epochs: 12
Enough for convergence, also uses early stopping if necessary to avoid overfitting
Loss Function: BCEWithLogitsLoss
Binary classification without manual sigmoid
Scheduler: ReduceLROnPlateau
Prevents plateauing
Why BCEWithLogitsLoss? The model predicts “favorability” (probability of winning given configuration). This is a binary classification → logistic output is appropriate.
If you want to skip training, download a pre-trained version of the model here. Place the file at:
checkpoints/model.pt
Then run inference or demo scripts normally.
Running the demo notebook is the easiest way to reproduce the results (highly suggested).
Download the dataset files to the same directory as the notebook and run the entire notebook.
Download the pre-trained model and run the notebook starting from the "Evaluation" subsection.
This project uses or references the following external resources:
- League of Legends Esports Player Game Data (2019-2024)
Maxime De Bois, Flora Parmentier, Raphaël Puget, Matthew Tanti, Jordan Peltier, "League of Legends Esports Player Game Data (2019-2024)", IEEE Dataport, January 16, 2025, doi:10.21227/5evv-jk25
- PyTorch for model training
- Pandas, NumPy, scikit‑learn for data handling and preprocessing
