[computer-go] Rotate the dog or the tail?
Chrilly
c.donninger at wavenet.at
Sun Jun 18 09:06:16 PDT 2006
> Spelling error. Decision tree. Just a bunch of nested if statements.
>
I first thought that it had something to do with "deca", ten. Some very
clever 10-way branching tree.
Thanks for the very interesting information. It is an advantage for
potential competitors to have this information. But in first place you have
slowed down the Suzie development. So far I was happy with my design, but
its very tempting to do it in the Many-Faces and Handtalk way and to
implement the move-pattern also as hardcoded switch-statements. The general
pattern-matching approach seems cleaner, but the hardcoded approach is more
flexible (e.g. one can easily check for additional conditions) and faster.
In Suzie I store only the color of the point and the info about the
8-Adjacent Neigbours in a 32-Bits.
typedef union {
Uint16 Adjacent16;
struct {
Uint8 wAdjacent;
Uint8 bAdjacent;
};
} Adjacent_t;
typedef struct {
Adjacent_t wbAdjacent;
Uint8 LibAdjacent;
Uint8 Stone;
};
The union is only used because its sometimes handy to access the information
about black and white at the same time.
So every stone nows about the state of its 8-Adjacent neighbours. The
information is somewhat redundant, because one would get the Liberty-Pattern
by oring black and white. But its handy to have it directly. And it saves no
space, because the compiler has anyway to pad the struct to 4-Bytes.
I use this 3x3 Tiles directly for pattern matching. One can speed up this,
by storing the OR of 5 Tiles, Center, N,E,S,W. The first match is done with
the OR of the corresponding board-tiles. This gives in most patterns already
in the first compare a mismatch.
Chrilly
More information about the computer-go
mailing list