[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [computer-go] Chains and liberties
Peter,
> The bit vector representation does allow for efficient representation
> of mathematical morphology operations. Specifically, to find the
> liberties of a block, we just:
> 1) Find the set of points adjacent to the block (with shift
> operations), then,
> 2) Take the intersection of this set with the set of vacant points
> (with bitwise AND operations).
If 32-bits for each row, you are not explaining how you get liberties
above and below the block, only to the right and left. (I assume you
do it the most obvious way.)
For fast tactical searching, you also want to know how many liberties
are involved and have a very fast way to identify them, one at a time
(not just as another bit vector.)
You can get a set of ALL liberties this way, but how do you get just a
set of liberties for a specified block without a lot of dilate type of
calculations? In other words, can you quickly get a bit vector of all
2 liberty or less groups? Do you maintain a separate list of vectors,
one for each block?
It's not so easy to count liberties fast. You can break up the bit
vector into n bit sections by shifting and do a table lookup, but a
large group might easily require 20 or so of these lookups. How do
you handle that?
I find that I'm always wanting to know:
1. Where each group is.
2. How many liberties each group has.
3. How many stones in each group.
How do you do these things?
- Don
_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://www.computer-go.org/mailman/listinfo/computer-go/