Hexagonal Population Game of Life
© 2013 Sam Pottinger
Released under the GNU GPL v3 license.
Done for CU Boulder CSCI 4900 – Independent Study (Software Engineering, Emergence, and Complex Adaptive Sys.)
Produced under the guidance of Professor Ken Anderson
While typically Conway’s Game of Life focuses on a square-based “game board”
environment, This project explores how the classic simulation’s same rules and
behaviors could adapt to a hexagonal grid with cells which, unlike the typical
implementation, are not just dead or alive but can have granular health, acting
like populations that grow and shrink.
Each cell takes on a “population value” from 0 to 1 and, at each simulation
step / generation, the population values surrounding a cell are summed.
This “surrounding population value” is then evaluated against these rules:
- If this sum exceeds 3 or is below 2, the cell’s population value decrements by 0.1.
- If this sum is in the range 2.5 to 3.5, the cell’s population value increases by 0.1.
- All other values leave the cell’s population unchanged.
A population value of 0 gives a cell a white fill color (for empty). Cells with
population values from 0.1 to 0.9 are grey and grow darker as their values get
larger. A population value of 1 (full capacity) receives a black fill.
Technologies and Resources Used
While not written in Processing, the solution draws on The Nature of Code by Daniel Shiffman.
The client side leverages jQuery, released under the MIT License.