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)) -- Petr "Pasky" Baudis We don't know who it was that discovered water, but we're pretty sure that it wasn't a fish. -- Marshall McLuhan _______________________________________________ computer-go mailing list computer-go@computer-go.org http://www.computer-go.org/mailman/listinfo/computer-go/