This is a submission for the Monthly MLH × DEV Writing Challenge: a project built at an MLH hackathon.
Fifteen seconds on lap 47
Suzuka, 29 March 2026. Lap 47 of the Japanese Grand Prix. Lando Norris passes Lewis Hamilton.
Fifteen seconds later, Hamilton is back in front.
A real pit wall would have seen that coming. Norris had just spent battery making the pass, and the next straight was long. Under the 2026 rules that is the whole fight: the car with electricity left on the straight wins it.
The catch is that no team can see another team's battery. You see your own car down to the joule. Rivals you see through public timing and a speed trace.
We built a pit wall that reads the rival battery from that speed trace alone. Run on the public OpenF1 feed of that exact race, it raised this call 15.1 seconds before Hamilton re-passed:
RE-PASS RISK. "Only 0.4 MJ, long straight ahead. HAM can re-pass."
Then it did it again on lap 50, 20 seconds early.

The real race, public data only. Top: speed. Bottom: what our estimator thinks each battery holds. The blue call is the pit-wall alert; the vertical lines are the pass and the re-pass.
This post covers how that works, how we checked it against 30 races it had never seen, and the parts that still don't work. We built it in a day at Hacktoberfest Hack Day Kolkata × AKI HACKS, where team Crispy Croissant won. 🥐
What I Built
We Are Racing, Not Testing is a desktop Formula 1 pit-wall simulator for the 2026 rules. You play the race engineer of one car.
It has two halves:
| Part | What it is |
|---|---|
pitwall_sim |
A full 22-car race at Suzuka under the 2026 power-unit rules: overtakes, pit stops, rival strategy AI, Safety Car, rain. A 53-lap race runs headless in about 8 seconds. It knows every hidden value (the Ground Truth) and hides it from you. |
simply_clipping |
The "radar". It estimates each rival's hidden battery from the public 4 Hz speed feed and raises ATTACK / DEFEND / RE-PASS RISK / CLOSING-SPEED RISK alerts, each with a one-line radio call. It never imports the simulator, and it runs unchanged on real 2026 race data. |
During the race the truth stays hidden, as it would in real life. After the chequered flag the simulator reveals it, and every call you made gets a price in seconds.
The 30-second F1 primer
- From 2026, about half of an F1 car's power comes from a battery, through an electric motor (the MGU-K) of up to 350 kW.
- The usable battery is small, about 4 MJ. At full electric power that is about 11 seconds of deployment. Drivers recharge under braking and lifting.
- If you attack with a full battery against a car with an empty one, you pass it. If you attack when they have the energy, you lose the place back on the next straight.
So every wheel-to-wheel fight comes down to one question nobody can answer directly: how much battery does the car in front have right now?
The tell: "clipping"
When the electric motor stops helping, the car stops accelerating even though the driver is still flat on the throttle. In 2026 F1 this is called clipping, and it shows up in the public speed trace.
Here is one simulated lap with the hidden values switched on. Lawson has run the battery down for the finish. Look at the orange stretch after 4.5 km: full throttle, motor at zero, speed flat at about 325 km/h.

The bottom two panels are hidden from rivals. Only the top one is public, so the whole job is to infer the bottom from the top.
A clip is a glimpse of a rival's hidden battery. The track decides where those glimpses happen. Across one simulated race, 22 cars × 53 laps, this is where cars run at full throttle with the motor giving nothing:

Most clips happen on corner exits, where the energy strategy holds the motor back. The rare high-speed clips on straights, when the battery is really empty, are the ones that decide passes.
That difference is the hard part, and we come back to it below.
Demo

An alert always shows its evidence. In Test mode the rival's TRUE battery (red, top right) appears next to the estimate, so you can check the radar. A real team never gets that column.
A race goes like this:
- Set up. Pick your team, driver, seed and a scenario: a normal race, a forced Safety Car, rain from lap N, a scripted re-pass trap, or a real race moment that starts you on a lap of the real 2026 Japanese GP with the real order, gaps and tyres.
- Race. Alerts pop up. Answer with F1 / F2 / F3, the command buttons, or team radio: type "save this lap, attack into turn 1 next lap" or hold a key and speak (offline speech-to-text). The driver answers back with a radio-filtered voice.
- React. Rivals fight back. A Safety Car bunches the field and makes a pit stop cheap.
- Reveal. At the flag, the call summary plots each rival's true battery against what you were told, and prices each decision.

"Calls made on an estimate off by more than 1 MJ: 7 of 10." The Reveal is honest about the radar too.
The cost of a call is measured, not guessed. At every call the simulator forks the race from a snapshot, replays each alternative (attack now, wait a lap, ignore it) with paired random seeds, and compares where you end up. "+2.4 s vs best option" means a different call would have finished 2.4 seconds better, on average across the forks.
After the flag, every race also becomes a graph of your car against every rival:
Try it yourself (Windows, Python 3.13, no GPU, no network):
git clone https://github.com/Dronzer2code/simply-clipping.git
cd simply-clipping
py -3.13 -m venv .venv ; .venv\Scripts\Activate.ps1
pip install -e ".[dev]"
python main.py # the pit wall
# or check the claims in this post from the command line:
python -m pitwall_sim.race.engine --headless --track suzuka --rules 2026_post_miami --seed 42
python -m pitwall_sim.bench --sc-module simply_clipping --scenario all --seeds 6-10
python -m simply_clipping.real_data --session 11253 --our NOR --out data/sc_real/jpn2026_nor
python docs/blog/make_charts.py # rebuilds every chart in this post
We Are Racing, Not Testing
What this is: in 2026 half of a Formula 1 car's power comes from its battery and every rival's battery is hidden. This desktop simulator puts you on the pit wall of one car at Suzuka: you see your own car exactly, the rivals only through public timing, a noisy 4 Hz feed and a Radar Estimate of their battery. The pit wall raises alerts (ATTACK, DEFEND, RE-PASS RISK, CLOSING-SPEED RISK), you call the driver with F1 / F2 / F3, and after the flag a call summary shows how each call worked out. A test bench exports races with full Ground Truth and scores battery estimators (your own plugs in; see below).
Personal use only (real team and driver names). Specs are in docs/ (start with
CLAUDE.md and docs/spec/PRD.md); the 3-minute demo script is docs/guides/DEMO.md.
Quick start (Windows)
Run the commands below…
How you read a battery you can't see
Simply Clipping works the way an engineer reasons from a speed trace, written as physics.
public speed (≈4 Hz, noisy, gaps)
→ acceleration smoothed, steady full-throttle windows only
→ wheel power = m·a·v + ½·ρ·CdA·v³ + Crr·m·g·v
→ electric power = wheel power / η − throttle × engine power
→ state per point: DEPLOY / CLIP / HARVEST / LIFT / CRUISE
→ battery E += (harvest − deploy)·dt, clamped to the battery window
→ anchors ("he just ran out") reset the drift
→ confidence, calibrated on races it has never been tested on
The drag of each rival car (CdA) is unknown, so it is fitted per car from that car's own full-throttle runs. Engine power differs by manufacturer, and fuel mass falls lap by lap. Each of these was a lesson the simulator taught us before we wrote a line of the estimator:
| Lesson | Trap | What Simply Clipping does |
|---|---|---|
| Super-clip ≠ empty | 2026 cars harvest on purpose at full throttle on straights (the motor runs backwards at up to 350 kW) with plenty of battery left. It looks like an empty battery. | An "empty" anchor fires only on the ran-out pattern: steady full throttle, early on a long straight, motor neither deploying nor harvesting. A super-clip is counted as harvest. |
| The taper is not a clip | Above about 290 km/h the rules taper MGU-K power with speed. A falling power curve there is legal, not empty. | In the taper band, a power drop the taper explains is never a CLIP and never an anchor. False CLIPs in the taper: 0–1 %. |
| Partial deploy | Cars often deploy 150–250 kW, not the full 350. | The CdA fit allows one unknown power level per run. |
| Honest confidence | A radar that says 0.8 should be right about 80 % of the time. | Confidence comes from time since the last anchor, missing samples and fit quality, then goes through a reliability table fitted on the tuning races only. |
This is the real state classifier, unchanged from simply_clipping/energy.py:
def classify_states(p_elec_kw, v_ms, a_ms2, throttle_pct, brake, cfg, full=None):
"""Per point state from throttle, brake, estimated P_elec and acceleration (L-b)."""
if full is None:
full = throttle_pct >= float(const(cfg, "states.full_throttle_pct"))
limit = taper_limit_kw(v_ms, cfg)
clip_below = np.minimum(float(const(cfg, "states.clip_max_kw")),
limit - float(const(cfg, "states.taper_margin_kw")))
flat = a_ms2 <= float(const(cfg, "states.clip_max_accel_ms2"))
out = np.full(p_elec_kw.size, CRUISE, dtype=np.int8)
out[full & (p_elec_kw > float(const(cfg, "states.deploy_min_kw")))] = DEPLOY
out[full & (p_elec_kw < clip_below) & flat] = CLIP
out[throttle_pct < float(const(cfg, "states.lift_throttle_pct"))] = LIFT
out[brake] = HARVEST
return out
There are no magic numbers in it. Every threshold lives in config.yaml, and every 2026 rule value lives in a rule-set file with a note on where it came from, so the pre-Miami and post-Miami rule changes are two YAML files, not two code paths.
The information barrier is a build failure
The easiest way to make a battery estimator look brilliant is to let it peek at the answer, even by accident. So peeking is a CI failure, not a code-review comment. import-linter contracts in .importlinter:
[importlinter:contract:simply-clipping-independent]
name = Simply Clipping stands alone (SIMPLY_CLIPPING_SPEC SC-R01)
type = forbidden
source_modules =
simply_clipping
forbidden_modules =
pitwall_sim
[importlinter:contract:ui-info-barrier]
name = UI reads only EngineerView (HR-02)
type = forbidden
source_modules =
pitwall_sim.ui
forbidden_modules =
pitwall_sim.race
The estimator cannot import the simulator. The UI cannot import the race state. It gets an EngineerView that physically does not contain rival Ground Truth. The simulator hands the estimator the same kind of files a real team would have: a FastF1-shaped public feed. The truth goes in a separate folder that only the scorer opens.
Does it work? 30 races it had never seen
Here is the protocol, because a number means nothing without it:
- Tune on seeds 1–5, test on seeds 6–10. The test set was run once, after tuning was frozen.
- Six scenarios per seed: a normal race, close battles, closing speed, a re-pass trap, a "drag trap" (cars with unusual drag), and the MGU-K taper.
- The baseline is the simulator's own built-in radar, plus a dumb rule ("the car ahead is slower on this straight → ATTACK") for the alerts.
First, a single stretch, so you can see what "estimate" means:

This is a good stretch, picked to show the shape. The honest race-long average for normal races is 0.36 MJ (below).
Now every test race, by scenario:
| Test set (seeds 6–10, 30 races) | Built-in radar | Simply Clipping |
|---|---|---|
| Battery error (MAE) | 0.84–1.28 MJ | 0.36–0.88 MJ, lower in every scenario |
| Estimates within 0.5 MJ of the truth | 20–41 % | 38–73 % |
| "He is clipping" calls that were right (CLIP precision) | 4–6 % | 53–66 % |
| Confidence error (ECE, 0 = honest) | 18–34 % | 4–10 % |
| DEFEND alerts that caught the real threat (recall) | 25–60 % | 38–91 % |
| Re-pass incidents warned about in advance | 33 % | 67 % |
The confidence result matters most to me. A pit wall needs to know how much to trust a number, not only the number. This is a reliability diagram: put every estimate in a bucket by its stated confidence, then check how often the bucket was actually right.

The built-in radar's confidence is decoration. Simply Clipping's means something, and it errs on the modest side: when it says 75 %, it is right closer to 89 % of the time. On a pit wall, slightly under-confident is the safe way to be wrong.
(If calibration is new to you, When a model says 95%, is it right 95% of the time? by @quantumbreakz is a clear walkthrough of ECE and reliability tables.)
What it is still bad at
I'd rather you hear this from me than find it in the repo:
- It is conservative about clips. CLIP recall is 19–27 %, against 35–41 % for the built-in radar. It calls fewer clips, but most of the ones it calls are real.
- ATTACK alerts barely fire in a normal race, so normal-race ATTACK precision is 0 % on very few alerts. The dumb rule gets 100 % recall by shouting ATTACK at everything, with 6 % precision.
- Closing-speed incidents: 0 % caught, the same as the baseline. That rule is still an open design question.
The real race
Simulated races are the exam we wrote ourselves. The real test is a real race.
OpenF1 publishes the 2026 Japanese GP: every car's speed, throttle, brake and position at about 3.7 Hz. This is the race as a gap-to-leader chart, the view every strategist keeps open:
We pointed Simply Clipping at that feed with Norris as "our car". It has no team data for Norris either, so even "our" battery is estimated.
| NOR passes HAM | RE-PASS RISK raised | HAM re-passes | Warning |
|---|---|---|---|
| lap 47, t 4732.7 s | t 4732.5 s | t 4747.6 s | 15.1 s |
| lap 50, t 5015.3 s | t 5015.0 s | t 5035.0 s | 20.0 s |
The evidence behind both calls: Norris estimated under 0.5 MJ, Hamilton at about the same, gap under half a second, 600 m+ of straight ahead.
And the misses, because there are some:
- The lap-22 Bearman / Colapinto crash is not caught. Bearman's speed channel in the public feed freezes before the impact, so the closing speed reads as about zero. The crash is visible in the position data, which the radar doesn't read.
- 115 alerts in one race is too many (51 ATTACK, 37 DEFEND, 25 RE-PASS, 2 CLOSING). With no exact battery for our own car, it often reads Norris as near empty and fires own-battery DEFEND and RE-PASS alerts. An engineer would mute half of them.
- That race ran on pre-Miami rules, while the estimator's constants follow the post-Miami rule set.
Partner Technologies
We didn't enter a sponsor prize category. The project is built on open data and open-source tools, which is why it runs on a laptop with no GPU and no network:
- OpenF1: the real 2026 race data (car data, location, laps, overtakes), cached locally.
- FastF1: we export simulated races in FastF1's shape, so anything written for real data runs on simulated races, and the other way round. The team colours come from FastF1's 2026 constants.
-
Numba: the physics step kernel and the energy integrator (
@njitover NumPy arrays). That is how a full 53-lap, 22-car race runs in about 8 seconds. - PySide6: the pit-wall UI.
- faster-whisper: offline push-to-talk radio.
- import-linter: the information barrier as a build rule.
- graphify: post-race comparison graphs and "Ask the pit wall".
- GitHub, where the whole thing lives.
If you want more F1 data work on DEV, these shaped how we think about the public feed: Building a Live F1 Dashboard Using OpenF1 and Streamlit by @eraine14, and The Software War Behind Formula 1 That Nobody Talks About by @andyb1979.
Hackathon Experience
Hacktoberfest Hack Day Kolkata × AKI HACKS, 31 October 2026, 9 AM to 8 PM.
We walked in with the simulator core already running: the physics, the 22-car race, the information barrier and the first radar. The Hack Day was where it became something you could play. In one day we built:
- the post-race Reveal and the cost of every call, using paired forks
- team radio: typed, spoken, and an LLM path with every command validated before the car obeys
- the driver's voice with a crackly radio filter
- Safety Car / VSC from crashes, and rain from a chosen lap
- the strategy panel: stay out vs pit now / in 1–3 laps, from public data only
- the real race moment: start on a real lap of the 2026 Japanese GP
- the post-race race graph and dashboard
- a full pit-wall UI overhaul in the last hours
Things I'll remember:
The rules file did more work than any of us. We built with an AI coding agent (Claude Code), and the most useful file in the repo is not code. It is CLAUDE.md: ten hard rules that are defects even when the tests pass. The UI may not import race state. All randomness comes from named RNG streams. No 2026 rule number is hard-coded. Never invent a value marked UNKNOWN. Most of them are enforced by a linter or a test, so neither a tired human at 6 PM nor an eager agent could quietly break them. When you move this fast, guardrails beat good intentions.
Placeholders hurt. Fuel is still a calibration placeholder, so full-distance races ran out of fuel around lap 41–46. The demo races are 15 laps. We wrote that in the README rather than tuning the number by hand to make it go away.
Timing tests lie on a busy laptop. The real-time tests (a headless race, the step kernel, one 16x UI frame) need a quiet machine. With a game or a video call open they fail, and the code is fine.
PowerShell eats pasted comments. Paste a block of commands with # comment lines into PowerShell and it can treat #, if or skip as arguments. That is how the repo root once gained folders with those names. The README now tells you to paste one command at a time.
Then they read out the winners.
What's next
-
Make Simply Clipping the live radar. Today the live radar panel and the Reveal still show the built-in radar unless you switch the provider in
config/app.yaml. This is the top item on our list. - Read positions, not only speed, so the next frozen speed channel doesn't hide a crash.
- An on-device radio model: a fine-tuned Gemma 3 270M, so free-text radio works with no API key and no network.
-
Calibrate fuel and tyres properly (
T-02B,T-026), then full-distance races. - More tracks than Suzuka.
The 2026 races are full of moments where a car "suddenly ran out of speed". Now you can see it coming 15 seconds early, from the same public data everyone else has. Good decisions are made on good estimates, and this tool shows you both.
Repo: https://github.com/Dronzer2code/simply-clipping
Every chart in this post: python docs/blog/make_charts.py, after the bench and real-data commands above have written their files to data/
Real data: OpenF1 session 11253, 2026 Japanese Grand Prix
Personal, non-commercial project. Real team and driver names are used for personal use only; the simulator can switch to a fictional grid. Not affiliated with Formula 1, the FIA or any team.








Top comments (0)