← Back to context

Comment by sfmz

1 year ago

Chess is not stateless. En Passant requires last move and castling rights requires nearly all previous moves.

https://adamkarvonen.github.io/machine_learning/2024/01/03/c...

Ok, I did go too far. But castling doesn't require all previous moves - only one bit of information carried over. So in practice that's board + 2 bits per player. (or 1 bit and 2 moves if you want to include a draw)

  • Castling requires no prior moves by either piece (King or Rook). Move the King once and back early on, and later, although the board looks set for castling, the King may not.

    • Yes, which means you carry one bit of extra information - "is castling still allowed". The specific moves that resulted in this bit being unset don't matter.

      4 replies →