Tool · 2026-08-24
Perceptron, one point at a time.
A single artificial neuron learns to split a plane into two half-spaces. Click the canvas to drop points into whichever class is armed. Step the learner and it walks the training set, nudging the weights on every point it gets wrong. If your two piles are separable by a line, the line finds itself. If they are not, the line will spin forever.
Click to add a point. Right-click, or hold shift, to flip its class.
The update rule
The neuron scores a point as w · x + b and predicts +1 when the score is positive, −1 otherwise. On every wrong answer it moves the weight vector toward y · x, by the learning rate. That is one line of code. Iterate over the training set until nothing is misclassified, and by Novikoff's 1962 theorem the loop terminates in a finite number of updates whenever a separating line exists.
Why XOR breaks it
Load the XOR preset. Two diagonal quadrants are +1, the other two are −1. No straight line can put both +1 points on one side and both −1 points on the other, so the perceptron never converges. Minsky and Papert built their 1969 book around this: a single layer cannot see beyond a hyperplane, and the field went quiet for fifteen years until backpropagation put a hidden layer between the input and the decision.
Sources
- Rosenblatt, F. (1958). The perceptron: a probabilistic model for information storage and organization in the brain. Psychological Review, 65(6), 386–408. The original learning rule on this page.
- Novikoff, A. B. J. (1962). On convergence proofs for perceptrons. Proc. Sympos. Math. Theory of Automata, 615–622. The convergence bound for linearly separable data.
- Minsky, M. & Papert, S. (1969). Perceptrons: An Introduction to Computational Geometry. MIT Press. The XOR argument, and everything that came after it.