Interactive Lab · What a neuron really does
Strip away the mystique and a neuron is almost embarrassingly simple: multiply each input by a weight, add them up, add a bias, then check the sign. That's it. Geometrically it draws one straight line and calls everything on one side "blue" and everything on the other "orange." Grab the three knobs, split the two clouds of points, then hit Train and watch the neuron find the line by itself.
🎬 Watch the 90-second explainer, then train a neuron yourself below ↓
▶ The playground, move the line until it separates the two classes
The perceptron is where neural networks began, and its XOR failure (which you just reproduced) famously froze the field for a decade until hidden layers fixed it. Every 'linear separability' argument in ML, every logistic-regression-vs-neural-net decision, and the entire motivation for depth traces back to this exact demo.
The code that's actually running
Set w₁ = 1, w₂ = 0, b = 0, a perfectly vertical line. Predict: what accuracy will you get on the easy data? Now hit 🎯 Train and watch the line snap into place, did it beat your hand-tuned guess? Finally press Toggle hard data (the classes now interlock) and Train again: can one straight line ever reach 100% here? Why, or why not?
The takeaway
w₁·x + w₂·y + b, then sign(). Nothing more mysterious than that.