A automation devised to simulate life and death of pixels. More details about Conway’s game of life is here. Here I am implementing it using PixiJS to simulate using bunnies. The setup is basically a two dimensional grid called the universe where each cell may or may not have a living organism (bunny is this case). Initial population is set up randomly or using user input and then the fate of existing life and the possibility new life is determined by following rules:
- underpopulation kills, so a bunny with less than two neighbours dies.
- overpopulation kills, so a bunny with more than three neighbors dies.
- Ideal conditions promote reproduction, so a vacant cell gets a bunny if it is surrounded by exactly three bunnies.
- User arrow keys to move the bunny around and place the initial population.
- Press space to select a space or remove an existing bunny.
- Once done press Enter to start the simulation.
- refresh page to restart the simulation
Standalone implementation can be found here