# Matrix: Simulating the world Part II: cellular automata In the first part of Simulating the World we saw how simple mathematical models can be built to study everything from the flocking of birds to the collision of entire galaxies. In these examples, a matrix, or a grid of numbers, was used as a convenient way of storing information on all the objects included in the simulation, so that it can be updated each time step as the simulation progresses. In this second article, we’ll take a look at another class of mathematical models; ones where the matrix or array isn’t just a way of storing information during the simulation, but actually is the simulation itself.

Many real-world situations can be simplified as a sequence of objects in a line or an arrangement across a flat space — in other words, they can be faithfully represented by either a list of numbers (a one-dimensional matrix) or a regular grid of cells (a two-dimensional matrix). During the course of the simulation, the objects interact with those near-by according to a set of predefined rules, with the identity of each discrete position on the line or plane changing over time. Such a system is called a cellular automaton model.