A FIFA World Cup match prediction tool based on real schedule data, group standings, and an Elo rating model.
schedule.jsonhttps://api.balldontlie.io/fifa/worldcup/v1Authorization: YOUR_API_KEYStore your API key in ~/.openclaw/openclaw.json:
json
{
"skills": {
"worldcup-predictor": {
"api_key": "***"
}
}
}
The key innovation: different models for different match types.
Mode A — Blowout Mode (strength gap ≥ 15 points)
Uses an attack × defense weakness product model with a collapse factor:
weakness × (1 + gap × 0.007) — e.g. gap=34 → 1.24x multiplierMode B — Balanced Mode (strength gap < 15 points) A compressed Poisson model that keeps total goals reasonable:
text
📊 Match Prediction
══════════════════════════════════════
🇦🇷 Argentina vs 🇧🇷 Brazil
📈 Team Strength:
🇦🇷 Argentina [█████████░] 95
🇧🇷 Brazil [█████████░] 93
🏅 Group Ranking:
🇦🇷 Argentina: Group #1
🇧🇷 Brazil: Group #2
⚽ Recent Data:
🇦🇷 Argentina: 2.0 goals/game avg
🇧🇷 Brazil: 1.0 goals/game avg
📊 Win Probability
🇦🇷 Argentina Win: 48.2%
🤝 Draw: 32.2%
🇧🇷 Brazil Win: 19.6%
⚽ Predicted Score: 🇦🇷 2 - 1 🇧🇷
📈 Tournament Draw Rate: 38% (reference)
🔑 Key Analysis
• Argentina ranked higher in group
• Argentina in better form
• Predicted narrow Argentina win
v2.3 achieved 78% (7/9) correct win/draw/loss direction on completed matches.
bash
python3 predict.py match Australia Turkey
bash
python3 predict.py team Brazil
bash
python3 predict.py standings
bash
python3 predict.py today
bash
python3 predict.py schedule
After fetching latest schedule from NetEase:
bash
python3 predict.py update
scripts/predict.py#Core prediction script with the following commands:
CommandDescriptionteamsList all 48 teams (grouped by confederation)standingsAuto-calculate group standingsscheduleView full match scheduletodayToday's matches + predictionsmatch <home> <away>Predict a specific matchteam <name>Predict a team's next matchupdateUpdate schedule cache--upcomingFlag for schedule: show only upcoming matches
The script reads the API key from ~/.openclaw/openclaw.json (optional, for BALLDONTLIE data enrichment):
json
{
"skills": {
"worldcup-predictor": {
"api_key": "***"
}
}
}
text
worldcup-predictor/
├── SKILL.md
└── scripts/
├── predict.py # Core prediction script
└── schedule.json # Schedule cache (auto-generated)