Models / calibrated-classifier

Undercut

P(pitting now puts the driver ahead of the car in front once it covers), when within 5s — plus whether to strike now or hold.

calibrated-classifieranalytics.strategy

How it works

A calibrated model of the covered undercut duel: the attacker stops, the car ahead responds, and the outcome is read once both have stopped. The success probability depends on the gap to the car ahead and averages over how rivals have historically reacted. The recommendation itself is made against the harder case — the rival covering immediately — so a strike call is not relying on the rival being slow to respond.

When to use it

  • Make or explain a pit-wall decision: should this car box now to jump the one ahead?
  • Flag on-screen that an undercut attempt is live, before the stop happens.
  • Combine with the overtake probability: a car that cannot pass on track but has a strong undercut chance has a pit-lane route instead.

Inputs

  • gap to car ahead
  • rival reaction distribution
  • laps remaining
  • race distance

Output

drivers[].threat.undercut.score / viableA 0–1 rule-based threat score and whether the window is open. Present for any non-leading car on lap completion.
drivers[].threat.undercut.gapToCarAheadSec / estimatedDeltaSecThe gap to the car ahead and the estimated time swing from stopping first.
drivers[].threat.undercut.pSuccessCalibrated probability that striking now ends ahead of the covering car.
drivers[].threat.undercut.callrecommend (UNDERCUT_NOW | HOLD), strikeInLaps, pSuccess and pNow.

Example payload

An excerpt of one analytics.strategy delivery, trimmed to the fields this model produces. Values are illustrative. The full message shape is on the feed reference.

json
{
  "feed": "analytics.strategy",
  "lap": 35,
  "drivers": [
    {
      "number": "81",
      "tla": "PIA",
      "threat": {
        "undercut": {
          "score": 0.64,
          "viable": true,
          "gapToCarAheadSec": 1.8,
          "estimatedDeltaSec": 2.3,
          "pSuccess": 0.57,
          "call": {
            "recommend": "UNDERCUT_NOW",
            "strikeInLaps": 0,
            "pSuccess": 0.57,
            "pNow": 0.57
          }
        }
      }
    }
  ]
}

Use it

Subscribe to analytics.strategy with a webhook and read this model's fields from each delivery:

bash
curl -X POST https://api.racehooks.io/v1/webhooks \
  -H "Authorization: Bearer $RACEHOOKS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"webhookUrl":"https://your-app.com/f1","feedId":"analytics.strategy"}'

To try it without waiting for a race weekend, replay the recorded Canadian Grand Prix (2026-canada_r) from the quickstart.

How to read it

pSuccess is the chance the stop works once the car ahead responds, averaged over how rivals have actually reacted. call.recommend is the decision: UNDERCUT_NOW means the stop is worth making even if the rival covers on the next lap; HOLD means it is not. Today the call always concerns this lap, so strikeInLaps is 0 and call.pSuccess equals pNow. The score and viable fields are a simpler rule-based readout and are present more often than pSuccess.

Limitations

  • pSuccess and call are only produced in races with a known distance, when the gap to the car ahead is within 5 seconds and the car ahead is known.
  • It is a probability, not a promise — pit-stop execution, traffic on the out-lap and team decisions all sit outside it.
  • Intermediate and wet stint lengths use fixed assumptions.
  • Race sessions only.

Calibration

Calibrated against historical undercut outcomes. See the calibration reference for the shared pipeline.

FAQ

What is the difference between pSuccess and score?

score is a rule-based 0–1 threat readout present for any non-leading car. pSuccess is the calibrated probability that pitting now ends ahead of the covering car, produced only within 5 seconds of a known car ahead.

What does an UNDERCUT_NOW call assume about the rival?

The call is made against the rival covering immediately, so it does not depend on the rival reacting late.

Related models

  • Overcut Threat — P(pitting next lap ends ahead of a rival that has already stopped), while that duel is live.
  • Overtake Probability — P(a clean on-track pass on the next lap), per attacking driver.
  • Pit Stop Prediction — Probability of a green-flag pit stop on the next lap; stops under safety car, VSC or red flag are not counted.
  • Pit Window Survival — How much longer each driver's current stint is likely to run.

Get the data

This model is delivered on analytics.strategy. Subscribe by webhook or stream it over SSE. The quickstart walks through registering an endpoint and replaying a past session against it.