generating sound based on the patterns in the game of go

For discussing go computing, software announcements, etc.
Post Reply
dohduhdah
Dies with sente
Posts: 109
Joined: Tue Oct 26, 2010 5:57 pm
Rank: KGS 4 kyu
GD Posts: 0
KGS: kneh
Has thanked: 8 times
Been thanked: 4 times

generating sound based on the patterns in the game of go

Post by dohduhdah »

Just like music can be visualized (generating visual patterns based on the patterns in audio), the game of go
can probably be represented by patterns in sound. That way, when you play go, you not just have the opportunity
to learn from visual patterns, but also from audible patterns. Learning a foreign language is also easier when
you see text (or visual representations) while hearing it and the associated translation.
Does anyone know of any attempts to generate sound based on the visual patterns in the game of go?
Preferably in a way that might be helpful in assisting in learning to play go or that generates more pleasing
audio depending on the strength of the moves?
Like where a favorable sequence of consecutive moves might be represented by a catchy melody and a good
position might be like a pleasing sounding chord, while a bad way to play or a bad position might coincide
with a dissonant or unpleasant sound.
And maybe where one of the player's moves generate rythms and textures while the other player's moves generate
the melodies and harmonies. Or something along those lines, so it's easy for each player to focus on their
contribution in the resulting audio.
User avatar
Phelan
Gosei
Posts: 1449
Joined: Tue Apr 20, 2010 3:15 pm
Rank: KGS 6k
GD Posts: 892
Has thanked: 1550 times
Been thanked: 140 times

Re: generating sound based on the patterns in the game of go

Post by Phelan »

dohduhdah wrote:Just like music can be visualized (generating visual patterns based on the patterns in audio), the game of go
can probably be represented by patterns in sound. That way, when you play go, you not just have the opportunity
to learn from visual patterns, but also from audible patterns. Learning a foreign language is also easier when
you see text (or visual representations) while hearing it and the associated translation.
Does anyone know of any attempts to generate sound based on the visual patterns in the game of go?
Preferably in a way that might be helpful in assisting in learning to play go or that generates more pleasing
audio depending on the strength of the moves?
Like where a favorable sequence of consecutive moves might be represented by a catchy melody and a good
position might be like a pleasing sounding chord, while a bad way to play or a bad position might coincide
with a dissonant or unpleasant sound.
And maybe where one of the player's moves generate rythms and textures while the other player's moves generate
the melodies and harmonies. Or something along those lines, so it's easy for each player to focus on their
contribution in the resulting audio.
I remember something in youtube, where a classical music composer composed a piece of music to go with a particular game of Go. Don't remember the name now.

As for generating music out of Go automatically, I don't think I've seen anything like it before. It might be possible to do if you had a strong Go engine that analysed the moves and classified them, interlinked with a music generator program. Not sure how it would be done.

Edit: Found it: http://youtu.be/I_Ij-xhr_w0
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go
skydyr
Oza
Posts: 2495
Joined: Wed Aug 01, 2012 8:06 am
GD Posts: 0
Universal go server handle: skydyr
Online playing schedule: When my wife is out.
Location: DC
Has thanked: 156 times
Been thanked: 436 times

Re: generating sound based on the patterns in the game of go

Post by skydyr »

Phelan wrote: I remember something in youtube, where a classical music composer composed a piece of music to go with a particular game of Go. Don't remember the name now.

As for generating music out of Go automatically, I don't think I've seen anything like it before. It might be possible to do if you had a strong Go engine that analysed the moves and classified them, interlinked with a music generator program. Not sure how it would be done.

Edit: Found it: http://youtu.be/I_Ij-xhr_w0
Yeah, that's Haskell Small. Among other things, he also started the US Go Congress after going to the European one in the 80s or so. If you go to his website, he has an entire go-themed album.

http://www.haskellsmall.com/discography ... game-of-go
Javaness2
Gosei
Posts: 1545
Joined: Tue Jul 19, 2011 10:48 am
GD Posts: 0
Has thanked: 111 times
Been thanked: 323 times
Contact:

Re: generating sound based on the patterns in the game of go

Post by Javaness2 »

I always wanted to have an sgf2midi program. The question is, what do you really do to translate the markup to music?

looking at nyquist you could start with osc(pitch [, duration, table, phase])
how to transform something like B[ac];W[ee];B[no]; into that?
I suppose you can make up some rules :)
badukJr
Lives with ko
Posts: 289
Joined: Sat Jan 07, 2012 1:00 pm
Rank: 100
GD Posts: 100
Has thanked: 7 times
Been thanked: 42 times

Re: generating sound based on the patterns in the game of go

Post by badukJr »

I think the problem on giving good/bad feedback based on pattern recognition is that it's hard.

Empty triangle is bad.

But there are situations where you have to play an empty triangle. Exceptions.

Basically if you have a thing that can feedback good or bad shapes based on playing position, you're almost to a really good AI.

That said, I think putting something into a music grid would be nice.

http://muzy.com/app/music_grid

How would some go position sound on that? You might have to modify to deal with the 3rd/4th line cluster of stones at the beginning.
msgreg
Lives with ko
Posts: 294
Joined: Sun Nov 13, 2011 10:58 am
GD Posts: 0
Universal go server handle: MSGreg
Has thanked: 47 times
Been thanked: 94 times

Re: generating sound based on the patterns in the game of go

Post by msgreg »

My first thought was to use Csound http://en.wikipedia.org/wiki/Csound

And to determine the goodness of a move by having a program rank the strength of the move and modify the "pleasantness" of the sound or arrangement played based on the strength of the move. (on rereading, I see that this is in the original post...)

The move could be evaluated brute force by having a bot play at different strengths and a move's strength would corresponds to the strength of the bot that played it.

Or the move could be evaluated by it's frequency of response in a large game database.

That's as far as my mental exercise went :-)

Seems like a fun project...
Founder, Central Mississippi Go Club
Free tips and resources for clubs and teaching
Go Kit Club Pack - pack of 13x13 go sets for clubs
Go Tin - very portable go
User avatar
Phelan
Gosei
Posts: 1449
Joined: Tue Apr 20, 2010 3:15 pm
Rank: KGS 6k
GD Posts: 892
Has thanked: 1550 times
Been thanked: 140 times

Re: generating sound based on the patterns in the game of go

Post by Phelan »

Javaness2 wrote:I always wanted to have an sgf2midi program. The question is, what do you really do to translate the markup to music?

looking at nyquist you could start with osc(pitch [, duration, table, phase])
how to transform something like B[ac];W[ee];B[no]; into that?
I suppose you can make up some rules :)
I don't think it would be easy to directly translate the markup into something meaningful, but I don't know much about music generation.

I think it might be easier to have a music generator that would shift pitch(or some other musical variable) from the main formula depending on how bad a good Go bot would rank it.
a1h1 [1d]: You just need to curse the gods and defend.
Good Go = Shape.
Associação Portuguesa de Go
Marcus
Gosei
Posts: 1387
Joined: Tue Apr 20, 2010 8:51 am
GD Posts: 209
KGS: Marcus316
Has thanked: 139 times
Been thanked: 111 times

Re: generating sound based on the patterns in the game of go

Post by Marcus »

I want to play with this idea, but I lack the time to get into it (I'm both an amateur programmer and an amateur musician, so this topic touches me deeply :mrgreen: ).

I think it might be interesting to vary certain musical parameters based on proximity to the previous opponent's move as well as the local situation around the current move.

Items other than pitch that could be varied as well are volume, duration ... oh, I think I'll put some time in and work out some parameters and build a function. Where's my SGF collection ...
Nikolas73
Lives with ko
Posts: 172
Joined: Thu Apr 22, 2010 5:24 pm
Rank: KGS 3 kyu
GD Posts: 42
KGS: Nikolas73
DGS: Nikolas73
Location: London / Vancouver
Has thanked: 28 times
Been thanked: 12 times
Contact:

Re: generating sound based on the patterns in the game of go

Post by Nikolas73 »

I think this is an excellent idea. A few years ago I wrote very briefly about connections between Go and music here: http://www.allaboutgo.com/articles/go-and-music/

As a web developer I am very interested in HTML5 advances, including how easy it is to use audio: http://www.w3schools.com/html/html5_audio.asp

I wonder if some sort of web app similar to Tonematrix ( http://tonematrix.audiotool.com/ ) is possible with a set of Go rules. Unfortunately I will not have time to explore such options for a few months if at all, but I look forward to seeing where this idea goes :).
All About Go | Go website featuring lessons, history of Go, downloads, articles by professionals and more.
dohduhdah
Dies with sente
Posts: 109
Joined: Tue Oct 26, 2010 5:57 pm
Rank: KGS 4 kyu
GD Posts: 0
KGS: kneh
Has thanked: 8 times
Been thanked: 4 times

Re: generating sound based on the patterns in the game of go

Post by dohduhdah »

badukJr wrote:I think the problem on giving good/bad feedback based on pattern recognition is that it's hard.

Empty triangle is bad.

But there are situations where you have to play an empty triangle. Exceptions.

Basically if you have a thing that can feedback good or bad shapes based on playing position, you're almost to a really good AI.

That said, I think putting something into a music grid would be nice.

http://muzy.com/app/music_grid

How would some go position sound on that? You might have to modify to deal with the 3rd/4th line cluster of stones at the beginning.
Something similar appears in this recent TTC course (in lecture 10 in particular):

"How Music and Mathematics Relate"

http://www.thegreatcourses.com/tgc/cour ... x?cid=1373

Putting all possible intervals between a combination of 2 tones in a grid
and viewing that as points on a Mobius strip.

http://dmitri.tymoczko.com/
pasky
Dies in gote
Posts: 43
Joined: Wed Apr 21, 2010 6:49 am
Has thanked: 4 times
Been thanked: 22 times

Re: generating sound based on the patterns in the game of go

Post by pasky »

If anyone wants to do any actual programming in this area, I would recommend determining the sound of the pattern simply by its "play likelihood". Many strong programs use patterns simply based on how likely are they to be played in the next move if they are available on the board. Patterns of good moves rank high, patterns of bad moves rank low. To have this adapt well to unusual situations, it's important to have variable pattern size and then match the pattern as big as you have in your database.

To push in a shameless plug, in Pachi, all this pattern matching infrastructure is already available, both for pattern matching in SGF record of games and with easily processable Pattern databases in text file format. A skilled UNIX user could process the database as needed and call Pachi to process game records purely using shell scripting. :) I think it's possible to figure it all out from existing documentation and scripts distributed with Pachi, but feel free to get in touch with me via email if you are serious about this.

(This might actually be extremely fun machine learning project if anyone got more serious about reaching highest quality possible, e.g. if you look for university assignment ideas! Learn "pleasant" accord/tone sequences from a body of music note records e.g. by building an HMM, build an HMM of "good" move sequences from a body of pro games, then match up these two using a maximum likelihood estimator so that pro games will make nice-to-hear sounds, then run that on random KGS game records and enjoy.)
Go programmer and researcher: http://pasky.or.cz/~pasky/go/
EGF 1921, KGS ~1d and getting weaker
Post Reply