A neuron with a real job: this patient needs medicine, and the dose has to be just right. Too little does nothing. Too much does harm.
⚙
Z−
Z+
X−
X+
Y+
Y−
dose 5.5 of 11 · 50 mg
predicted effect
0%
Notice the sealed black box in the corner: a machine you cannot see into, yet. Hover it to turn it to glass, click it for a CAD-style exploded view. By the end of this page, nothing inside it will be mysterious. Play with the room too: click the floor to drop a brick (it snaps to the studs), drag bricks around, flick one hard to launch it, and double-click any dropped brick to remove it. Note: everything on the plate is a real LEGO element; right-click any part (long-press on touch) for its BrickLink catalog page.
1 · The problem, in numbers
Five observations from the (toy) clinic. Effectiveness peaks in the middle: the Goldilocks zone. Your whole job in this lab is to make a machine that predicts effectiveness from dose.
stage 1 of 3 · one neuron
Start with the simplest possible machine: one neuron, two knobs. It computes the line you know from school: ŷ = m·x + c. Turn m (the slope) and c (the starting height) and try to fit the dots you collected.
Score (loss): -
a 2-neuron machine, fully visible
Drag any weight box in the diagram to change it, or use the knobs. Everything on this page is the same one machine.
Only the two circles are neurons. x is an input socket and ŷ is a readout; the small + just adds. (Purists: that adding step is technically a third, linear neuron.)
New words ahead: you do not need any of them yet. Wiggle first, vocabulary later. (The bend blocks squish negatives to zero; ML people call that a ReLU.)
2 · The automatic hand
Hand-tuning seven knobs is hard. Backpropagation is an automatic hand: it feels which way each knob should turn to reduce the loss, and turns all of them at once, a little, over and over.
Same graph as above, kept in sync: watch the curve get pulled toward the dots as the code runs. Each press really executes the highlighted lines on the right, live, in this page. Gradient descent is just a ball rolling downhill on the loss landscape.
Dialect note: in code, m is called w (weight) and c is called b (bias). Same things, ML accent. Don't worry about how this works yet. You will build every line of it, step by step, in Part 2. For now just notice: when you press the button, this code runs.
3 · Train together (team preview)
Real models train on far more data than one machine wants to chew alone. Here is the trick your class will use on the bigger models in Parts 2 and 3: split the data across teammates, train in parallel, then merge the weights. Preview it right here with three simulated teammates.
your team name (it appears on the tile in the 3D scene, and in the shared AR export)
This panel simulates the mechanic locally. In the classroom version of Parts 2 and 3, each teammate runs a real Colab GPU on their shard and the merge happens through your team's shared Drive folder. See the design spec.