Skip to main content

Overview

The Race Strategy Tool has two modes that sit outside the ordinary lap-by-lap solve. Pre-race is a prediction that exists before a single lap has been timed, built from the round’s own race data bundle. What-if studies re-run the same engine against a different input file and write nothing at all to the platform, so a theory can be tested without touching what anyone else is looking at.
Both are the same interim engine the live tool uses. Neither invents a new model: pre-race is a real solve at lap 0, and a study is a real solve whose output goes to a file instead of the database.

Pre-Race

Before a race weekend, the round’s race_data.json bundle is loaded into the platform. That produces a lap-0 snapshot: a full engine solve of the whole race from the grid, with no timed laps behind it, stored against the session like any other strategy row but marked as a pre-race trigger. In the session picker. A session that exists only as that pre-race placeholder carries its own provenance badge, Pre-race, alongside the OpenF1 and FastF1 badges a weekend slot can offer. Picking it opens the prediction rather than a session with timing in it. On the session screen. Pre-race applies when two things are true at once: the playhead is earlier than lap 1, and the snapshot as of the playhead is the lap-0 one. While it holds:
  • Predicted Race History draws the predicted curves alone, against a constant reference that puts the predicted winner at zero seconds on the final lap. There is no actual trace to join yet, so nothing is joined.
  • Every predicted trace is styled exactly as a real one would be: team colour, per-team solid and dashed line types, and the end-of-line driver tag.
  • A caption reads “Pre-race prediction loaded (race_data vN). Live strategy starts at lap 1”, where vN is the loaded bundle’s own version. When no lap-0 status row exists yet, or it predates these fields, it reads “unknown version” rather than inventing a number.
  • The other widgets in the suite read the as-of snapshot exactly as they would on any other lap.
Driver names before the roster exists. A provisional race session has no driver roster of its own, and the timing feed only publishes the real race roster shortly before the start. Until it does, the app borrows the roster of the latest session from the same race weekend that has one, so the Predicted Pylon and the other strategy widgets show driver names and codes rather than dashes. As soon as the session’s own roster arrives it replaces the borrowed one. If no session in the weekend has a roster either, the Predicted Pylon labels drivers from their car numbers. Once the playhead reaches lap 1, pre-race stops applying. A lap-0 snapshot is then simply a stale one and renders through the ordinary as-of path. Strategy Status on the lap-0 pre-race solve (Madrid 2026) On the wire. Since the template stage, a strategy_status payload also carries input_mode (template or fitted), race_data_version and package_dir, the solve archive folder for that lap. Rows written before that stage carry none of them, and the app treats their absence as unknown rather than as a default.

What-If Studies

A study re-runs the precompute path with zero database writes: nothing is cleared, no lap-0 association is made, and no metric_outputs row is written. The session’s real stored laps still drive the replay, because the database is still read for those. Only the engine’s own per-lap input changes.
1

Point the run at a different race data file

The engine takes its per-lap input from that file instead of the database’s resolved parameters.
2

Or keep the real inputs and only move the output

--output-file on its own is also a no-write study: the inputs stay the database’s own, only the output moves to a file.
3

Collect the results

Outputs land under a studies folder inside the archive directory: the collected rows as JSON Lines, and the per-lap packages beside them. The folder name encodes the session key, the input file’s name, the first twelve characters of its sha256 and the run’s UTC start time, so two runs never collide. Both paths are printed at the end.
Nothing prunes study folders. Delete them yourself once a study is finished. --race-data and --output-file cannot be combined with --keep-existing or --clear-all: those two only mean something for a database write, which a study never makes.
Pre-race rows survive a re-precompute. An ordinary strategy re-precompute spares the lap-0 pre-race rows. They are removed, with a warning, only when they carry a different model_version from the run, because a metric holding two versions is skipped by replay altogether; rebuild them with the race data loader when that happens. --clear-all deletes them deliberately.

Where You See It in the App


FAQ

Because there are none yet. Before lap 1 nothing has been timed, so the chart draws the prediction on its own rather than joining it to an empty frame.
No. That is the point of a study: it writes nothing, so nothing reaches the channels the widgets read. Compare the output file against the stored run instead.
Yes, the same interim build, run over the round’s own race data bundle instead of fitted inputs from timed laps.

Next Steps

Predicted Race History

The widget the pre-race rule changes.

Strategy Status

The gate and reasons behind any solved lap, lap 0 included.

Race Strategy Tool

How the suite fits together.

Operator Cheat Sheet

Every command, including loading race data and running a study.
Last modified on October 15, 2026