F1 Race Strategy Decision Support
Lap-time prediction and Monte Carlo simulation for comparing pit-stop strategies using real 2021–2025 F1 data.
- 1.751s
- HGB MAE · held-out 2024 laps
- 2,000
- Monte Carlo runs
- 2021–25
- Race data
The corrected evaluation uses an earlier-season circuit baseline: 1.751 seconds MAE over 7,454 held-out 2024 laps, versus 3.802 seconds over 24,747 cross-season 2025 laps. These measure lap-time error, not race-outcome accuracy.
What I was trying to solve.
Race strategy couples tyre degradation, pit loss, weather, and uncertainty. Manually reasoning over every combination is impractical, so the system makes the trade-offs explorable.

Inspect original evaluation chart ↗
Follow the data.
A simplified processing flow. Each numbered stage feeds the next; storage and retrieval boundaries stay explicit.
- FastF1 telemetry
- Feature engineering
- Rolling split
- Lap-time model
- Monte Carlo simulation
- Strategy bands
- Interactive dashboard
The constraints shaped the system.
Use the latest available earlier-season median for each circuit as the pre-race baseline, excluding the completed test race. Compare Ridge with HistGradientBoosting and sample residuals plus pit loss to return P10/P50/P90 strategy-time bands.
Where the happy path ends.
Wet-weather laps and Las Vegas produce larger errors. The model is more trustworthy in dry-race scenarios and does not yet explicitly simulate traffic, safety cars, or overtakes.
What exists today.
- With the corrected prior-season baseline, HistGradientBoosting achieved 1.751s MAE and 2.795s RMSE on 7,454 held-out laps from 2024 rounds 17–24.
- Training on 2022–2024 and evaluating 24,747 laps from 2025 gave 3.802s MAE, exposing cross-season distribution shift.
- Supports up to 2,000 Monte Carlo simulations per strategy with P10/P50/P90 bands.
- The updated Belgian GP retrospective recommends a supported Medium–Hard–Hard two-stop. That round is in the training window, so this demonstrates the interface rather than holdout performance.
Ridge provides the comparison baseline. HistGradientBoosting is evaluated chronologically on 2024 rounds 17–24 using a prior-season circuit baseline; residual sampling and pit-loss variation produce P10/P50/P90 strategy bands. Those bands describe the simulation assumptions, not every source of race uncertainty.
What I would improve.
Build a dedicated wet-weather model, add traffic, safety-car, and overtake effects, and investigate the Las Vegas residual spike.