Author: KarinsDad
Date: 20:33:32 10/29/99
Go up one level in this thread
On October 29, 1999 at 23:04:57, Dann Corbit wrote: >Since you have to take one piece or one pawn to promote up to two pawns, how >does the balance work out? Or is there some unimaginable way in which to get a >better ratio for promotions? Sorry, I didn't answer your second question. So far, everything that I have seen indicates that you cannot get a better compression for promoted pieces than for pawns (the reason is that you can promote 3 rooks, 3 knights, 3 bishops, and 3 queens and replacing the low bit pawn with any of them in a Huffman scheme fails). However, you can get a better ratio for promoted pieces than with the Huffman encoding above. You simply indicate that there are 5 piece types on the board (pawn, rook, knight, bishop, and queen; not king), hence, 3 of these "generic pieces" can be represented in 7 bits (5^3 = 125, 2^7=128). As a matter of fact, this is one of the two algorithms I use. The other is similar to the Huffman encoding specified. When there are few pawns, use the generic scheme. When there are a lot of pawns, use the Huffman-like scheme. It requires an additional bit to indicate which schema to use (and if I could figure out how to drop that bit...). KarinsDad :)
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.