Skip to content
This repository has been archived by the owner on Dec 22, 2021. It is now read-only.

User Documentation

Joshua Lamusga edited this page Jul 18, 2017 · 1 revision

Elementary Automata

The classic elementary automata are computed from a single row of cells. A ruleset is applied to each cell to determine the new value of that cell. This implementation is limited to a directional (as opposed to totalistic) implementation with a basic neighborhood of 1 that uses two states. This creates only 256 possible rulesets, which can be encoded with 8 0's and 1's for all permutations in a binary simulation of basic neighborhood 1. The string 00011110 is called "rule 30". See: http://mathworld.wolfram.com/ElementaryCellularAutomaton.html.

2-D Automata

These 2-D automata are calculated based on the values of neighboring cells and/or the total values of nearby cells in a Moore's neighborhood of 1. Rules are constructed in the general format of LHS=RHS, where the left-hand side describes the condition required to apply the right-hand side as the new value of the current cell.

General symbols

x: The current value of the cell.

Left-hand only symbols

tb#: The rule is totalistic for a basic neighborhood in the cardinal directions. # is a number for the total sum required to meet the condition.
tm#: The rule is totalistic for a Moore's neighborhood of 1 in the cardinal/diagonal directions. # is a number for the total sum required to meet the condition.
d#: The rule is directional so the value is based on the neighborhood cells' values. # is a number describing the direction. 0 is right, 1 is up, 2 is left, 3 is down.
x#: The current value of the cell. # is a number describing the required value of the state to meet the condition.

Right-hand only symbols

g: The rule is generational (a.k.a. temporal) so it's based on the value of the last generation.
x+1: The current value of the cell + 1. This cannot be the left-hand side of the rule.
x-1: The current value of the cell - 1. This cannot be the left-hand side of the rule.

Rule examples

tm3=1|tm2=x This is Conway's Game of Life. See: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
x=0 The cell is unconditionally set to 0.
x1=0 If the cell's state is 1, it's set to 0.
tb3=0 Cells with cardinal sum 3 are set to 0.
tm14=x+1 Cells with Moore sum 14 are incremented.
d01=0 If the cell to the right has state 1, set this cell to 0.
d23=x If the cell to the left has state 3, keep the current state of this cell.
tm4=x-1|d11=1 Moore sum 4 decrements the state, and is set to 1 if the cell above is 1.
d0x=x+1 Increments the cell if the cell to the right has the same value.

Langston's Ant

Rules for Langston's Ant are a string of L's and R's meaning left turn and right turn; respectively. The cells generated have any number of states, and the LR string attributes a direction that the ant should turn in when it moves to a cell with a certain state. The first character defines whether it turns left or right for cells with state 0. The second character does this for cells with state 1, and so on. There are different types of ants (specified by the ant state).

  • State 0: The ant increments every cell it touches and moves in cardinal directions.
  • State 1: The ant decrements every cell it touches and moves in cardinal directions.
  • State 2: The ant increments every cell it touches, but moves opposite of the normal turning direction in cardinal directions.
  • State 3: The ant increments every cell it touches, but moves opposite of the normal turning direction in diagonal and cardinal directions.

Controls

Left-click: Increment a cell state in any automata mode.
Right-click: Decrement a cell state in any automata mode.
Spacebar: Pause or resume the simulation.
1: Skip 50 generations.
2: Skip 100 generations.
3: Skip 500 generations.
Enter: Set all cells to random binary states in any automata mode.
Escape: Set all cells to initial state 0 in any automata mode.
Right arrow: Apply one generation update.
Double-click: Increment/set ant state. Langston's ant mode only.
Shift + Double-click: Decrement/remove ant state. Langston's ant mode only.