Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about minimum bits needed for SAN pv

Author: Dieter Buerssner

Date: 09:35:17 11/19/01

Go up one level in this thread


On November 19, 2001 at 11:42:42, Les Fernandez wrote:

>Need to know what the minimum number of bits that are needed to store the worse
>case scenario for a pv (ie  Qa6xb7# or fxg1=Q+).  As you can see both these
>strings are 7 characters long and represent the longest possible situation.  If
>someone is aware of how to represent these 2 conditions with the fewest number
>of bits I would appreciate it.

Another suggestion, that will also need to know the board and the side to move -
like Tim's suggestion.

I think, 9 bits will be enough. The idea would be: There are at most 16
different pieces that can move. Just scan the board for pieces for the side to
move (say from a1 to h8). This will give a piece number <= 16. For each square,
a piece cannot have more than 28 moves. 16*28 fits in 9 bit. This approach would
need tables, and a move generator. I believe, with a bit more thinking, even 8
bits might be possible. For example, one could have a well defined move
generator, that allway generates moves in the same order. There are no legal
chess positions, that have more than 255 moves. So, just storing the move number
will be enough.

Regards,
Dieter




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.