Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges...

4
Game-of-Life Mosaics Robert Bosch and Julia Olivieri Dept. of Mathematics, Oberlin College, Oberlin, OH 44074 ([email protected]) Abstract We used integer programming to design a set of tiles that can be interpreted as still Lifes (stable patterns) in Conway’s Game of Life. We designed the tiles to be modular so that when we place tiles side by side, the resulting composite pattern will remain a still Life. We also designed the tiles so that they have various brightnesses. This makes the tiles suitable for constructing still-Life mosaics that resemble user-supplied target images. Introduction In the late 1960s, John Horton Conway invented the Game of Life, a two-dimensional cellular automaton (CA) played on a grid of squares. At each time t = 0, 1, 2,... each square cell is either alive or dead. Starting from an initial pattern, the “time 0” pattern, the following rules are repeatedly applied: If at time t cell (i, j) is dead and exactly three of its eight neighbors are alive, then at time t +1 cell (i, j) will become alive (i.e., a birth will take place). If at time t cell (i, j) is alive and has either two or three living neighbors, then at time t +1 cell (i, j) will remain alive (i.e., it will survive). Otherwise at time t +1 cell (i, j) will be dead. Accordingly, the rules for the Game of Life can be denoted B3/S23, as they mandate birth with three living neighbors, survival with two or three, and death in all other cases. t = 0, 1, 2,... t = 0, 2, 4,... ❛ ❞ t = 1, 3, 5,... t = 0 ❵❞ t = 1 ❵❞ t = 2 ❛❵ t = 3 t = 4 Figure 1: A ship (top left), blinker (top right), and glider (bottom) Figure 1 displays a few of the many interesting Game-of-Life patterns discovered by Conway’s group. In the top left we see a ship, the densest still Life (stable pattern) that fits in a three-by-three region. In the top right we see the two phases of a period-2 oscillator known as a blinker. And on the bottom we see the four phases of a glider, a period-4 spaceship that “moves” one row up and one column to the right every four time units. In Figure 1, cells that contain solid circles are healthy (currently alive and stayin’ alive), while cells that contained ringed circles are unhealthy (currently alive but about to die). Empty cells are dead. Cells that contain tiny dots are dead but are about to become alive. The Game of Life reached the general public when Conway shared his results with Scientific American’s Martin Gardner. Gardner devoted two of his Mathematical Games columns [3,4] to the game, and these columns ignited a frenzy of investigation that has yet to subside. In the early 1970s, Robert Wainwright edited and published Lifeline [6], a typewritten newsletter devoted to the CA. Today’s enthusiasts can find Lifeline on the ConwayLife.com website [2], which also contains a great wealth of other information, including reports of recent discoveries. And though it is a tremendously fun exercise to program your own Game-of- Life simulator, it is very difficult to create one with the power and performance of Golly [5]. Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture 325

Transcript of Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges...

Page 1: Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture 325. Game-of-Life Mosaics

Game-of-Life Mosaics

Robert Bosch and Julia OlivieriDept. of Mathematics, Oberlin College, Oberlin, OH 44074

([email protected])

AbstractWe used integer programming to design a set of tiles that can be interpreted as still Lifes (stable patterns) in Conway’sGame of Life. We designed the tiles to be modular so that when we place tiles side by side, the resulting compositepattern will remain a still Life. We also designed the tiles so that they have various brightnesses. This makes the tilessuitable for constructing still-Life mosaics that resemble user-supplied target images.

Introduction

In the late 1960s, John Horton Conway invented the Game of Life, a two-dimensional cellular automaton(CA) played on a grid of squares. At each timet = 0,1,2, . . . each square cell is either alive or dead. Startingfrom an initial pattern, the “time 0” pattern, the followingrules are repeatedly applied: If at timet cell (i, j)is dead and exactly three of its eight neighbors are alive, then at timet+1 cell (i, j) will become alive (i.e.,a birth will take place). If at timet cell (i, j) is alive and has either two or three living neighbors, then attime t+1 cell (i, j) will remain alive (i.e., it will survive). Otherwise at timet+1 cell (i, j) will be dead.Accordingly, the rules for the Game of Life can be denoted B3/S23, as they mandate birth with three livingneighbors, survival with two or three, and death in all othercases.

t t

t t

t t ��

t = 0,1,2, . . .

dba

t

dba

` `

t = 0,2,4, . . .

dba t dba

`

`

t = 1,3,5, . . .

-

dba

` t

dba t t

`

t = 0

-dba t

` dba t

t `

t = 1

-` dba

dba t `

t t

t = 2

-dba `

dba t

t t `

t = 3

-dba

` t

dba t t

`

t = 4

Figure 1: A ship (top left), blinker (top right), and glider (bottom)

Figure 1 displays a few of the many interesting Game-of-Lifepatterns discovered by Conway’s group. Inthe top left we see aship, the denseststill Life (stable pattern) that fits in a three-by-three region. In thetopright we see the two phases of a period-2 oscillator known as ablinker. And on the bottom we see the fourphases of aglider, a period-4spaceshipthat “moves” one row up and one column to the right every four timeunits. In Figure 1, cells that contain solid circles are healthy (currently alive and stayin’ alive), while cellsthat contained ringed circles are unhealthy (currently alive but about to die). Empty cells are dead. Cells thatcontain tiny dots are dead but are about to become alive.

The Game of Life reached the general public when Conway shared his results withScientific American’sMartin Gardner. Gardner devoted two of hisMathematical Gamescolumns [3,4] to the game, and thesecolumns ignited a frenzy of investigation that has yet to subside. In the early 1970s, Robert Wainwright editedand publishedLifeline [6], a typewritten newsletter devoted to the CA. Today’s enthusiasts can findLifelineon theConwayLife.comwebsite [2], which also contains a great wealth of other information, includingreports of recent discoveries. And though it is a tremendously fun exercise to program your own Game-of-Life simulator, it is very difficult to create one with the power and performance ofGolly [5].

Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture

325

Page 2: Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture 325. Game-of-Life Mosaics

Game-of-Life Mosaics

We designed a set ofstill-Life tiles made up of square cells, each of which is in one of two states: living(drawn as a solid black circle on a white background) or dead (just the white background). In each tile,each living cell has either two or three living neighbors, and no dead cell has exactly three living neighbors.Consequently, each tile can be interpreted as a still Life. Three of the tiles are displayed in Figure 2.

r rr rr r

r r r rr r r r r rr r r r

r r r r r r r r r rr r r r r rr r r r r r r r r r

r r r r r r r r r rr r r r r r r r r rr r r r r r r r r rr r r r r r r r r r

r r r r r r r r r rr r r r r rr r r r r r r r r r

r r r rr r r r r rr r r r

r rr rr r

r rr rr r

r r r rr rr r

r r r r r r r rr r r r r rr r r r r r

r r r r r r r r r rr r r rr r r rr r r r r r r r r r

r r r r r rr r r r r rr r r r r r r r

r rr rr r r r

r rr rr r

r rr rr r

r r r rr rr r

r r r rr rr r

r r r rr rr rr r r r

r rr rr r r r

r rr rr r r r

r rr rr r

Figure 2: Three still-Life tiles

We used integer programming (IP) to design the tiles. Our IP model is a nontrivial modification of oneof Bosch’s models for theMaximum Density still Lifeproblem [1]. In our model, we included constraintsto force the tiles to have 90-degree rotational symmetry andhorizontal and vertical mirror symmetries inorder to reduce the size of the search space. We also includedconstraints that guaranteed that the tiles wouldbe modular. These constraints ensure that when we place the tiles side by side, the resulting compositepattern of living and dead cells remains a still Life. By maximizing the number of living cells, we were ableto construct a tile that appears darkest to the human eye. By including constraints that prohibit previouslydiscovered solutions, we were able to find additional tiles,and by repeating this process over and over again,we were able to find all 85 tiles that satisfied our symmetry andmodularity constraints. The entire searchtook less than five minutes of computer time.

Figures 3 and 4 display two Game-of-Life mosaics produced with our tiles. Each one is based onMagritte’s “Ceci n’est pas une pomme” and is titled “still Life with Glider.” Each one shows a Game-of-Life still Life (that resembles a still life of an apple) thatis about to be demolished by a glider (found in thelower right corner).

References

[1] R.A. Bosch,Integer programming and Conway’s game of Life, SIAM Review 41(3) (1999), pp. 594-604.

[2] ConwayLife.com. A community for Conway’s Game of Life and related cellular automata.www.conwaylife.com. Accessed 16 March 2014.

[3] M. Gardner,The fantastic combinations of John Conway’s new solitaire game “life”, Sci. Am. 223(1970), pp. 120-123.

[4] M. Gardner,On cellular automata, self-reproduction, the Garden of Eden and the game “life”, Sci. Am.,224 (1971), pp. 112–117.

[5] Golly. Golly Game of Life Home Page.golly.sourceforge.net. Accessed 16 March 2014.[6] R.T. Wainwright,Lifeline: A Quarterly Newsletter for Enthusiasts of John Conway’s Game of Life,

Issues 1–11, 1971-1973.

Bosch and Olivieri

326

Page 3: Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture 325. Game-of-Life Mosaics

Figure 3: still Life with Glider (22× 26)

Game-of-Life Mosaics

327

Page 4: Game-of-Life Mosaicst.archive.bridgesmathart.org/2014/bridges2014-325.pdf · Proceedings of Bridges 2014: Mathematics, Music, Art, Architecture, Culture 325. Game-of-Life Mosaics

Figure 4: still Life with Glider (44× 52)

Bosch and Olivieri

328