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

Re: [computer-go] Chains and liberties - performance



On Mon, 15 Nov 2004 09:43:33 -0700, Anders Kierulf <anders@xxxxxxxxxxxxxxxxx> wrote:
> > Here is the data it keeps track of in this time:
> > ...
> > int libs[MAX_LIBERTIES];         /* Coordinates of liberties. */
> > ...
> > Arend
> 
> As far as I understand, GNU Go only keeps track of the liberties up to a
> certain number, not the theoretical maximum possible. Why? You'll have to
> test for the upper limit in a number of places, and recompute the liberties
> if you ever get blocks with more liberties. Is the reduced memory usage seen
> as more important than a small speedup?

It is rare that GNU Go cares about the locations of liberties when
there are a lot of them.  For example, the tactics code never deals
with strings with 5 or more liberties -- it calls them alive.  The owl
code (life and death) uses patterns, and only sometimes (I think --
haven't looked at it recently) uses the libs array.  I'm guessing the
semeai code cares.  The point is that it's quicker to not bother
tracking all liberties, because once there are a lot the program stops
caring directly (for the most part), and so there is no point to
keeping track.

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