Chapter 18 Exercises — The Strategy Room
Difficulty: ⭐ concept check · ⭐⭐ calculation or short analysis · ⭐⭐⭐ multi-step analysis or judgment · ⭐⭐⭐⭐ open-ended project
All numeric inputs come from the book's data snapshot (OpenF1 2023–2026 through the Las Vegas GP; Jolpica-F1) or from this chapter's script outputs. Where an exercise asks you to compute something new, the "expected shape" tells you what kind of answer to look for. Run everything offline from data/processed/.
Measured inputs you will need:
| Input | Value |
|---|---|
| Green-flag pit loss G (pooled) | 22.512 s (n = 1,921) |
| Pit loss under SC, S (near-field) | 12.722 s (n = 137) |
| Pit loss under VSC, V (near-field) | 15.671 s (n = 106) |
| p(red flag | SC opened after lap 1) | 7/44 = 0.159 [0.079, 0.294] |
| Middle-phase incident hazard λ | 0.0186 per lap at risk |
| Expected saving if a mid-race incident arrives, s̄ | 8.985 s |
| Median fresh-tyre advantage Δ | 1.078 s/lap |
| Clean-lap residual SD σ | 0.369 s |
Part A — Concepts ⭐
A1. List the seven information streams of a strategy room from section 18.1. For each, say whether this book's data have it live-equivalent, after the fact at lower resolution, or not at all.
A2. Why does race control's lap_number sometimes disagree with the lap a given car is on? What should you do before asking any per-car question of a race-control message?
A3. Define expected value, regret and minimax regret in one sentence each. Give an example from this chapter where minimax regret and expected value recommend different actions.
A4. What is "resulting"? Why does DecisionLog store the state that each call was made in, not just the call?
A5. The radio index holds a median of 128 clips per race in 2023 and 30 in 2025. Give two conclusions you cannot draw from those numbers, and one you can.
A6. Explain in plain language why lap times are a "slow sensor" for tyre wear compared with what a driver feels. Use the words noise, average and corner.
A7. What does opp_lap represent in a RaceState? Why does it depend on the assumed lead_s?
A8. Why is a 79.8% agreement rate for a VSC rule unimpressive? What two extra numbers should always be reported alongside agreement?
A9. Team-mates make 8.5% of green-flag passes but are adjacent in 11.6% of running pairs. Give one explanation that involves team orders and one that does not. Which does the data support?
A10. Why are neutralisations the best place to grade a pit wall's decisions from timing data alone?
Selected answers (A2, A3, A5, A8, A9)
A2. Race control records the leader's lap. Lapped cars, and cars further back that have not yet crossed the line, are on earlier laps. Convert the message's timestamp to the car's own lap using its lap start and end times (RaceFeed does this).
A3. Expected value: the probability-weighted average outcome of an action. Regret: what an action cost compared with the best action in the outcome that actually happened. Minimax regret: choose the action whose worst-case regret is smallest. For an owed stop under a safety car, EV says box (+6.21 s at p = 0.159), while minimax regret says stay (worst-case regret 9.8 s, against 12.7 s for boxing).
A5. You cannot conclude that teams talked a quarter as much in 2025, or that 2025 races were calmer. You can conclude that the published selection changed between 2024 and 2025, so cross-season comparisons of the index are invalid.
A8. Under a VSC about 80% of cars stay out, so a rule that never boxes scores about 80% agreement while predicting nothing. Report precision (the share of BOX calls that were real stops) and recall (the share of real stops the rule called), and compare against the never-box and "box iff owed" baselines.
A9. Team orders: teams tell team-mates to hold position, so passes between them are rarer. No team orders: team-mates have the same car and so rarely have the pace difference that passing requires. The data cannot separate the two. Both predict a ratio below 1, and the measured 0.73 is consistent with either.
Part B — Calculations & Physics ⭐⭐
B1. Break-even red-flag probability. Using G and S from the table, compute the break-even p* at which boxing an owed stop under a safety car and staying out have equal expected time. Then repeat for a circuit where the safety-car loss is 19.8 s (the Shanghai figure in Chapter 14's table).
Solution
p = (G − S)/G = (22.512 − 12.722)/22.512 = 9.790/22.512 = 0.435. With S = 19.8 s: p = (22.512 − 19.8)/22.512 = 2.712/22.512 = 0.120. At a circuit where the safety car barely discounts the stop, the measured p = 0.159 is above the break-even. There, staying out for a possible free red-flag change becomes the better bet on expected time.
B2. Expected value at the edge of the interval. Compute EV(box − stay) for an owed stop at p = 0.079, 0.159 and 0.294, the lower bound, point estimate and upper bound.
Solution
EV = (1 − p)(G − S) − pS with G − S = 9.790 and S = 12.722. - p = 0.079: 0.921 × 9.790 − 0.079 × 12.722 = 9.017 − 1.005 = +8.01 s - p = 0.159: 0.841 × 9.790 − 0.159 × 12.722 = 8.233 − 2.023 = +6.21 s - p = 0.294: 0.706 × 9.790 − 0.294 × 12.722 = 6.912 − 3.740 = +3.17 s
The output of code/03_ev_and_regret.py gives +8.006, +6.209 and +3.179 s. The small differences come from rounding p. The answer is positive across the whole interval.
B3. A discretionary stop with red-flag risk. A car has already used two compounds. A safety car comes out with 25 laps left. Its MEDIUM set is 18 laps old. Using Chapter 14's closed form with deg 0.051 s/lap for both old and new sets and no compound offset, the extra stop's tyre saving is R × deg × a = 25 × 0.051 × 18. (a) Compute the net gain of an extra stop at S = 12.722 s. (b) Include the red-flag risk: with probability p the extra stop is wasted, since the red flag would have given new tyres for free. Compute the expected net gain at p = 0.159.
Solution
(a) Saving = 25 × 0.051 × 18 = 22.95 s; net gain = 22.95 − 12.722 = +10.23 s. (b) If the red flag comes, the boxing car and the staying car both end up on new tyres, but the boxing car has paid S. So the expected net gain is (1 − p) × 10.23 + p × (−12.722) = 0.841 × 10.23 − 0.159 × 12.722 = 8.60 − 2.02 = +6.58 s. Still a clear box.
B4. Waiting for a safety car. In the middle of a race, λ = 0.0186 per lap and the expected saving per incident is s̄ = 8.985 s. (a) What fresh-tyre advantage Δ makes waiting one lap break even? (b) Compute the expected value of waiting 3 laps at Δ = 0.640 s/lap (the 75th-percentile delta). (c) At a circuit with a hazard 1.33 times the average, what is the new break-even Δ?
Solution
(a) Δ ≈ λ s̄ = 0.0186 × 8.985 = 0.167 s/lap. (b) P(at least one in 3 laps) = 1 − e^(−0.0558) = 0.0543. EV = 0.0543 × 8.985 − 3 × 0.640 = 0.488 − 1.920 = −1.43 s. That matches the script's −1.43. (c) 1.33 × 0.167 = 0.222 s/lap*.
B5. How many laps to see a drop? Clean-lap residuals around a stint's trend have σ = 0.369 s. (a) How many laps must you average to detect a 0.3 s/lap drop at two standard errors? (b) A 0.5 s drop? (c) With three laps of data, what is the smallest drop you can confirm at two standard errors?
Solution
n ≥ (2σ/δ)². (a) (0.738/0.3)² = 2.46² = 6.05 laps. (b) (0.738/0.5)² = 1.476² = 2.18 laps. (c) δ = 2σ/√3 = 0.738/1.732 = 0.426 s.
B6. The decision window. At a circuit with an 80 s green-flag lap, a safety car is deployed at a uniformly random moment. (a) What share of the field would you expect to be within 10 s of the line, if cars kept lapping at green speed? (b) The measured share under a safety car is 3.3%. Give the physical reason the measured share is smaller.
Solution
(a) 10/80 = 12.5%. (b) Once the safety car is deployed the cars slow down, so the remaining part of each lap takes longer and the distribution of time-to-line stretches out. The 10-second slice then holds a smaller share. (Part of the difference also comes from cars that had just crossed the line counting as most of a lap away.)
B7. Tyre arithmetic for the Zandvoort gamble. Reproduce the 18.9 calculation. Car A boxes on lap 23 of 72 and runs a new HARD to the end (ages 0–48). Car B stays on its 22-lap HARD (ages 23–52 for laps 24–53), then fits a new MEDIUM for laps 54–72 (ages 0–18). Use the linear tyre model with HARD 0.048 and MEDIUM 0.051 s/lap. How much more tyre time does B spend than A?
Solution
A: 0.048 × (0 + 1 + … + 48) = 0.048 × 1,176 = 56.45 s. B: 0.048 × (23 + … + 52) + 0.051 × (0 + … + 18) = 0.048 × 1,125 + 0.051 × 171 = 54.00 + 8.72 = 62.72 s. B − A = +6.27 s. Car B spends more tyre time, and also risks paying the green price later if no second neutralisation comes.
B8. Points for a team-mate swap. A team runs P2 and P3. Under the 2010+ points scale, by how much does swapping them change the team's points? By how much does it change the gap between the two drivers in the championship?
Solution
18 + 15 = 15 + 18, so the team total changes by 0. The gap between the two drivers changes by 2 × (18 − 15) = 6 points: one gains 3 and the other loses 3, relative to not swapping.
Part C — Data & Code ⭐⭐–⭐⭐⭐
C1. Analyze this session: 2024 Canadian GP, race (⭐⭐). Run pitwall.event_stream and neutralisation.incidents on the race. Print the incidents with their start laps and types, and count the strategic messages. Then take RaceFeed.state_at one second after the first safety-car deployment and tabulate each car's compound, tyre age, s_to_line and whether it changed tyres at its first or second opportunity.
Expected shape: a short incident table (the race had two safety cars, per the book's season table), and one row per running car with a mix of BOX and STAY. Note any wet-tyre compounds: this race is not in the dry-race set, so the two-compound "owed" logic does not apply.
C2. Compare these drivers: radio around stops, 2023 vs 2025 (⭐⭐). Extend code/04_team_radio.py to run the event study separately for 2023 and for 2025. Plot the two curves on one chart, each normalised by its own season's average clips per lap.
Expected shape: the 2023 curve sits far higher in absolute terms (about 0.10 clips per lap near the stop, from the by-season table). After normalisation the two may look similar. The comparison you can make is of shape, never of level.
C3. Build the strategy: a red-flag compound picker (⭐⭐⭐). choose_compound uses fixed thresholds (SOFT ≤ 20 laps left, MEDIUM ≤ 35, otherwise HARD). For every red flag in 2023–2026 after lap 1, compare what the rule would have fitted with what each car actually fitted during the suspension: the compound on the first lap after the restart. Report the match rate overall and by laps left.
Expected shape: for the 2026 Italian GP the rule matches 15 of 21 cars (18.9). Expect lower match rates late in races, when teams often pick SOFTs for a short sprint.
C4. Analyze this session: the 2026 Mexico City GP decision log (⭐⭐). Run pitwall.run(session, Rules.v2()) and use DecisionLog.to_frame() to list every BOX call for Lewis Hamilton, with its reason. On which laps did the "set has paid" trigger first fire for each of his stints, and when did he actually stop?
Expected shape: a short list, starting about 21 laps into each stint, with real stops well after the first call. The race-wide median lag is 12 laps.
C5. Predict the race: a VSC rule fitted on 2023–24 (⭐⭐⭐). Using evaluate_neutralisations, fit min_age_vsc on 2023–24 dry races only, by grid search from 2 to 14 for maximum agreement. Score it on 2025 and on 2026. Always report the never-box baseline, precision and recall.
Expected shape: a fitted threshold somewhere near 10 laps, and out-of-sample agreement close to (and possibly not above) the never-box baseline of about 79–81%.
C6. Compare these drivers: team-mate passes by team (⭐⭐). Extend code/06_team_orders.py to compute, for each team in 2026, the number of green-flag passes between its two drivers and the share of laps on which they ran adjacent.
Expected shape: a team table with small counts (the 2026 total is 125 team-mate passes across 21 races). Many teams will have single-digit counts, so attach Wilson intervals to any share you quote.
C7. Analyze this session: warning times at one circuit (⭐⭐). Run deployment_warning for every race at Baku (circuit_ref "baku"), 2023–2026. Do safety cars there come with more or less warning than the all-circuit median of 29 s?
Expected shape: a handful of deployments, which is far too few for a confident answer. Report the values individually and say so.
C8. Analyze this session: the lead-time assumption at Monaco (⭐⭐⭐). At Monaco the timing line sits in the pit lane (toolkit README §5). Re-run the decision-window analysis of 18.3 for Monaco only and compare the share of cars "too close to box" with the all-circuit 3.3%. Discuss whether lead_s = 10 is sensible there.
Expected shape: small n (Monaco had few neutralisations in 2023–26). The discussion matters more than the number.
Part D — Strategy & Judgment ⭐⭐⭐
D1. Call the pit stop: 2026 Mexico City GP, lap 43. It is 21:02:30 UTC. Antonelli leads by about 8.5 s on SOFTs that, by OpenF1's stint record, are 42 laps old. The plan is to stop this lap. There are no flags. (a) Using only the information on the timing screen, is the stop a good decision? (b) At 21:04:06, 80 s after his in-lap ended, a safety car is deployed. Does that change your answer to (a)? (c) If you were on Leclerc's pit wall at 21:04:07 (MEDIUM, 16 laps old, about 11 s to the line), what would you call, and what is the regret of each choice in each outcome?
Discussion
(a) On the timing screen alone, a stop on a 42-lap set is overdue: the "set has paid" trigger had been firing since lap 21. Nothing visible argues for staying out. (b) No. The quality of a decision is fixed by the information available when it was made. The safety car changes the outcome, not the grade. That is the point of the hook. (c) The rule book calls BOX (the extra stop is worth about +10 s at the SC price). If the SC ends normally, boxing gains about that much against staying. If it becomes a red flag (p = 0.159 at the base rate), staying gets the change free and boxing wastes 12.7 s plus track position. Leclerc stayed out. The red flag came 116 s later, and he changed tyres during the suspension.
D2. Call the pit stop: 2023 Australian GP, lap 7, P2. You are on Lewis Hamilton's (Mercedes) pit wall. Your team-mate leads by 0.6 s, both on 6-lap-old MEDIUMs, and a safety car has just been deployed. Your team-mate's pit wall is calling him in. What do you call, and why might a team want its two cars to make different calls here? (Then read Case Study 1.)
D3. Design the setup: a pit-wall display. Using the vocabulary counts of 18.2 (about 80 messages per race, about 16 of them strategic), design a one-screen display for a race strategist. Decide what must appear immediately, what can be summarised, and what should be hidden. Justify each choice with a number from the chapter: the warning times, the decision window, the escalation probabilities.
D4. Team orders. Your cars run P2 and P3 with 12 laps left. P3 is 0.4 s per lap faster and 0.8 s behind. The constructors' total is unaffected by a swap. List the risks of letting them race, the risks of a swap, and the data you would want before deciding. Which of those data does this book's snapshot contain?
D5. Build the strategy: the VSC owed-stop dilemma. An owed stop under a VSC saves G − V = 6.841 s. Real pit walls take it only about a third of the time on a mid-age set. Give three reasons, each grounded in a measurement from this chapter or Chapter 14, why the 6.841 s is often not available or not worth it.
Discussion
- It may be gone before you arrive. A VSC has a median length of about one lap (Chapter 14's incident library), and cars that missed the first opportunity almost never stopped on the next lap (2.6% of VSC car-deployments with more than 30 s to the line). If the VSC ends while the car is in the pit lane, the stop is priced at green, or at the "mixed" near-field median of 25.2 s, which is worse than green.
- The discount is small. 6.841 s is 70% of the safety-car discount on an owed stop (9.790 s). Under a VSC the gaps are preserved, so a car rejoins roughly where a green stop would have put it, minus 6.8 s. Whether that gains a place depends on the gap behind, and often it does not.
- The set may be too young to want to change. A stop on a 10-lap-old set commits the car to a long final stint. The decision-surface map shows real VSC box rates of only 0–17% on sets of 6–10 laps, whatever the laps left.
Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐
M1 (Chapters 12 and 18). Chapter 12's break-even says a set has "paid for" a stop at 20.9 laps. This chapter found that first green-flag stops have a median of 20 laps on the set (IQR 14–28). Explain why the median agrees with the break-even while the spread is so wide. Name two inputs from Chapter 12's race model that a single break-even age ignores.
M2 (Chapters 13 and 18). The cover rule in decide fires when the car behind pits from within 1.36 s. Using Chapter 13's logistic curve (logit P = 2.171 − 1.597 × gap), compute P(undercut succeeds) at gaps of 0.5, 1.36 and 2.5 s. At which gap would you stop covering? Justify it as an expected-value argument.
Solution
P = 1 / (1 + e^−(2.171 − 1.597 g)). - g = 0.5: logit = 1.373 → P = 0.80. - g = 1.36: logit ≈ 0 → P = 0.50. - g = 2.5: logit = −1.822 → P = 0.14.
Covering costs you your own planned stop timing, and that cost is not fixed. If you value a lost place at L and the cost of an early stop at C, cover when P × L > C. Chapter 13's numbers match: 0.80 / 0.44 / 0.14 at 0.5 / 1.5 / 2.5 s.
M3 (Chapters 14 and 18). Chapter 14's Anchor C found that the robust Singapore strategy is a flexible one-stop that takes a second stop only under SC or VSC. Explain how pitwall.decide implements "flexible" in code. What would you have to change in Rules to make it implement a rigid one-stop instead?
M4 (Chapters 17 and 18). Lap-1 neutralisations happened in 17.6% of 2023–26 races (Chapter 17). Why does this chapter's evaluation drop lap-1 incidents, and what different decision does a lap-1 safety car pose? Use the 2025 Saudi Arabian GP example from Chapter 17.
M5 (Chapters 4, 5 and 18). Chapter 4 and Chapter 5 describe the tyre "cliff" physically. This chapter found a median late excess of only +0.127 s before green stops, and that 0.5% of stints end more than 2 s above a linear fit (the book's degradation measurements). Reconcile the physics with the data in one paragraph.
M6 (Chapters 2 and 18). Chapter 2 showed that OpenF1 and Jolpica lap times agree to the millisecond from lap 2 onward. This chapter's tyre_changes disagrees with Chapter 12's stint-boundary count for 47 of 1,856 driver-races. Explain the sources of the disagreement (OpenF1 stints around same-set pit-lane passages, pit entries after the flag, and missing laps) and write a test that would catch each.
Part E — Research & Extension ⭐⭐⭐⭐
E1. A state-dependent red-flag probability. p(red | SC) = 0.159 is pooled. Using race-control messages between each safety-car deployment and the next window change ("RECOVERY VEHICLE ON TRACK", "MARSHALS ON TRACK", "MEDICAL CAR DEPLOYED", barrier-repair messages), build a classifier for "this SC becomes a red flag". With only 56 SC-opening incidents, use leave-one-race-out validation and report whether you beat the base rate. Discuss what a team's private information (video, GPS, marshal reports) would add.
E2. A receding-horizon pit wall. Replace the "set has paid" green trigger with a call to Chapter 12's optimise from the current state at every tick: remaining laps, current set, compounds used, pit loss. Run it over every dry 2025 race and compare the error between the first BOX call and the real stop lap with the break-even trigger's error (median 12 laps at Mexico City 2026). Report the run time, too: a live pit wall needs an answer in seconds.
E3. Pricing track position. Case Study 2's family-1 disagreements (owed stop, car stays out) suggest teams value track position. Estimate a "seconds per place" exchange rate from the data. Use the undercut study of Chapter 13, or green-flag pass rates by circuit (Chapter 35 and the book's overtaking table), as a measure of how hard a place is to regain. Add it to decide and test whether it reproduces the stay-out decisions without breaking the others.