Chapter 13 Exercises — The Undercut and Overcut

Difficulty: ⭐ concept check · ⭐⭐ calculation or short analysis · ⭐⭐⭐ multi-step analysis or judgment · ⭐⭐⭐⭐ open-ended project

All data exercises run offline on the book's data snapshot through the toolkit and project/boxbox/undercut.py. Where an answer is given as a number, it comes from running the chapter's scripts. code/undercut_pairs.csv (written by code/03_undercut_study.py) holds every situation used in the chapter.


Part A — Concepts ⭐

A1. In your own words, define the undercut, the overcut and the cover. For each, say which car (the one ahead or the one behind) stops first.

A2. Why does the fuel load cancel when you compare two cars through an undercut, and why does that make the fuel-corrected degradation rate the right input rather than the raw lap-time slope?

A3. The two-car model's closed form is $G = k\,d\,(a - s)$. Explain in words what each of the four symbols does to the gain, and why the settle laps $s$ reduce it.

A4. The chapter calls the 331 cases "situations", not "attempts". Give two reasons a car might stop one lap before the car ahead without trying to undercut it.

A5. In successful undercuts, which components of the gain (in-lap, out-lap, fresh-tyre, settle) differ most from failed undercuts? What does that say about who "wins" an undercut?

A6. Why is a car that is 0.5 s behind a better undercut candidate than the gap alone would suggest? What does the closeness itself tell you?

A7. A defender covers on the next lap ($k = 1$). Which component of the undercut does that limit, and why does it not limit the in-lap or out-lap components?

A8. Give the physical reason why the overcut does relatively better at low-degradation circuits.

A9. Name three things that decide undercuts but are invisible in the book's timing data, and for each one say how a team would see it.

A10. "The undercut works 43% of the time." List the four pieces of definition you need before that sentence means anything.


Part B — Calculations & Physics ⭐⭐

B1. The closed form. Two cars on HARDs wear at 0.048 s/lap (fuel-corrected, pooled median). Both sets are 22 laps old when the attacker pits. The defender replies after two laps, and the outcome is measured two laps after his out-lap. What is the model gain? What gap can it close?

Solution

$G = k\,d\,(a - s) = 2 \times 0.048 \times (22 - 2) = 1.920$ s. With equal stops and no warm-up, the undercut is expected to succeed from any gap under about 1.9 s. Compare the empirical curve: the logistic fit gives about 30% success from 1.9 s (it ignores $k$), and with $k = 2$ the measured rate is 51.2% (all gaps). The closed form is a planning number, not a probability.

B2. Raw vs corrected. Repeat B1 with the raw HARD slope of −0.002 s/lap. What does a strategist who forgot the fuel correction conclude?

Solution

$G = 2 \times (-0.002) \times 20 = -0.080$ s. The forgetful strategist concludes the undercut is worthless, even slightly harmful. The truth is that the falling fuel load hides about 0.05 s/lap of tyre wear in raw stint lap times. In a same-lap comparison between two cars the fuel cancels, so the wear shows up in full.

B3. Settle laps. With $k = 1$, $d = 0.051$, $a = 20$, compute $G$ when the outcome is measured on the defender's out-lap ($s = 0$), two laps later ($s = 2$) and six laps later ($s = 6$). The data show the median undercut gain falling from 1.306 s ($s = 0$) to 0.755 s ($s = 2$) to 0.573 s ($s = 6$). Does the model's rate of decline match?

Solution

$G = 0.051 \times (20 - s)$: 1.020 s, 0.918 s and 0.714 s. The model loses $k\,d = 0.051$ s per settle lap, about 0.31 s over six laps. The data lose 0.733 s from $s = 0$ to $s = 6$: faster than the model, but in the same direction. The extra decline in the data has several possible sources. Situations with long green windows are a different sample (n falls from 180 to 156), and the defender's younger tyres may be worth more than the linear rate implies.

B4. A slow stop. The model gives a $k = 1$ undercut with 20-lap-old MEDIUMs going to HARDs a gain of +0.966 s. The attacker's stop is 0.5 s slower than the defender's. What is the gain now, and from what gap would the undercut still be expected to work?

Solution

The stop delta adds one-for-one: $0.966 - 0.500 = 0.466$ s (simulate_pair(..., stop_delta_s=0.5) gives +0.466 s). The undercut is now expected to work only from inside about half a second. A half-second stop-execution difference is common: in successful undercuts the attacker's stop was cheaper 73.6% of the time.

B5. Break-even, revisited. Chapter 12's break-even for one stop is the pit loss divided by the fresh-tyre delta: $22.512 / 1.078 = 20.9$ laps. Explain why the undercut's required gap does not involve the pit loss at all, while the break-even does.

Solution

The break-even compares one car stopping with the same car not stopping, so the whole pit loss is a cost to be repaid. The undercut compares two cars that both stop, one lap or a few laps apart. Each pays one pit loss, so the pit losses cancel. Only their difference (stop execution) and the tyre-age difference over the $k$ laps remain.

B6. Odds from the logistic curve. The undercut curve is $\text{logit}\,P = 2.171 - 1.597\,g$, with the gap $g$ in seconds. Compute $P$ at $g = 0.8$ s and $g = 2.2$ s. By what factor does each extra second of gap divide the odds?

Solution

At 0.8 s: $\text{logit} = 2.171 - 1.278 = 0.893$, so $P = 1/(1 + e^{-0.893}) = 0.709$. At 2.2 s: $\text{logit} = 2.171 - 3.513 = -1.342$, so $P = 0.207$. Each second divides the odds by $e^{1.597} \approx 4.94$.

B7. The Miami counterfactual. In the 2026 Miami GP, Norris's canonical pit loss was 19.550 s and Antonelli's 17.904 s. At the end of lap 28 Antonelli was 0.264 s ahead. If the two stops had cost the same, what would the gap have been, and who would have led?

Solution

Norris would have saved $19.550 - 17.904 = 1.646$ s, so the gap would have been $-0.264 + 1.646 = +1.382$ s with Antonelli behind: Norris leads. (code/05_cover_and_overcut.py prints +1.382 s.) The undercut was won by the difference between the stops, not by the tyres.

B8. Different compounds, different wear. The attacker's old MEDIUMs and the defender's old HARDs are both 14 laps old. The attacker goes onto new HARDs, and the defender will reply after three laps ($k = 3$). Use this race's wear rates: MEDIUM 0.206 s/lap and HARD 0.035 s/lap (the 2024 Las Vegas GP's race medians, fuel-corrected). Ignore warm-up and offsets. Estimate the fresh-tyre component, then the settle component for $s = 2$, using the linear model. Why does the model see so little in this undercut, and what did it miss in the real case (Hülkenberg on Pérez)?

Solution

During the $k = 3$ fresh-tyre laps the defender's HARDs are 14–16 laps old (strictly, the model's laps 0–2 at ages 14, 15, 16) and the attacker's new HARDs are 1, 2 and 3 laps old. The difference is $0.035 \times [(14 + 15 + 16) - (1 + 2 + 3)] = 0.035 \times 39 = 1.365$ s. The settle laps then hand back about $k \times d \times s = 3 \times 0.035 \times 2 = 0.21$ s. On the in-lap the attacker's MEDIUMs, at 0.206 s/lap, are much slower than the defender's HARDs at the same age: the attacker's in-lap carries $0.206 \times 14 = 2.884$ s of wear against $0.035 \times 17 = 0.595$ s on the defender's in-lap three laps later, a cost of about 2.3 s to the attacker. That is why predict_pair, with the real ages (13 laps for both sets), returns −1.108 s for the Hülkenberg case. In the real race Pérez's own HARDs were fading much faster than the race median (raw trend +0.285 s/lap), and the measured fresh-tyre component was +7.394 s. The race-median rate described the average HARD, not Pérez's.

B9. Probability to expected places. An attacker is 1.2 s behind. From the undercut curve, $P(\text{success}) = 1/(1 + e^{-(2.171 - 1.597 \times 1.2)})$. If success gains one place and failure costs nothing in position (the attacker stays behind), what is the expected gain in places? Now suppose failure costs 0.674 s of track time (the median gain in failed undercuts), and a car is 0.5 s behind you, ready to pass if you lose more than 0.5 s. How does that change the decision?

Solution

$\text{logit} = 2.171 - 1.916 = 0.255$, so $P = 0.563$, and the expected gain is 0.563 places. With a threatening car 0.5 s behind, failure now has a downside. In failed undercuts the median attacker loses 0.674 s, more than the 0.5 s cushion, so a failure roughly costs a place. The rough expected value becomes $0.563 \times (+1) + 0.437 \times (-1 \times p_{\text{lose}})$, where $p_{\text{lose}}$ is the chance a failure drops you behind that car. Even with $p_{\text{lose}} = 1$ the expectation stays positive ($+0.126$), but it is much smaller, and much more volatile, than the naive 0.563.


Part C — Data & Code ⭐⭐–⭐⭐⭐

C1. Analyze this session ⭐⭐. 2024 Bahrain GP, Race. Run UC.find_undercut_attempts(f1data.session(2024, "Bahrain", "R")) and print the kind, attacker, defender, gap, gain, success and the four components. (a) How many undercut and how many overcut situations are there? (b) Three rows have gains near ±81 s, all involving the same driver. Find them, and use stop_diff, lane_first and lane_second to say what happened. Should rows like these stay in a success-rate study? What about a median-gain study? (c) Compute the race's median canonical deg by compound with metrics.degradation_table.

Expected shape: a table of about 20 rows, 10 undercuts and 10 overcuts. (c) gives HARD 0.092 (n = 37) and SOFT 0.094 (n = 23) s/lap, fuel-corrected at the toolkit default.

C2. Compare these drivers ⭐⭐. 2026 Monaco GP, Race. Find Russell's undercut on Hadjar (stops on laps 31 and 32). Print the pair's lap times from lap 28 to lap 37 with UC.pair_gap(s, "RUS", "HAD"), and plot the gap. Which component carried the 10.233 s gain? Remember that at Monaco the timing line sits inside the pit lane, so the pit-lane time lands mostly in the in-lap.

Expected: gain +10.233 s, with in +0.871, out +4.346, fresh +1.260 and settle +3.701.

C3. Build the strategy ⭐⭐⭐. Write live_required_gap(session, attacker, defender, lap) on top of UC.required_gap. It should read both cars' compounds and tyre ages at lap from f1data.laps, fit the defender's own fuel-corrected deg over his last 8 clean laps, and return the expected gain for $k = 1$ and $k = 2$. Test it on the 2024 Las Vegas GP: Hülkenberg on Pérez at lap 13, Tsunoda on Hamilton at lap 9. Does it get the two outcomes right where the race-median version (Case Study 1) got them backwards?

C4. Analyze this session ⭐⭐. Rerun UC.study(gap_max=1.5) and UC.study(max_k=1). Report the undercut and overcut success rates with Wilson intervals for each.

Expected shape: with a 1.5 s window, fewer situations and a higher undercut rate than 42.9%, because the 0–1 s band dominates. For the rate at the chapter's 2 s and 5 s windows, see section 13.8: 55.0% (n = 111) and 28.8% (n = 267).

C5. Predict the race ⭐⭐⭐. Fit UC.success_curve on 2023–2025 situations only, then predict each 2026 situation's success probability. Compute the Brier score on 2026 and compare it with the Brier score of a constant prediction equal to the 2023–25 undercut or overcut rate. Is the 2026 behaviour consistent with the earlier seasons?

Expected shape: 40 situations in 2026 (20 of each kind). Report both Brier scores and say whether the curve's advantage survives the rule change.

C6. Compare these drivers ⭐⭐⭐. Using code/undercut_pairs.csv, group undercut situations by attacker team (B_team) and report success with Wilson intervals for teams with at least 8 situations. Then repeat for the share of situations where stop_diff > 0 (the attacker's stop was cheaper). Is any team's undercut record distinguishable from the field's 42.9%? Is the stop-execution share more or less variable between teams than the success rate?

C7. Analyze this session ⭐⭐⭐. The decomposition's components are sums of lap times, but the gain comes from line timestamps. They agree to within ±0.206 s in 90% of pairs (maximum 0.721 s). Find the five pairs with the largest disagreement. For each, look at the two drivers' date_start and date_end on the laps in question and date_start_imputed. Is the disagreement concentrated on a particular kind of lap (in-lap, out-lap, lap 1 of a stint)?

C8. Build the strategy ⭐⭐⭐. Extend simulate_pair with an attacker_pace_advantage_s parameter: a per-lap pace edge the attacker has in clean air, applied on every lap after his out-lap. Choose its value from the data. For close pairs (gap < 1 s), use the median of (defender's lap − attacker's lap) over the 5 green laps before the stop, if both were clean. Does adding it close the gap between the model's predicted gain and the 2.782 s median measured gain in the 0–1 s band?

C9. Predict the race ⭐⭐. Using code/undercut_pairs.csv, compute the undercut success rate for situations where the attacker was on SOFTs before the stop (first_old == "SOFT") against MEDIUMs and HARDs. Report the Wilson intervals. Then explain why SOFT → HARD undercuts might gain more (median +2.492 s in the chapter's run, n = 18) than MEDIUM → HARD (median +0.755 s, n = 70), using what you know about each compound's degradation rate.

Expected: SOFT → HARD 61.1% (n = 18), MEDIUM → HARD 42.9% (n = 70), HARD → HARD 40.9% (n = 22). The intervals are wide enough that only the direction is worth discussing.


Part D — Strategy & Judgment ⭐⭐⭐

D1. Call the pit stop. 2024 Las Vegas GP, end of lap 10. You are Hamilton's strategist. Tsunoda, 0.829 s behind at the end of lap 9, has just stopped (in-lap 10) and will rejoin on HARDs. Hamilton is on MEDIUMs that are 10 laps old at the start of lap 11, and his lap times are steady (raw trend +0.048 s/lap). Most of the cars around the rejoin point have not stopped yet. Do you cover on lap 11 or stay out? Write your call first.

Reveal

Hamilton stayed out until lap 13 ($k = 3$), against the base rates: undercuts with $k = 3$ succeed 71.4% of the time. It worked. Tsunoda's new tyres gained only 1.614 s over three laps, because Hamilton's MEDIUMs were not fading. Tsunoda then lost 6.590 s on the two laps after Hamilton's out-lap, while his running position climbed from 12th to 8th. That is consistent with Tsunoda passing cars that had not yet stopped. The base rate said "cover". The live information (steady tyres, a crowded rejoin zone for the attacker) said "wait". A good strategist uses both, and the data only show which one won on the day.

D2. Design the setup. A team is choosing between two set-ups for a high-degradation circuit. One gives 0.15 s/lap more race pace but heavier rear-tyre wear: the fuel-corrected deg rate rises from 0.08 to 0.11 s/lap. Use the two-car model to show how each set-up changes (a) the gain your undercut can make on a rival with standard wear, and (b) the gain a rival's undercut can make on you. Which set-up makes you harder to undercut, and what does that cost in clean-air pace?

A way in

With the closed form and 20-lap-old sets, $k = 1$ and $s = 2$, a defender wearing at 0.11 s/lap gives an attacker on standard tyres about $0.11 \times 18 = 1.98$ s. A defender wearing at 0.08 s/lap gives about $0.08 \times 18 = 1.44$ s. So the high-wear set-up makes you about 0.5 s easier to undercut at mid-stint, while gaining 0.15 s per lap in clean air. Over the 5–10 laps before a stop window, that is 0.75–1.5 s of extra margin over the car behind. Whether the trade is worth it depends on whether the extra pace keeps the rival outside the 1.4 s undercut window. Note that the faster-but-hungrier set-up also shortens your own optimal stint (Chapter 12).

D3. Call the pit stop. 2026 Miami GP, end of lap 25. You are Antonelli's strategist. You are second, 2.090 s behind Norris, on 25-lap-old MEDIUMs, and the gap has been 2.4–3.1 s for nine laps. The base rate for an undercut from 2–3 s is 19.3%, and from the top six only 23.1%. Do you stop on lap 26? Write down what you expect Norris to do and what has to go right for you.

Reveal

Antonelli stopped on lap 26 and Norris covered on lap 27. On base rates this was a long shot: from 2.090 s the logistic curve gives about 24%. It succeeded by 1.207 s at the outcome lap because Norris's stop cost 1.646 s more than Antonelli's. The case for stopping anyway: staying out behind a car you cannot pass has expected value zero, while a long-shot undercut has some upside and little downside if Norris covers cleanly. You would still be second, a little further back. Quantify that downside with the chapter's data: in failed undercuts the median gain is −0.674 s.

D4. When not to undercut. Describe a race state in which stopping first is clearly wrong even if you are 0.5 s behind. Think about traffic, a likely safety car, the tyre sets you have left, or a team-mate due to stop in the same window. Explain using at least two numbers from this chapter or from Chapter 12.


Part M — Mixed / Interleaved ⭐⭐–⭐⭐⭐

M1 (Chapters 12 + 13) ⭐⭐. Chapter 12's optimiser says the one-stop cost curve at the 2024 Bahrain GP is within 1 s of the optimum over laps 26–32. A rival is 0.8 s ahead of you on the same strategy. Use the flat optimum to argue how much it costs you, in total race time, to stop at lap 26 as an undercut instead of at your optimum. Compare that cost with the chapter's success rate from 0–1 s.

M2 (Chapters 4 + 13) ⭐⭐. Chapter 4 explains the tyre's operating window and why a cold tyre lacks grip. The measured second-lap warm-up penalty is 0.417 s for a new MEDIUM and 0.048 s for a new HARD. Yet the overcut's success rate is the same against defenders who fitted HARDs (22.3%) as against those who fitted MEDIUMs (21.4%). Reconcile the physics with the data. Where in the decomposition does the cold-tyre cost actually show up?

M3 (Chapters 10 + 13) ⭐⭐⭐. Chapter 10's circuit profiles give each circuit's pit loss. Join the chapter's undercut situations to the circuit pit-loss table (metrics.pit_loss_table()) and fit a logistic regression of undercut success on gap plus circuit pit loss (continuous). Is the higher success at high-pit-loss circuits (50.8% vs 37.0% in the terciles) still visible once you control for the gap?

M4 (Chapters 14 + 13) ⭐⭐⭐. All of this chapter's situations are green. Using the near-field pit loss under the SC (12.722 s) and VSC (15.671 s) from the book's pit-loss tables, explain why an "undercut" under a safety car is a different game. Then find, in the 2023–2026 races, cases where two adjacent cars stopped one lap apart and one of the stops was under a VSC. Which car gained, and by roughly how much compared with the green-flag pit loss?

M5 (Chapters 9 + 13) ⭐⭐. Chapter 9 estimates lap-to-lap noise for drivers in clean air. If a driver's green-lap standard deviation is about 0.3 s, how much of the robust 3.21 s residual spread in the undercut model could lap-time noise over the five or six laps of the window explain? What does the answer imply about where the rest comes from?


Part E — Research & Extension ⭐⭐⭐⭐

E1. A traffic-aware undercut study. Using line timestamps for the whole field (f1data.laps(session)[["driver_number", "lap_number", "date_end"]]), define for every out-lap and the two laps after it whether the rejoining car was within 1.5 s behind another car that had not yet stopped. Add that flag to every situation in undercut_pairs.csv. How much of the variation in undercut gains does "rejoined into traffic" explain? Does it change the front-vs-midfield difference (23.1% vs 51.7%)? Report it in the chapter's format: definition, n, intervals, and what the data still cannot see.

E2. Undercuts before 2023. Jolpica has race lap times from 1996 and pit stops from 2011, but no compounds and no track status. Rebuild the undercut study for 2011–2022 with the toolkit's lap-time detector (metrics.neutralised_laps_history) for neutralisations and Jolpica pit laps for stops. State clearly what you lose: no compounds, no rain flag, and a detector with measured precision and recall. Plot undercut success by season from 2011 to 2026. Did the 2014 power units, the 2017 wider cars or the 2022 ground-effect rules change the undercut?

E3. A Bayesian undercut window. Fit the success model with a hierarchical (partially pooled) circuit effect, using any library from the book's stack or a simple empirical-Bayes shrinkage you write yourself. Report each circuit's undercut window (the gap at P = 0.5) with an interval. Which circuits' windows are distinguishable from the pooled 1.36 s?