Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Does anybody know the algorithm for generation of all possible moves ?

Author: KarinsDad

Date: 00:31:31 02/08/00

Go up one level in this thread


On February 07, 2000 at 21:02:39, leonid wrote:

[snip]
>
>Thanks for explanation! Was very curious for me to see your way of writing the
>logic and impress me by its difference.
>
>I don't use the bitboard or look up table. Everything goes after stright and
>"simple logic" that we usually use in all kind of games. It could be that your
>way is more efficent.
>
>Leonid.

Who can tell?

One thing I do to speed it up is to calculate all of the main bitboards (white
and black rows, columns, and diagonals) from the previous position's bitboards.
This means that I only have to figure out how the start location of a piece move
affects the bitboards (i.e. clears a bit in 4 bytes) and how the end location of
a piece move affects the bitboards (i.e. sets a bit in 4 bytes and clears a bit
in 4 bytes for the other color). Note: an EP move is slightly different, it
affects the bitboards by clearing the bit of the pawn being captured (in 4
bitboards) in a different location in the other color bitboards.

I haven't profiled this, but I think it is a significant savings over taking
every piece and setting a bit in 4 bitboards as to it's location.

KarinsDad :)



This page took 0.01 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.