# Go To Music - Move 37

Sébastien Thon

► To cite this version:

Sébastien Thon. Go To Music - Move 37. International Computer Music Conference, ICMC 2024, Hanyang University, Seoul, S. Korea, Jul 2024, Seoul (Korea), South Korea. pp.26-29. hal-05146340

HAL Id: hal-05146340

https://hal.science/hal-05146340v1

Submitted on 5 Jul 2025

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Go To Music - Move 37

Sébastien Thon

LIS Laboratory, Aix-Marseille University, France

sebastien.thon@univ-amu.fr

## ABSTRACT

Black and white like musical notes or the keys of a piano, arranged on a board where they form meaningful patterns, the Go game stones resemble notes that two musicians would take turns writing on a same musical score.

To explore this idea, we developed GOTO MUSIC, a Python program that generates music from records of Go games, by establishing a correspondence between a stone that is placed and a pentatonic scale of notes widely used in Korean traditional music. We used it to write a piece of music in 5 parts from the moves played in 2016 during the famous 5-game Go match between the Korean champion Lee Sedol and the artificial intelligence program AlphaGo.

Thus, our algorithm finds sound in motion, as it generates music and also animation from moves on a board.

## 1. INTRODUCTION

Generative music refers to music that is automatically composed by algorithms. The concept, which dates back to the avant-garde experiments of the 20th century, has seen significant advancements with the advent of AI and machine learning technologies. The origins of generative music can be traced to the early experiments in computer-assisted music composition by Hiller and Isaacson, exploring the potential of algorithms to generate musical structures, laying foundational concepts for future explorations in generative music [1]. Composers like John Cage [2] and Iannis Xenakis [3] also explored aleatory and stochastic processes in their music.

Recent years have seen AI and machine learning emerge as powerful tools for creating music. Algorithms such as Markov chains, genetic algorithms, and neural networks are now commonly used to generate complex musical compositions [4].

The application of AI in music has transformed the field, with deep learning models like recurrent neural networks (RNNs) and generative adversarial networks (GANs) being used to create music that can often be indistinguishable from that composed by humans [5].

Multiple experiments of sonification [6] have also been made to generate music from various data sources, such

as stock market movements, weather data, literature, or even biological signals.

In this paper, we propose a new translational model for algorithmic generation of music, by writing music from the moves played during a Go game.

Go is a strategy board game for two players invented in China more than 2,500 years ago. One player uses white stones and the other black. The players take turns placing their stones on the vacant intersections on a board covered by a 19×19 grid of lines (Beginners often play on smaller 9×9 and 13×13 boards). The aim is to capture more territory than the opponent by fencing empty space off.

We can find many analogies between the game of Go and music. First, the round black and white stones bring to mind musical notes, but also the keys of a piano. The lines on the Go board recall the lines of a musical staff, in 2D instead of 1D. At the start of a game, the Go board is empty and is gradually filled with stones, like notes on a score that is being written. The score is blank at the start, a simple white page with empty staffs. The stones on a Go board during a game present a very graphic appearance which becomes more complex with each move, revealing meaningful graphical patterns.

Thus, we may be tempted to analyze these patterns to find a hidden meaning, to try to decipher information encoded on the board like music in a score. Every Go game is a story, and music is a powerful way for storytelling. So, we propose our music generation approach as one musical way to tell the story of a Go match.

## 2. GO TO MUSIC

### 2.1 From stones to notes

Could it be possible to get music from the record of a game of go, to get sound from moves? To explore this idea, we wrote GOTO MUSIC, a program in Python that automatically creates music from records of Go games.

Such records, called *gibo* in Korean or *kifu* in Japanese, take the form of a diagram representing the grid of the board (19 lines by 19 columns for the standard size) and all the stones played with their numbers (Figure 2).

Previously written exclusively on paper, kifu are now available in the form of computer files. The most used file format is the *Smart Game Format* (SGF), a mark up text format used for storing records of board games, particularly Go. Most Internet Go servers and Go software from 1990 support this format.

Copyright: © 2024 Sébastien Thon. This is an open-access article distributed under the terms of the Creative Commons Attribution License 3.0 Unported, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited.
For a given SGF file of a game, our program analyzes the moves played one after the other. For each stone placed on the board, a value is computed from the stone and the eventual 8 stones surrounding it at that moment. This value is then used to determine a musical note.

At first, we started by counting a semitone for a black stone and a tone for a white stone, and adding them up to directly get the note, but the result was too dissonant. Instead, we count 1 for black and 2 for white, and the sum is used as an index to get a note in a pentatonic scale of notes widely used in Korean traditional music (Table 1).

<table><caption>**Table 1.** Correspondence between index and a note in a pentatonic scale.</caption><thead><tr><td>Index</td><td>Note</td><td>Index</td><td>Note</td></tr></thead><tbody><tr><td>1</td><td>G3</td><td>10</td><td>Eb5</td></tr><tr><td>2</td><td>A3</td><td>11</td><td>G5</td></tr><tr><td>3</td><td>Bb3</td><td>12</td><td>A5</td></tr><tr><td>4</td><td>D4</td><td>13</td><td>Bb5</td></tr><tr><td>5</td><td>Eb4</td><td>14</td><td>D6</td></tr><tr><td>6</td><td>G4</td><td>15</td><td>Eb6</td></tr><tr><td>7</td><td>A4</td><td>16</td><td>G6</td></tr><tr><td>8</td><td>Bb4</td><td>17</td><td>A6</td></tr><tr><td>9</td><td>D5</td><td>18</td><td>Bb6</td></tr></tbody></table>

We process like this for each stone placed by a player, to get a note for each move (Figure 1).

<figure><img src="image_2.png" /><figcaption>**Figure 1.** The white stone placed by Lee Sedol at move #168 during the second game gives the value 14 (black: 1+1+1+1 + white: 2+2+2+2+2). This value is used as an index in a pentatonic scale and gives the note D6.</figcaption></figure>

With this algorithm, if a stone is isolated, the corresponding note is low. If the stone is surrounded by several others, the note will be higher, reflecting a great activity in this local area for the conquest of the board. The music gradually rises in pitch as the game progresses, while the board fills up with stones.

## 2.2 Music tracks

The algorithm stores the computed notes in two MIDI scores, one for each player. Each score finally contains as many notes as moves were played during the game by the corresponding player.

We could have respected the times between each move as the same amount of time between each note, but the duration of a game of Go can be very long, sometimes several hours, with a move sometimes taking more than ten minutes. We have instead opted for regular time intervals between each note, as if a person reading the record of the game would read it at a different pace from that of the game itself.

A piece of music is then written with a DAW on a computer, built around these two MIDI tracks. Each MIDI track is played by a different virtual instrument (VSTI) to give an identity to each player.

## 2.3 Video

In addition to music, our program also produces animation. For each move, a square image is generated, reproducing the Go board and the location of the stones at this moment. The stone which has just been placed appears with a number, calculated as described previously in section 2.1. The stone is connected to the corresponding note in a pentatonic scale, which appears at the top of the image (Figure 1).

# 3. MUSIC GENERATED BY MAN AND AI

## 3.1 Lee Sedol vs AlphaGo

Between March 9 and 15, 2016, a 5-game Go match was held in Seoul between Lee Sedol, a South Korean professional player considered the best in the world at the time, and AlphaGo, a Go program based on Artificial Intelligence developed by Google DeepMind. This match saw the first victory of a program against a professional of the highest level, AlphaGo winning the first three games as well as the fifth, Lee Sedol only managing to win the fourth (Table 2).

<table><caption>**Table 2.** Results of the 5 games between Lee Sedol (LS) and AlphaGo (AG) in March 2016.</caption><thead><tr><td>Game</td><td>Black</td><td>White</td><td>Winner</td><td>Moves</td></tr></thead><tbody><tr><td>1</td><td>LS</td><td>AG</td><td>AG</td><td>186</td></tr><tr><td>2</td><td>AG</td><td>LS</td><td>AG</td><td>211</td></tr><tr><td>3</td><td>LS</td><td>AG</td><td>AG</td><td>176</td></tr><tr><td>4</td><td>AG</td><td>LS</td><td>LS</td><td>180</td></tr><tr><td>5</td><td>LS</td><td>AG</td><td>AG</td><td>280</td></tr></tbody></table>

With our GOTO MUSIC program, we created a piece of music in 5 parts from the 1033 moves played during the 5 games between Lee Sedol and AlphaGo. The SGF files of the records are available online [7].
## 3.2 The instruments

The MIDI scores generated by our program for the two players are played on a computer. We use a virtual instrument reproducing the *gayageum* (traditional Korean zither) when Lee Sedol plays, to evoke his Korean nationality and the millennial past of the game of Go. We use a simple electronic pluck sound when it is AlphaGo's turn.

The two instruments are placed in stereo space, like two opponents on either side of a Go board. The electronic sounds for AlphaGo are on the left, the gayageum for Lee Sedol on the right, as they were placed during the official competition.

## 3.3 The 5 parts of the music

### 3.3.1 Part 1

The first game took place March 9, 2016 and lasted 3h27. Lee Sedol resigned after 186 moves (Figure 2).

<figure><img src="image_3.png" /><figcaption>**Figure 2.** *Kifu* of the 186 moves of the first game between Lee Sedol and AlphaGo (Lee Sedol is black)</figcaption></figure>

The indices of the notes computed by our algorithm for this first part are shown in table 3. These numbers are then used in a pentatonic scale to determine the note to play as seen in table 2.

<figure><img src="image_4.png" /><figcaption>**Table 3.** Notes indices for the 186 moves of the first game alternatively played by black then white (read from left to right, top to bottom).</figcaption></figure>

In the corresponding first part of our music piece, the gayageum starts first, since Lee Sedol had black for the first game (Black always starts first in Go). The two instruments then respond to each other, alternately playing a note corresponding to the stone placed by one of the two players. Then, drums appear at the first third of this music part, corresponding to the moment when AlphaGo's statistics began to show its dominance in the first game. In traditional Korean music, like *sanjo*, the gayageum is accompanied by the *janggu*, an hourglass-shaped drum. In our music, these percussions are like heartbeats to reinforce the dramatic tension of the game which will culminate in the first defeat of the human champion against the machine after 186 moves.

### 3.3.2 Part 2

The second game took place March 10, 2016 and lasted 4 hours. Lee Sedol resigned after 211 moves.

During this game, move #37 played by AlphaGo stunned the Go world. Many players believed that it had been placed in the wrong place. A human player would never have dared to play it, it was too difficult to estimate the consequences.

At the press conference which followed this second game, Lee declared: "*I thought that AlphaGo was based on probability calculations and that it was just a simple machine. But when I saw this move, I changed my mind. Certainly, AlphaGo is creative. This move was really creative and beautiful.*"

In the second part of the music, to reflect this extraordinary move, a very pronounced bend ornament (called *nonghyeon* in Korean) is applied to the note played by the gayageum for move 38, Lee Sedol's response, to represent the turmoil in his mind at this revolutionary moment.

### 3.3.3 Part 3

The third game took place March 12, 2016 and lasted 3h51. Lee Sedol resigned after 176 moves.

Percussions accompany the entire third part of the music to emphasize the tension of all the spectators and Lee Sedol himself. If he does not win this third game, he will have no chance of defeating AlphaGo during the tournament. Unfortunately, this game was won by AlphaGo.

### 3.3.4 Part 4

The fourth game took place March 13, 2016 and lasted 3h59. It was the only one won by Lee Sedol, after 180 moves.

The fourth part of the music forms a calm break in the piece, without percussion. It is underlined by a layer constructed from a human voice to evoke this temporary victory of man over the machine. This part evokes the calm of this last human resistance before the final domination of the AI in the fifth and last part.

### 3.3.5 Part 5

The fifth and last game of the tournament took place March 15, 2016 and lasted 4 hours. Lee Sedol resigned after 280 moves.
The fifth part of the music gradually degrades into glitchy electronic sounds, as well as the video which becomes more and more glitched, to mark the historic victory of the machine over man in the game of Go.

The final music and animation can be found here: https://vimeo.com/912987229

## 4. ANALYSIS OF THE RESULTS

Our method allows us to produce polyphonic music, with the overlapping of two independent melodic lines corresponding to the moves of the two players.

The notes have equal durations and are placed alternately between the two lines, giving a regular rhythmic pattern. This pattern contributes to a clear rhythmic texture and rhythmic interaction between the two melodic lines, translating the alternating sequence of moves between the players.

The lowest notes correspond to isolated stones, mainly played at the start of the game when the board is still empty. Higher notes are heard when a placed stone has many neighbors, reflecting competition for dominance of the board. Higher and higher notes are heard as the game goes on, because the board fills with stones with each move played. Certainly, stones are removed from the board when they are captured, but it is still increasingly rare that a stone placed has not at least a neighbor.

Music generated with our algorithm generally has the same starting sequence for approximately the first 5 to 8 notes, if the players play Go in the classical style. Indeed, to have the best chances of conquering territories on the board, traditional wisdom says the priority is to play corner enclosures, then to extend to the middle of the sides, and finally to the center because it is easier to secure territory in the corners than on the sides or in the center. This starting phase is called *fuseki* in Japanese. Thus, players play approximately the first 8 moves by placing their stones in isolated places at the corners and sides, which results in the two lowest musical notes in our range (G3 for black, A3 for white). This fuseki phase ends when it is no longer possible to place a stone without triggering an immediate combat, because the free spaces are no longer sufficient for this stone not to be in danger. Consequently, a stone is placed next to another one, and a higher note is computed by our algorithm. It is interesting to see how the sonification of the game with our algorithm allows us to hear when the fuseki phase ends. Thus, this phase serves as an introduction to the music generated by our algorithm, before the game really begins with the first attack.

Unlike the sonification of some real-world data which are extracts without beginning or end of a continuous flow (ocean wave heights, weather data, stock prices, etc.), with values which may appear stochastic, a game of Go has a beginning and an end and tells a story, which is very close to the flow of music.

Instead of only stone neighborhood, higher level Go concepts could be considered in our algorithm to better tell the story of a Go game through music: connection and separation, life and death, thickness and lightness, attack and defense, *sente* and *gote*, *ko* fighting, *joseki* use, etc. This opens many avenues of research for future work.

## 5. CONCLUSIONS

We presented an algorithm capable of interpreting a game of Go like a music score, by playing on the many similarities between stones on a Go board and notes on a musical staff.

Our software produces both music and animation. We used our program on a series of 5 very famous games played in 2016 between the Korean champion Lee Sedol and the artificial intelligence AlphaGo, which experienced for the first time the domination of the machine over man in Go at such a level. We produced a musical piece in 5 parts from these games. The two players are like two musicians who write alternately on the same score. Their parts are played with different instruments, a gayageum for Lee Sedol, to recall his Korean nationality and the millennial past of the game of Go, and very electronic sounds for his artificial challenger.

Since a few years, there is more and more use of AI to generate music. In this paper we take a roundabout way, using the joint action of man and AI to generate music, but indirectly, by computing the notes from games of Go between man and machine.

Our program therefore finds sound in motion, in the moves played on the board, but also in the shock wave caused by this victory of AI over man in a field that was then thought to be beyond its reach.

### Acknowledgments

We would like to dedicate our music piece to Lee Sedol. Despite the excessive media exposure of this tournament against the AI where he had to pose as champion of humanity, he showed a lot of courage and tenacity. This tournament was one of the symbols of the dominant advent of AI in all fields.

## 6. REFERENCES

[1] L.A. Hiller and L.M. Isaacson, "Experimental Music: Composition with an Electronic Computer", 1959.

[2] J. Cage, "Silence: Lectures and Writings", Wesleyan University Press, 1961

[3] I. Xenakis, "Formalized Music: Thought and Mathematics in Composition", 1971.

[4] E.R. Miranda and J.A. Biles "Evolutionary Computer Music", Springer, 2007.

[5] J.-P. Briot, G. Hadjeres and F.-D. Pachet, "Deep Learning Techniques for Music Generation, Computational Synthesis and Creative Systems", Springer, 2019.

[6] Kramer, G, Auditory display: Sonification, audification, and auditory interfaces. Proceedings of the First International Conference on Auditory Display (ICAD), 1992.

[7] Records of Go games between Lee Sedol and AlphaGo, 2016 https://www.alphago-games.com/#leesedol