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, January 03, 2006

Eureka! (continued)



The past 24 hours I have been feverishly trying to find a bug in the multiprocessing code (usually, the last 5% of anything non-trivial I make takes 50% of the time).

Even worse, usually I manage to build horrendously complex things without the slightest problem, only to be stumped by an obscure bug in a seemingly insignificant line of code.

The weird thing was that with 4 CPU's harvesting patterns, substantially less patterns were found than with 1 CPU, in spite of using Critical Sections around global data. For the rest, everything worked fine and dandy.

I finally concluded it must be due to some use of global data that I had missed, which turned out to be true. I confess to occasionally using global data with the aim of simplifying the architecture (DoTheSimplestThingThatCanPossiblyWork), but with the advent of multiprocessing, this is even less of a good idea than it already was :)