QuadLife extends Conway’s Game of Life with four live-cell colors—red, green, blue, and yellow—while retaining birth, survival, death, and toroidal wrap-around rules. section 5.6
Represent and advance the world with a compact NumPy-and-Cython pipeline:
- Store a SIZE_Y by SIZE_X uint8 NumPy array, using zero for dead cells and values one through four for colors. section 5.6
- Run the state transition in typed Cython using memoryviews, disabled checks, and nongeneral operations to reduce Python interaction. section 5.6.1
Color transition
When a dead cell has three live neighbors, it becomes live. A majority color supplies the new color; if all three live neighbors differ, the cell takes the remaining fourth color. section 5.6
