Mailbox info

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

Mailbox info

Postby Anonymous » 08 May 2005, 22:59

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.
Anonymous
 

Re: Mailbox info

Postby Richard Pijl » 08 May 2005, 23:13

Checkout the TSCP sourcecode:
http://home.comcast.net/~tckerrigan/
User avatar
Richard Pijl
 
Posts: 105
Joined: 26 Sep 2004, 21:09
Location: Minderhout, Belgium

Re: Mailbox info

Postby Anonymous » 09 May 2005, 08:45

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.
Anonymous
 

Re: Mailbox info

Postby Guest » 14 May 2005, 07:00

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
Guest
 


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 9 guests