[computer-go] rotate board

Álvaro Begué alvaro.begue at gmail.com
Wed Dec 19 02:14:32 PST 2007


On Dec 19, 2007 3:08 AM, Ben Lambrechts <lambrechts.benedictus at gmail.com>
wrote:

> Hi all,
>
> I am planning a fuseki database.
> Now I got the following problem: how to rotate/mirror the board for a
> unique representation.
>
> $$c
> $$ +---------------------------------------+
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . O . . . . . , . . . . . X . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . , . . . . . , . . . . . , . . . |
> $$ | . . . . . . . . . . . . . . . . 5 . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . O . . . . . , . . . . . , . . . |
> $$ | . . . . . . . . . . . . . . . X . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ +---------------------------------------+
>
> $$c
> $$ +---------------------------------------+
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . 5 . . . . . . . . . . |
> $$ | . . X , . . . . . , . . . . . X . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . , . . . . . , . . . . . , . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . O . . . . . , . . . . . O . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ | . . . . . . . . . . . . . . . . . . . |
> $$ +---------------------------------------+
>
> Both are the same board, but has anyone made an algorithm that rotates
> the board or an area of the board in a unique way?
> I don't need the move order, just the "snapshot" of the board.


You can compute all rotated versions of the board (8 of them) and pick the
minimum, in some sense. For instance, you can compare boards
lexicographically, or you can compute a zobrist key and pick the minimum of
that.

Does that help?


Álvaro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://computer-go.org/pipermail/computer-go/attachments/20071219/5fb780ae/attachment.htm


More information about the computer-go mailing list