Implements a Monte Carlo simulator for men's/women's tennis seasons scored on the qualifying_points pattern. Simulates all 4 Grand Slam majors (Australian Open, French Open, Wimbledon, US Open) using surface-specific Elo ratings and ATP/WTA world rankings for seeding. New table: participant_surface_elos — one row per (participant, season) storing worldRanking, eloHard, eloClay, eloGrass. Key design decisions: - Seeding uses ATP/WTA world ranking (not Elo), matching real draw procedure - Top 32 seeded with standard slot placement (1→0, 2→64, 3-4→quarters, etc.) - QP per round with tie-splitting pre-applied: W=20, F=14, SF=9, QF=4, R16=1.5 - Completed majors read actual qualifyingPointsAwarded from eventResults - 10,000 Monte Carlo simulations; column sums naturally 1.0 (no normalization) Admin UI at /admin/sports-seasons/:id/surface-elo: - 5-column grid (Player | Rank | Hard | Clay | Grass) - Bulk import: "Name, ranking, hardElo, clayElo, grassElo" one per line - Fuzzy name matching (bigram Dice coefficient) with "Did you mean?" suggestions - Inline participant creation for unmatched names via useFetcher - Saves Elos and auto-runs simulation on submit Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 line
No EOL
74 B
SQL
1 line
No EOL
74 B
SQL
ALTER TABLE "participant_surface_elos" ADD COLUMN "world_ranking" integer; |