Cellular Auomata (1D x Time)
This is intended to be a learning tool for exploring ideas about spatial structure and pattern that can arise from simple transition rules. In
cellular automata applications, space and time are descrete. Space is divided up into cells (e.g. a grid/lattice if space is modeled in two
dimensions) and each cell can have a finite number of states. A series of simple rules based on the states of neighbouring cells determine how the
state of a cell changes from one time step to the next. In this most simple of applications only one dimensional space with two possible states (1/0)
is considered. Because cellular automata result in a dynamic series of cell states (usually), it can be difficult to depict a celluar automata series
in graphical form if space is treated as > 1D. However, in this tool the time series can be depicted as a raster surface in which the x axis
represents 1D space, and the y axis represents descrete TIME. Thus although the output of this simulation is a raster layer, it should not be thought
of as spatial in the 2D sense we normally think of raster data - it is only spatial in the 1D sense and the rows of the raster represent the snapshots
of the cell states at each descrete time.
Some good introductory sources of information on cellular automata are:
Wikipedia article "Cellular automaton"
Or do Google search on cellular automata.
A pattern is required to start the cellular automata simulation. Any series of 1's and 0's is acceptable. You can either allow the program to generate one randomly
(you specify the number of cells in the row and the percentage of 1's in that row), or you can specify a particular pattern. (The latter option often leads to the most
interesting results!). To specify your own pattern you need to type in a series of instructions that is based on the idea of run-length encoding. For instance,
if you want ten 0's followed by one 1 and ten more 0's the code would be:
10*0, 1*1, 10*0
The format is thus: [the number of cells]*[0 or 1]. This pattern is repeated as many times as you like, with each one being separated by a comma. Here
is a more complex example. This code:
3*1, 6*0, 2*1, 4*0, 1*1
would result in this pattern:
in the first row (the starting point for the rest of the simulation).
The rules define how the pattern is modified from one time step to the next. The value of a cell at position x at time (row) t+1 is based on the values of
the cells in row t at positions x-1, x and x+1. You can use any set of rules you like but the default is set to the famous "Rule 30 CA" which produces
a particular pattern. Note that in my application the rows wrap around such that the very first cell in the row is based on the value of the cell at the end
of the previous row, as well as the cell directly above it and to the upper right of it. This is a very important element to build into a cellular automata program.
Can you explain why? (What would the result of any alternative rule be?)