ML-powered macro-action advisor for Dota 2. Captures live Game State Integration data, predicts optimal team strategy via LightGBM, and displays hints in a minimal overlay.
git clone https://github.com/larelgit/Aegis-Assistant-v1.git
cd Aegis-Assistant-v1
pip install -r requirements.txtpython scripts/serve_model.pyLoads
data/models/aegis_lgbm_v3.pkland serves predictions on port 8000.
python scripts/runtime_server.pyAccepts Dota 2 GSI on port 5000, computes features, queries model, serves
/hint.
cd tauri-app
npm install
npm run tauri devPlace this file in your Dota 2 config directory:
steamapps/common/dota 2 beta/game/dota/cfg/gamestate_integration/gamestate_integration_aegis.cfg
"Aegis Assistant"
{
"uri" "http://localhost:5000/gsi"
"timeout" "5.0"
"buffer" "0.1"
"throttle" "0.2"
"heartbeat" "10.0"
"data"
{
"map" "1"
"player" "1"
"allplayers" "1"
"buildings" "1"
}
}You don't need Dota 2 running to see the project in action:
# Terminal 1: Model API
python scripts/serve_model.py
# Terminal 2: Runtime server
python scripts/runtime_server.py
# Terminal 3: Replay synthetic game data
python scripts/replay_gsi.py --generate
# Terminal 4: Overlay
cd tauri-app && npm run tauri devThe overlay will display changing hints as the synthetic game progresses.
python scripts/fetch_matches.py --count 1000 --min-rank 70python scripts/build_dataset.pypython scripts/train_model.pyEvaluation artifacts are saved to data/artifacts/:
classification_report.txtconfusion_matrix.csvfeature_importance.csvmetrics.json
┌──────────┐ ┌──────────────┐ ┌───────────────┐ ┌─────────┐
│ OpenDota │────▸│ build_dataset│────▸│ train_model │────▸│ .pkl │
│ API │ │ .py │ │ .py │ │ bundle │
└──────────┘ └──────────────┘ └───────────────┘ └────┬────┘
│
┌──────────┐ ┌──────────────┐ ┌───────────────┐ │
│ Dota 2 │────▸│ runtime │────▸│ serve_model │◂─────────┘
│ GSI │ │ _server.py │ │ .py │
└──────────┘ └──────┬───────┘ └───────────────┘
│
┌──────▼───────┐
│ Tauri overlay│
│ /hint │
└──────────────┘
├── scripts/
│ ├── config.py # Shared constants, feature/label definitions
│ ├── fetch_matches.py # Download matches from OpenDota
│ ├── build_dataset.py # Raw JSON → labeled CSV snapshots
│ ├── train_model.py # Train LightGBM + save artifacts
│ ├── serve_model.py # FastAPI model API (port 8000)
│ ├── runtime_server.py # GSI receiver + hint server (port 5000)
│ ├── replay_gsi.py # Demo mode: replay/generate GSI packets
│ ├── record_gsi.py # Debug: standalone GSI packet recorder
│ └── screenshot.py # Experimental: minimap capture (optional)
├── tauri-app/ # Minimal overlay UI
├── tests/ # Unit and smoke tests
├── data/
│ ├── raw/ # Downloaded match JSONs (gitignored)
│ ├── snapshots/ # Generated CSV datasets (gitignored)
│ ├── models/ # Trained model bundles
│ └── artifacts/ # Evaluation reports and metrics
├── requirements.txt
└── requirements-dev.txt
| Method | Endpoint | Description |
|---|---|---|
| POST | /predict |
Predict macro-action from features |
| GET | /health |
Model readiness check |
| GET | /meta |
Feature list, class labels |
| Method | Endpoint | Description |
|---|---|---|
| POST | /gsi |
Receive Dota 2 GSI packet |
| GET | /hint |
Current hint for overlay |
| GET | /health |
Server + model API status |
| GET | /debug/state |
Raw last GSI payload |
| GET | /debug/features |
Last computed feature vector |
- Heuristic labels: training data uses rule-based labels, not human annotations
- Radiant-centric training: model is trained from Radiant perspective; runtime inverts features for Dire players
- Roshan respawn: approximated with fixed 8-min window (real: 8–11 min random)
- Tower status in training: reconstructed from match objectives; may be absent for some matches
- Local only: no cloud deployment, single-machine setup
- No input automation: advisory only, does not interact with the game
pip install -r requirements-dev.txt
pytest tests/ -v