Building a Real-Time Dota 2 Draft Prediction System with Machine Learning
I built an AI system that watches live Dota 2 pro matches and predicts which team will win based purely on the draft. Here's how it works under the hood. The Problem Dota 2 has 127 heroes. A Captai...

Source: DEV Community
I built an AI system that watches live Dota 2 pro matches and predicts which team will win based purely on the draft. Here's how it works under the hood. The Problem Dota 2 has 127 heroes. A Captain's Mode draft produces roughly 10^15 possible combinations. Analysts spend years building intuition about which drafts work — I wanted to see if a model could learn those patterns from data. Architecture Live Match → Draft Detection → Feature Engineering → XGBoost + DraftNet → Prediction + SHAP Explanation The system runs 24/7 on Railway (Python/FastAPI). When a professional draft completes, it detects the picks within seconds, runs them through two models in parallel, and publishes the prediction to a Telegram channel and website. The Models The workhorse. Gradient boosted trees trained on 28,000+ pro matches with: Hero one-hots (240 features) — which heroes are on which team Player hero pool depth — how many games each player has on their hero Team form — rolling win rate over last 20 matc