Branched from Cheng Lou's Handwired.

Was sad that his demos didn't directly use the NN's output to drive the UI, instead using it as inputs to hardcoded DOM entrypoints. So I decided to fix that. It's slightly less efficient when not leaning on the browser's DOM, so had to shrink it in size. That said, it's a neat proof of concept.

Input: 84 numbers

CellsCountWritten by
down.active, down.x, down.y3host: a press, in canvas pixels on a 1/64 grid
tick1host: 1 every 250 ms
share[0..5]6host: each of its stages' share of its busy time since the last tick, on a 1/1024 grid
key.active, key.code2host: a printable key, code 32–95
backspace1host
tab[0..2]3state: one-hot of the shown tab
springMatrix[0..3]4host: the spring's step matrix for this evaluation's elapsed time
settleCheck, snap2host: timing bits
monitor.load[0..5]6state: each stage's smoothed share, 0..1
text.chars[0..39]40state: character codes
text.length1state
pics.focus[0..5]6state: the open picture, one-hot or all zero
pics.shown[0..5]6state: the picture being drawn while the zoom closes
pics.zoom.{displacement, velocity, destination}3state: the zoom spring

The event cells (down.active, tick, key.active, backspace) are 1 only in the evaluation where that event happens.

Output: 129,685 numbers

ValuesCountUsed for
Next state, one per input cell84copied back into the input: state cells get their new value, inputs pass through, events become 0
active11 while the zoom still moves, so the page keeps requesting frames
Grays, row by row129,600the 360 × 360 raster, 0..1, × 255 into the canvas

So one evaluation is current state + this moment's events → next state + every pixel of the frame. Outside the net, the page only queues events, looks up the spring matrix, and converts grays to RGBA.