1 unstable release
Uses new Rust 2024
| new 0.1.0 | Dec 19, 2025 |
|---|
#43 in Simulation
215KB
4.5K
SLoC
world-cup-simulator-rs
Summary
This project is a simulation system for the FIFA World Cup 2026. It simulates the full process from confederation-level qualification to the knockout stage of the main tournament, and aims to quantitatively evaluate how the following factors affect outcomes:
- Confederation Constraints: A group-stage draw rule that prevents multiple teams from the same confederation from being placed in the same group.
- Top-4 Pathway Seeding: A bracket design rule that places the top four teams into different pathways (bracket halves) to avoid concentration before the semi-finals.
- Qualification Difficulty: Differences in competitive intensity across confederations and how they impact the likelihood of reaching the World Cup.
Note
If you find this project useful, consider supporting it via GitHub Sponsors.
[!WARNING] I have included disclaimers covering usage on YouTube, web articles, and media as well. Please see Disclaimer
As of December 2025, the teams for the World Cup group stage are still being determined, and the playoffs have not yet been completed. Please note that this World Cup simulation starts from the regional qualifiers and is not a simulation of only the World Cup finals, which is the more common approach. Please pay close attention to the distinction between this and simulations based on conditional probabilities.
Motivation
My original motivation was to understand how much confederation constraints actually affect the outcomes. In the World Cup draw, there are confederation constraints that prevent more than one team from the same confederation (two in the case of Europe) from being placed in the same group. Intuitively, this seems to increase the likelihood that teams from confederations with lower average ratings, such as Asia, will face teams from higher-rated confederations.
On the other hand, in confederations with higher average ratings, such as Europe or South America, it is inherently more difficult to survive the confederation qualifiers and even reach the World Cup itself. In fact, at the 2022 World Cup, several highly ranked teams failed to qualify, including Italy (ranked 6th at the time), Colombia (17th), Peru (23rd), and Sweden (25th).
In this project, I built a simulation based on FIFA ratings and analyzed how outcomes change depending on whether confederation constraints are applied or not. By implementing not only the World Cup finals but also the regional qualification processes, I was able to examine questions such as: how much does advancing through highly competitive confederations contribute to performance in the group stage, and do teams that qualify more easily from lower-level confederations tend to face significantly tougher challenges in the group stage?
Since this is only a simulation, there is inevitably a gap between the model and reality, and I fully recognize that upsets are a fundamental part of what makes football so compelling. Nevertheless, I believe this analysis provides a valuable quantitative reference for understanding the extent to which confederation constraints influence World Cup outcomes.
Result
I ran 100,000 simulations for each condition. For more details, please see the report.
- Current setup
Under the current setup, World Cup qualification is much harder for UEFA mid-tier teams: e.g., Panama 96.9% vs Ukraine 68.4% / Norway 58.9%, despite similar rating bands. For UEFA teams around rank 40, qualification can drop to ~10%, while similarly ranked AFC/CAF teams can reach ~90%, reflecting confederation depth.
- Conditioning on confirmed conditions as of Dec 5
In this simulation, I defined the points as: Win: 160pt, Runner-up: 120pt, Best 4: 80pt, Best 8: 40pt, Best 16: 20pt, and World Cup Qualification: 10pt. This condition shifts expected points mainly through (i) automatic +10pt for qualification and (ii) easier/harder group/knockout routes. Examples: Spain drops from 105.03 pts to 87.21 pts and England drops from 77.87 pts to 63.19 pts, suggesting a tougher projected path. Conversely, Argentina rises from 74.47 pts to 94.47 pts and France rises from 68.39 pts to 85.99 pts, consistent with a more favorable early knockout route.
- The confederation (area) draw constraint
This constraint has a very small impact on average points (mostly within ±0.20 pt, ~±1%). In Best16 probability, removing the area constraint helps some borderline teams (e.g., Panama +3.18%, Uruguay +0.93%) while hurting UEFA mid-tier teams (e.g., Türkiye −0.84%, Austria −0.67%). In Japan’s case, the hypothesis that “Japan is disadvantaged because the confederation constraint prevents matches against weaker Asian teams” is not supported by the results.
- The top-4 pathway seeding rule
This rule is much more influential: removing it creates an imbalanced bracket 62.5% of the time (3–1 or 4–0 split). Without top-4 seeding, Spain and England each lose ~14 pts, while Argentina and France each gain ~8.5 pts, showing that seeding protects top favorites and reduces mid-tier upside.
Get Started for Simulation
Simulate World Cup
- Run simulation
roption: number of simulations
cargo run --release --bin world-cup-simulator -- -r 100000 -o results/result.parquet
- Run simulation with a condition
cargo run --release --bin world-cup-simulator -- -r 100000 -o results/confederation_constraints.parquet --use-confederation-constraints false --use-seeding true
- Run simulation with current combination
cargo run --release --bin simulate_current_combination -- -r 100000 -o results/simulate_current_combination/result.parquet
- Analyze the simulation
cargo run --release --bin analyze_results -- -p results/result\*.parquet -o results/analysis.csv
- Check simulation results
cargo run --release --bin check_parquet_file -- -p path/to/file.parquet
Contribution
PRs are welcome. Please check the documents before making PRs:
If you want to know about the design, please check the design documents:
- Design Document
- How the Regional Qualifiers and the Finals Draw Are Structured with 48 Teams (Japanese)
Reference
- https://inside.fifa.com/fifa-world-ranking/men
- FIFA rating used: December 5th, 2025
- Eritrea is unranked and has been excluded
- Mark J. Dixon, Stuart G. Coles, Modelling Association Football Scores and Inefficiencies in the Football Betting Market, Journal of the Royal Statistical Society Series C: Applied Statistics, Volume 46, Issue 2, June 1997, Pages 265–280, https://doi.org/10.1111/1467-9876.00065
Dependencies
~34MB
~752K SLoC