WireWorld
Four states and one interesting rule, designed backwards from the answer: an automaton in which electricity behaves itself well enough to build electronics.
Draw with the mouse. Lay copper with Wire, then drop a Head with a Tail immediately behind it to launch an electron in that direction.
The rules
Every cell is empty, copper wire, an electron head, or an electron tail.
- Empty stays empty.
- Electron head becomes an electron tail.
- Electron tail becomes wire.
- Wire becomes an electron head if exactly one or two of its eight neighbours are heads. Otherwise it stays wire.
Brian Silverman devised it in 1987, and unlike most automata it was designed with a purpose in mind rather than discovered by search. Every clause exists for a reason.
Why the tail matters
The head-then-tail pair is what makes an electron directional. When a head moves forward it leaves a tail behind it, and a tail is not a head - so the wire the electron just came from cannot re-fire. Without that one-generation refractory state, a pulse would spread in both directions along the wire and the whole thing would be useless.
The "one or two" clause does the other essential job. If three or more heads arrive at a wire cell simultaneously, nothing happens. That single asymmetry is what allows diodes and logic gates to exist: a junction can be arranged so that a signal arriving from one direction sees one or two heads and passes, while a signal arriving from the other sees three and is blocked.
What people have built
Because signals can be forked, merged, timed and blocked, WireWorld supports a complete digital logic. Working WireWorld constructions include binary adders, seven-segment displays, memory cells, and - most famously - a computer built by a group of enthusiasts in 2002 that calculates prime numbers, complete with an instruction set, registers and a display. It is genuinely a computer, running on four rules and a grid of copper.
Things to try
- Load the clock and watch a single electron circulate forever. The period is the number of cells in the loop.
- Load two clocks: the loops have different lengths, so the pulses drift out of phase and back again.
- Load the fork: one electron reaching a branch point becomes two, because both branch cells see exactly one head.
- Load the merge: two wires joining into one is already an OR gate, since one head or two both satisfy the birth condition.
- Draw your own loop, then add a spur to tap the signal off it - you now have a clock generator driving a line.