Getting a little sidetracked here, I'm not sure what you mean by "compress it only to 27 bits". Wouldn't it neatly fit in 24 bits?Sopel wrote: ↑Tue Nov 30, 2021 1:44 amI've specified something like this https://github.com/Sopel97/chess_pos_db ... s/Eran.cpp (Extended Reverse Algebraic Notation, which is based on Reverse Algebraic Notation but includes castling rights and ep square)and even used it for a chess position database to support going backward. It's fun, but requires too much information for a general purpose notation (I managed to compress it only to 27 bits in a packed binary implementation too, compared to what, like 12 bits for normal move?), so I'm not sure why the original proposal is trying to include it. It is however very useful for identifying transpositions in a database.
I'll allow to repeat myself - what's wrong with uci notation?
Code: Select all
struct rmove {
int fromSquare: 6;
int toSquare: 6;
int fromPiece: 3; // MovedKing = 0, MovedRook = 7
int toPiece: 3; // None = 0, MovedRook = 7
int flags: 2; // CastleQueen = 1, CastleKing = 2
// PromoQueen = 0, PromoKnight = 1
// PromoRook = 2, PromoBishop = 3
int isEnPassant: 1;
int enPassantFile: 3;
};