[Retros] A single integer N = a complete chess game

Thomas Brand t.brand at gmx.net
Fri Apr 11 01:57:25 EDT 2008

Some notes:

It's simple to include promotion into "my algorithm": just add two bits
for the promoted piece to the end of a promotion move; this will keep
uniqueness unchanged.

Marks and my approach are different: I construct a unique number for a
single game, while Mark needs such an algorithm to "generate" a subset
of the natural numbers, which, of course is well ordered, so he can map
a game to its index: true, that results in "shorter" numbers, but
requires the array of the presentation of all possible games to do so
(and in reverse, to map a natural number to a game).

Otto is correct, that Huffman like (context sensitive) encoding will
theoretically result in shorter (since compressed) numbers than my
algorithm, but you have to take into account, that these "context
sensitive information" has to be stored anywhere -- with the number, if
you want to optimize the compression for any game notation. Or you
require to optimise the compression for all possible games -- and than
your approach results in the same problems as Marks: you have to take
into account all possible games.

Regards, Thomas

More information about the Retros mailing list