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.

Thursday, November 30, 2006

November Sales

In 2005 I sold 30 copies in November, and this month it's 22.

This is not at all bad, because last time I sold most of those 30 due to a row that AGA - The American Go Association - started with a malicious "review" of my software, that spurned about fifteen people (mostly Americans) to purchase it out of sheer disgust with the article. All in a couple of days, so that I ran out of bubble envelopes and stamps. The AGA folks that run their website and newsletter have a financial stake in competing Go software, hence the shameless "review".

I go into detail because I noticed that quite a number of μISV regulars from Joel Spolsky's site occasionaly visit here because I'm the archetypal μISV: A one-man shop, starting from scratch, doing everything himself and able to make a living from it if he would live in a cheaper country.. And there are few things more interesting for the small independent software vendor than comparing sales figures.

My competitors will see these figures too, but I consider it part of the psychological warfare. The enemy plays a much dirtier game than handing over their trade secrets like I've done regularly. They make up lies and put them on their sites. PsyOps message: Don't forget that I don't play Go above beginner level and my software is, in terms of Go software sales in general, selling like hot cakes. 2007 is scheduled for major R&D, which includes regular Go lessons from a teacher and play on a Go server, so I will get stronger at Go and learn all principles needed for the next step: A full-fledged Go playing program. You ain't seen nuthin' yet!

Go software in the West is a niche, and for those who didn't know yet - my software is in the unique position of being boycotted by most major Western Go websites and retailers due to the disproportionate power the "old boy network" has, an established order of - mostly millionaires - who monopolized the world's Go games under the banner of "ethical game ownership". Of course this is totally bogus - all they do is fight hand and nail to protect their business interests, and anything goes.

The remarkable collusion in this little Western Go world is something to think about, to contemplate. Will it be the same in South-East Asia? That is my main (potential) market.

So far, I think not much can go wrong when I will introduce my software in SE Asia. For the most part, those who have been vilifying/attacking my software here due to the threat it poses to their bottom line are either unknown or despised there.

Of course there will be repercussions to the actions of the GoGoD/MasterGo/SmartGo kartel. If I ever manage to write the world's strongest Go program (and I really think I will be able to, and in a reasonable time as well), then one of my criteria to any dealers in SE Asia will be that they do not carry the aforementioned products. This would only be fair, seen how those three effectively interfered with me advertizing, getting retailed and sponsoring Go tournaments.

Revenge is sweet - patience is a virtue, who laughs last laughs best and that what not kills me, makes me stronger.

Labels: ,

Tuesday, November 28, 2006

Christmas Tree Kifu's

A while ago, someone on GoDiscussions.com showed a kifu he found somewhere on the web and wondered where he could find software that could make such kifu's.

The diagram in his example was a little work of art: Many font sizes, alignments and even font colors. In spite of the season, I do not want to encourage "Christmas tree kifu's" but the user should be able to specify alignment, font attributes and color for various parts of the published material and included kifu's, so I cooked up this monster:


I discovered more bugs in the PDF output module I purchased the sources to: Italic doesn't work properly in RTF, the last character is cut off because the bounding box is too narrow. In PDF, italics don't work at all. Thank heaven I have the source at this advanced stage!

Labels: ,

Monday, November 27, 2006

Influence

A year or so ago, I spent a lot of time designing an influence/territory function that worked differently than the classical Bouzy map. The disadvantage of a Bouzy map is that it requires quite some calculations.

My solution is incremental (I can do delta-updates to the territory/influence map) and does not require multiple "passes". So it's very fast.

I have just added it to the update.exe and this is how it looks:



It's most useful at the Fuseki/Joseki stage, because life & death is not yet taken into account.

Labels: ,

Tuesday, November 21, 2006

PowerPoint, Excel, XML and DOC

My current report generator is lousy in producing editing-friendly RTF/DOC, so I evaluated five more PDF2RTF solutions, none of which satsified my demands bar one, and that one had two showstopper bugs. It's also the most expensive but I am very impressed.

I notified them of the bugs and suggested they were trivial to fix and they mailed back within 24 hours with their acknowledgement! They would have a fix ready the next day or so, which means I'm now ordering their software for embedding into Moyo Go, as soon as as I have their confirmation that redistribution as an embedded app is OK.

Their solution also properly supports Excel and Powerpoint and even XML for maximum flexibility, so this would mean that Moyo Go will be able to make powerpoint presentations and Excel spreadsheets and produce Word documents that are compatible with OpenOffice. Thirteen major formats is a good start ;-)

So it will be DOC, EMF, EPS, HTML, PDF, PNG, PPT, PS, RTF, SVG, TIFF, XLS and XML. And not half-assed, shitty-rendered, nasty-looking, often-crashing either, but stable, fast, high-quality, exactly-what-you-would-expect output, tried and tested and every single output format looking identical to the other, including page margins, CJK fonts and images. This is another reason why it's taking so long. And - I want to bet you a free copy that AGA will not publish an independent review of this rather spectacular publishing module, or, if they do, they'll crush it into the ground :-)

And yes, the HTML publishing will FTP your games straight to your website!

Friday, November 17, 2006

Find The Differences

This game was played on January 7, 1935 between Tainaka Shin [W] and Takagawa Kaku [B].



..or was it this game:



GoBase does not have this game in its repository. It makes you wonder where those guys get the guts, telling me I am stealing "their" games, while in the end it is I who have, with the help of many others, collected and normalized a pro database that has more than 12,000 games than GoBase or GoGoD or SmartGo or MasterGo or anyone else except perhaps the Nihon Kiin, but they haven't romanized their collection and besides, their collection is zealously guarded.

So Gobase has zilch, zippo, and I have two versions of it. Makes you wonder how serious those game monopoly dudes are, it's a game from 1935 for crying out loud!

Could anyone shine a light on which game has been entered incorrectly so I can remove the erroneous duplicate? The second one looks suspicous to me..

(Thanks to Bob Felice for pointing this out)