Four of my projects as models you can run. Each has a short exercise that says what to try and what you should see, and unit tests behind the mathematics.
What CrashGuard is for: a crash becomes an emergency call with nobody touching a phone. The impact is detected, the occupant gets ten seconds to cancel, and if they do not, the system calls a dispatcher, speaks a briefing, and answers follow-up questions using only verified data.
1Detect
2Warn
3Override
4Escalate
5Locate
6Call
7Document
ARMED
Monitoring. Press Crash to start the chain.
The transcript appears here.
Written incident report
Published to the phone dashboard first, then sent by text message or email.
What the agent is given
The agent can read this record and nothing else. Edit any field and ask again. The occupant, address and hospital are fictional.
Try this
Press Crash and leave it alone. Ten seconds later the call goes out with nobody touching a phone. Skip the wait jumps to the end of the countdown.
Press Re-arm, then Crash again, and this time press CANCEL - I'M OK. No call is placed. A false alarm costs one tap.
On a live call, ask Is the occupant conscious? Nothing on the board measures that, so the agent says it does not have that information.
Clear Blood type in the record and ask for it. The answer becomes the same refusal, because the record is all the agent can read. Type a new value and ask again.
Press Pothole. It reads under 2 g, well below the 5.0 g threshold, and nothing happens.
A vision model that finds damage needs thousands of labelled images of damage. When those cannot be photographed, they are generated: build the scene in simulation, randomize it, and every image arrives with labels that are exact by construction. This is that workflow at browser scale.
Sample
000001
Craters
0
Light
az 0°, el 0°
The record written beside the image. Boxes are in pixels for a 512 × 512 frame.
Try this
Press New batch a few times. No two images match, and each one is already labelled.
Untick Ground-truth boxes, then tick it again. No detector drew those boxes. They are read straight off the scene description that produced the pixels, which is why they are exact.
Untick everything under Randomize except Lighting direction. Now the batch is one scene under six suns. A model that has only ever seen one of them fails on the other five.
Click through the batch and read the record under the image. That is what a dataset writer emits per frame, and the sample number alone regenerates the picture.
An error-correcting code adds parity bits so the receiver can find and fix what the channel broke. This is a Hamming(7,4) code, decoded from the syndrome H·rᵀ: first one word by hand, then the same experiment repeated until the error-rate curves appear.
Click a message bit to change the word, or a received bit to flip it in transit.
d1
d2
d3
d4
p1
p2
p3
Message
parity is computed
Sent
0
0
0
0
0
0
0
Received
Decoded
0
0
0
0
0
0
0
Parity-check matrix H, and the syndrome s = H·rᵀ over GF(2). A nonzero syndrome equals the column of the bit to flip.
1
1
0
1
1
0
0
0
H
1
0
1
1
0
1
0
s
0
0
1
1
1
0
0
1
0
The same experiment, a few hundred thousand times
Frame error rate: circles simulated, line exact
Bit error rate after decoding: crosses simulated, dashes exact
Uncoded: the channel's own error rate
Frames simulated
0
Frame error rate at p = 0.05
0
Try this
Click one bit in the Received row. The syndrome stops being 000, it matches one column of H, and that column names the bit to flip back.
Click a second bit. The syndrome still points somewhere, but at a bit that was never wrong. The decoder "fixes" it and hands back a valid codeword that is not the one sent: a frame error.
Press Run the sweep. Every point is that experiment repeated thousands of times at one channel error probability. The simulated points settle onto the exact curves, which is the check that the simulation is right.
Read the left edge of the chart: below p ≈ 0.1 the decoded bit error rate drops under the uncoded line. That gap is what the three parity bits buy.
Scalp EEG is tens of microvolts, buried under mains hum, slow drift and the wearer's own blinks. A dry electrode makes each of those worse. This bench runs a synthetic channel through the standard cleanup chain so each stage can be switched in and out.
Faint: raw. Solid: after the enabled filters. Spectrum from a 2 s Hann window, averaged.
Alpha, 8 to 12 Hz
0 µV
60 Hz after filters
0 µV
60 Hz at the electrode
0 µV
Try this
Untick Notch, 60 Hz. The mains line returns in the spectrum and rides on the filtered trace as fuzz.
Drag Contact impedance up and down. Mains pickup follows it in proportion, which is why contact impedance is the first thing the capstone benchmarks.
Press Eyes closed to open them. The alpha peak near 10 Hz collapses. A feature like that, appearing and disappearing, is what a brain-computer interface classifies.
Untick High-pass, 1 Hz: slow drift carries the trace out of its lane. Tick it again and press Blink: a blink sits inside the passband at ten times the signal, so no filter removes it. It has to be detected and rejected.
§ How these are built
Models first, pictures second
Each lab is a small pure model with no dependencies, insrc/lib/sim, and a thin canvas layer on top. The models are covered by 64 unit tests that run on every push: a cancel inside the ten-second window means no call is ever placed, the dispatcher model refuses any question its record cannot answer, every single-bit error is corrected and every double-bit error is not, the notch removes 60 Hz and leaves 10 Hz alone.
The canvases stop drawing when they scroll out of view, follow the light and dark themes, and start paused for anyone who has asked their system to reduce motion.