Conway's Game of Life
---------------------
Classical Cellular Automaton with synchronized updates.
Rules:
- If alive, die when less than 2 live neighbors
- If alive, survive when 2 or 3 live neighbors (no change)
- If alive, die when more than 3 live neighbors
- If dead, become alive when exactly 3 live neighbors
Example-GameOfLifeSimulates Conway's cellular automata model "Game of Life" by
1. summing the states of neighboring cells with NeighborhoodReporter
2. based on this sum, setting the cell state using a System of (synchronously updated) Rules.2if((s == 1 and sum < 2), 0,
if((s == 1 and sum > 3), 0,
if((s == 0 and sum == 3), 1, s)
)
)
if(rand_uni(0,1) > 0.75, 1, 0)