football_what_if
Simulate the rest of World Cup 2026 from a chosen stage while keeping real earlier results; optionally flip one decided knockout tie to compare championship odds.
Instructions
Replay World Cup 2026 from a chosen stage, optionally flipping one real knockout result.
Keeps every real result played before replay_from and Monte-Carlos the
rest of the tournament from there. flip_winner_of makes one decided
knockout tie in the kept results go the other way first.
Args:
replay_from: Stage to re-simulate from: "group" (whole tournament, no
real results kept), "r32", "r16", "qf", "sf" or "final" (keeps every
result before the final and simulates only the final).
flip_winner_of: Optional tie to flip, as two FIFA codes or names joined
by a hyphen in any order (e.g. "ESP-FRA"). It must be a decided
knockout tie before replay_from.
iterations: Number of tournament simulations (clamped to 100..20000).
seed: Optional RNG seed for reproducible output.
Returns: data.teams: {code: {reach_r32, reach_r16, reach_qf, reach_sf, reach_final, win}} sorted by win probability descending. data.champion: most likely winner. data.iterations: iterations run. meta.mode: "what_if". meta.replay_from: the stage. meta.flipped: {tie: [code_a, code_b], winner: code} or null. meta.estimated: true.
Example: football_what_if(replay_from="qf") football_what_if(replay_from="final", flip_winner_of="ESP-FRA", seed=7)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | Optional RNG seed for reproducible output. | |
| iterations | No | Number of tournament simulations (clamped to 100..20000). | |
| replay_from | No | Stage to re-simulate from: "group" (whole tournament, no real results kept), "r32", "r16", "qf", "sf" or "final" (keeps every result before the final and simulates only the final). | group |
| flip_winner_of | No | Optional tie to flip, as two FIFA codes or names joined by a hyphen in any order (e.g. "ESP-FRA"). It must be a decided knockout tie before ``replay_from``. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| meta | No | ||
| error | No |