Overview
Predicted Race History takes the same gap-to-leader-average chart as the Race History widget and adds one dashed, faded line per driver: the engine’s predicted remainder of the race, joined onto that driver’s actual trace at the playhead.The engine models no traffic and no lapped cars. A predicted line can cross a real one; that is expected, not a bug.
What It Shows

- starts at the point where that driver’s actual trace currently ends (the join point), so there is no visible gap between actual and predicted;
- carries the same styling an actual trace would: the driver’s team colour, the per-team solid or dashed line type, an end-of-line driver tag, and a reduced opacity;
- stops drawing at the last lap the engine judged reachable, if any later lap in that driver’s predicted series carries the engine’s unreachable sentinel;
- is named by the driver alone, never “predicted”, so the always-on legend can key off a real driver name.

Data Behind It
The predicted lines come from the lateststrategy_snapshot’s race_history rows, at or before the playhead lap (the as-of rule). model_id strategy_snapshot, model_version the composite engine_version+WRAPPER_VERSION, over vpw:v1:{session_key}:insight:strategy_snapshot, hydrated via REST on session enter and rehydrate, then live.
Each predicted point is re-baselined into the same gap frame the actual traces use: y(lap) = cumulative_time(lap) - sum(baseline over laps 1..lap), the identical transform (cumulative lap time minus a rolling baseline) the base Race History chart applies to real laps. Rows for a lap at or before the playhead are skipped: they are already covered by the actual trace up to the join point, and drawing them again would draw a predicted point backwards from it. A row at or above the engine’s 1e300 unreachable threshold truncates that driver’s predicted series at the last reachable lap; this is sentinel decoding, done once in the shared derivation layer, never smoothing.
States
No snapshot, no as-of data at all
No snapshot, no as-of data at all
Shows the shared empty-state text: the exact-lap status gate and reasons where known, or a generic “No strategy data at lap N.”
No completed laps yet
No completed laps yet
When an as-of snapshot exists but the race has not yet produced a completed lap to plot, shows “No completed laps yet.” instead of an empty chart.
Laptimes missing
Laptimes missing
Mirrors the base Race History widget’s own honest-empty state: one missing measured lap time anywhere would silently corrupt the running cumulative sum, so the whole widget shows “Laptimes missing” and plots nothing, actual or predicted.
Stale snapshot
Stale snapshot
The chart still renders, with an as-of stamp under it: “Data as of lap N (playhead lap M)”.
Race-only
Race-only
Outside a race, renders “Session is not a race”; the app never computes a strategy bundle for a non-race session.
FAQ
Why does a predicted line cross a real driver's line?
Why does a predicted line cross a real driver's line?
The engine’s remainder prediction assumes clear air: no traffic, no lapped cars. A predicted line crossing another driver’s actual or predicted line is expected under that assumption, not an error.
Why does a driver's predicted line stop partway through the race?
Why does a driver's predicted line stop partway through the race?
The engine judged every later lap in that prediction unreachable from the current race state (its
DBL_MAX sentinel). The line truncates at the last lap it could still complete.Next Steps
Race Strategy Tool
The shared engine, derivation layer, and sentinel rule behind all six strategy widgets.
Race History
The real, actual-only version of this chart.
Predicted Pit Window and SC
Each driver’s next predicted stop, plus safety-car guidance.
Strategy Status
The gate, reasons, and whole-race health strip that explains a blank or stale chart.
