Page 1 of 1

Mailbox info

PostPosted: 08 May 2005, 22:59
by Anonymous
Hello peeps. :D

Through my searching on the web I've found info on 0x88 and Bitboard representations, but no luck for the mailbox idea. Could someone please post a link or explanation so I can find out about the mailbox board representation.

Thanks in advance.

Re: Mailbox info

PostPosted: 08 May 2005, 23:13
by Richard Pijl
Checkout the TSCP sourcecode:
http://home.comcast.net/~tckerrigan/

Re: Mailbox info

PostPosted: 09 May 2005, 08:45
by Anonymous
Ah, I see. It's the idea of having an extra border of "out of bounds" squares around the board. I just hadn't connected the name with the idea.

Cheers.

Re: Mailbox info

PostPosted: 14 May 2005, 07:00
by Guest
Ah, I see. It's the idea of having an extra border of "out of bounds" squares around the board. I just hadn't connected the name with the idea.


The extra "out of bounds" border, is merely a handy way of implementing a mailbox board representation. It eliminates the need for added code to prevent piece moves which would be off the board.

Mailbox representation consists of using memory locations (usually an array), to represent the squares of the board, and to hold the values of the piece which it may contain. Classic mailbox board programs don't use any "0x..." logic of any kind. The square data is read and or written as needed, by simply accessing the array location.

If you think of a 2 dimension array in a chess program for the board, and compare it to a postal worker sorting mail out at the post office, into a lot of rows and columns of post office boxes, you'll probably best see the similarity. Especially if you can picture the postal sorting out the mail behind a wall of post office boxes which just happened to have 64 boxes, arranged eight boxes high, and eight boxes across, along a wall.

This was the original board representation proposed by Shannon in 1950.

Dave