I am a huge fan of cellular automata. The fingerprint of God is in the nature of the universe from atomic, to biologic, to economic, to cosmic and at each scope the emergence of complex systems arise not in spite of the lack of a central control but precisely because of it. This is how the universe truly works; central planning is foolish hubris and designs based on this premise are the clumsy fingerprint of man. While they may be necessary due to our lack of knowledge, they should never be regarded as optimal or preferable to a solution arising spontaneously from free entities functioning organically be them atoms, cells, people or asteroids.
Conway’s Game of life is the most famous cellular automata algorithm and it is a zero player game that takes place on a grid where each cell in the grid is either shaded or empty representing either a living cell or a dead cell respectively. It starts with a randomly seeded grid and then follows these 4 simple rules to determine the next state of each cell:
- If the Cell is alive and is surrounded by 0 or 1 living cells it dies of underpopulation
- If the Cell is alive and surrounded by 2 or 3 living cells it continue to live happily
- If the Cell is alive and is surrounded by 4, 5 or 6 living cells it dies of overpopulation
- If the Cell is dead and surrounded by exactly 3 living cells it comes to life due to reproduction
The result looks something like this where you at times begin to see organic behavior arising from the system:
I wanted to create a software framework to explore this further and so I completely abstracted out the rules engine and map geometry so that I could toy with each without refactoring. Here you can see a hex patterned game in the visual simulator I configured on top of the engine but any geometry and rule can be configured and the simulator seamlessly models it. I have been intending to build a large LED Hex Conway Game of Life installation art piece in the foyer of my house for some time so I am hoping this software is an investment towards that future use. I do regret indexing positions with a POINT class though which is 2d (and Integral), if and when I dust this off I intend to change that to use my multidimensional vector class so I can simulate higher dimensional games.
to-do: post source code