# How Does the Emulator Work?
I wanted to make some fun designs, and had just read about one-dimensional cellular automata, so this site was born.
Read on, or skip straight to the emulator.
# One-dimensional Cellular Automata
Cellular automata are a kind of zero-player game played on a "universe" of tiled "cells." Each automaton has its own configuration, and can evolve a universe through many generations. The most well-known cellular automaton is probably Conway's Game of Life.
One-dimensional cellular automata (1DCA) are a kind of cellular automata where the tiling is 1D; we can think of it as a line of squares. This makes the many generations of a 1DCA easy to draw: we can draw all the generation lines one after another to form a rectangle.
(First generation) | |||||
(Next generation) | |||||
(Next generation) |
# Configuration
To define a 1DCA we need to know three things: the number of states to use, which neighbors to consider when calculating the next generation, and the transition rules for deciding which state a cell will evolve into (based on the states of its neighbors).
# States
Each cell in a cellular automata can be in one of several states, most often represented as a number (like 0 or 1) or a color (like black or white).
In this emulator, you can set the number of states the cellular automaton has.
# Neighbors
A simple example of a neighborhood is the current cell and its two immediate neighbors, such as:
000In general, there are many, many types of neighborhoods that can be used to create cellular automata (including neighboorhoods that can change with time). However, neighborhoods used on this site are limited to a selection of the current cell and several of its closest neighbors on each side.
Neighbors (1 - 7)# Transition Rules & Rule Number
Once the number of states and the neighborhood have been selected, the transition rules must be determined. For every possible combination of states in the given neighborhood, the resulting state must be chosen. As an example, here is the transition rule saying that if all of a cell's neighbors are 0
then the cell should become 1
:
These transition rules can be encoded as a single number, the "rule number," which can also be used to change the transition rules.
(This representation of the transition rules as a "rule number" uses the Wolfram Code.)
# Emulator
Once the automaton is configured, this site emulates it by generating a random initial generation and then drawing many children generations.
# Note on Naming
I called this an "emulator" instead of a "simulator," because simulators are expected to approximate the thing they simulate, while the goal of an emulator is to recreate the behavior of the thing it emulates exactly.
# Display Settings
There are several settings that control how the emulator is displayed:
Hue- The numeric labels can be toggled on or off.
- The emulator can be rendered in color or in grayscale.
- The first generation of cells can be created randomly, or as a single non-zero cell surrounded by zero cells.
- The hue can be adjusted to render the emulator using different colors.