Re: [computer-go] representing liberties

2009-08-15 Thread Don Dailey
2009/8/15 Jason House jason.james.ho...@gmail.com On Aug 14, 2009, at 11:02 PM, David Fotland fotl...@smart-games.com wrote: Moves often merge two groups. I count liberties incrementally as I make moves, so no need to search to count. How do you detect shared libreties to avoid double

Re: [computer-go] representing liberties

2009-08-15 Thread Jason House
On Aug 15, 2009, at 8:22 AM, Don Dailey dailey@gmail.com wrote: 2009/8/15 Jason House jason.james.ho...@gmail.com On Aug 14, 2009, at 11:02 PM, David Fotland fotl...@smart- games.com wrote: Moves often merge two groups. I count liberties incrementally as I make moves, so no need to

Re: [computer-go] representing liberties

2009-08-15 Thread Don Dailey
My code ignored this problem, I didn't know you were talking about merges.In my code I simply recomputed the liberty count when there was a merge. I'm not convinced all of this is worthwhile, especially when you keep adding more data structure. Also, it seems like modern processors favor

Re: [computer-go] representing liberties

2009-08-15 Thread Petr Baudis
On Sat, Aug 15, 2009 at 08:33:31AM -0400, Jason House wrote: On Aug 15, 2009, at 8:22 AM, Don Dailey dailey@gmail.com wrote: 2009/8/15 Jason House jason.james.ho...@gmail.com On Aug 14, 2009, at 11:02 PM, David Fotland fotl...@smart- games.com wrote: Moves often merge two groups.

RE: [computer-go] representing liberties

2009-08-15 Thread David Fotland
: Saturday, August 15, 2009 2:07 AM To: computer-go Subject: Re: [computer-go] representing liberties Thanks both. I guess reading over my message it was a bit ambiguous since I could have meant either liberty counts i.e.. |liberty| or the actual contents of the liberty set. I actually meant

Re: [computer-go] representing liberties

2009-08-15 Thread wing
for example? --- On Fri, 8/14/09, Don Dailey dailey@gmail.com wrote: From: Don Dailey dailey@gmail.com Subject: Re: [computer-go] representing liberties To: computer-go computer-go@computer-go.org Date: Friday, August 14, 2009, 2:33 PM

RE: [computer-go] representing liberties

2009-08-15 Thread David Fotland
dailey@gmail.com Subject: Re: [computer-go] representing liberties To: computer-go computer-go@computer-go.org Date: Friday, August 14, 2009, 6:16 PM I'm not sure I understand your question.   But I'll try to explain it a little better. Basically, you keep a C structure

Re: [computer-go] representing liberties

2009-08-15 Thread Heikki Levanto
On Sat, Aug 15, 2009 at 10:03:11AM -0600, w...@swcp.com wrote: There are many ways to track the liberties of a chain And there are many different implementations of each: * none * count pseudo liberties * simple count * do count, sum, and sum squared, which can detect atari * array

Re: [computer-go] representing liberties

2009-08-15 Thread Mark Boon
On Aug 15, 2009, at 6:24 AM, Heikki Levanto wrote: You can also use board-sized bitmaps. Merging is a trivial OR operation. I've seen bit-maps mentioned many times, but is there any evidence it's faster than a 'traditional' implementation? Mark

Re: [computer-go] representing liberties

2009-08-15 Thread wing
I tested bit maps in the cgbg framework, and they perform slower than other techniques. However, I wrote the code in C which does not use the built-in hardware bit tests and sets nor use SIMD to merge or clear sets. If you do it in assembler, bitmaps might work much better. There are various ways

Re: [computer-go] representing liberties

2009-08-15 Thread Carter Cheng
bits I cannot think of any techniques to do this quickly. --- On Sat, 8/15/09, w...@swcp.com w...@swcp.com wrote: From: w...@swcp.com w...@swcp.com Subject: Re: [computer-go] representing liberties To: computer-go computer-go@computer-go.org Date: Saturday, August 15, 2009, 10:54 AM I tested

Re: [computer-go] representing liberties

2009-08-15 Thread wing
techniques to do this quickly. --- On Sat, 8/15/09, w...@swcp.com w...@swcp.com wrote: From: w...@swcp.com w...@swcp.com Subject: Re: [computer-go] representing liberties To: computer-go computer-go@computer-go.org Date: Saturday, August 15, 2009, 10:54 AM I tested bit maps in the cgbg framework

Re: [computer-go] representing liberties

2009-08-15 Thread Mark Boon
On Aug 15, 2009, at 8:52 AM, w...@swcp.com w...@swcp.com wrote: You will just have to jump in and read some code or write your own to fully understand. I recommend reading the gnugo source, which is pretty darn good. But that's exactly the kind of work you'd want to avoid if there's no

Re: [computer-go] representing liberties

2009-08-14 Thread Don Dailey
On Fri, Aug 14, 2009 at 5:13 PM, Carter Cheng carter_ch...@yahoo.comwrote: I have been having difficulties selecting a good representation for liberty sets for strings of stones. I am curious how other people might be doing this. I suspect that for heavier playouts one would like to know not

Re: [computer-go] representing liberties

2009-08-14 Thread Carter Cheng
: Don Dailey dailey@gmail.com Subject: Re: [computer-go] representing liberties To: computer-go computer-go@computer-go.org Date: Friday, August 14, 2009, 2:33 PM On Fri, Aug 14, 2009 at 5:13 PM, Carter Cheng carter_ch...@yahoo.com wrote: I have been having difficulties selecting

Re: [computer-go] representing liberties

2009-08-14 Thread Don Dailey
doing it to have some method of liberty counting + a exhaustive search to determine the last two liberties for example? --- On Fri, 8/14/09, Don Dailey dailey@gmail.com wrote: From: Don Dailey dailey@gmail.com Subject: Re: [computer-go] representing liberties To: computer-go

RE: [computer-go] representing liberties

2009-08-14 Thread David Fotland
From: computer-go-boun...@computer-go.org [mailto:computer-go-boun...@computer-go.org] On Behalf Of Don Dailey Sent: Friday, August 14, 2009 6:17 PM To: computer-go Subject: Re: [computer-go] representing liberties I'm not sure I understand your question. But I'll try to explain it a little

RE: [computer-go] representing liberties

2009-08-14 Thread David Fotland
Old Many Faces keeps linked lists of liberties for each group. They are sorted, singly linked lists, so merges are fast. The new UCT code does not track liberties, just keeps a count, so to find a liberty takes a search over the points adjacent to the group. The stones in each group are in a

Re: [computer-go] representing liberties

2009-08-14 Thread Don Dailey
Of *Don Dailey *Sent:* Friday, August 14, 2009 6:17 PM *To:* computer-go *Subject:* Re: [computer-go] representing liberties I'm not sure I understand your question. But I'll try to explain it a little better. Basically, you keep a C structure or the equivalent which tracks each

Re: [computer-go] representing liberties

2009-08-14 Thread Don Dailey
On Fri, Aug 14, 2009 at 9:51 PM, David Fotland fotl...@smart-games.comwrote: Old Many Faces keeps linked lists of liberties for each group. They are sorted, singly linked lists, so merges are fast. Yes, I can see that merges would be really fast with linked lists. Are they common enough to

RE: [computer-go] representing liberties

2009-08-14 Thread David Fotland
multiplies were much slower than adds back then. From: computer-go-boun...@computer-go.org [mailto:computer-go-boun...@computer-go.org] On Behalf Of Don Dailey Sent: Friday, August 14, 2009 7:21 PM To: computer-go Subject: Re: [computer-go] representing liberties On Fri, Aug 14, 2009