All work

Byproduct

Evolves tiny robot brains in simulation, then flashes them to a rover

Byproduct trainer: a dark arena with walls, orange food and small yellow and blue agents; the trainer chat on the right shows a mission plan and milestones.

The problem

Teaching a small robot to roam a room without hitting things usually means hand-writing control rules or training a large model that will never fit on a cheap microcontroller.

I wanted a controller small enough to run on an ESP32, learned rather than hand-coded, and honest about what the real car can sense, so that what works in simulation still works on the floor.

What I built

  1. Every brain is the same tiny recurrent network: about 30 to 40 weights, a few hundred bytes. No gradients and no training data; brains that find food reproduce and brains that don't die out.
  2. The engine is fully deterministic. Seeded random numbers mean the same run replays frame for frame on any machine, which makes tuning and comparisons trustworthy.
  3. Learning happens through a curriculum. A population is promoted from easy worlds to harder ones, gaining new inputs and outputs without losing what it already learned.
  4. A trainer turns a plain-English goal into milestones, builds the arena for each one, and checks that the brains only train on senses the real hardware actually has.
  5. The winning brain is exported as generated firmware with the same math as the simulation, plus test runs and a pre-flight check before it is flashed to the car.

What it does

Built with JavaScript (no dependencies), HTML canvas, Node.js, ESP32 firmware (C++), Local LLM, 2026.