On Thu, 2007-05-31 at 12:44 +0100, Jacques Basaldúa wrote:
> I keep 81 different asm functions for each possible mapping of the
> borders

I had a really fast all-at-once move generator for chess that worked
like this.

For each piece type of each color on each square was a separate move
generator.
That's 64x6x2 different functions.   

The advantage was that almost all conditional branching was done away
with. Didn't have to test whether a pawn was on the second rank, seventh
rank, on the edge of the board, etc.   Further advantage is that use
constants instead of variables which was faster on the processors being
used back then (and I think still is.)

This requires (for sanity sake) to write a code generator - a special
program that wrote the code.    If you wrote 768 routines by hand you
would be fighting bugs forever.  

This code was really fast back then, but it proved not to be very
efficient on later generation processors.   The concept was good but
this blew out the cache of the machines and it was very odd that it
either was super fast or super slow depending on the computer you
compiled and ran it on.  

Eventually this wasn't even feasible because the program got more
sophisticated and it was spending less and less time on move generation
anyway.

But for something like analyzing the neighborhood around a point this
could be a big win. 

- Don



_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to