Optimistic Conway's Game of Life
This is a story about how I made a mistake while implementing Conway’s Game of Life for my university homework. I thought that I had done it correctly because the game generated a beautiful symmetrical image at every stage. However, when my professor reviewed my work, he pointed out a mistake. Surprisingly, the mistake ended up creating something unexpectedly nice.
What is Conway's Game of Life?
Back in 1970, a brilliant British mathematician by the name of John Horton Conway came up with a fascinating cellular automaton called the “Game of Life,” as described in Conway’s publication in 1976. The Game of Life became widely known and popular after Martin Gardner wrote about it in Scientific American in 1970. Gardner’s article generated a lot of interest in the game.
Conway’s Game of Life has been used to study phenomena such as the dynamics of populations and the emergence of patterns in nature. Additionally, the game has been used as a tool for creating art, such as in computer graphics and visual design.
Conway’s Game of Life is a non-playable computer game where you have a bunch of tiny squares (called “cells”) on a grid. Each cell can either be alive or dead.
The game has rules that determine whether a square lives or dies based on the number of its living neighbors. If a square has too few or too many living neighbors, it dies. If a dead square has exactly three living neighbors, it comes to life.
When you start the game, you set up an initial pattern of living and dead squares. Then you watch what happens as the game progresses, while the pattern changes based on the rules. Sometimes, interesting patterns emerge, like little moving shapes called “gliders”.
What a mistake!
Recently, I had a chance to experiment with Conway’s Game of Life and made a mistake in one of the rules. Specifically, I modified the rule that determines what happens when a cell has two living neighbors. Instead of only allowing the cell to live if it was already alive, I made it so that the cell would also come to life if it was dead. At the time, I thought this was a valid implementation that would lead to interesting patterns.
As I started running the simulation, I was amazed at the beautiful patterns that emerged in every iteration. The shapes were stunning, and I couldn’t believe that such a simple set of rules could create something so visually pleasing.
However, my excitement was short-lived after my professor pointed out my mistake. I had accidentally violated one of the fundamental rules of Conway’s Game of Life, which states that a cell can only come to life if it has three living neighbors. Despite my initial disappointment, I was even more blown away by the beauty of the patterns that emerged from my mistake. What’s more, I was given a pattern of a ship that was supposed to be static, but with my modified rule, it began to generate beautiful patterns that kept growing.
The emergence of symmetrical patterns in my modified version of Conway’s Game of Life has resulted in the creation of fascinating faces of various animals and creatures. These symmetrical patterns can serve as a valuable source of inspiration for artists, providing them with unique and visually striking ideas for their creations. By exploring and analyzing these patterns, artists can use the inherent beauty of symmetry to create captivating works of art.
At first, I planned to use the symmetry feature in drawing app, but I later decided to introduce a bit of randomness on one side. I enjoyed being able to naturally choose which part of the pattern to include based on my imagination. The process felt so smooth!
Here are the steps you can follow to replicate my modification:
- Download NetLogo from their site. In NetLogo, you can define agents (such as cells in the Game of Life), their interactions, and then run simulations to observe the behavior of the system over time. https://ccl.northwestern.edu/netlogo/
- Create new project
- Go to tab “Code” and paste there code down bellow.
patches-own [ live-neighbors ]
to setup
clear-all
ask patches [set pcolor black ]
ask patch -1 1 [set pcolor yellow]
ask patch 0 1 [set pcolor yellow]
ask patch -1 0 [set pcolor yellow]
ask patch 0 -1 [set pcolor yellow]
ask patch 1 -1 [set pcolor yellow]
ask patch 1 0 [set pcolor yellow]
reset-ticks
end
to go
ask patches [
set live-neighbors count neighbors with [ pcolor = yellow ]
]
ask patches [
if live-neighbors < 2 or live-neighbors > 3 [
set pcolor black
]
if live-neighbors = 2 or live-neighbors = 3 [
set pcolor yellow
]
]
end
4. Go to “interface” tab and create two buttons (Setup and Go) by following tutorial video down bellow.
5. Press created button “Setup” to set up initial pattern and then press “Go” to see the progress based on the rules
6. To increase the display resolution in NetLogo, right-click on the display. area and select “edit”, then change the “pxcor” and “pycor” values to increase the number of pixels.
7. Watch the progress.
Where to go now?
- Type “Conway’s Game of Life” into the Google search bar and observe the changes that occur within Google’s user interface.
- All you need to do in order to implement original rules is to remove if statement “ if live-neighbors = 2 ” in “code” tab.
- Experiment with changing the initial pattern.
- Make your own “mistakes”
Conclusion
The symmetrical patterns that emerged from my modified version of Conway’s Game of Life, resembling animal and creature faces, were a humbling reminder of the beauty and complexity that can come from small changes in a simple system. This experience has inspired me to share my findings and encourage artists to explore these patterns as a potential source of inspiration for their creative work.
Thank you for reading.
Special Thanks to Professor Jiří Pospíchal
I want to thank Professor Jiří Pospíchal for his valuable guidance and support during our computer science course.
Professor Pospíchal helped me to understand the basics of Conway’s Game of Life and pointed out a mistake in my approach that ended up becoming a useful tool for artist inspiration.
I am grateful for Professor Pospíchal’s dedication to his students and for always making time to answer my questions and support my interests.