Skip to content

Stage 1 · Beginner · D1

The Perceptron

A model like ChatGPT is built from millions of these.

12 lessons · 141 minEasy

About this chapter

One neuron adds up what it hears, compares the total to a bar, and answers yes or no. Every model you will meet is built from copies of it.

Here you will drag its weights and watch a line turn, apply the 1958 learning rule by hand, and prove for yourself that it always finishes on data a line can split. Then you will meet the four inputs it cannot handle, the book that made that failure famous, and the two extra neurons that dissolve it. You finish by training one in the Masfofah toolkit and then finding the same object, renamed Linear, inside a modern model.

What you will be able to do

  1. 1

    The Cell That Fires

    Describe what a brain cell decides, and write the 1943 rule that copies that decision.

    9 min
  2. 2

    Not Every Input Matters

    Compute a neuron's output by hand from its weights and bias, and say what each one controls.

    10 min
  3. 3

    A Neuron Is a Line

    Draw a neuron as a boundary in space, and say what the weights and the bias do to that boundary.

    11 min
  4. 4

    The Rule That Learns

    Apply the perceptron learning rule by hand to one example and explain every symbol in it.

    12 min
  5. 5

    It Always Stops, If It Can

    Say when the perceptron rule is guaranteed to stop, and what it never promises.

    12 min
  6. 6

    Two Gates Fall, One Does Not

    Build AND and OR out of one neuron, and see why XOR is out of its reach.

    12 min
  7. 7

    The First Winter

    Tell what the 1969 book actually proved, and separate that from the story people tell about it.

    13 min
  8. 8

    Why Activations Exist

    Explain what the step, sigmoid, tanh and ReLU each do to a neuron's output, and why the step function cannot be trained.

    14 min
  9. 9

    A Neuron Is a Detector

    Read a neuron's weights as a picture of the pattern it is hunting for.

    11 min
  10. 10

    Two Neurons Beat XOR

    Solve XOR with a hidden layer of two neurons, and say why the activation between the layers is required.

    13 min
  11. 11

    Build One

    Write a perceptron from scratch, train it on two clouds of points, and then write the same neuron the way a modern library does.

    12 min
  12. 12

    Where They Live Today

    Find the perceptron inside a modern model, and count roughly how many of them a large one contains.

    12 min

Before you start

Nothing to learn first. You can start here.

Keep going

All chapters