Showing posts with label Game of Life. Show all posts
Showing posts with label Game of Life. Show all posts

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

Monday, 29 April 2024

Another Record in Conway's Game of Life

I've written about Conway's Game of Life in numerous posts but specifically in Conway's Game of Life Records I began to track record number of generations using polyominoes in the shape of my diurnal age as the starting points. I began that post by saying:

Since the 15th February 2024 I've been tracking the number of generations required for the number associated with my diurnal age to reach stability under the rules of Conway's Game of Life. On that date, I created a post titled Diurnal Age Meets Conway's Game Of Life that explained the manner in which this number was arrived at. 

Up until today, the record of around 1190 generations was held by 27373 on the 13th March 2024. At that date, no other number had surpassed 1000 generations. Today however, the number associated with my diurnal age, 27388, exceeded the previous record by an impressive margin. This number required slightly less than 1700 generations to reach stability.

 I fairly quickly had to add two addendums to the post and here they are:

ADDENDUM, Sunday April 14th 2024

27402 stabilises after about 2070 generations under Conway's Game of Life rules to six gliders and an assortment of still lifes and oscillators. This sets the record so far for number of generations. The previous record was held by 27388 with about 1700 generations.

ADDENDUM, Sunday April 28th 2024

Only two weeks since my last addendum and 27419 sets a new record by a significant margin. The new number of generations is about 3745 and Figure 3 shows the final configuration with the paths of the numerous gliders clearly visible.

The latest record marked an impressive increase in the number of generations required to achieve stability. The purpose of this post is to show the progression more clearly and to include an animation of the progression for 27419. See below.


I've been dutifully recording the number of generations required to reach stability since the 15th of February 2024. Figure 1 shows a screenshot of the final configuration for 27419.


Figure 1

I'd like to think I'm the only person on the planet to have ever thought of pursuing this particular activity, at least on a consistent basis. Maybe. In any case, I'll continue the pursuit and happily record, in an addendum to this post, when the current record is broken.

Thursday, 28 March 2024

Conway's Game of Life Records

Since the 15th February 2024 I've been tracking the number of generations required for the number associated with my diurnal age to reach stability under the rules of Conway's Game of Life. On that date, I created a post titled Diurnal Age Meets Conway's Game Of Life that explained the manner in which this number was arrived at. 

Up until today, the record of around 1190 generations was held by 27373 on the 13th March 2024. At that date, no other number had surpassed 1000 generations. Today however, the number associated with my diurnal age, 27388, exceeded the previous record by an impressive margin. This number required slightly less than 1700 generations to reach stability.

Early in the evolution two gliders were created so these do not appear in the screenshot shown in Figure 1 because by the time stability was reached they were far off screen.


Figure 1: using https://playgameoflife.com/

The path of the gliders can be seen in this alternative view shown in Figure 2 where oscillators appear in black and still life shapes appear as white, both against a background of orange cells that were active prior to stability.


Figure 2: using https://conwaylife.com/

Here's a video of the action:


So the record has been set and it remains to be seen when it will be surpassed but this post formally notes the record and if and when it is exceeded I'll add an addendum.

It's interesting what a difference a single cell that is turned on or off can make. For example, 27389 is identical to 27388 except for one cell that is turned off and thus makes the 8 into a 9. Under Conway's Game of Life rules, it terminates in 142 generations and leaves only two blocks. It's nice how the glider collides with a third block so that the two annihilate each other. Here is a video of the action:


ADDENDUM, Sunday April 14th 2024

27402 stabilises after about 2070 generations under Conway's Game of Life rules to six gliders and an assortment of still lifes and oscillators. This sets the record so far for number of generations. The previous record was held by 27388 with about 1700 generations.

ADDENDUM, Sunday April 28th 2024

Only two weeks since my last addendum and 27419 sets a new record by a significant margin. The new number of generations is about 3745 and Figure 3 shows the final configuration with the paths of the numerous gliders clearly visible.


Figure 3

Wednesday, 20 March 2024

Sequence Formed From Digit Display Elements

In my post titled Polyominoes and Conway's Game of Life (February 19th 2024), I looked at the representation of the digits 0, 1 and 2 as polyominoes. In a subsequent post titled Digits 3 to 9 in Conway's Game of Life (February 20th 2024), I examined the digits from 3 to 9 in the same light. Somewhat earlier, in a post titled Diurnal Age Meets Conway's Game Of Life (February 15th 2024), I began to investigate how the number associated with my diurnal age behaves under the Game of Life rules and since 27346 I've been doing this on a daily basis. The results I've been recording in my Airtable database.

My diurnal age today is 27380 and in terms of polyominoes it looks as shown in Figure 1:


Figure 1

This representation uses 54 squares and it occurred to me that starting from 0 and progressing through the natural numbers, records will be set for the number of squares required to represent the numbers. So I set out to determine these record number of squares and the numbers with which they were associated. 

The first step was to set up a data dictionary linking each digit with the number of squares in its polyomino. The dictionary looks like this with digit first followed by the number of squares:

{0:12, 1:5, 2:11, 3:11, 4:8, 5:11, 6:12, 7:7, 8:13, 9:12}

The results in the range from 0 to 100000 are shown in the table in Figure 2 (permalink).


Figure 2

Putting the results in list format, we have the following records:

12, 13, 17, 18, 23, 24, 25, 26, 29, 30, 31, 35, 36, 37, 38, 39, 41, 42, 43, 44, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 59, 60, 61, 62, 63, 64, 65

The numbers associated with these records are:

0, 8, 10, 18, 20, 28, 68, 88, 100, 108, 188, 200, 208, 288, 688, 888, 1000, 1008, 1088, 1888, 2000, 2008, 2088, 2888, 6888, 8888, 10000, 10008, 10088, 10888, 18888, 20000, 20008, 20088, 20888, 28888, 68888, 88888

Surprisingly these numbers make an appearance in OEIS A143617:


 A143617

Where record values occur in A010371: number of segments used to represent n on a 7-segment calculator display.
            

The record values are different since in OEIS A010371 we are counting dashes and not squares. It's the numbers at which these records occur that are the same. The calculator display digits are shown in Figure 3:


Figure 3

Looking at Figure 2 it can be seen that my square total of 54 for today's number of 27380 was reached for the first time way back in 10008. Even though it would be much more labour intensive, another sequence could be developed that counts that number of generations required for a number to reach stability under Conway's Game of Life rules. 

For example, 27380 requires about 380 generations to reach the stable configuration shown in Figures 4 and 5.


Figure 4


Figure 5

The single "toad" and two "traffic lights" alternate between the shapes shown in the two figures whereas the still life "blocks" (two of them), the "pond" (one of them) and the single "honey farm" (the group of four "beehives") remain the same. There's no way of telling how many generations are required for each number to reach stability and so they would all need to be tested individually.

Tuesday, 20 February 2024

Digits 3 to 9 in Conway's Game of Life

In my previous post, I looked at the behaviour of the digits 0, 1 and 2 under the rules of Conway's Game of Life. Today I'll look at the digits 3, 4, 5, 6, 7, 8 and 9. Let's start with the digit 3. See Figure 1.


Figure 1: 3 in the shape of an 11-omino

After about 50 steps it ends up in the form shown in Figure 2. There are two ships, two blocks, two beehives and one blinker.


Figure 2: three types of still life and one blinker

Now let's look at the digit 4 shown in Figure 3. It completely disappears after 12 steps or generations, so there's no final state that needs to shown.


Figure 3: the digit 4 in the shape of an octomino
It disappears after 12 generations

The digit 5 is shown in Figure 4 and after three steps or generations it changes into the shapes shown in Figure 5. It's really the same shape as the digit 2 and so the outcomes are basically the same, just differently orientated.


Figure 4: the digit 5 in the shape of an 11-omino


Figure 5: final state of 5 produces two boats

The digit 6 shown in Figure 6 has by far the most complicated behaviour of all the digits. After well over a thousand generations it turns into what is shown in Figure 7.


Figure 6: the digit 6 in the shape of a 12-omino


Figure 7: the complicated final state of the digit 6.
There are additional gliders not shown

Figure 8 shows the digit 7 that, after six generations, turns into a blinker.


Figure 8: the digit 7 as an heptomino
After six generations it becomes a blinker

The digit 8, shown in Figure 9, disappears after 21 generations:


Figure 9: the digit 8 as a 13-omino
It disappears after 21 generations

The digit 9, shown in Figure 10, will behave exactly the same way as for the digit 6, only the orientation will be different.


Figure 10: the digit 9 represented as a 12-omino
It behaves the same as the digit 6

Monday, 19 February 2024

Polyominoes and Conway's Game of Life

I've been reading a free ebook (title shown above) that I downloaded from this site. To quote from a footnote in the book:

A polyomino is a pattern made up of orthogonally connected live cells, and a tetromino is a polyomino with 4 live cells. More generally, polyominoes with 2, 3, 4, ..., 8 live cells are called dominoes, triominoes, tetrominoes, pentominoes, hexominoes, heptominoes, and octominoes.

Once we exceed eight cells, the polyominoes are referred to as 9-ominoes, 10-ominoes, 11-ominoes etc. This is a formidable but comprehensive book of 494 pages that I'll try to make my way through gradually. It was published in 2022 with the dedication:


I've mentioned John Conway before in posts about:

More recently I've been mentioning him in posts about his Game of Life:

In this and probably subsequent posts I'll be pursuing the Game of Life from the perspective of polyominoes formed by the decimal digits when using a 5 high x 3 wide grid of pixels. See Figure 1:


Figure 1
In my post titled Diurnal Age Meets Conway's Game Of Life I looked at the sort of "ash" that was produced by a "soup" of pixels representing my diurnal age. The terms "soup" and "ash" are used in the book mentioned at the start of this post. However, I thought it would also be interesting to examine how the digits from 0 to 9 behave when not in close proximity to other digits. To this end, I'll begin with the digit 0.

In a 5 high x 3 wide grid of pixels, the digit 0 occupies 12 of those pixels. See Figure 2:


Figure 2: a 12-omino in the shape of the digit 0

The zero quickly becomes the famous pulsar. See Figure 3.


Figure 3: source

The digit 1 forms a pentomino and it quickly morphs into what is called a blinker. See Figure 4 and Figure 5.


Figure 4: pentomino in shape of the digit 1


Figure 5: the digit 1 becomes a blinker

The digit 2 is an 11-omino and it quickly transforms into two boats. A boat is an instance of a still-life. See Figures 6, 7, 8 and 9.


Figure 6


Figure 7: first step on the way to two boats


Figure 8: second step on the way to two boats


Figure 9: two boats (unchanging)

I'll look at the other digits in future posts. That's enough for now.

Thursday, 15 February 2024

Diurnal Age Meets Conway's Game Of Life

 I've written about Conway's Game of Life in two recent posts:

I've been playing around with an app called "Life" on my iPhone that allows the game to be run but I prefer on browser-based app that I can access from my laptop. To that end, I've been playing around with one of three websites recommended by Gemini:
This website utilizes the popular "Golly" simulation software, offering advanced features like pattern libraries, scripting, and different grid geometries. You can save and export your simulations in various formats.
This website allows you to draw patterns directly on the grid with an intuitive interface. While it lacks advanced features, it's great for quick visualizations and sharing creations.

So in this post, I'm looking at the first of the recommendations and playing around with a new idea. I want to investigate how the number associated with my diurnal age behaves under the Game of Life rules. The number for today, 27346, is shown in Figure 1. All the digits from 0 to 9 can be created using a 3 x 5 pixel grid, the smallest possible size.


Figure 1

The rules lead, after 125 steps, to the image shown in Figure 2:


Figure 2

What would be interesting to keep track of are the number of steps required to reach a stable state. It's clear that the stable states arising from numbers are not unique. For example 16161 will end up the same as 19191 if we don't regard mirror images, rotations and reflections as different. However, most numbers should result in stable states that are different from one another. I can attach images of these stable states to my Airtable database. 

I'll explore the other two Gemini recommendations later. Any particularly interesting stable states or record number of steps arising from these diurnal age investigations can be the subject of future posts. In the case of 27346, we can say that the stable state consists of five blocks (the simplest still life) and one hive or beehive (the second most common still life).

 

This ongoing, daily exercise is a great way to deepen ones understanding of a topic. It was only through my adherence to the investigation of the number associated with my diurnal age that I widened and deepened my understanding of number theory. It's a great maxim: once a day but everyday and can be and should be applied to more aspects of my daily life.

Friday, 9 February 2024

108 Meets Conway's Game Of Life

Playing around with Conway's Game of Life on my iPhone, I discovered that 108 produces an interesting progression. I mentioned this number in my previous post but it's reappearing here in a quite different context. What I've been doing is creating numbers and then looking at what happens to them once Conway's algorithm is applied. See my earlier post The Game of Life from December of 2023. Figure 1 shows the pixel shape I created for 108.


Figure 1

The following video shows what happens once the algorithm is applied:


Figure 2 shows the final result.


Figure 2

So just a visually pleasing progression and not all numbers behave like this. 107 for example ends quite abruptly. Most of the shapes explored in The Game of Life are single shapes but I found these composite shapes quite interesting as the individual digits interact with one another.

Saturday, 16 December 2023

The Game of Life

I've mentioned the mathematician John Conway in three posts to this blog. The first was the Look and Say Sequence on February 10th 2017, the second was the RATS Sequence on September 26th 2020 and the third was the Free Fibonacci Sequences on July 18th 2021.


John Conway: 1937 - 2020
MacTutor Biography

I've known about his Game of Life for quite some time now but had avoided delving into it. However, yesterday I downloaded an iOS app that allows one to play around with it and this kindled an interest to find out more. Here is some information about the game together with its rules taken from Wikipedia:

The universe of the Game of Life is an infinite, two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead (or populated and unpopulated, respectively). Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

  • Any live cell with fewer than two live neighbours dies, as if by underpopulation.
  • Any live cell with two or three live neighbours lives on to the next generation.
  • Any live cell with more than three live neighbours dies, as if by overpopulation.
  • Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

The initial pattern constitutes the seed of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed, live or dead; births and deaths occur simultaneously, and the discrete moment at which this happens is sometimes called a tick. Each generation is a pure function of the preceding one. The rules continue to be applied repeatedly to create further generations.

Figures 1, 2 and 3 show examples of commonly occurring patterns that occur during the game:


Figure 1: Loaf
Example of a still life


Figure 2: Blinker
Example of an Oscillator


Figure 3: Glider
Example of a Spaceship

The Pulsar is the most common period-3 oscillator as shown in Figure 4.


Figure 4: Pulsar
The most common
Period-3 oscillator

The Wikipedia comments go on to say:

The pulsar is the most common period-3 oscillator. The great majority of naturally occurring oscillators have a period of 2, like the blinker and the toad, but oscillators of all periods are known to exist, and oscillators of periods 4, 8, 14, 15, 30, and a few others have been seen to arise from random initial conditions. Patterns which evolve for long periods before stabilizing are called Methuselahs, the first-discovered of which was the R-pentomino. Diehard is a pattern that eventually disappears, rather than stabilizing, after 130 generations, which is conjectured to be maximal for starting patterns with seven or fewer cells. Acorn takes 5,206 generations to generate 633 cells, including 13 escaped gliders.

Figure 5: R-Pentomino
The first discovered Methuselah

Of course, I've encountered numerous references to the Game of Life in the OEIS over the years but have uniformly ignored them. OEIS A019473 is one example.


 A019473

Number of stable \(n\)-celled patterns ("still lifes") in Conway's Game of Life, up to rotation and reflection.



The initial members of the sequence are: 0, 0, 0, 2, 1, 5, 4, 9, 10, 25, 46, 121, 240, 619, 1353, 3286, 7773, 19044, 45759, 112243 (beginning with \(n\)=1).

Figure 1 shows the Loaf, one of the four 7-celled stable patterns. OEIS A089520 is another such sequence:


 A089520

In Conway's Game of Life, the number of steps it takes for an \(n \times n\) square, in which all the cells are in the "on" state, to die out or start to cycle, or -1 if there is no cycle.



The initial members are:

1, 0, 5, 4, 11, 5, 5, 6, 16, 17, 32, 9, 18, 9, 22, 11, 33, 17, 20, 12, 26, 13, 48, 15, 46, 26, 295, 45, 154, 38, 62, 309, 38, 87, 78, 53, 96, 150, 641, 69, 82, 265, 216, 70, 70, 70, 120, 401, 107, 78, 70, 351, 318, 109, 297, 95, 122, -1, -1, 85, 232, 294, 127 (beginning with \(n\)=1).

The 1 x 1 square disappears in one step but the 2 x 2 square (called the Block) is stable and an example of a still life. The 3 x 3 square takes five steps to turn into four blinkers (one of which is shown in Figure 2). The 4 x 4 square takes four steps to disappear and so on. The OEIS comments for this sequence state that:
The -1 terms for \(n\) = 58, 59, 80, 92, 95, 96, 98, 99, 100 correspond to starting \(n \times n \) squares that produce 8 gliders (16 for \(n\) = 99) that go off to infinity, hence never reaching a cycle.

Here is a link to an interesting article in Quanta Magazine about the latest news regarding the Game of Life. Here is an excerpt:

Throughout the 1970s, mathematicians and hobbyists filled in the other short periods and found a smattering of longer ones. Eventually, mathematicians discovered a systematic way to build long-period oscillators. But oscillators with periods between 15 and 43 proved tough to find. “People have been trying to figure out the middle for years,” said Maia Karpovich, a graduate student at the University of Maryland. Filling in the gaps forced researchers to dream up a slew of new techniques that pushed the boundaries of what was thought possible with cellular automata, as mathematicians call evolving grids like Life.

Now Karpovich and six co-authors have announced in a December preprint that they have found the last two missing periods: 19 and 41. With those gaps filled, Life is now known to be “omniperiodic” — name a positive integer, and there exists a pattern that repeats itself after that many steps.