Enhancing Conway’s Game of Life with Randomness, Probabilistic Rules, and Dynamic Interactions
In this project I wanted to play with the famous Conway's game of life. Conway’s Game of Life, devised by mathematician John Conway in 1970, is one of the most famous examples of cellular automata. It is a zero-player game that demonstrates how simple rules can lead to emergent and complex behaviors. Played on a two-dimensional grid of cells, each cell can be in one of two states: alive or dead. The game evolves over discrete time steps, with the state of each cell at any time determined by the states of its eight neighbours.
Original Rules of Conway’s Game of Life
The rules governing the game are deterministic and simple:
- Birth: A dead cell with exactly 3 live neighbours becomes alive.
- Survival: A live cell with 2 or 3 live neighbours stays alive.
- Death by Isolation: A live cell with fewer than 2 live neighbours dies.
- Death by Overcrowding: A live cell with more than 3 live neighbours dies.
Despite these straightforward rules, Conway’s Game of Life produces stunningly complex behaviors, including oscillators, gliders, and spaceships. Patterns can evolve, grow, stabilize, or disappear, and the game has even been proven to be Turing complete, capable of simulating a universal computer.
However, while the original rules are fascinating, adding new dimensions like randomness, probabilistic behavior, and dynamic rules, as crude additions of real-world phenomenon, can unlock even richer possibilities for emergent complexity.
Randomness, Probabilistic Rules, and Inter-Cell Interactions
One way to enhance Conway’s Game of Life is by adding randomness to cell behavior. Probabilistic rules introduce uncertainty into the simulation, making it more reflective of real-world systems where outcomes are rarely deterministic. Additionally, introducing new types of cells (e.g., mutants) allows for inter-cell interactions, adding layers of complexity.
Randomness and Probabilistic Rules
In our enhanced version of the Game of Life:
- Probabilistic Birth: Dead cells have a small chance (1%) to spontaneously come to life, simulating the natural phenomena of spontaneous generation.
- Probabilistic Death: Live cells have a small chance (5%) to die randomly, reflecting unpredictable environmental factors.
- Mutation: Live cells occasionally mutate into a new state (orange mutant cells) with a 2% probability.
These probabilistic rules ensure that the simulation never becomes static, even in scenarios where patterns might otherwise stabilize.
Inter-Cell Interactions
To further enhance the complexity, we introduced inter-cell interactions:
- Mutant cells (orange) thrive when surrounded by regular live cells (green). If a mutant cell has at least two live neighbors, it continues to survive and spread.
- If surrounded by more than 2 mutant cells, the mutant cell dies.
- This interaction adds a competitive dynamic to the simulation, as mutants rely on regular cells for their survival while influencing the broader behaviour of the grid.
These enhancements make the system more dynamic and unpredictable, breaking away from the purely deterministic nature of the original game.
Dynamic Rule Changes
Another key enhancement to Conway’s Game of Life is the addition of dynamic rules. Instead of having static rules that govern the simulation throughout, dynamic rules allow the system to evolve over time.
How Dynamic Rules Work
The simulation alternates between two rule sets every 20 ticks:
- Rule Set 1: Follows the standard Game of Life rules where:
- Cells with exactly 3 live neighbors are born.
- Live cells with 2 or 3 neighbours survive, while others die.
- Rule Set 2: Alters the survival thresholds:
- Cells survive if they have between 2 and 4 neighbors.
- Overcrowding occurs at 5 or more neighbors.
- Cells with just 1 neighbor die from isolation.
Why Dynamic Rules Matter
Dynamic rules we added intended to introduce cyclical changes to the simulation’s environment, somewhat akin to seasonal changes in real-world ecosystems. This creates patterns that adapt over time, with different behaviors emerging under different rule sets. For example, in Rule Set 2, more cells may survive due to relaxed thresholds, leading to denser populations and new types of interactions.
Combining Randomness, Probabilistic Behavior, and Dynamic Rules
Now lets see what happens when you combine of all these features. Together, they create a rich and interesting system:
Conclusion
By adding randomness, probabilistic rules, inter-cell interactions, and dynamic rules, we have transformed Conway’s Game of Life into a vibrant. These enhancements breathe new life into the simulation, allowing us to explore richer emergent behaviors that go beyond the original game.