This is a very simple implementation of Conway's Game-of-Life, one that you can play with in your browser. There are much better implementations of Life out there which make use of some very intricate optimizations. Some of these optimizations, like Hashlife by Bill Gosper are interesting in and of themselves, worthy of implementation and study. This was mostly an excuse to play with cellular automata and ponder the nature of our own (potentially simulated) reality. Isn't it amazing that so much complexity can arise from four simple rules?
I tend to play with something that I've created with more enthusiasm than one picked off-the-shelf. In making your own, you tend to appreciate it just a bit more, the complexity of it. In this case, the simplicity of it, the simplicity of the rules driving the complex behavior visible on this grid.
Looking at a glider zipping across the screen, it is hard to not feel an explosion of pseudo-philosophical questions. Take a close look at that glider, to me the observer, it appears as a thing, a clear repeating pattern, but what is it really? Across just a few time steps, that glider clearly no longer exists at the same cells on which it began, but it continues to exist, whatever it may be. What comes mind is the astonishing fact that we are not made of the same atoms across time, after some number of years, all of the atoms are different, yet here we are.
As it moves towards the edge, the rules of the world trap it on a toroidal surface, its world like the globe to us, appears to have no boundry. Does our world have an edge, or do we simply loop back somewhere in the universe? If we wanted we could also devise a world that simply expands to fit the glider, giving it a larger space. Could our own world be similarly lazily expanded? And if so, how could we know?
I think I'll stop myself here before things get too intangible. But, if you haven't played with the Game of Life, I hope you do, if not on this simulator than on one of the many others online. Pour yourself some tea, try out some patterns, and let your imagination go. And if you happen to stumble across the answer to life, the universe, and everything, please let me know.