Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Peter Drake
What a timely thread! I've reimplemented Łukasz Lew's libego in Java for the latest edition of Orego. It includes something of an explanation of the data structures. I believe the code itself is relatively clear. The goodies are here: http://www.lclark.edu/~drake/go/ Enjoy! Peter Drake

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Jason House
Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains. Is there any mechanism to avoid this problem in the play of the bot? I'll have to think more

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Peter Drake
On Jul 20, 2007, at 7:23 AM, Jason House wrote: Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains. Is there any mechanism to avoid this problem

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Jason House
On 7/20/07, Peter Drake [EMAIL PROTECTED] wrote: On Jul 20, 2007, at 7:23 AM, Jason House wrote: Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains.

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Peter Drake
On Jul 20, 2007, at 8:04 AM, Jason House wrote: I thought he was using the disjoint set! I'll recheck. Well written disjoint sets average out to nearly O(1) operations for everything. Yes -- O(log* n) to be precise, as mentioned in my book, shameless plugData Structures and Algorithms

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Jason House
On 7/20/07, Peter Drake [EMAIL PROTECTED] wrote: On Jul 20, 2007, at 8:04 AM, Jason House wrote: I thought he was using the disjoint set! I'll recheck. Well written disjoint sets average out to nearly O(1) operations for everything. Yes -- O(log* n) to be precise, as mentioned in my

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Peter Drake
Yes: log* is to log what log is to division. In other words, it's the number of times you have to take a logarithm before you get down to 1. It's an extremely slowly-growing function. It's conceivable that actual, empirical time is a better metric than asymptotic time here, because we're

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Richard J. Lorentz
Peter Drake wrote: On Jul 20, 2007, at 8:04 AM, Jason House wrote: I thought he was using the disjoint set! I'll recheck. Well written disjoint sets average out to nearly O(1) operations for everything. Yes -- O(log* n) to be precise, ... At the risk of being accused of serious

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Peter Drake
It looks like you're right -- but I did say O (rather than THETA), so I'm also technically correct. :-) Peter Drake http://www.lclark.edu/~drake/ On Jul 20, 2007, at 9:15 AM, Richard J. Lorentz wrote: Peter Drake wrote: On Jul 20, 2007, at 8:04 AM, Jason House wrote: I thought he was

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Ian Osgood
On Jul 20, 2007, at 8:04 AM, Jason House wrote: On 7/20/07, Peter Drake [EMAIL PROTECTED] wrote: On Jul 20, 2007, at 7:23 AM, Jason House wrote: Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread forrestc
Jason House said: Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains. Is there any mechanism to avoid this problem in the play of the bot? Eye

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Jason House
On 7/20/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Jason House said: Thanks for the documentation. I have a few questions. Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains. Is there any

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Andrés Domínguez
2007/7/20, Ian Osgood [EMAIL PROTECTED]: Looking at only the four neighbors to detect eye-like points seems like it could leave many false eyes and allow captures of dangling chains. Is there any mechanism to avoid this problem in the play of the bot? It does also look at the diagonals; see

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Ian Osgood
On Jul 20, 2007, at 2:25 PM, Andrés Domínguez wrote: 2007/7/20, Ian Osgood [EMAIL PROTECTED]: My program disallows playing in eyes (string of empty surrounded by self) unless a neighboring stone is in atari. That catches your special- case, but is not good for saving tails (strings

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread terry mcintyre
From: Ian Osgood [EMAIL PROTECTED] On Jul 20, 2007, at 2:25 PM, Andrés Domínguez wrote: 2007/7/20, Ian Osgood [EMAIL PROTECTED]: My program disallows playing in eyes (string of empty surrounded by self) unless a neighboring stone is in atari. That catches your special- case, but is not

Re: Fast data structures explained! (was Re: [computer-go] Go datastructures)

2007-07-20 Thread Ian Osgood
On Jul 20, 2007, at 12:10 PM, Jason House wrote: That's essentially the best that I came up with. Since bit board operations on 19x19 are slow... They are not necessarily slower than on smaller boards if you store only non-zero portions of your bitmaps along with the start and end