The heart of a computer is Boolean logic. All of a computer's complexity ultimately rests on logical operations like and acting mechanistically on the information contained in bits.
Problems that break into a sequence of logical steps are ripe for solving with a computer. But what if the logic of a particular problem is beyond your reach?
Enter the artificial neural network.
An artificial neural network (ANN) is a system that can learn the logic of complex patterns in data. Its basic unit is the artificial neuron, inspired by simplified mathematical models of the neurons in animal brains.
Just as biological neurons send and receive electrical impulses to other neurons and change their own state based on the pulses they receive, the artificial neuron can be active or inactive based on the information it receives from its inputs.
The single neuron below has inputs, which can be
off. Clicking on an input will change its state.
The inputs with green edges drive the neuron toward its active state The pink input has the opposite effect, inhibiting the neuron when it's
The neuron's output state is determined by summing the inputs: each green edge contributes and pink one contributes (Only the inputs that are
on are counted; inputs switched
off have no effect.)
When the sum of the inputs equals or exceeds a particular value, called its bias, the neuron flips from to The higher the bias, the greater the input needed to flip the neuron.
The leftmost input alone isn't enough to flip the neuron to but if you set both green inputs to
on, their combined effect is. Likewise, the pink neuron lowers the total input, and it flips the output neuron back to its inactive state
With this rule, a neuron can be configured to perform basic logical operations (or "gates") on the inputs. For example, the neuron below mimics the logical gate.
The neuron flips to only if are
By adjusting the bias, this neuron can replicate a completely different gate. For example, the gate flips to if is
Because the gate is activated by a single positive input, its bias is lower than a configuration that mimics
On the neuron below, the bias is represented by the triangle on the meter showing different bias settings. You can set it higher or lower with the
- buttons (click the meter to access). If you increase the bias to its highest setting, you should recover the gate.
Other logic gates are possible with negative inputs and negative bias settings. A neuron with a bias of zero or less is even when none of the inputs are
on. The center of the meter on the neuron corresponds to a bias of
This doesn't mean a bias value that is zero or negative is useless. In fact, the gate isn't possible with strictly positive bias values. This gate outputs the opposite of its single input: