On Dec 19, 2007 10:44 AM, Don Dailey <[EMAIL PROTECTED]> wrote:

> I actually have a routine in Lazarus that rotates a full board.   It's
> called transformBoard() and it takes 2 arguments - a board to rotate and
> a transformation   (0 through 7) and returns a new rotated board.
>
> I don't use it much except for debugging or stuff done at the root,
> because there are faster ways to do things.
>
> I also have a routine called canHash()  which returns a canonical hash
> of the board by trying all 8 transformations and returning the lowest
> valued one.     It is more efficient (but not efficient) because it
> doesn't actually produce a new board - it just builds 8 hashes of the
> board from scratch without touching anything.    This routine is only
> used at the root for storing opening book moves.
>
> You can use zobrist hashing for maintaining all 8 keys incrementally,
> but you probably need a fairly good reason to do so.     Incrementally
> updating of 1 key is almost free, but 8 might be noticeable if you are
> doing it inside a tree search or play-outs.   It depends on how "fat" or
> "lean" your program is.   Even 8 keys may not be noticeable if your
> program does a lot of work at each move (or an end nodes.)    If you are
> not,  then it doesn't really matter how you do it.


It's also possible to select hash keys such that transformations of the
board's key is the same as recomputing the key for a symmetrical board
position.  This will be *much* faster.  I came up with a scheme to do this
and documented it on my website, but haven't actually implemented it yet.

While it was interesting, I just couldn't come up with any uses for it
beyond fuseki and games of mirror go.  While that was appealing, it would
slow down the program and it added a layer of complexity that would either
make debugging tougher or require tossing cached search data when the
opponent plays a symmetric move.
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to