Back to TrophyCast

FIFA World Cup 2026 · Methodology

Methodology

TrophyCast turns a tournament snapshot into static forecast artifacts: team tables, group standings, match summaries, qualification views, a knockout bracket, and a compact simulation binary used for fast browser-side what-ifs.

1. Source snapshot

The source file under data/source/world-cup-2026.json contains teams, ratings, group standings, group fixtures, knockout slots, completed results, and seeded bracket labels. The generator fixes completed results and simulates unresolved matches from that snapshot, so a rebuild is reproducible from the checked-in source data and seed.

2. Team strength

Each team has an Elo-style strength rating. Match win probabilities are derived from the rating gap, bounded so even extreme underdogs retain a non-zero chance. TrophyCast keeps the model compact and auditable; the data pipeline can later swap in a richer blend of FIFA rating, player-value, market, or live-feed inputs without changing the browser contract.

3. Group simulation

Every simulation writes one byte for each group match score. Completed matches use their final score. Remaining matches are sampled, the group table is ranked, and the top two teams plus the best third-place teams advance. The published group and qualification views are aggregate counts from the same simulations.

4. Knockout simulation

Each knockout slot stores the two participant indexes and a winner bit in static/data/bracket_sims.bin. Winner and loser references are resolved through the bracket tree, including the third-place match. The UI uses those bytes to condition on team-reaches, team-wins, and group match-result what-ifs without asking a server to recompute.

5. Reading the bracket

The bracket renders a coherent single projected path: displayed winners advance to the next displayed match, and semifinal display losers feed the third-place card. The left number is the marginal chance that the displayed team reaches that slot. The right number is the exact simulation share for the displayed head-to-head matchup, so the two right-side figures in an unresolved match add to 100%.

6. Scenario links

What-if state is encoded in the URL. Bracket conditions use slot:team:kind, while group match conditions use m:match:outcome. Loading a shared URL filters the simulation binary, recomputes the visible group and bracket probabilities, and restores the selected team page when present.

7. Local validation

The development gate is bun run check, bun run lint, bun run test, and bun run build. The model tests cover the binary winner bit and fixed knockout results; client tests cover group-match conditioning and exact displayed matchup probabilities.