Computer Chess Club Archives


Search

Terms

Messages

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

Author: Christophe Theron

Date: 18:11:58 05/14/99

Go up one level in this thread


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?
>
>1:
>Is anyone willing to provide source for a EPD to Binary converter that operates
>in both directions?
>
>2:
>What are the tradeoffs between the smallest size that you can crush a position
>into and the fastest binary format that you can create?

I would be interested in such coding/decoding routines too. Speed is not really
an issue I think.

I would add to the desired features that the encoded position should always take
the same space.

Why? I currently use such an encoding to store positions in my opening book (I
don't want to rely on hash codes, as a hash code cannot be converted back to a
position). Variable length encoding is of no interest in this case.

Being able to extract positions from my book has several purposes, one of it is
to be able to edit it without knowing the move sequence that lead to a position.

Without working too much on it I have found a simple way to encode positions on
32 bytes for any possible (legal) position. I read somewhere else in the thread
that a near 20 bytes encoding is possible. That would be nice, so guys keep on
thinking about it... But you should also think about the worst case. It doesn't
help much to be able to crush a position into 10 bits if the algorithm in the
worst case needs 320 bits...


    Christophe



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.