Formula 1 AI PitWall

CS 7641 - Summer 25 - Group 4

Analysis: Pit Stop & Stint Predictor

Pit Stop & Stint Predictor: The Verdict

Data Preprocessing

Using FastF1 lap‑by‑lap & weather data (2022–2025). Extracted: compound type, tire life, stint length, avg. rainfall, avg. pressure, avg. wind direction, avg. wind speed, avg. track temperature. One‑hot encoding for categorical variables.

ML Algorithms / Models Implemented

Linear Regression, Random Forest, and XGBoost to predict first‑stint lengths. After the midterm report, we determined that the above implemented algorithms do not work well. We did additional feature engineering and shifted to time-series based predictions and try to predict the remaining laps a tire can last. The shift in perspective have helped us model tire degradation over the duration of an entire race.

Quantitative Metrics

Model MAE MSE RMSE R2
Linear Regression 7.712788 100.567019 10.028311 0.142442
Random Forest 4.685028 55.157687 7.426822 0.529658
XGBoost 4.855137 57.848294 7.605807 0.506715
LSTM - 12.8782 3.5886 0.8862

Final Model Analysis

In the midtern, the Random Forest model emerged as the most effective predictor of tire stint length, achieving a final R² of 0.53. Its ability to capture non-linear relationships between features like weather and tire wear proved superior to other models. However, the moderate R² value indicates a clear conclusion: predicting stint length is impossible without accounting for dynamic, in-race events. The model's performance is limited by its inability to factor in variables like safety cars, red flags, and on-track battles, confirming that these chaotic elements are as critical to strategy as the initial data. We alleviated some of these concerns by using LSTM with additional features such as the time of the tire, lap times, car speed through various sections of the track and stint lengths. The RNN was able to model how many laps a tyre had remaining. We would however like to make additional modifications such as incorporating tire choices and on-track conditions such as red flags, yellow flags, and safety cars to better model tire degradation.

F1 car scroll progress indicator Checkered flag