Re: Chess boards & connections.




Michael Stemper wrote:
In article <1145555339.841442.203250@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>, dynamics writes:
Trying to calculate if I can write a Chess AI.

I need to define all possible boards.

I have a total of 64 different pieces, 16 for Black
and 16 for White to start, and since each pawn
can be promoted, to either a Queen or Knight, a

They can't be promoted to a bishop or a rook?

further 16 for B&W's 8 pawns for another 32.

There are 65 locations on the board, 8*8 + 1 for
non-existance called the side bar.

So I dimension an Array, (64,65) where the 64
provides the *serial number* for all possible
pieces and each of those can be in 65 locations,
providing 64*65=4160 boards.

Nope.

Place the first of the 64 pieces. How many choices for a square do
you have? 65. Now, for each of those possibilities, you have 64 choices
for placing the second piece. [...]

Not if the first piece is placed off the board! Then there are 65
possibilities for the second piece.

--- Christopher Heckman

.