[computer-go] Rotate the dog or the tail?

Chrilly c.donninger at wavenet.at
Sat Jun 17 21:47:11 PDT 2006



Many faces spends very little time on pattern matching, perhaps 2 percent,
since it is only used for full board move generation.  Tactical move
generation is all hand crafted C decagons trees.

What is a decagons tree?

When the pattern code was written the whole program still had to fit in 600
KB to run under DOS, before Windows 95 existed :(  So memory usage for
patterns was critical.  That's why the joseki database was encoded in about
10 bits per move.

It was even worse. One had 600KB, but a single data entity had to be smaller 
than 64KB.  There was no cache, no super-pipeline.... The rules of the 
programming game were different.
I would also not change a running pattern-code, because it is a lot of work 
and any change introduces new bugs. But if one designs from scratch one 
should start from todays hardware resources.

I don't lose any performance for being memory efficient.  It just means
keeping 8 copies of the board bitmap.  Updating the board bitmap when a move
is made takes no time.

But then you have to build up the pattern-area around a point from these 
bitmaps.
Something like:
Shft=ShiftValue[point];
Pattern=((BitMap[BitVectorIndex[point]]>>Shft)&PATTERNMSK) |(( 
(BitMap[BitVectorIndex[point+ROW_OFFSET]>>Shift)&PATTERNMSK)<<ROW1_SHFT).....


Mark Boon did a different approach. He maintained for every point the 3x25 
area. In this case updating the info is not for free. One saves the 
operation above - unless there is a clever trick to avoid this.

Chrilly



More information about the computer-go mailing list