Coding

Worldcup Predictor

Try it

FIFA World Cup match predictor: dual-mode score model + Elo ratings. Win/draw/loss probabilities & score predictions.

What it does

FIFA World Cup match predictor: dual-mode score model + Elo ratings. Win/draw/loss probabilities & score predictions.

The skill document

World Cup Predictor

A FIFA World Cup match prediction tool based on real schedule data, group standings, and an Elo rating model.

Data Sources

Primary: NetEase Sports

Secondary: BALLDONTLIE FIFA World Cup API

  • Website: https://fifa.balldontlie.io
  • API Base URL: https://api.balldontlie.io/fifa/worldcup/v1
  • Auth: HTTP Header Authorization: YOUR_API_KEY
  • Free tier: team list, stadium list

API Key Configuration

Store your API key in ~/.openclaw/openclaw.json:

{
  "skills": {
    "worldcup-predictor": {
      "api_key": "***"
    }
  }
}

Prediction Model (v2.3)

Dual-Mode Score Prediction

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:

  • Strong team's attack λ is multiplied by the weak team's defensive weakness
  • When a weak team (strength < 65) faces a strong team (strength > 85), weakness is amplified by the gap
  • Collapse factor: weakness × (1 + gap × 0.007) — e.g. gap=34 → 1.24x multiplier
  • Result: correctly predicts blowouts like Germany 6-1 Curaçao (actual: 7-1)

Mode B — Balanced Mode (strength gap < 15 points) A compressed Poisson model that keeps total goals reasonable:

  • Base λ is compressed to 1.0-2.0 range
  • Opponent strength provides gentle moderation
  • Prevents over-predicting goal fests in close matches
  • Result: correctly predicts close matches like Netherlands 3-2 Japan (actual: 2-2)

Multi-Dimensional Elo Rating Model

  1. Base Strength — 48 teams with preset strength scores (50-95), mapped to Elo 1300-2000
  2. Group Standings — Auto-calculated from match data; rank bonuses (#1: +20, #2: +10, #3: -5, #4: -15)
  3. Recent Form — Completed match performance (win +3/draw +1 pts), +5 Elo per point
  4. Goal Data — Average goals scored/conceded calibrate Poisson λ parameters
  5. Tournament Draw Rate — Real-time tournament draw rate weighted 50:50 with model draw probability
  6. Draw Bias Correction — When draw probability is high and attacking data is close, score tilts toward a draw
  7. Home Advantage — +70 Elo

Prediction Output Format

📊 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

Backtest Accuracy

v2.3 achieved 78% (7/9) correct win/draw/loss direction on completed matches.

Usage

Predict a match

python3 predict.py match Australia Turkey

Predict a team's next match

python3 predict.py team Brazil

View group standings (auto-calculated)

python3 predict.py standings

Today's matches + predictions

python3 predict.py today

View full schedule

python3 predict.py schedule

Update schedule cache

After fetching latest schedule from NetEase:

python3 predict.py update

Scripts

scripts/predict.py

Core prediction script with the following commands:

CommandDescription
teamsList all 48 teams (grouped by confederation)
standingsAuto-calculate group standings
scheduleView full match schedule
todayToday's matches + predictions
match Predict a specific match
team Predict a team's next match
updateUpdate schedule cache
--upcomingFlag for schedule: show only upcoming matches

Configuration

The script reads the API key from ~/.openclaw/openclaw.json (optional, for BALLDONTLIE data enrichment):

{
  "skills": {
    "worldcup-predictor": {
      "api_key": "***"
    }
  }
}

File Structure

worldcup-predictor/
├── SKILL.md
└── scripts/
    ├── predict.py      # Core prediction script
    └── schedule.json   # Schedule cache (auto-generated)

Related skills

Predict English Premier League football match outcomes first, keep World Cup national-team support for compatibility, include schedule/result context, answer in the user's language, and keep output as statistical reference only, never betting advice.

10 installs1 stars

Use for English or Chinese football match forecasts, pre-kickoff alerts, post-match review, and controlled self-evolution from multi-book odds, line movement...

Connect and use Fantopy's MCP server for World Cup 2026 predictions. Use when helping a user install Fantopy in OpenClaw, ChatGPT, Claude, Cursor, or another...

3 installs

Use when predicting World Cup match results and generating China Sports Lottery betting strategies (胜平负/让球/半全场/总进球/比分), including injury factor analysis, wea...

6 installs

Trade Kalshi soccer markets using EA FC OVR rating disparity and a bivariate Poisson model. Finds edge on match winner, total goals (over/under), and goal sp...

3 installs

BALLDONTLIE World Cup (fifa.balldontlie.io). Use this skill for ANY BALLDONTLIE World Cup request — searching and reading data. Whenever a task involves BALL...