[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] Event-driven programming



Call it what you will, we are doing something very close to what Peter
has asked. But we are not doing any object oriented programming,
just message passing.

We have a cluster of 4 dual processor G4 Macs and a laptop that acts
as a master controller and a pool manager for the other 8 processors.
We use LAM MPI for the communication protocol between the master,
the pool manager, and workers. The workers can also ask for workers,
so a hierarchical tree structure is dynamically grown and pruned at
run time. We will add to the cluster as the need for computing arises,
but have not needed more than 8 processors yet. We will soon.

Our base Go engine is Gnu Go. So far we have only played our MPI
enhanced Gnu Go (with some added logic that Gnu Go does not do
but is based upon nothing but existing Gnu Go function calls) against
standard Gnu Go. Right now we are using v. 3.4.

We are just at the very beginning of getting results, but with a total
increase in computation of about a factor of 70 we split an 8 game
series 4 to 4 when giving a 4 stone handicap. I think we could cut
our computation in half and get the same result, but we have not run
those parameters yet. We are adding a few more logical features
rather than gathering statistics.

We also did a test where we had Gnu Go play at level 15 and the MPI
version use Gnu Go at level 10, and we won 6 out of ten giving a 2
stone handicap. When both use level 10 we won 8 of 10 with the 2
stone handicap. For these two tests our total computation was just
about 100 times that of Gnu Go.

I think we will get better results with far less computation when we
do things more intelligently. As I said, we are just getting started.
These first tests were really just to test our infrastructure. To win
at this stage just adds an element of fun and encouragement.

We will report more as progress of note occurs.

Cheers,
David

On Thursday, January 15, 2004, at 05:27  PM, Thomas Johnson wrote:

I think that you may be confusing event-driven programming with the
subject/observer pattern. Event driven programming is "A kind of
program, such as a graphical user interface, with a main loop which just
waits for events to occur. Each event has an associated handler which is
passed the details of the event, e.g. mouse button 3 pressed at
position" (ref:
http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?event-driven). I may not be
understanding your approach, but I can't think of a program structure
where the main loop of the program sits idle and waits for events.

The subject-observer design pattern, which is described at
http://sern.ucalgary.ca/courses/SENG/609.04/W98/lamsh/observerLib.html
as well as in the classic "Gang of Four" Design Patterns book (Design
Patterns by Gamma, Helm, Johnson, and Vlissides) sounds closer to what
you are describing.

Tom

On Thu, 2004-01-15 at 17:14, Peter Drake wrote:
Is anyone using event-driven programming for Go? (This is a variation
on object-oriented programming where a message can be sent to many
recipients and the sender doesn't have to know who they are.)

The advantage, as I see it, is that various entities (pattern matchers,
miai, groups, connections) can listen to only the board points that
interest them. When a play is made, only the interested parties are
updated.

There are some interesting low-level programming challenges, and we'll
also have to be careful to do just the right amount of propagation...

Peter Drake
Assistant Professor of Computer Science
Lewis & Clark College
http://www.lclark.edu/~drake/

_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go
--
Thomas Johnson <thomas_johnson@xxxxxxxxxxxxxxxxx>
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go

_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go