;biome CA language implementation of LIFE

DEAD = {0,255,0}
ALIVE = {255,0,0}

%%

DISCRETE SIMULATION
DISCRETE RECORD

%%

;A dead cell comes to life with probability 1 when surrounded by exactly 3 living cells
SIMULATION:DEAD + 3ALIVE -> ALIVE*1 

;A living cell dies when surrounded by four or more living cells (probability 1)
SIMULATION:ALIVE + 4ALIVE+ -> DEAD*1  

;A living cell dies when surrounded by 1 or fewer living cells (probability 1)
SIMULATION:ALIVE + 1ALIVE- -> DEAD*1  

;When a cell comes to life int he simulation layer, make note of it in the record layer (probability 1)
RECORD:DEAD + SIMULATION:ALIVE -> ALIVE*1

;Slowly decay the record (low probability of spontaneous death)
RECORD:ALIVE + SIMULATION:DEAD -> DEAD*0.01