Pit-stop strategy in Formula 1 is a sequential decision problem under uncertainty, in which strategists decide at each lap whether to pit and which tire compound to fit. We develop a data-driven simulator, calibrated with historical race data, that captures tire degradation, drivers' recent performance, overtaking, yellow flag events, and rivals' pit-stop decisions. We train agents with five Deep Reinforcement Learning (DRL) algorithms and compare them with a Quadratic Mixed-Integer Programming (QMIP) formulation that is optimal in deterministic single-driver settings. Without uncertainty or competition, all DRL methods except TRPO achieve near-optimal performance. With a full grid of competitors and stochastic race events, the ranking of DRL methods depends on the evaluation setting: Proximal Policy Optimization (PPO) and its recurrent variant are the only methods that improve on the QMIP both in fully simulated races and when the actual 2024 races are replayed. Averaged over eight circuits, PPO improves on the QMIP by 0.33 and 0.49 positions in the two settings and Recurrent PPO by less, and in the replay PPO finishes 0.66 positions ahead of the drivers' actual strategies simulated in the same races. The QMIP performs similarly to the other methods, even though it cannot anticipate yellow flag events. Finally, we use the trained PPO policy as a look-ahead decision-support tool that shows the strategist the distribution of race outcomes under each candidate pit-stop action. Applied retrospectively to eight 2024 races, the look-ahead identifies the laps where the actual decision, the recommendation, or a third action was preferable.
Figures & tables
Variable
Values
Description
XLap
{1,…,N}
Lap number
XPitIn
{0,1}
1 if the car is entering the pit lane in the lap, 0 otherwise
XPitOut
{0,1}
1 if the car is exiting the pit lane in the lap, 0 otherwise
{Xd}d∈D
{0,1}
1 if the driver is d , 0 otherwise
{Xy}y∈Y
{0,1}
1 if the year is y , 0 otherwise
XDRS
{0,1}
1 if the car ahead is within one second, 0 otherwise
Table 1: Description of the independent variables in the regression model
Figure 1: Race points of Hamilton and Norris at the Mexican Grand Prix in 2021–2023 and in the 2024 races up to that Grand Prix. Red markers show the 2024 Mexican Grand Prix.
Variable
Values
Description
STire,d
Cr
Tire compound in use of each driver d∈D
STireLife,d
Z≥0
Age in laps of the tire set in use of each driver d∈D
SSetAge,c
Z≥0
Age of the set of compound c∈Cr that the agent would fit by stopping in the current lap
SLap
{1,…,N}
Current lap number
SLaps Left
{1,…,N}
Number of remaining laps in the race
SChange,d
{0,1}
1 if at least two different compounds have been used by driver d∈D , 0 otherwise
Table 2: Description of state variables for the agent.
Figure 2: Overview of the data sources, predictive models, and simulation components used to construct the environment.
Figure 3: Tire performance at the 2024 United States GP. Left: Equation ( 1 ) estimated with all laps. Center: Equation ( 1 ) estimated after removing outliers with Algorithm 1 . Right: coefficients of the joint model (Appendix 10 ). Additional lap time is relative to a new hard tire.
Figure 4: MSE between predicted and ground-truth driver coefficients for each 2024 Grand Prix, where the ground truth is estimated with Equation ( 1 ) using only that race. Without correction : Equation ( 1 ) on the 2021–2023 editions of the same circuit; With correction : Equation ( 2 ), which adds the driver’s three most recent 2024 races plus practice and qualifying sessions of the same weekend. Circuits without dry editions in 2024 or before are omitted, as is the Australian GP, where the reference driver retired on the fourth lap.
Figure 5: Pit-stop strategies for five DRL models and the optimal solution, in a deterministic setting with no competition.
Figure 6: Distribution of final positions over 500 fully simulated races per circuit, 2024 season.
Figure 7: Distribution of final positions over 500 simulations per circuit with rivals’ decisions and yellow flags fixed to those of the actual 2024 race. The leftmost box, “Replay”, reproduces the driver’s actual 2024 starting compound and pit stops.
Figure 8: Final position over M=500 rollouts of each candidate action at lap 7 of the 2024 Saudi Arabian Grand Prix, with the PPO policy driving in place of Lando Norris. Head-to-head wins and Δ points compare paired rollouts with the recommended action ( ±2 standard errors, SE).
Figure 9: Average championship points by lap for each candidate action over M=500 rollouts. 2024 Saudi Arabian Grand Prix, PPO policy driving in place of Lando Norris.
Figure 10: Actual 2024 tire stints of Alonso in the Bahrain Grand Prix and stints implied by the DRL recommendation at every lap where it differs from the actual decision. Each lower bar replays the race up to the lap marked by the triangle and shows one representative continuation under the PPO policy, without further yellow flags. On the right, the mean paired difference in points against the actual decision for the recommended action and for the best of the four actions, ±2 SE over M=500 rollouts with simulated yellow flags; positive values favor the recommended action (or the best of the four) over the actual decision, and ∗ marks differences larger than 2 SE. The best action is selected with a separate set of 500 rollouts, so its difference is not biased upward by the selection.
Appendix figures & tables22 assets
Supplementary material from the paper’s appendix.
Appendix
Grand Prix
Compound
Stints 2021–2023
βc,1
βc,2
Bahrain
C1
33
0.000
0.1171
C2
45
-0.206
0.1388
C3
109
-0.415
0.1674
Belgian
C2
16
0.000
0.1574
C3
60
-0.145
0.1780
C4
33
-0.256
0.1919
Appendix
Table 10.1: Tire coefficients of the joint model for each Grand Prix and compound. βc,1 is expressed relative to the hardest compound of the Grand Prix (seconds) and βc,2 is the lap-time increase per lap of tire age (seconds per lap). The number of stints run with each compound in 2021–2023 indicates how much each coefficient relies on the circuit’s own data.
Specification
No correction
Season
(i)
(ii)
(iii)
(iv)
Previous race
Same circuit
2023
0.136
0.153
0.166
0.135
0.249
0.538
2024
0.221
0.195
0.210
0.191
0.322
0.618
Appendix
Table 11.1: Out-of-sample mean squared error, in (seconds per lap) 2 , of the predicted driver coefficients for the races of 2023 (189 driver–race pairs) and 2024 (276), by specification of Equation ( 2 ) and for the two benchmarks without correction.
Coefficient
Estimate
Std. Err.
ρVSC
1.337
(0.023)
ρSC
1.420
(0.026)
κin
0.366
(0.227)
κout
0.702
(0.092)
Std. dev. of ug
0.087
Appendix
Table 12.1: Common coefficients of the yellow flag lap time model (Equation ( 3 )), estimated with 2021–2023 data.
Grand Prix
L(g)
Gin(g)
Gout(g)
ug
VSC lap
SC lap
Pit (YF)
Pit (clear)
Bahrain
98.315
3.227
20.841
-0.129
131.5
127.0
15.8
24.1
Saudi Arabian
95.170
3.347
19.085
0.033
127.3
138.3
14.6
22.4
Miami
92.768
5.034
14.860
-0.076
124.1
124.7
12.3
19.9
Hungarian
84.573
3.069
18.674
0.000
113.1
120.1
14.2
21.7
Belgian
112.776
5.122
13.653
0.000
150.8
160.2
11.5
18.8
Dutch
76.390
3.681
18.703
-0.092
102.2
101.5
14.5
22.4
Appendix
Table 12.2: Circuit-level quantities of the yellow flag lap time model and resulting lap times and pit-lane losses, in seconds. Pit (YF) is the pit-lane loss κinGin(g)+κoutGout(g) and Pit (clear) is Gin(g)+Gout(g) . No SC laps remain in the estimation sample at the Hungarian and Belgian GPs in 2021–2023, so their circuit effect is set to zero.
Laps
On car
Sets available (age in laps)
GP (driver)
Lap
left
(age)
Hard
Medium
Soft
Bahrain (Alonso)
15
43
C3 (15)
C1: 0, 0
C2: 0
C3: 1, 1
35–40 (39)
19
C1 (23)
C1: 0
C2: 0
C3: 1, 1, 16
Saudi Arabian (Norris)
7
44
C3 (6)
C2: 0
C3: 0
C4: 1, 3, 3
29
22
C3 (25)
C2: 0
C3: 0
C4: 1, 3, 3
31–36 (34)
17
C3 (30)
C2: 0
C3: 0
C4: 1, 3, 3
Appendix
Table 13.1: Tire sets available to the driver at each decision point of Figure 26.1 , with the age in laps of every set of each compound and of the set on the car. For a group of consecutive laps, the lap of the largest difference is given in parentheses and the state refers to that lap. A pit stop fits the least-worn set of the chosen compound. A dash means that no spare set of that compound is left; the set taken off returns to the driver’s sets with its age, so the set on the car can always be refitted, with the age it has at that lap. Ages follow Section 3 : laps under SC, VSC or red flag, and the non-push laps of earlier sessions, do not count.
Estimated Probability
Actual Laps (2024 GP)
Grand Prix
SC
VSC
SC
VSC
Bahrain
0.37
0.22
—
—
Saudi Arabian
0.70
0.67
7–9
—
Miami
0.50
0.50
28–32
22–23
Hungarian
0.25
0.33
—
—
Belgian
0.64
0.11
—
—
Appendix
Table 14.1: Estimated probability of at least one SC or VSC event per race, taken from Aguad and Thraves (2024) except for Miami, which is not included there and is estimated from its 2022–2023 races, and lap ranges during which SC or VSC conditions were active in the corresponding 2024 race.
Hyperparameter
Double DQN
A2C
TRPO
PPO
Recurrent PPO
Learning rate
1×10−4
3×10−4
1×10−3
3×10−4
5×10−4
Discount factor ( γ )
0.99
LSTM layers × units
–
–
–
–
1×32
Hidden layers
[64, 64, 64]
[64, 64]
[64, 64, 64]
[64, 64, 64]
[32, 32]
nsteps
–
nl
nl
2nl
nl
Batch size
2nlne
–
nlne
nlne
nlne
Appendix
Table 16.1: Hyperparameters of each RL algorithm without competition. nl : laps per circuit; ne=10 : parallel environments. All use ReLU activation, reward normalization and 5M timesteps. Double DQN uses a replay buffer of 3×106 ; A2C uses RMSProp with normalized advantages; PPO uses target KL =0.015 ; the LSTM of Recurrent PPO is used by the actor only.
Hyperparameter
Double DQN
A2C
TRPO
PPO
Recurrent PPO
Learning rate †
3×10−4
5×10−4
5×10−4
3×10−4
5×10−4
Discount factor ( γ )
0.995
Reward normalization
No
No
No
Yes
Yes
LSTM layers × units
–
–
–
–
1×64
Hidden layers
[256, 256, 256]
[256, 128]
[256, 128]
[256, 128]
[128]
nsteps
–
2nl
2nl
2nl
2nl
Appendix
Table 16.2: Hyperparameters of each RL algorithm with competition. nl : laps per circuit; ne=10 : parallel environments. All use ReLU activation and 5M timesteps with early stopping (patience of 25 evaluations, 50 episodes each). Double DQN uses a replay buffer of 1.5×106 , learning starts after 30,000 steps, exploration fraction 0.30 with ϵfinal=0.02 , and target network updates every 1,500 steps. † Double DQN anneals the learning rate linearly from 3×10−4 to 1×10−5 ; the other algorithms use a constant rate. ‡ With 0.02, PPO and Recurrent PPO collapsed their entropy early in training and kept stopping on the sixth lap of the Miami Grand Prix.
Figure 16.1: Mean final position of the ten training seeds of each algorithm, by circuit, in the validation races used for seed selection.
Model
With outliers
Without outliers
Variable
Coef.
Std. Err.
Coef.
Std. Err.
Intercept
102.3083
(0.191)
101.8442
(0.089)
DRS
-0.3834
(0.137)
-0.3765
(0.064)
FirstLap_pos
-0.1156
(0.030)
0.3717
(0.061)
Interval_behind
0.4954
(0.172)
0.6740
(0.081)
Appendix
Table 17.1: Regression coefficients under clear-track conditions for the 2024 United States Grand Prix, estimated with 2021–2023 data. Left: estimated with all data points; Right: estimated after removing outliers. The reference driver is Verstappen. Notes: *** p<0.01 , ** p<0.05 , * p<0.1 .
Figure 18.1: Clear-track lap times of the United States GP in 2021, 2022 and 2023. Laps removed by Algorithm 1 are shown in orange.
Full specification
Without XQ (used)
Variable
Coef.
Std. Err.
Coef.
Std. Err.
Intercept
0.0018
(0.0004)
0.0016
(0.0004)
XPrev1
0.202
(0.027)
0.213
(0.029)
XPrev2
0.213
(0.027)
0.201
(0.028)
XPrev3
0.202
(0.028)
0.224
(0.029)
XFP
0.275
(0.027)
0.271
(0.028)
Appendix
Table 19.1: Coefficients of Equation ( 2 ) estimated with the races prior to the 2024 Belgian GP. The specification without XQ is the one used for this race. Notes: *** p<0.01 , ** p<0.05 , * p<0.1 .
Estimated Coefficients
Training data [observations]
Overtake rate
Grand Prix
γ0
γPredGap
Overtakes
Total
Bahrain
-1.1439
-1.8735
235
1475
0.159
Belgian
-0.7949
-2.6221
183
964
0.190
Dutch
-1.9121
-1.8383
130
1551
0.084
Hungarian
-1.6567
-2.4366
206
1969
0.105
Miami
-0.8381
-2.4429
133
1302
0.102
Appendix
Table 20.1: Overtake logistic regression coefficients for selected GPs, laps with overtake in training data, and empirical overtaking rate in the estimation sample. Notes: *** p<0.01 , ** p<0.05 , * p<0.1 .
Figure 20.1: Probability of overtaking as a function of the predicted gap, from the coefficients of Table 20.1 . Circuits are listed in decreasing order of the probability at a gap of zero.
Variable
Coef.
Std. Err.
Intercept
-5.6162
(0.152)
Bahrain GP
1.5180
(0.149)
Belgian GP
1.6129
(0.170)
Dutch GP
0.4334
(0.150)
Hungarian GP
0.0325
(0.154)
Miami GP
-0.7288
(0.214)
Appendix
Table 21.1: Logit regression results for pit stop decision. Each SC or VSC period contributes one observation per driver, on its first lap. Notes: *** p<0.01 , ** p<0.05 , * p<0.1 . Reference categories and the indicators of the circuits not considered omitted.
Variable
Coef.
Std. Err.
Alt: C0
-1.3493
**
(0.540)
Alt: C1
-0.0278
(0.610)
Alt: C2
-1.0243
**
(0.406)
Alt: C4
1.2418
(0.443)
Alt: C5
3.4327
(1.044)
Alt: C0 ⋅ LapsLeft
0.0265
(0.015)
Appendix
Table 21.2: Conditional logit results for tire compound choice conditional on pit stop. Notes: *** p<0.01 , ** p<0.05 , * p<0.1 . Base alternative (C3) omitted. Clustered standard errors at race level (63 races).
Grand Prix
Double DQN
A2C
TRPO
PPO
Recurrent PPO
Bahrain
0.000
0.185
4.919
0.068
0.000
Belgian
0.057
0.057
1.217
0.000
0.000
Dutch
0.000
1.231
1.408
1.231
0.000
Hungarian
0.000
0.128
5.374
1.217
0.000
Miami
0.421
0.889
3.438
0.885
0.128
Saudi Arabian
0.000
3.471
5.068
0.000
0.000
Appendix
Table 22.1: Time difference (in seconds) between each DRL model strategy and the global optimal race strategy computed via the QMIP model. Positive values indicate how much slower the agent’s full-race strategy is compared to the QMIP optimum. Each entry corresponds to the seed with the smallest gap among five. Median over seeds : median gap across the five seeds of each circuit, averaged over circuits.
DNF
Grand Prix
Total
Ahead of Agent
Bahrain
0
0
Belgian
1
0
Dutch
0
0
Hungarian
1
0
Miami
1
0
Appendix
Table 23.1: Number of drivers who did not finish (DNF) per race in the 2024 season. DNF Ahead of Agent: number of DNFs among drivers who started ahead of the agent’s grid position.
GP
Double DQN
A2C
TRPO
PPO
Rec. PPO
QMIP
Fully simulated races (Figure 6 )
Bahrain
5.34 ± 0.24 †
4.69 ± 0.23 †
4.91 ± 0.24 †
4.04 ± 0.19 ∗
4.13 ± 0.19 ∗
4.34 ± 0.20
Belgian
10.74 ± 0.25 ∗
10.71 ± 0.24 ∗
11.79 ± 0.29 †
10.77 ± 0.25 ∗
10.80 ± 0.25 ∗
11.18 ± 0.25
Dutch
7.67 ± 0.26
7.98 ± 0.26 †
7.83 ± 0.30
6.79 ± 0.22 ∗
6.70 ± 0.22 ∗
7.72 ± 0.25
Hungarian
8.47 ± 0.25 †
8.37 ± 0.24 †
8.28 ± 0.24 †
7.73 ± 0.22 ∗
7.84 ± 0.23
8.02 ± 0.25
Miami
12.98 ± 0.29
13.85 ± 0.29 †
14.50 ± 0.28 †
12.76 ± 0.28 ∗
13.06 ± 0.28
12.99 ± 0.27
Appendix
Table 24.1: Mean final position by solution method and circuit, 2024 season, over 500 simulations per circuit, with 95% confidence intervals. Since all methods are evaluated on the same 500 random seeds, the difference with the QMIP is computed race by race. The intervals reflect the variability across simulated races for the trained agent of each method, and not the variability across training seeds or circuits. ∗ / † Better/worse than the QMIP at the 5% level (paired t -test, i.e., the 95% confidence interval of the paired difference excludes zero).
Figure 25.1: Tire stints implied by each candidate action at lap 7 of the 2024 Saudi Arabian Grand Prix, with the PPO policy driving in place of Lando Norris. Each bar shows one representative continuation under the PPO policy, with the same realization of race events across actions. Numbers in parentheses give stint lengths in laps.
Figure 26.1: Actual 2024 tire stints of each driver and stints implied by the DRL recommendation at every lap where it differs from the actual decision. Each lower bar replays the race up to the lap marked by the triangle and shows one representative continuation under the PPO policy, without further yellow flags. Consecutive laps with the same recommendation share a bar, drawn from the lap with the largest difference. The annotation on the right reports the recommended action and the mean paired difference in points against the actual decision at that lap (given in parentheses for grouped bars), over M=500 rollouts with simulated yellow flags, ±2 SE; positive values favor the DRL recommendation and negative values favor the driver’s actual decision, and ∗ marks differences larger than 2 SE. The differences come from the rollouts used to select the best action in Figure 10 , so they differ slightly from those reported there.
Setting
Double DQN
A2C
TRPO
PPO
Recurrent PPO
With competition
1.65
1.48
1.67
1.50
1.86
Without competition
0.37
0.16
0.28
0.25
0.83
Appendix
Table 27.1: Median wall-clock training time per policy and circuit, in hours, by DRL method.