Restart Lab
A set-piece simulator that refuses to lie. It plays a corner out thousands of times, scores every chance with a real expected-goals model, and won't call a routine a winner unless it beats random search first.
What it had to do
Football clubs spend a great deal of time on set pieces and have very little evidence about which routines actually work. The obvious approach — count what happened in past matches — runs out of data almost immediately, because any specific routine against any specific defence has been tried a handful of times at most.
So the problem was not really about football. It was about building a tool that could answer a question the data was too sparse to answer directly, without quietly inventing confidence it hadn't earned.
What I chose
Simulation over statistics. A deterministic physics engine flies the ball with real spin, drag and bounce, moves every attacker and defender, and resolves the delivery into a shot, a clearance or a scramble. That turns a handful of real attempts into thousands of synthetic ones.
Every simulated chance is then graded by an expected-goals model trained on StatsBomb's open World Cup and Euros data, so the scoring is anchored to real football rather than to my own judgement.
The decision I care most about is the last one: an optimiser searches for better routines, but nothing it proposes counts unless it beats a random search baseline. Optimisers are very good at finding noise and presenting it as insight. Making the baseline mandatory was the only way to stop the tool flattering itself.
How it works
Three steps, one loop. Simulate the set piece; measure each chance with the xG model and report it with confidence intervals; then search the space of deliveries, runs and timings across thousands of trials.
Two consoles sit on top. The Scenario Workbench builds a set piece from real squads and compares two routines under common random numbers, so the comparison isn't polluted by luck. Optimization Studies reads a completed search: convergence against the baseline, a parallel-coordinates view of every trial, and a SHAP explanation of what separated the winners.
What it cost
Speed. The simulator is slower than I would like, and the throughput work — a Numba kernel for the inner loop — is still in progress. The live demo is usable but not brisk.
And honestly: the results so far are thin. The platform runs end to end and the machinery is sound, but I have not yet found routines that are decisively better in a way I would defend to a coach. The honesty banner that refuses to declare a winner without statistical backing spends most of its time refusing.
What I'd change
I would build the throughput kernel first. Almost every limitation downstream — how many trials a study can afford, how tight the confidence intervals get, how much of the space the optimiser can actually explore — traces back to how fast a single simulation runs. I optimised the interesting part before the boring part, and the boring part turned out to set the ceiling.