Skip to content

Add knockout stage results tracking and condition projections on real outcomes#5

Open
nomastudioai wants to merge 2 commits into
mainfrom
claude/tournament-quarterfinals-predictions-p2t79b
Open

Add knockout stage results tracking and condition projections on real outcomes#5
nomastudioai wants to merge 2 commits into
mainfrom
claude/tournament-quarterfinals-predictions-p2t79b

Conversation

@nomastudioai

Copy link
Copy Markdown
Owner

Summary

This PR adds support for tracking real knockout stage results and conditioning the tournament projections and Monte Carlo simulations on actual match outcomes. Previously, the model only predicted the entire bracket from the group stage onwards. Now it can incorporate real Round of 32 and Round of 16 results to provide updated predictions for remaining rounds.

Key Changes

  • New data file (knockout-resultados-2026.json): Stores real knockout match results (goals, penalties, winner) with metadata about when results were recorded. Includes 16 matches from Round of 32 and Round of 16.

  • Projection logic (proyeccion.mjs):

    • Loads real knockout results if the file exists
    • For matches already played, uses actual winner instead of prediction
    • Tracks model's pre-match pick vs. actual outcome to measure accuracy
    • Generates detailed match-by-match comparison showing which predictions were correct
  • Simulation logic (simular.mjs):

    • Conditions Monte Carlo simulations on real knockout results
    • Only samples unplayed rounds, ensuring probabilities reflect the actual bracket
    • Real winners are fixed in all 50,000 simulations
  • Report generation (genera-predicciones.mjs):

    • New section showing knockout results vs. predictions with hit/miss tracking
    • Displays scoreboard: model called 19 of 24 ties correctly (79.2%)
    • Separates historical results from future projections
    • Updates section numbering dynamically based on how many rounds have been played
  • Updated predictions (PREDICCIONES.md, README.md):

    • Reflects real quarter-finalists (France, Morocco, Norway, England, Spain, Belgium, Argentina, Switzerland)
    • Updated finalist probabilities: Argentina vs Spain now 23.4% (was 16.5%)
    • Removed teams eliminated in earlier rounds from finalist tables

Implementation Details

  • Real results are optional: if knockout-resultados-2026.json doesn't exist, the system falls back to full bracket prediction
  • Validation ensures real match participants match the bracket structure
  • Penalty shootout results stored as [home_goals, away_goals] tuple
  • Model accuracy tracked per round and overall (79.2% on 24 knockout ties so far)
  • Timestamp (as_of) in results file controls report generation date

https://claude.ai/code/session_01GmtcBGn7eopeUJMJ41KC9S

claude added 2 commits July 8, 2026 22:17
Runs the daily pipeline: refreshes live Elo from eloratings.net and
regenerates the Monte Carlo simulation, projected bracket and README
block. Knockout ties remain model projections (no real Round-of-32 /
Round-of-16 results are recorded in the repo yet).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmtcBGn7eopeUJMJ41KC9S
The knockout stage through the Round of 16 has been played. Add the real
results in a new data/knockout-resultados-2026.json (24 ties, verified
against the official bracket topology and the final group tables) and make
the projection and Monte Carlo condition on them:

- proyeccion.mjs: real winners advance, so the projected bracket now starts
  from the eight real quarter-finalists (France, Morocco, Spain, Belgium,
  Norway, England, Argentina, Switzerland). Each played tie also records the
  model's pre-match pick and whether it hit.
- simular.mjs: fixed rounds are no longer sampled, so finalist/champion
  probabilities reflect the real bracket (eliminated teams drop to 0%).
- genera-predicciones.mjs: new "knockout so far: predictions vs results"
  section (19/24 correct) and a projected-rest-of-bracket section from the
  quarter-finals; finalist table lists only teams still alive.

Projected quarter-finals: France-Morocco, Spain-Belgium, Norway-England,
Argentina-Switzerland. Projected champion: Spain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GmtcBGn7eopeUJMJ41KC9S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants