technique

Perceptron

The simplest neural network: weight each input, sum the weighted inputs plus a bias, pass the sum through a sign activation function.

What it is

The source calls it “the simplest neural network possible: a computational model of a single neuron. Invented in 1957 by Frank Rosenblatt at the Cornell Aeronautical Laboratory, a perceptron consists of one or more inputs, a processor, and a single output.” It takes several numbers in and produces one number out — no layers, no hidden units, just one unit deciding.

How it works

Feeding it forward is three steps, each given directly:

Training reuses the same feedforward pass and then corrects it:

Repeat that over many labeled examples. What isn’t in these excerpts is the exact size of each adjustment — no formula tying the weight change to the error and no learning-rate number appears here, only the ingredients (error, weights) and the direction (move toward less error). Don’t import a specific constant from elsewhere and present it as this source’s.

Parameters & tuning

The one lever the excerpts name is the activation function itself, and it isn’t really tunable here: because it’s a sign function, every decision the perceptron makes is binary, not a confidence score. Beyond that, these excerpts stop at a single neuron’s weights and its error-driven adjustment — how fast training converges, how many examples it needs, or what a bad initialization looks like in practice isn’t covered by what’s quoted.

Where it’s been used

Nothing in these excerpts names a work built on a perceptron. The Nature of Code presents it as a teaching example, walking through the algorithm before moving on to networks built from more than one of these units.

Variants & neighbours

A feedforward neural network arranges several perceptron-like units into input, hidden, and output layers, letting it solve problems that aren’t linearly separable — something a single perceptron, with no layering to fall back on, can’t do on its own.

Neuroevolution keeps the same kind of network but discards the error-and-adjust training loop entirely, evolving a population of networks’ weights with a genetic algorithm instead of computing a per-example error signal.

Go deeper

Related, in brief

Covered here rather than as pages of their own — each is described by a single source, and gets promoted the moment a second one corroborates it.

Feedforward neural network

Multiple perceptron-like neurons arranged in input, hidden and output layers with data flowing strictly forward, letting the network solve non-linearly-separable problems a single perceptron cannot.

Connected to

Contrast with: Feedforward neural network

Further reading: The Nature of Code

Used to build: Feedforward neural network · Neuroevolution


Revision 2 · 1 source · Something wrong? Tell us.