Custom rule is defined by a JS object having following fields:
next: required, function(state, sumNeighbors) -> newState. Calculates new state of a cell from its current state and (generalized) sum of the neighbors.
states: optional integer, number of states in the automaton. Default value is 2.
foldInitial: optional, any type. Initial values for calculating generalized sum of neighbors. Default value is 0.
fold: optional, function(sum, state) -> updatedSum. Adds one neighbor to the generalized sum of the neighbors. Default is function(sum,s){return sum+s;}.
Keyboard shortcuts
Editing
N
Next step
Z
Undo last step
G
Run/stop simulation
A
Random fill
E
Clear the world
Mouse tools
D
Enable drawing mode
U
Enable cue mark mode
M
Enable panning mode
R
Enable rotation mode
C
Enable select and copy mode
P
Enable paste mode
Viewing and navigation
Q
Hide cue mark if shown
H
Havigate to origin
[
Zoom in
]
Zoom out
Examples gallery
Custom rules
Rotating spaceship -
a pattern that exhibits behavior only possible in Minkowski plane: infinite (pseudo) rotation.
It quickly goes out of sight, so use "Rotate" tool to follow it. This pattern uses specially engineered custom rule with 9 states.
Reversible second-order automaton
This example uses custom rule with 4 states to implement Fredkin second-order reversible automaton (Wikipedia).
Evaluate it for 8 steps to see a result. To change evaluation direction (forward or backward in time), click Custom rule... and change the value of the forward field.
Simple binary rules
Here is a catalog of some patterns, found in the binary rules. All binary rules exhibit "explosive" (Wolfram class 3) behavior when population exceeds some critical value.