An Augmented Rating System for Test cricket: adapting Glicko's model
Paper β’ 2603.02574 β’ Published
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
A complete League of Legends esports match prediction system integrated with Polymarket for edge detection. Built on Oracle's Elixir match data (2014β2026) with a dual ELO rating system and XGBoost probability model.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β DATA LAYER β
β Oracle's Elixir CSV (165 columns, 1.1M+ rows) β
β Google Drive auto-sync (daily updates) β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
β FEATURE ENGINEERING β
β β’ Rolling team stats (15-game window, exp. weighted) β
β β’ Gold/XP/CS diffs at 10, 15, 20, 25 min β
β β’ Objective control (dragons, barons, towers, heralds) β
β β’ Vision metrics (wards, vision score) β
β β’ Win/loss streaks β
β Total: 115 pre-game features per matchup β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
β DUAL ELO RATING SYSTEM β
β Regional Rating: Updated from domestic league games β
β Meta Rating: Updated from international events only β
β ΞΌ_total = ΞΌ_regional + ΞΌ_meta β
β β Solves cross-region comparison (LCK vs LPL vs LEC) β
β β’ Margin of victory scaling (gold diff / game length) β
β β’ Time-based Ο inflation (off-season uncertainty) β
β β’ Roster change detection β Ο increase β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
β PREDICTION MODEL β
β XGBoost + Isotonic Regression Calibration β
β β’ 63% accuracy, 0.67 AUC-ROC, 0.225 Brier Score β
β β’ Time-series cross-validation (no data leakage) β
β β’ Bo3/Bo5 series probability extension β
β β’ Ensemble: 70% model + 30% ELO β
ββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββββββββ
β POLYMARKET INTEGRATION β
β Gamma API β Market discovery (tag_slug: esports) β
β CLOB API β Live bid/ask/mid prices β
β Edge = Model_prob - Market_mid β
β Kelly criterion for position sizing β
β 248+ active LoL markets detected β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Metric | Value |
|---|---|
| Accuracy | 63.0% |
| AUC-ROC | 0.672 |
| Brier Score | 0.224 (calibrated) |
| Log Loss | 0.639 (calibrated) |
| League | Accuracy | Brier Score | Games |
|---|---|---|---|
| LCK | 65.8% | 0.227 | 1,853 |
| LCP | 63.8% | 0.227 | 376 |
| LTA N | 67.6% | 0.225 | 213 |
| MSI | 62.4% | 0.234 | 234 |
| LEC | 61.8% | 0.257 | 1,077 |
| LPL | 59.9% | 0.250 | 2,796 |
| Worlds | 59.2% | 0.251 | 520 |
| Overall | 61.5% | 0.245 | 8,085 |
elo_diff β ELO rating difference (4.7%)diff_opp_towers_mean β Opponent tower diff (3.7%)diff_earned_gpm_mean β Gold per minute diff (2.2%)diff_towers_mean β Tower control diff (1.9%)diff_result_mean β Win rate diff (1.7%)| Rank | League | Strength | Method |
|---|---|---|---|
| 1 | LCK | 2.621 | MSI/Worlds results |
| 2 | LPL | 1.827 | MSI/Worlds results |
| 3 | LEC | 0.960 | MSI/Worlds results |
| 4 | LTA | 0.850 | Prior (limited intl) |
| 5 | CBLOL | 0.319 | MSI/Worlds results |
| 6 | LCP | 0.283 | MSI/Worlds results |
How it works: League strengths start from priors based on historical international performance. They are then updated via a Bayesian ELO-style system every time teams from different leagues meet at MSI, Worlds, FST, or EWC. The system uses K=0.02 for conservative updates.
| Rank | Team | League | ΞΌ | Games |
|---|---|---|---|---|
| 1 | Gen.G | LCK | 70.4 | 906 |
| 2 | T1 | LCK | 64.4 | 910 |
| 3 | Bilibili Gaming | LPL | 55.5 | 899 |
| 4 | Dplus Kia | LCK | 52.5 | 903 |
| 5 | Top Esports | LPL | 52.4 | 896 |
| 6 | JD Gaming | LPL | 50.8 | 845 |
| 7 | G2 Esports | LEC | 49.4 | 698 |
# Install dependencies
pip install -r requirements.txt
# Download data from Google Drive
python -c "
import gdown
gdown.download_folder('https://drive.google.com/drive/folders/1gLSw0RLjBbtaNy0dgnGQDAZOHIgCe-HH',
output='data/raw', quiet=False)
"
# Train the model (uses 2022-2026 data)
python -m lol_predictor.main train --backtest
# Predict a specific match
python -m lol_predictor.main predict --team-a "T1" --team-b "Gen.G" --league LCK --format bo5
# Compare against market odds
python -m lol_predictor.main edge --team-a "T1" --team-b "Gen.G" --market-odds 0.40 --format bo5
# Scan Polymarket for live LoL markets
python -m lol_predictor.main scan
# Show team ratings
python -m lol_predictor.main ratings --top 30
# Run full scheduler (daily retrain + 5-min scanning)
python -m lol_predictor.main run
The system uses a dual rating architecture (inspired by PandaSkill):
ΞΌ_total = ΞΌ_regional + ΞΌ_meta
Ο_total = sqrt(Ο_regionalΒ² + Ο_metaΒ²)
P(A wins) = Ξ¦((ΞΌ_A - ΞΌ_B) / sqrt(Ο_AΒ² + Ο_BΒ²))
1. Download latest CSVs from Google Drive (updated daily)
2. Rebuild ELO ratings from scratch (warm-up: 2019-2021, train: 2022-2026)
3. Recompute all rolling features
4. Retrain XGBoost with early stopping
5. Calibrate with isotonic regression
6. Save model artifacts
1. Query Polymarket Gamma API for active LoL esports events
2. Parse market questions to extract team names + match format
3. Fetch live CLOB prices (mid, bid, ask, spread)
4. Generate model predictions for each detected matchup
5. Compute edges: model_prob - market_mid
6. Flag edges > 5% with Kelly criterion sizing
7. Log results to data/processed/scan_logs/
lol_predictor/
βββ __init__.py
βββ config.py # All configuration (leagues, params, API URLs)
βββ main.py # CLI entry point
βββ train.py # Training pipeline orchestrator
βββ predict.py # Match prediction + market edge analysis
βββ data/
β βββ loader.py # CSV loading, cleaning, game pairing
βββ features/
β βββ engineering.py # Rolling stats, H2H, league strength
β βββ elo_system.py # Dual ELO (regional + meta) rating system
βββ model/
β βββ predictor.py # XGBoost model + calibration + backtesting
βββ polymarket/
β βββ scanner.py # Gamma API + CLOB price fetcher + edge detection
βββ scheduler/
βββ runner.py # Cron-like scheduler for retrain + scan
MIT