So, most programmers and math nerds are probably familiar with John Conway's Game of Life. You have a pixel grid, if you are alive and two neighboring pixels are alive, you live on, if there is three living neighbors you live, otherwise you are dead.

As a way to keep my brain soft, I do little exercises where I take a familiar concept and try to implement it by myself. This is one of them. Nothing big really, a canvas, some code and pish pash posh, it's done. It made me curious though. How would the patterns behave if you chuck generations into the mix?

So, I added two more rules into the algoritm:
1. If a pixel has been alive for more than X generations, then it's considered old.
2. If a pixel has been alive for more than Y generations, then it dies of old age.

X and Y are arbitrary and it's fun to experiement.

Most of the still lifes die of old age, but there is a fun thing I found out; if the pixels in the block are of different generations, then the block lives on forever and becomes its own tiny generational society. Because when one pixel dies, then there is exactly three left, and therefore a new pixel immediately replaces it. Kind of nifty, huh?

The code is honestly garbage, and I didn't spend more than an hour writing the program, but you can find a demo here: https://teddiewallie.github.io/generationalGoL/

Game of Life, With a Twist