← All simulations · Pillar 8: Brains made of math
Model Builder
This is the glassbox the whole platform is named for. A neural network is just layers of tiny decision-makers wired together. Here you can build one by dragging layers, or by writing the code — and the two views are locked together, so you can always see how the blocks of an AI fit. Then send a fruit through it and watch the answer light up, or train it and watch the wrongness fall.
Meet the parts
- Input layer. The numbers that go in. Here there are two — how sweet a fruit is and how big it is. It does no thinking; it just hands the numbers on.
- Hidden layers. The thinking middle. Each neuron takes every signal from the layer before it, multiplies each by a weight (how much it cares about that signal), adds them up, and then bends the total with its activation. One neuron draws one bend; a row of them (a wider layer) draws several at once; stacking layers (a deeper network) lets later layers combine earlier bends into curvier shapes. You can set each hidden layer to anywhere from 1 to 10 neurons.
- Output (answer) layer. Turns the last layer’s features into the final answer. Here two scores go through softmax, which makes them into chances that add up to 100% — team A vs team B.
The bends (activations), and why they matter:
- relu — keeps positive signals, zeroes out negatives. A simple, fast on/off bend.
- tanh — a smooth S-curve from −1 to +1.
- sigmoid — a smooth S-curve from 0 to 1.
- line — no bend at all. Useful to see why bends matter: a stack of only straight lines is still just one straight line, so it can never wrap around the checkerboard.
How to read it
- Inputs (left) are the two numbers about a fruit: how sweet it is and how big it is.
- Each hidden neuron draws one bend in the boundary. One straight line can’t split the two teams — add a couple of neurons and the network can wrap around each one.
- Every line is a connection. Thicker means a stronger pull; blue pushes the answer up, red pushes it down.
- Training nudges every weight a little downhill on the wrongness, round after round — that’s gradient descent. Drag Training rounds done to rewind and replay the learning.
- Hit Watch it learn ▶ to play the whole thing step by step. Each round the numbers flow forward (blue, left→right) to make a guess, then the mistake flows back (orange, right→left) and tweaks every weight — that backward pass is backpropagation. Watch the loss curve drop as it repeats.
Try this
- Start with 0 hidden layers (remove the one that’s there): the network is one straight line and gets stuck near 50%. Add a hidden layer of 3–4 neurons and watch the score jump.
- Slide one layer up to 10 neurons (wider) and read the live explanation to see what changes.
- In the code, change
kind tanhtokind relu— the builder above follows. - Drag a hidden-layer chip to reorder it, or add a second hidden layer to make a deeper network.
- Press Watch it learn with 0 hidden layers and again with a hidden layer — see how the backward pass can’t fix a straight line, but can teach a bent one.
- Hit Open in the Studio to keep going with the very same model as Spectra code.
Safe by design
Everything here runs in your browser on small, made-up data. There is no upload, no internet from the model, and nothing about you is collected — the same safety-by-absence rule as the rest of the platform.