Let cell state have two components, named Red and Blue. Each component can be dead or alive, so 4 states total. We define a cell which is dead in both components to be dead as a whole; otherwise, the cell is alive.
For a given cell, find the first living cell in each of the 8 possible directions. Call these the neighbors of the cell. Neighbors might not be (and often won't be) adjacent to the cell. Among the neighbors, count the number that have an alive Red component. This count determines the next state of the Red component of the cell, like Conway's Game of Life. Similarly, use the Blue components of the neighbors to determine the next Blue state.
The reason why this isn't two completely independent cellular automata layered on top of each other is because the neighbor of a cell in a given direction is the first cell in that direction that is alive in either component. A cell that is alive in one component brings its other component (which might be dead) into focus.
No comments :
Post a Comment