esolang

Brian's Brain

A grid of neurons that fire, then rest. Four cells are enough to make a spaceship, and almost anything you draw flies apart at the speed of light.

Brian Silverman, ~1995 · Turing complete: unknown · ●○○ easy

Tested with 1 known program · Test method

Run it

Random cells at the start. Firing cells rest one step, then wait for exactly two firing neighbours.

The idea

Brian Silverman, who also made Wireworld, designed this rule in the mid-1990s. It works like a sheet of nerve cells. A cell that fires cannot fire again straight away: it spends one generation refractory (recovering) before it is ready again.

Read the story

That one rule turns Life's habit of settling down on its head. Nothing in Brian's Brain can stay still, because a firing cell always goes out. What survives is motion: waves, sparks and spaceships streaming outward from any random start until the screen is full of traffic. Its first oscillators were only found in 1999.

The machine

An infinite square grid (finite runs wrap at the edges). Each cell is in one of three states and looks at its eight neighbours.

The cell isNext generation
Firing #Refractory
Refractory oOff
Off .Firing if exactly 2 neighbours are firing, else off

Example

The smallest spaceship: two firing cells with two refractory ones behind them.

The smallest spaceship: two firing cells with two refractory ones behind them.

gen 0
..........
..........
..........
..........
....##....
....oo....
..........
..........

gen 1
..........
..........
..........
....##....
....oo....
..........
..........
..........

The two cells above the firing pair each see exactly two firing neighbours, so they fire. The firing pair goes refractory and the old refractory pair goes out. The shape moves one cell per generation, the fastest anything can move in a rule that only looks at neighbours (the speed of light, c). In Life the glider needs four generations to move one cell.

Patterns it teaches

Try this

  1. Turn the glider on its side (#o over #o). Which way does it fly?
  2. Draw a 3 × 3 block of firing cells and run it for 10 generations. What comes out?
  3. Hard: find a pattern that comes back to itself in the same place (an oscillator).

Further

Also in Artificial life

Write your own in Run Convert a program from Brian's Brain

Implementation

JavaScript interpreter, source and command line

A JavaScript interpreter, used in the browser and on the command line. Id: brians-brain.

Command line

shib run brians-brain -e '......
..##..
..oo..
......' --input '1'
shib manual brians-brain

Source

Module
langs/museum/ports.js
Interpreter
langs/museum/brians-brain.js, langs/common.js

Docs: Kernel instructions · The .shib format · Command line · Adding a language