Downloads · 30 days
0
Cochon123/clash-royale-winner-predictor
clash-royale-winner-predictor is a tabular classification model from Cochon123. Use it for the tabular classification task on the model card, and read the license before you ship it in a product. It is set up for scikit-learn. The card lists the license as mit.
Perspective-symmetric ensemble that predicts which player wins a Clash Royale battle from replay action sequences (card plays and Hero/Champion ability activations).
Downloads · 30 days
0
Access
Public
Updated Aug 6, 2026
Repo size
53.6 MB
Likes
0
Public
Click a slice to open those files.
.pkl44 MB · 81%
From the Hugging Face model README
Perspective-symmetric ensemble that predicts which player wins a Clash Royale battle from replay action sequences (card plays and Hero/Champion ability activations).
| Metric | Validation | Test |
|---|---|---|
| Accuracy | 78.9% | 78.9% |
| AUC | 0.888 | 0.879 |
| Log loss | 0.430 | 0.442 |
Trained on 13,873 RoyaleAPI replays with battle-level train/val/test splits (70/15/15). Baseline (most-common legal action) test accuracy: 77.4%.
| File | Description |
|---|---|
hgb_ensemble.pkl | Pickled artifact: both sklearn models, blend weights, confidence calibrator, card index |
hgb_report.json | Full training report, splits, duration breakdown, confidence curves |
vocab.json | Card name vocabulary used during feature extraction |
accuracy_vs_confidence.png | Selective prediction curve on held-out test set |
accuracy_vs_confidence.json | Raw curve data |
confidence_training_stages.json | Per-tree-stage metrics for the training animation |
accuracy_vs_confidence_training.mp4 | Animation of confidence curve evolution during Extra Trees training |
Install the companion pipeline from cochon123/clash-royale-ai, then download this checkpoint:
pip install git+https://github.com/cochon123/clash-royale-ai.git
huggingface-cli download Cochon123/clash-royale-winner-predictor --local-dir models/winner_predictor
Load the artifact in Python:
import pickle
from pathlib import Path
with Path("models/winner_predictor/hgb_ensemble.pkl").open("rb") as f:
artifact = pickle.load(f)
hgb = artifact["models"]["hist_gradient_boosting"]
trees = artifact["models"]["extra_trees"]
hgb_weight = artifact["hgb_weight"]
card_index = artifact["card_index"]
Retrain or reproduce from raw replays:
cr-replays train-winner-hgb --input data/raw --trees 100
Features are extracted from RoyaleAPI replay HTML payloads. The model does not see live arena state (unit positions, HP, projectiles)—only the ordered sequence of card plays and ability activations plus deck metadata. See the investigation report for labeling details around Hero/Champion abilities.