Racetrack Lab
Draw a track. Race the autonomous car. · Experimental
Pick a circuit or draw your own with the mouse, then race the yellow car around it. It's driven by a real Python controller running in your browser — a kinematic bicycle model with heading and lateral-error feedback, the same approach I built for Formula Electric at Berkeley. Arrow keys or WASD to drive. Beat it if you can.
Pick a circuit above, or drag here to draw your own
You–best –
AI–best –
Target–drive a lap
StatusWarming up Python…drawing works already
Tuning — the AI's gains, live
vmax and alat apply to both cars, so the race stays fair. Changing anything here clears the lap records for this circuit.
controller.py — edit the Python that drives the AI
The full simulator — vehicle model, error computation, lap logic — is in lab_sim.py. Only controller() is swapped in when you apply.