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

Re: computer-go: What makes a ladder



Njoroge" <Njoroge@xxxxxxxxxxxxxxxxx> wrote:
> If a human reads out a ladder they can eventually determine whether a
> capture can be made or not.  Following this rationale I see no reason why a
> computer cannot do the same.  

To see a real life example in C, go to
http://www.gnu.org/software/gnugo/devel.html, download a recent
version (e.g. 2.7.217), unpack it and look in the file
engine/reading.c.  Look especially at the two functions attack2() and
defend1(), which try to attack a string with two liberties and defend
a string with one liberty respectively.  This is exactly what happens
in a ladder.

Granted, the code is not simple since it not only handles ladders but
all type of tactical reading.  It is also further obscured by speedups
such as hash table searches and the like.  But you should at least be
able to see what is going on.  

Kind regards,

Inge Wallin
Member of the GNU Go team