Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Minimum Number of Bytes - encode castling within kings coordinates

Author: Reinhard Scharnagl

Date: 02:55:41 12/24/03

Go up one level in this thread


On December 24, 2003 at 01:06:30, Russell Reagan wrote:

>If you were able to get rid of the castling rights by the method I mentioned in
>my other post, you could do this (I think):
>
>1. filling matrix: 62 bit (one bit for each square 0...63, excluding kings)
>2. white king's position: 6 bit (coordinate 0...63, castling rights included
>here)
>3. black king's position: 6 bit (coordinate 0...63, castling rights included
>here)
>4. active color: 1 bit
>5. e.p. flag: 1 bit
>6. e.p. column of pawn (if need be): 3 bit (column 0...7)
>7. left pieces: 2...4 bit (from filling matrix, except K, castling R and P), no
>more than 81 bits
>
>This would require 160-bits at most. Surely further improvements are possible.
>One I can think of is that if the e.p. flag is 0, then we can use the other
>3-bits for something (or get rid of them). If the e.p. flag is 1, then we can
>locate both the pawn that can be captured by the column, requiring the 3-bits
>you have already accounted for, and we can also know the location of the
>capturing pawn with 1-bit (left or right of the threatened pawn). In either
>case, you can save at least one bit, so we should be down to 159-bits.

An e.p.-situation can have two threatening pawns, so there saving one bit is
not as easy as described.

Reinhard.



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.