Tuesday, September 18, 2012

[scwjirnz] Encoding chess moves in 12 bits

Any chess move may be denoted by origin square and destination square.  Some special moves are denoted by illegal moves.

For pawn promotion, the destination file gives the file (could be over 1 in case of capture), the destination rank specifies the piece promoted to.  The position is of course always 8th rank.  Correspondence chess uses this as a not recommended shortcut.  Castling by king move only might be ambiguous for Chess960 positions, so again use a different destination rank, maybe 3rd rank.

No comments :