Read more about cellular automata in Nature of Code. Written in p5.js. Code on Github Annotated source code