Evolution of a Go program

About the development of Moyo Go Studio, software to (help) play the Oriental game of Go. Go is a two-player zero-sum game of perfect information. It is considered much harder than Chess. Currently, in spite of enormous effort expended, no computer program plays it above the level of a beginner.

Tuesday, December 05, 2006

Kama The Devadasi

If you ever are in London and you would like to receive some spiritual love, you should contact Kama:

http://www.kamaofkingston.com/home.html

I write about her because some trouble she faces is identical to mine. We have a lot in common:

- We both turned our hobby into our profession

- We both are a class apart at what we do

- We both put ethics above money (she has a Flash animation saying she does not welcome Republicans and I don't make a secret of my thoughts on sales-sensitive subjects either)

- We both have something unique on offer: Kama is perhaps the only person in the Western world able to perform the 10th Position of the Perfumed Garden in full suspension, and Moyo Go's unique pattern system is just about as enjoyable I guess.

But what really got my attention (this is how I found her site) is how she is subjected to similar attacks by competitors and wannabees. The wildest allegations about her have surfaced. She would be a pimped slave. She would not pay tax. She would not exist at all but she would be a "team". People harassed her on every forum she ventilated her opinion about politics and/or her profession (I haven't met her but according to her she offers actual, religious-inspired love/sex).

To sum it up: She was a threat, and her competitors and some potential customers not able/prepared (financially) to enjoy her service lashed out to her at all fronts, including threats, slander, harassment and censorship. Those she had offended by being against the US administration might have joined in as well.

Harrassment broken down in five categories:

"FINANCIAL"

Kama: Competitors losing market share,

Moyo:
Competitors losing market share.

"FRUSTRATION"

Kama: Men who want to spend time with her but can't afford it,

Moyo:
Go players who want to have Moyo Go but can't afford it or it doesn't run on their OS.

"EGO"

Kama: US Republicans she has offended by saying she won't sleep with them,

Moyo:
Java/C++/Linux/Mac users, Polish/Canadians/etc. who felt personally offended when I made general remarks about resp. their language/country.

"ENVY"

Kama: Envious women who secretly admire her independence and wouldn't object to making the kind of money she makes,

Moyo: Envious programmers who tried to set up a Go software company as I did, but failed. Or they never even tried it and now they feel it's too late.

"ELITARIANISM"

Kama: Racists, telling her to go back to India,

Moyo: Go players, telling me to become strong at Go or shut up, lose all hope and disappear.

Rich Text & Audio in Publishing

This morning, in bed, I realized that I forgot to do the Rich Text publishing part. This is non-trivial! Because images need to be scaled in an acceptable manner (you can't use Windows' BitBlt, it would look like crap).

So the "Rich Text" feature in Moyo Go Studio is both a curse and a blessing. The curse-part is the fact that everything that works with text also has to work with RTF, but the blessing-part is that spectacular output becomes possible.

In fact, Publishing is the "killer app" for Rich Text in Moyo Go. Because OK, you can put a picture of your favorite pro in his kifu, but it's really cool if you then can FTP the HTML to your website with Moyo Go so that everyone can see it.

Even more interesting: Publishing audio Go lessons that are simple HTML + MP3! You record an audio Go lesson in Moyo Go, publish the game to web and the sound will be converted to links to MP3/WAV files.

I coded the GUI part already:

Monday, December 04, 2006

Publishing Progress

A rec.games.go terror-gang member commented recently on the progress report for publishing that showed proper working columnization in any format with dummy diagrams with: "It is clear that you are not a Go player, otherwise your diagrams would have looked better".

:-)

Perhaps when I get older/take more meds, I will be able to ignore such stuff. Are such folks intentionally evil, or merely stupid?

In any case - rest assured that Publishing is on track, rec.games.go unsubscribed, and I'm finished translating David Mitchell's functional spec into a GUI. He makes a lot of Go diagrams and his wishlist is pretty comprehensive.

Basically, everything imaginable in the diagram should be configurable. It's a kazillion of options that I could barely fit on eight tabs. And I made the dialog box 800x600 to be able to do even that.

David is a Kifu publishing expert, is familiar with most of the the main Go software for publishing/printing and he has made clear what he wants to see in the "perfect" publishing module. It's a multi-page document with multi-page addendums in aswer to my questions. I will do my best to implement as much as I can for a first version, and he will be my beta-tester.

Several days went into designing a GUI that could present the large number of options to the user in the clearest possible way. I had to re-do a lot during the process. The image presented here shows how the user drags & drops items above or below a diagram, like title or move range.

In the "Fonts" section, every part of a Kifu has its own font name, -attributes and text alignment.

What's left is a bunch of coding here & there, mainly fixing some more bugs in the rendering engine and then greatly expanding the "diagram" class I already use to display board positions.

If I want to add variable diagram positioning, I'd also have to do some tricky coding in the rendering engine, so I might leave that until I roll out the first version. Attacks on me on rec.games.go have delayed me for a few days, and the work involved in suing David Windsor for slander and defamation will add to the delay, but I still think I can have a working version before the end of the year.

It would speed up my development time if more of my customers would assertively respond to allegations of theft, lies, professional incompetency etc. directed at me. I appreciate that a lot. If just a couple of my customers would do that, I wouldn't even bother to respond any more to the trolls there and I find myself more relaxed and able to produce new -free- features at a much faster pace.

Hi-Tec Envelopes

I am going to the postoffice now, mailing these four MoyoGo's here that have accrued over the weekend. I prefer to deliver them personally than to walk to the mailbox at the bottom of the hill (although I should, for excercise's sake..) Call me paranoid, but once a batch of similar size got lost after I'd put it in a mailbox (downtown, now I live in the woods) and since then I always bring them to the postoffice myself.

A while ago I bought 500 special foam envelopes, much firmer than ordinary bubble envelopes. An added advantage is that I can write directly on the white envelope without danger of puncturing it.

Since I am using these envelopes, the occasional reports of damaged DVD's have ceased.

Friday, December 01, 2006

Interactive Go Maps: Art, Not Science

http://canut-ki-in.jeudego.org/simulation_influence/ has a beautiful "influence simulator" and quite a few people asked me: "Why don't you put something like that in Moyo Go"? Well.. Because I'm a computer-Go scientist, not an artist :-)

I want to make it clear that I have great respect for the programmer of this stunningly beautiful display, and I'm sure the algorithms used are not simple at all. Yet, it does not appear to be a genuine influence simulator, more a kind of "Go art" or perhaps the programmer's own interpretation of "influence".

Because "influence" in comp. Go terms is not something subjective, or something "beautiful", no, we design influence functions and measure their performance with tens of thousands of end positions of pro games and keep tuning those functions until they give the most accurate estimation of territory and influence (which is more subjective). Territory is subjective as well, but the abberations average eachother out so we can establish accurate performance parameters for our influence functions.

Take this example of influence maps.
(note that there are five shades of beige in this diagram, and that therefore black has large influence at Tengen- the very darkest/lightest area's are "very strong influence" points and that simply is too speculative to be of any use, for Tengen).
In computer Go, the sub-problem of "influence" has been quite nicely solved by Bruno Bouzy, who has published several papers on his method.

Both Bouzy's and David Fotland's (of Many Faces of Go fame) influence functions "bounce" influence off the edges of the board and let the "wavefronts" combine. This is visible in the lower right corner of Moyo Go's example (right), but not in the "interactive Go map" on the left because a much simpler, more inaccurate algorithm is used that does not even take Manhattan distances into account. The purpose of Interactive Go maps appears to test and present Go-concept ideas in an esthetical manner, without laying claim to being "accurate".

And there are more things that are sub-optimal in the example on the left. Look at those white stones in the lower right. They project quite some influence leftward, but in the Interactive Go map there is nothing! Moyo Go's influence graph around Tengen is a large diamond, whereas in the Interactive Go MAps exapmple, it's a square. A diamond is the accurate form, because Go stones connect in a horizontal/vertical manner.

The analogy Go stones = magnets goes a long way, but in the end, Go stones in a Go position are not magnets and more realistic algorithms need to be employed to predict likely territory and influence, especially in more complex positions.

Let the Interactive Go maps be pretty, and let Moyo Go's influence maps be as accurate as possible. No effort has obviously been spared to make those maps as pleasing to the eye as possible, while I read my way through a pile of state-of-the art research in influence algorithms. The Bouzy algorithm remains unbeaten, but I found a way to greatly speed it up and get almost the same (or better?) results. Rest assured that although it doesn't look as good as the Interactive Go maps, no efforts have been spared to make them as useful as possible, and not merely good-looking.