Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: OOPS! Shortening Huffman coding + OT

Author: Guido

Date: 05:44:12 11/03/99

Go up one level in this thread


In the previous message I calculated the number of different positions with 32
regular pieces (without captures, promotions, castling, ep) obtaining the value:

Total dispositions:   (48!/(32!*8!))^2 / 64  = 2.14 10^40  ===> 134 bits

I think that the number is wrong and that the correct answer is 1/4 of this
value, so 132 bits are sufficient to represent all the positions. A new help for
the goal of a maximum of 160 bits to represent every chess legal position!

The reason is that each bishop can occupy only 32 squares, and therefore we have
to exclude as illegal all the positions where both white bishops or both black
bishops occupy squares of the same colour. The complete symmetry of the problem
should guarantee the correctness of my statement.

The problem become very complicated with promotions and I don't try here to
solve! Perhaps it could be convenient in the calculations to consider bishops on
white squares and bishops on black squares as two different pieces, with the
possibilities for each bishop of occupying only 32 squares. But a pawn promoted
can always choose only between 4 pieces depending on the colour of the square on
which it is promoted.

In another successive message KarinsDad said:
"
The only illegal positions that can occur in the variable length code method
(that I perceive off the top of my head and assuming the decoder can check for
illegality of too many pieces and too many pieces of a given type) are: side not
to move king in check; side to move king in check by more than 2 pieces or in
check by more than 1 knight; pawn misplacement based on number of promotions
(i.e. with no captures and no promotions, all pawns must be on their starting
column); bishop misplacement based on number of promotions; piece location where
it could not be (say for example the king bishop realised when none of the king
pawns have moved).
"

I would specify that IMO are also illegal all the positions where 2 identical
pieces give check, not necessarily 2 knights, specifying that in this case:

- Queen and bishop are considered identical if queen acts as a bishop (on
diagonals)
- Queen and rook are considered identical if queen acts as a rook (on rows or
columns)

There is one only exception to the second statement: it is legal a double check
of queens, rooks or queen-rook in the only situation in which the capture move
of a pawn determines its promotion (queen or rook). The pawn, doing so, could
discover the enemy king to an attack along the column where the pawn was before
the move.

It was interesting to calculate how many positions for a double check and other
reasons are illegal in the very famous KDDKDD ending.

Regards
Guido







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