11.4 Rules of the Game
Our computer simulation models a world that contains two types of life-forms: bears and fish. We can think of this world as a two-dimensional grid with a fixed size for each dimension. Life-forms are able to live only at specific locations within the grid.
Each life-form is described by a set of rules that govern how it lives. Initially, a group of life-forms will be placed in the world at random locations. The simulation will progress by allowing one of the life-forms to live for one time unit. During this unit of time, all other life-forms are in suspended animation. Thus, at any given time, the life-form is in one of two states: (1) alive or (2) suspended. The life-form to be put into the alive state is chosen at random ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access