Game Development Reference
In-Depth Information
typically far more complex than the systems found in games. Luckily, there are also
many other, simpler systems that also display emergent behavior. It is easier to study
these systems and try to distill from them the relevant structural qualities that con-
tribute to emergent behavior.
Active and Interconnected Parts
At the boundary of mathematics, computer science, and games lies a peculiar field
that studies cellular automata (the plural of cellular automaton ). A cellular automa-
ton is a simple set of rules governing the appearance of spaces, or cells , in a line or
on a grid. Each cell may be either black or white. The rules determine what causes a
cell to change from black to white (or vice versa) and how the color of a cell influ-
ences the cells around it. Normally the rules for changing a cell's color only take
into account the cell's current color and those of its eight immediate neighbors (on
a two-dimensional grid) or its two immediate neighbors (on a line).
Mathematicians think of such a collection of rules as a hypothetical machine that
operates by itself without human intervention. This is why they are called automata .
A cellular automaton starts with its cells in a given configuration (some white, some
black) and then applies the rules to each cell to determine whether its color should
change. It does not change a cell immediately; it checks every cell in the grid first,
marks the ones to be changed, and then changes them all before the next iteration.
Then it repeats the process. Each iteration is called a generation.
British scientist Stephen Wolfram has created a simple cellular automaton that
exhibits emergent behavior. It uses a line of cells. The state (or color) of each cell
is determined by the previous state of that cell and its two immediate neighbors.
Because cells have only two possible states, black and white, this creates eight pos-
sible combinations. Figure 3.2 displays one set of possible rules (on the bottom)
and the resulting, surprisingly complex pattern that is created by printing each new
generation of the system under the previous one. It begins with one black cell and
all the rest white.
The images at the bottom of the figure state the rules for converting the color of a
cell. The leftmost rule means “If a black cell is surrounded by black cells on either
side, in the next generation, the cell will turn white.” The fourth rule means “If a
white cell has a black cell on its left side only, in the next generation, the white cell
will turn black.”
Notice that even though there is nothing random in the rules, this cellular automa-
ton produces a pattern with distinctive and apparently random features.
 
Search WWH ::




Custom Search