Computer Chess Club Archives


Search

Terms

Messages

Subject: Shortening Huffman coding + OT

Author: Guido

Date: 13:00:55 10/29/99


Huffman coding for recording a chess position, should be as follows:

Empty square: 0
Pawn: 10C
Bishop: 1100C
Knight: 1101C
Rook: 1110C
Queen: 11110C
King: 11111C

where C indicates the colour bit (0 = White, 1 = Black).

For the starting chess position we have a total size of  32*1 + 16*3 + 4*5 + 4*5
+ 4*5 + 2*6 + 2*6  = 164 bits with additional bits (from 1 to 8 IMO) for side to
move, castle status and en passant capture.

But Pawns cannot occupy the first and the last row, so only for these rows, the
coding can be modified eliminating the first  '1':

Empty square: 0
Bishop: 100C
Knight: 101C
Rook: 110C
Queen: 1110C
King: 1111C

In the best case of starting position it is possible to save 16 bits, for a
total of 148 bits vs 164 bits of  the original Huffman coding. In a generic
situation the saving is less and equal to the number of pieces in the first and
in the last row.

Is this reduction already known?


OT Argument

In a past thread the problem of the language to use in CCC was discussed, as
many people are not of english mother tongue and have problem with english. I'm
italian and probably I speak and write english very badly.
I don't suggest to use latin or esperanto, but more concretely that all the
english mother tongue persons who write to CCC make an effort to use the easiest
words and expressions they know, so more non-english people can understand and
learn english as well as chess.

Regards
Guido






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