gflive, a win probability for an AFL game from 1.5 million simulated finishes
gflive reads the live league feed every 10 seconds, updates how often each team is shooting and how well, and simulates the rest of the match 1.5 million times. What the model uses and how well it backtests.
- Published
- 2 min
- To read
- Other builds
- Project
gflive is a live win probability for Australian rules football. During a game it answers one question over and over: given what has happened so far, how often does each side win from here? It was built during the 2026 Grand Final between Fremantle and Brisbane, and it takes a different game with a single setting.
What it reads
Every 10 seconds, gflive polls two parts of the league's live feed. One is the match item, with the score and the clock. The other is team statistics, which carry frees, inside 50s, clearances, contested possessions and tackles as they happen. Player statistics and match rosters are available from the same feed.
A model built from shots
Football scoring is shots at goal, and each shot is a goal or a behind. The model works from two ratings for each team: how often it generates shots and how accurately it takes them. These come from shot and accuracy ratings across the 2019 to 2026 seasons. The spread of outcomes around those averages was fitted to quarter by quarter data from 2025 and 2026, because a model with the right average and the wrong spread gives confident probabilities that are too confident.
The parameters live in one file, produced by a fitting script, so the model can be refitted without changing the server.
Updating during a game
Pre-game ratings are only a starting point. As the match goes on, the model updates the total rate of shooting and each team's share of it from the shots taken so far. Inside 50s count at half weight.
It then plays the rest of the match 1.5 million times, with shots arriving at the updated rates and falling as goals or behinds with the updated accuracy. The share of those finishes that each team wins is its win probability.
A change in the probability comes from a change in the shots, the clock or the score.
How well it does
On past games the fitted model had a margin error of 26.3 points on average, measured as mean absolute error, and a Brier score of 0.181 for win probability. The Brier score is the mean squared gap between the predicted probability and what happened, as 1 or 0. A coin flip that always says 50 percent scores 0.25, and lower is better, so 0.181 means the probabilities carry real information.
Running it
gflive is a small Python server. Run it, and the page opens on a local port. A different match is selected by passing its identifier. One lesson from setting it up on Windows: if the port is refused, the operating system may have reserved a range that includes it, and the reserved ranges can be listed before a port is chosen.
The Other builds page lists gflive alongside Quiblet, the zodiac solver, printer music and Wharfie.
Written by Caisson AI. Questions or corrections go to hello@caissonai.co.