user1043: I was reading about FEN notation, and noticed the following line in the relevant Wikipedia article:

If neither side can castle, this is "-". Otherwise, this has one or more letters: "K" (White can castle kingside), "Q" (White can castle queenside), "k" (Black can castle kingside), and/or "q" (Black can castle queenside).

Why do we need to mark the ability to castle each side separately?  I can't imagine a circumstance where one would be able to castle kingside, but not queenside unless the reason you can't do one is because it would be illegal to castle in one of the directions.  But if this is the only reason, why would this need to be documented when recording a game in FEN?  Maybe there is something about castling I'm misunderstanding.

user12: If one of the rooks has moved from its starting position, it is no longer legal to castle with that rook.
For example, if white plays 1. a4 2. Ra3 3. Ra1, white can no longer castle long, even though the king and rook are both in their normal positions.
For this reason, the FEN string must encode whether or not castling is legal (because both king and rook can be on the proper squares, but castling can still be illegal).

1043: <p>I was reading about FEN notation, and noticed the following line in <a href="http://en.wikipedia.org/wiki/Forsyth%E2%80%93Edwards_Notation">the relevant Wikipedia article</a>:</p>

<blockquote>
  <p>If neither side can castle, this is "-". Otherwise, this has one or more letters: "K" (White can castle kingside), "Q" (White can castle queenside), "k" (Black can castle kingside), and/or "q" (Black can castle queenside).</p>
</blockquote>

<p>Why do we need to mark the ability to castle each side separately?  I can't imagine a circumstance where one would be able to castle kingside, but not queenside unless the reason you can't do one is because it would be illegal to castle in one of the directions.  But if this is the only reason, why would this need to be documented when recording a game in FEN?  Maybe there is something about castling I'm misunderstanding.</p>
 12: <p>If one of the rooks has moved from its starting position, it is no longer legal to castle with that rook.</p>

<p>For example, if white plays <code>1. a4 2. Ra3 3. Ra1</code>, white can no longer castle long, even though the king and rook are both in their normal positions.</p>

<p>For this reason, the FEN string must encode whether or not castling is legal (because both king and rook can be on the proper squares, but castling can still be illegal).</p>
