Monday, 24 November 2025

Conway's Game of Life Revisited

The reason that I stopped recording how the digits of my diurnal age behaved under Conway's Game of Life rules was that it was tedious entering the individual squares that made up the digits in the initial configuration. See Figure 1.

Figure 1: the number is made up of over 50 squares

Given Gemini 3.0's capabilities however, I thought I'd revisit this issue and get it to write a program that allows me to simply enter the above digits, 27380, and have the configuration appear on the grid as shown in Figure 1 without my having to manually enter each square. After that the program runs according to the Game of Life rules until a stable state is reached. 

The program had a great deal of trouble determing what constituted a stable state because the spaceships kept moving on their eternal trajectories. This motion was being regarded as a stable state not being reached, which in a sense it isn't, but once the spaceships head off on their trajectories, they just have to be forgotten about. Anyway, I compromised and got the program to display on ongoing count of generations that I could manually stop and move backwards or forwards if required once I hit pause. Here is a link to the simulation:

https://sites.google.com/view/gameoflifesimulation?usp=sharing

Figure 2 shows the interface and the initial state when the number 27994 has been entered. Even though I entered the "7" as shown in Figure 1 when constructing my initial prompt, Gemini took it upon itself to alter the way the "7" was rendered on the grid. Now that I see it, I find the shape preferable to my original so I'm not planning to change it.


Figure 2: initial state once 27994 has been entered

The final stable state that is reached after 59 generations is shown in Figure 3. It correctly identifies that there are two still lifes and one oscillator remaining. The "Period: 2" in the black box presumably refers to the fact that the oscillator has two possible shapes.


Figure 3: final state resulting from an input of 27994

No comments:

Post a Comment