Automata Experiments
This project started because I wanted to create a game. Being the React/Javascript fanboy that I am, I created this Game of Life automata as a proof of concept of what I wanted to do technologically. It also gave me a great excuse to really do a deep dive into React hooks which had just come out months prior.
Quick explanation of the demo
In the top right hand side of the demo, you’ll find two modes. of “play”. At the bottom, you’ll find the parameters. The parameters aliveChance and foodChance (found only in Creatures) represent the percentage chance that a cell is alive or food respectively. The tickInterval controls how fast the game is played (i.e. the number of milliseconds per update or “tick”). A higher tickInterval results in a slower update cycle.
You’ll find that you might need to hit the Reload button a couple times for the settings to properly take effect.
Modes
There are two modes to the demo.
The first mode is Conway’s Game of Life.
The second mode is something I created called Creatures. I wanted to create something a bit more complex with cells being either food or a creature. Food reproduces when it’s alive after a certain amount of time and is stable. Creatures, on the other hand, need to eat food to live and will die if they don’t eat. This results in a push and pull similar to what we find in evolution.
It ends up creating a pretty mesmerizing pattern between the two colors.