Back to notes
$ cat ~/notes/f1-strategy-as-a-decision-space-part-1.mdx

F1 Strategy as a Combinatorial Decision Space, Part 1

A curious overview of why Formula 1 race strategy is less about one pit call and more about searching a branching space of constrained futures.

June 19, 202617 min read

I first started watching Formula 1 in my preteen years, around 2007 or 2008. Some parts of that era are blurry now, but I still vividly remember the defining chaos of the 2008 season: "Is that Glock? Is that Glock going slowly? It is! It's Glock!"

Years of watching F1 made the strategy side more interesting to me, not less. The racing is visible, but the decisions behind it are stranger: teams making time-critical calls with incomplete information, changing tyres at exactly the right or wrong lap, reacting to rivals, gambling on weather, or trying to keep a future pit window alive before anyone watching at home can see why it matters.

That curiosity eventually turned into a more technical question: how are these decisions made on the fly, and what kind of model would even be able to reason about them?

Formula 1 strategy looks like a sequence of simple questions.

Should we pit now? Which tyre should we fit? Should we cover the car behind? Is the undercut strong enough? Can we stretch this stint until rain, traffic, or a Safety Car changes the race?

The useful model is that those are not separate questions. They are branches in a combinatorial decision space: a large set of possible futures created by many small discrete choices.

In mathematics and computer science, a combinatorial decision space is a set of discrete choices whose combinations create a much larger set of possible configurations, plans, or outcomes. The important word is combinations. A single choice may be simple. A sequence of choices, each with several legal options, can become too large to inspect directly.

Formula 1 race strategy fits that definition cleanly:

  • Compounding Choices: A strategist has to choose the starting tyre compound, the lap for each pit stop, and the compound fitted after each stop.
  • Exploding Permutations: Each choice is multiplied by changing weather, tyre degradation, fuel burn, traffic, and pit-loss uncertainty.
  • Competitor Variables: Strategy cannot be modelled in isolation because every branch interacts with the possible moves of 19 other drivers.
  • Safety Cars and Virtual Safety Cars: Unexpected events create sudden branches in the decision tree, so teams need fast simulation and Monte Carlo-style evaluation during the race rather than one static plan.

That is what makes F1 strategy interesting. The hard part is not knowing that fresh tyres are faster than old tyres. The hard part is deciding whether the future opened by taking those fresh tyres now is better than the futures closed by giving up track position, tyre offset, or Safety Car optionality.

For example, suppose a Formula 1 team must decide:

  • which lap to pit on
  • which tyre compound to fit
  • whether to stop once, twice, or three times
  • whether to respond to a rival's pit stop
  • whether to split strategies between two drivers
  • whether to prioritise track position or tyre life
  • whether to pit under Safety Car or Virtual Safety Car, or stay out
  • whether to attack now or save tyres, fuel, or ERS for later

Each individual choice may be simple. Together, they create a large decision space.

So in F1, the decision space is not just large. It is combinatorial, dynamic, uncertain, and adversarial.

A clean example

The 2021 Spanish Grand Prix is one of the clean examples of this, and I do mean a masterclass in race strategy. Mercedes put Lewis Hamilton onto an unexpected two-stop strategy, giving up track position to Max Verstappen so Hamilton could use fresher tyres to hunt him down in the closing laps. A late-race second pit stop was a very calculated gambit that allowed Hamilton to hunt down and pass Verstappen in lap 60 of 66. That kind of gamble only makes sense when the race strategy team has enough confidence in the decision-system tooling behind the call.

The 2021 Spanish Grand Prix: from 4:56 to 7:20, Mercedes' pit wall and Brackley tactics team work through the second-stop call.

The most interesting part of the clip is the conversation from roughly 4:56 to 7:20: Toto Wolff, James Vowles, Mercedes' Strategy Director, and the tactics team back at Mercedes F1 headquarters in Brackley, UK, working through the call in real time. It is not framed as a grand theory problem. It is a live branch selection problem. If Hamilton stops, he has to recover track position on tyres with enough life and pace advantage. If he stays out, Verstappen's older tyres may be easier to defend against.

On the surface, it was a pit call. Underneath, it was a psychological chess match. Mercedes chose a branch where Hamilton would temporarily lose the lead, then force Verstappen and Red Bull to answer an uncomfortable question: stay out and defend on older tyres, or pit again and likely surrender track position.

Hamilton used the tyre delta to close the gap and overtake Verstappen with a few laps left. It felt like a repeat of the 2019 Hungarian Grand Prix at the Hungaroring: the same basic structure, the same pressure, and the same idea that the best strategic move can be the one that makes the rival's remaining options worse.

So let's dive into the world of race strategy and its intricate relation to combinatorial decision spaces.

The branching problem

A race strategy decision has a very small surface area.

At a given lap, a team may only have a few visible actions:

  • stay out
  • pit for a legal compound
  • react to a rival
  • push harder
  • manage tyres
  • split the two cars

That list is not large. The explosion comes from sequencing.

If a driver can pit on many possible laps, choose among several compounds, react to rival stops, and change plan after interruptions, the number of possible strategy paths grows quickly. Even a simplified dry race creates more branches than a person can inspect one by one.

F1 strategy is not one decision. It is a sequence of linked decisions.

A strategist is not asking only:

Should we pit now?

They are really asking:

If we pit now, what tyre do we fit, where do we rejoin, what will our rivals do, how will our tyre degradation evolve, what if a Safety Car comes, and does this help us by the end of the race?

That is a combinatorial decision problem because every choice branches into future possibilities.

A simple decision tree might look like this:

codetext
Lap 18:
  Stay out
    Rival pits
      Cover next lap
      Stay out longer
      Switch to offset strategy
    Rival stays out
      Extend stint
      Pit for undercut
      Wait for Safety Car
  Pit now
    Fit medium
      Push out-lap
      Manage tyres
    Fit hard
      Commit to long final stint
    Fit soft
      Attack short-term, risk late degradation

Each branch creates more branches. The number of possible race futures grows very quickly. This is the core of combinatorial decision spaces: the total number of possible strategies becomes too large to evaluate manually one by one.

The strategy question is therefore not just:

What is the fastest pit lap?

It is closer to:

Which action now leaves us with the best distribution of future outcomes, given tyre degradation, traffic, rival behaviour, Safety Car risk, and the constraints we cannot violate?

That wording matters. It moves the problem from a single-point answer to a decision system.

Key dimensions of the strategy space

Pit stop timing

Pit timing is one of the most obvious combinatorial variables. A team must decide not only whether to pit, but when.

Pitting one lap earlier or later can change rejoin position, traffic, undercut or overcut potential, tyre temperature on the out-lap, exposure to Safety Car risk, final stint length, and whether the driver can push or must manage. The difference between pitting on lap 17 and lap 18 may look small, but strategically it can change the race.

Tyre compound choice

F1 tyre strategy is heavily combinatorial because tyre choice interacts with stint length.

A soft tyre may be faster initially but degrade quickly. A hard tyre may be slower at first but more durable. A medium tyre may be the compromise. The compound choice is not independent. It depends on remaining race distance, track temperature, degradation rate, graining or blistering risk, driver style, traffic, required pace to undercut or defend, mandatory compound-use rules, and the tyres already used or still available.

So the question is not simply:

Which tyre is fastest?

It is closer to:

Which tyre gives the best total race outcome given this lap, this traffic, this rival behaviour, this degradation curve, and this probability of future interruptions?

Number of stops

One-stop, two-stop, and three-stop strategies create different strategic universes.

A one-stop strategy may prioritise track position and tyre management. A two-stop strategy may prioritise pace and attacking flexibility. A three-stop strategy may work only if degradation is high, traffic is low, or Safety Car timing makes it viable.

The number of stops changes the structure of the whole decision space. Once a team commits to a certain stop pattern, some future strategies become impossible or unattractive.

Traffic and rejoin position

F1 strategy is not just about theoretical lap time. It is about where you come out on track.

A car may have the fastest tyre strategy on paper, but if it rejoins behind a slower car or a DRS train, the strategy may fail. Each pit decision has to account for gaps to cars ahead and behind, pit-lane time loss, overtaking difficulty, DRS effects, defensive behaviour from rivals, whether slower cars have already stopped, and whether the driver can clear traffic quickly.

A theoretically optimal strategy can become bad if it puts the car into dirty air.

Undercut and overcut dynamics

The undercut is when a driver pits earlier, uses fresh tyres to set fast laps, and jumps a rival who stays out.

The overcut is when a driver stays out longer, either because their old tyres still perform well or because the rival struggles on cold new tyres, in traffic, or on a slower compound.

These are classic F1 combinatorial decisions because they depend on timing, tyre warmup, pit loss, traffic, and rival response. A team has to ask:

If we pit now, will they cover us? If they cover us, do we gain anything? If they do not cover us, can we undercut? If we stay out, can we overcut? What if another team pits first and blocks the window?

This is not a static optimisation problem. It is a game.

Safety Car and Virtual Safety Car uncertainty

Safety Cars radically alter the decision space.

Under green-flag conditions, a pit stop might cost around 20 to 25 seconds depending on the circuit. Under Safety Car or VSC, the effective loss can be much smaller. That means teams are constantly weighing whether to pit now and take certainty, stay out and hope for a cheaper stop later, pit under Safety Car even if the tyre choice is not ideal, double-stack both cars, or leave one car out to preserve track position.

Safety Car probability turns F1 strategy into a decision problem under uncertainty. The best decision is not always the one that is fastest in the average case. Sometimes it is the one with the best risk-adjusted payoff.

Weather

Rain multiplies the decision space.

In dry conditions, teams are mostly choosing among slick compounds. In mixed conditions, they must also consider slicks, intermediates, full wets, crossover lap times, track drying rate, rain intensity, standing water, driver confidence, and sector-by-sector conditions.

The tyre decision can change lap by lap. Sometimes sector by sector. A car may be faster on slicks in sector 3 but dangerously slow in sectors 1 and 2. That makes the decision space partially observable and highly uncertain.

Wet races are often where combinatorial strategy becomes most visible to fans.

Why the space is too large for humans alone

Race strategists are very skilled, but the raw number of possible futures is too large for intuition alone.

Consider a simplified race with 50 possible pit laps, 3 tyre compounds, 3 possible stop counts, 20 rival cars, multiple traffic states, several Safety Car probabilities, changing degradation curves, weather uncertainty, and two team cars whose strategies interact.

The number of possible strategy paths becomes enormous.

A very simplified example: assume the starting tyre is already fixed. A driver can pit on any of 50 laps, choose from 3 tyre compounds for the next stint, and use either a one-stop or two-stop strategy.

For one stop, that is roughly:

50×3=15050 \times 3 = 150

For two stops, choosing two pit laps and two tyre compounds gives something more like:

(502)×32=50!2!×(50−2)!×32=1,225×9=11,025 possible strategies\binom{50}{2} \times 3^2 = \frac{50!}{2! \times (50 - 2)!} \times 3^2 = 1{,}225 \times 9 = 11{,}025 \text{ possible strategies}

And that is still absurdly simplified. It ignores traffic, rival cars, tyre degradation, Safety Cars, weather, driver pace, pit-loss variation, stint length constraints, tyre allocation limits, and race regulations.

This is why teams rely heavily on simulation, Monte Carlo models, optimisation algorithms, real-time telemetry, predictive tyre degradation models, competitor modelling, live timing, gap analysis, and human strategist judgement.

The goal is not to evaluate every possible path perfectly. The goal is to search the space intelligently and identify a small set of high-quality options.

The state is doing most of the work

A useful race model starts with state.

At minimum, the state needs to know the current lap, car order, gaps, tyres, tyre ages, pit history, legal compounds, and a rough model of pace. A less toy-like version also needs traffic loss, Safety Car or VSC conditions, weather, pit-loss variation, rival tendencies, and the team's objective.

The objective is easy to underspecify. Fastest total race time is not always the same as best race outcome. A leader may prefer a robust defensive branch. A midfield car stuck in traffic may need a high-variance branch. A team fighting a championship rival may care more about finishing ahead of one car than about theoretical expected position.

That means the state should not only ask "how fast are we?" It should ask "what are we optimising for?"

Constraints make the space useful

The full decision space is too large, but the legal and sensible space is smaller.

F1 strategy is constrained by tyre rules, available sets, pit-lane loss, stint lengths, traffic windows, team cars, race-control state, and the physical fact that tyres do not care about spreadsheet optimism. Some branches are illegal. Some are mechanically possible but strategically unserious. A soft tyre stint that is too long may be a branch in the abstract tree, but it does not need equal attention.

This is where combinatorial thinking becomes practical. The goal is not to admire the size of the tree. The goal is to prune it.

Good strategy work removes branches early:

  • illegal compound sequences
  • pit laps that rejoin into obvious traffic
  • stint lengths outside a useful tyre window
  • double-stack calls whose delay cancels the benefit
  • strategies that only work under one fragile assumption

The model improves when it can say "do not spend search budget here."

Simulation turns branches into consequences

A simulator answers a narrow question:

If this strategy path is followed under this scenario, what happens?

That is not the whole strategy problem, but it is the foundation. Without a simulator, the decision space is just a diagram. With a simulator, each branch can produce consequences: race time, position, points, downside risk, or probability of beating a target rival.

For a first prototype, I would start with a lap-based simulator rather than a fully event-driven one. Most strategic calls can be represented at lap boundaries:

codepython
for lap in range(current_lap, race_laps + 1):
    update_lap_times()
    update_tyre_age()
    apply_pit_decisions()
    update_gaps_and_positions()
    sample_race_events()

That is simple enough to debug and fast enough to run many times. Event-driven tools such as SimPy become more useful later, when pit-lane resources, double-stacking, Safety Car timing, or queueing effects deserve their own mechanics.

The trap is expecting a simulator to make the decision. A simulator can evaluate a candidate future. The strategy layer still has to decide which futures to simulate.

Search is the strategy brain

Once the simulator exists, the next question is how to explore the future.

The simplest method is enumeration: generate legal pit plans and simulate each one. For a dry race prototype, that may be enough. That might mean comparing a medium-to-hard one-stop with several possible pit laps, or comparing it against two-stop variants that use soft, medium, and hard tyres in different orders.

codetext
M-H, stop on lap 18
M-H, stop on lap 22
S-M-H, stop on laps 14 and 38
S-H-M, stop on laps 12 and 34

Then add Monte Carlo uncertainty. Instead of evaluating one clean future, evaluate many noisy ones:

  • pit stop loss varies
  • tyre degradation varies
  • traffic appears or clears
  • rivals pit earlier or later
  • Safety Car or VSC events occur

The output becomes a distribution, not a single number. One branch may have a slightly better average finish but a painful downside. Another may be less efficient on paper but more robust against traffic or a late Safety Car. A third may be the right choice only if the team needs variance, not stability.

codetext
Strategy A:
  average finish: P6.1
  P4 or better: 18%
  P9 or worse: 9%

Strategy B:
  average finish: P6.5
  P4 or better: 31%
  P9 or worse: 24%

Now there is a real strategic question. Do we prefer the stable branch or the volatile one? The answer depends on context.

Why "optimal" is slippery

In a clean optimisation problem, "optimal" can mean minimising a well-defined cost. F1 resists that neatness.

The inputs move. Rival behaviour changes. A driver reports graining. Track temperature shifts. A Safety Car appears. A car that should have been easy to pass turns into a rolling constraint. The model can be right on lap 12 and stale on lap 15.

That makes race strategy a receding-horizon problem. The team is not solving the race once. It is repeatedly re-solving the next useful slice of the race as the state changes.

This is why human judgement still matters. The model can search branches, but someone still has to notice when the model's assumptions are breaking. The driver may be unable to warm a tyre. A rival may be faster in clean air than the pre-race model expected. A pit window may exist on paper but not in the actual traffic pattern.

The computer is good at counting branches. The human is still useful for asking whether the branches mean what the model thinks they mean.

A prototype path

This first article is only the framing. The implementation belongs in the next three parts.

In Part 2, We will build the race simulator: a small model that evolves the race lap by lap. It should track tyres, gaps, pit loss, traffic, and enough pace behaviour to make strategy tradeoffs visible.

In Part 3, We will build the decision model: the layer that decides what actions are available from a given state. This is where constraints live. It should know when a compound is legal, when a stop is possible, when a Safety Car changes the value of a pit stop, and when a branch should be rejected. The branching will be Monte Carlo-style: many plausible futures, not one perfectly clean forecast.

In Part 4, We will build the search layer: this is the layer that guides the system towards the best available decisions by comparing many simulated futures and ranking the actions they imply. Enumeration first, Monte Carlo next, and possibly Monte Carlo Tree Search once the simulator can support branching futures.

The useful residue is this: a race strategist is not choosing one pit stop in isolation. They are shaping the reachable future. The interesting question is which futures are worth keeping open.