Reflect group stage in World Cup sim; seed R32 from real 2026 bracket #107
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "fix/world-cup-simulator-bracket-seeding"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The World Cup Monte Carlo simulator wasn't reflecting the current group stage or simming out the knockout bracket correctly:
1v2, 3v4, …), so bracket paths from R32 onward didn't match the real tournament.Approach
Reworked the simulator around three regimes:
ceil(matchNumber/2)rule (matchingadvanceWinnerTemplate) so sim paths match the admin tooling. Fully-drawn brackets skip the group sim entirely.source.Completed group and knockout matches still lock in real results at every round.
Annex C data
app/lib/fifa-2026-bracket.tsencodes the R32 group-position template (official FIFA matches 73–88 mapped onto DB matchNumbers 1–16 so theceil(n/2)tree reproduces the real bracket halves) andassignThirdPlaceSlots(). The 495-row third-place allocation is generated deterministically from the published source byscripts/gen-fifa-third-place.mjsintoapp/lib/fifa-2026-third-place-allocation.ts— no hand-transcription.Tests
🤖 Generated with Claude Code