a program to place multiple conway's-game-of-life-like cellular automata in a single ecosystem that can all interact with eachother
run the program and it outputs output.mp4 file with the video replay of the simulation
https://www.youtube.com/watch?v=zpPAf_UoUCc
the programs code is licensed under the MIT license
all videos created using this software are licensed under CC BY 4.0
- Michaelangel007's nanofont3x4
- FFmpeg for video encoding
- cellular automaton rules from various authors found from conwaylife.com and hatsyas catagolue
specie = singular for species species = plural for species
- each cell can belong to a specie each with its own
B/Srule - the world is a wrapped torodial grid
- at every step, the engine computes the next state in parallel with multiple workers
for each cell:
- count total neighbors in
totalNeighbors - count per-species neighbors in
specieNeighbors
if the current cell is alive:
- check its own specie survival condition using
totalNeighbors - if it fails, the cell dies and can later be replaced by a birth of a different specie
each specie independently checks if it can birth at the current cells location using its own neighbor count from specieNeighbors[specie.Id]
a specie is added as a candidate for birth if the current cell meets its birth condition AND:
- the cell is alive but the specie is different from the current cells specie OR
- the cell is dead
canCompete := shouldBirth &&
((cellIsAlive && differentSpecie) ||
(!cellIsAlive))since species can replace other species cells, survival doesnt make a cell invincible
- each candidates weight = number of neighbors of its own specie (
specieNeighbors[candidateId]) - the candidate with the highest weight wins
- if multiple candidates tie for the highest weight, there is no change to the cell
- each cell counts neighbors per specie and total neighbors
- a cell can survive according to its species survival rule
- species can attempt to birth into empty cells or replace other species
- multiple candidates resolve with neighbor-weight; ties keep the cell unchanged
- the simulation supports multi-threading for faster computation