Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How do you internally store binary board positions in the minimum space?

Author: Charles L. Williams

Date: 15:13:10 05/14/99

Go up one level in this thread


On May 14, 1999 at 18:11:04, Charles L. Williams wrote:

>On May 14, 1999 at 17:10:38, KarinsDad wrote:
>
>>On May 14, 1999 at 15:21:57, Dann Corbit wrote:
>>
>>>0:
>>>Title says it all.  What binary format does your program use when you want to
>>>store a board position in the smallest space possible?
>>
>>Without thinking about it alot, here is my first cut (my program does not do
>>this yet):
>>
>>10 bits for side to move, en passant possible, en passant to square (4 bits
>>since there are only 16 legal squares for this), white kingside castle possible,
>>white queenside castle possible), black kingside castle possible, black
>>queenside castle possible (note: for a program, it may be better to know if a
>>rook moved and if the king moved, but you save 2 bits without that info here)
>>
>
>
>The en passant can be reduced to three bits because you already have the side to
>move.  The three bits represent the file.
>
>My program doesn't do any of this either.
>
>
>Chuck
>
>
><snipped>


Sorry, KarinsDad.  I just read your followup.  I think we may be posting here
nearly simultaneously.

Chuck



This page took 0 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.