On Nov 13, 2007 4:05 PM, Jason House <[EMAIL PROTECTED]> wrote:
>
>
>
> On Nov 13, 2007 3:57 PM, Petr Baudis <[EMAIL PROTECTED]> wrote:
> >
> > On Tue, Nov 13, 2007 at 03:32:03PM -0500, John Tromp wrote:
> > > On Nov 13, 2007 2:48 PM, Petr Baudis <[EMAIL PROTECTED]> wrote:
> > >
> > > > I'm now somewhat torn. The speedup from using pseudo-liberty counts
> > > > could be huge, estimating from my profiling. On the other hand, it
> would
> > > > be very useful to still be able to quickly check if a group is in
> atari
> > > > - it looks like if atari stones would get special attention during the
> > > > random games, that could make the bot a lot stronger.
> > > >
> > > > Is there any known way to get the best of the both worlds? :-)
> > >
> > > Yes, you can generalize pseudoliberties by extending them
> > > with another field, such that if the (summed) pseudoliberty field
> > > is between 1 and 4, then the other (summed) field will tell you if all
> these
> > > are coming from a single true liberty.
> >
> > Wow, that's great idea! I was trying to think along these lines but
> > realized the implementation only after reading what you wrote.
> >
> > I guess you mean something in the spirit of:
> >
> >        group.xyzzy = 0
> >
> >        add_liberty(group, coord)
> >                group.xyzzy += as_int(coord)
> >
> >        remove_liberty(group, coord)
> >                group.xyzzy -= as_int(coord)
> >
> >        in_atari(group)
> >                group.pseudlibs <= 4 && is_liberty(group, as_coord(
> group.xyzzy))
>
> You're right, that would work.
>
> PS: I think that last one should be:
> group.pseudlibs <= 4 && is_liberty(group,
> as_coord(group.xyzzy/group.pseudlibs))

I definitely understand the idea now, and it looks very good. However
this implementation could break:

Say we have pseudoliberties at intersections: 99,100,101. We sum those
up to get 300, divide by the number of pseudoliberties - 3, get back
100, check to see if 100 is a  liberty, and since it is we conclude
that we have one liberty at intersection 100 that we counted three
times, and hence our string is in atari.
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to