Skip to content

#from-scratch

12 posts

Tags
  1. № 014

    Train your own AI composer in three minutes: from noodling to calm

    Train a small Transformer to write four-part chorales from scratch, in your browser, and listen to it turn noodling into music. Then judge it: twenty clicks make it calmer — and show you how it games the judge.

    Interactive

    8 min
  2. № 013

    A mini Figure AI in three minutes: one camera, one arm

    Figure's humanoids work from the cameras in their heads. This is the smallest version I could build from scratch: an arm made of boxes that picks a block up and puts it where you say, from one 48 × 48 camera. Knock the camera and it still gets there; a cut-down version trains in your browser in three minutes.

    Interactive

    12 min
  3. № 012

    Putting a path tracer in a 3D playground: crash a car, gun a plane, fly a helicopter

    Part one's room stood still. This part takes the same path tracer outdoors and puts in a character you steer, five cars, a helicopter and an aeroplane, with the light computed anew every frame. When anything moves, every accumulated sample is void; four things keep it playable all the same.

    Interactive

    11 min
  4. № 011

    How a picture clears from snow: a WebGPU path tracer from scratch

    The colour of one pixel is the average of many rays bouncing at random. Watch a picture clear from noise, shoot one ray and see how it becomes a colour, flip one switch that cuts the noise five times, swap in metal and glass, and see how a BVH keeps a million triangles running.

    Interactive

    11 min
  5. № 010

    A task scheduler from scratch

    Sixty tasks that wait for one another, four workers, 215 lines of TypeScript. The scheduler itself is four rules, failed tasks and all; the hard part is answering "how long is left". Watch three progress bars mislead you, then use the scheduler to forecast itself, and let it learn from the tasks that have finished.

    Interactive

    10 min
  6. № 009

    A city nobody schedules — 300 people, each minding their own needs

    A procedurally generated 3-D city where every person picks the next thing to do from four needs of their own. Swap the deciding for dice or a fixed timetable and watch the rhythm of the whole city change.

    Interactive

    11 min
  7. № 008

    Drawing the map while finding yourself on it — SLAM from scratch

    A small car with no GPS and no map has to draw the map and find itself on it at the same time. Drive it round a loop, watch its map bend, and watch the whole thing snap straight the moment it gets back to where it started.

    Interactive

    8 min
  8. № 007

    How a cloud of noise becomes an apple: training a 3-D diffusion model in the browser

    Pick two fruit and press Train. A diffusion model written from scratch learns, in your browser, to pull a cloud of coloured 3-D noise into those two fruit, colours included. Then we take apart what it learned.

    Interactive

    11 min
  9. № 005

    One body, two heads: training a HydraNet that draws boxes and masks, in the browser

    Emoji fruit as training data, and a small network with one shared trunk and two output heads, trained from scratch in your browser. It finds the fruit within ten seconds. Then we measure honestly what multi-task learning bought us and what it cost.

    Interactive

    11 min
  10. № 004

    Training a Transformer from scratch in the browser: watching attention grow

    No PyTorch and no libraries. A tiny autodiff engine and a Transformer of about fourteen thousand parameters, written in TypeScript. Press a button and it learns to reverse a string of digits within seconds.

    Interactive

    8 min
  11. № 002

    From rookie to boss bird: 50 birds teach themselves Flappy Bird

    Give each of fifty birds a brain of only six weights, add survival of the fittest, and usually within a dozen or so generations they clear a hundred pipes in a row. Then open that brain and see what it actually learned.

    Interactive

    4 min
  12. № 001

    A CNN from scratch: watching a convolutional network see, in your browser

    A handwritten-digit classifier written in plain TypeScript with no machine-learning library, then opened up so you can look at the output of every layer.

    Interactive

    7 min