Formula 1 Tyre Strategy Prediction

LSTM, GRU and MLP models to predict the best tyre compound lap by lap during a Formula 1 race

Tyre strategy is one of the most decisive factors in a Formula 1 race: teams must balance the grip, durability and speed of each compound against track temperature, tyre wear and weather. This project, developed for my B.Sc. thesis, studies recurrent and feed-forward neural networks (LSTM, GRU and MLP) to predict the best tyre for each lap of a race, using telemetry data from the FastF1 library. The “best tyre” is defined through a best-lap-time metric.

Results. The GRU consistently outperformed the other models, reaching 51.4% accuracy (learning rate 1e-4), against 28.1% for the LSTM, 27.1% for the MLP, and 24.5% for a blind classifier that predicts from class priors only. Its recurrent structure captures the sequential nature of race data better than the alternatives.

Left: accuracy of GRU, LSTM and MLP compared with a blind classifier. Right: tyre compound usage in the dataset.
Accuracy and loss of each model across learning rates.

Links: Code · Thesis

Thesis: (Rondelli, 2023)

References

2023

  1. The Future of Formula 1 Racing: Neural Networks to Predict Tyre Strategy
    Massimo Rondelli
    University of Bologna, Mar 2023
    B.Sc. in Computer Science and Management.
    Supervisor: Elena Loli Piccolomini
    Co-Supervisor: Davide Evangelista