lichess.org
Donate

We got real lucky with algebraic notation

#11
Yes, you can notate a move with 12 bits.
12 Bits? You number the squares of the board from 0 to 63 (111111) and you need two times 6 bits to notate from ..... to.....
I think I've got your idea.
King and Knight - oops, they had to cheat and write an N for the kNight. We really had bad luck with algebraic notation.
1.5254 5755 2.7163 2836 3.4244 5544

It was a legal notation for otb games. I don't know if FIDE allows it still today.
en.wikipedia.org/wiki/Chess_notation
#17 ICCF still uses it

FIDE disallows it:
"FIDE recognises for its own tournaments and matches only one system of notation, the Algebraic System, and recommends the use of this uniform chess notation also for chess literature and periodicals. Scoresheets using a notation system other than algebraic may not be used as evidence in cases where normally the scoresheet of a player is used for that purpose. An arbiter who observes that a player is using a notation system other than the algebraic should warn the player of this requirement."
handbook.fide.com/chapter/E012018
#tpr
I found this in an article of the internet.

“My first naive dabbling led me to the conclusion that to store a chess move requires somewhat more than 12 bits (so somewhat more than 1.5 bytes, for our purposes a byte is 8 bits, and is also essentially equivalent to a character in the examples above). A chessboard of course has 64 squares and since 2^6 = 64, six bits neatly accommodate a single square. So a move requires two squares (source and destination) or twelve bits. Unfortunately just as UCI sometimes requires five characters, 12 bits seemed to me to be sufficient usually, but insufficient universally because of the need to accommodate underpromotion. Four possible promotions are always possible, so since 2^2 = 4, 2 more bits are required, for a total of 14. Right? Well no, even I quickly realised it was possible to avoid a 2 bit promotion tax. Imagine a pawn promoting from e7. It can go only to d8, e8 or f8. That’s only three possibilities, yet we are allocating 6 whole bits to encode this destination. Wasteful! Our first piece of cleverness today comes into play. We will adjust the destination square to indicate underpromotion, so e7-f8 indicates a rightward capture and Queen promotion, e7-f7 indicates a Rook, e7-f6 indicates a Bishop, e7-f5 indicates a Knight (say). Of course we apply the same idea to promoting leftward captures and non capturing promotions.“

A clever idea this whole underpromotion solution...

This topic has been archived and can no longer be replied to.