Castling


Castling is a move in chess. It consists of moving the king two squares toward a rook on the same and then moving the rook to the square that the king passed over. Castling is permitted only if neither the king nor the rook has previously moved; the squares between the king and the rook are vacant; and the king does not leave, cross over, or finish on a square attacked by an enemy piece. Castling is the only move in chess in which two pieces are moved at once.
Castling with the is called kingside castling, and castling with the is called queenside castling. In both algebraic and descriptive notations, castling kingside is written as 0-0 and castling queenside as 0-0-0.
Castling originates from the king's leap, a two-square king move added to European chess between the 14th and 15th centuries, and took on its present form in the 17th century. Local variations in castling rules were common, however, persisting in Italy until the late 19th century. Castling does not exist in Asian games of the chess family, such as shogi, xiangqi, and janggi, but it commonly appears in variants of Western chess.

Rules

Description

During castling, the king is shifted two squares toward a rook of the same color on the same rank, and the rook is transferred to the square crossed by the king. There are two forms of castling:
  • Castling consists of moving the king to g1 and the rook to f1 for White, or moving the king to g8 and the rook to f8 for Black.
  • Castling consists of moving the king to c1 and the rook to d1 for White, or moving the king to c8 and the rook to d8 for Black.

    Requirements

Castling is permitted provided all of the following conditions are met:
  1. Neither the king nor the rook has previously moved.
  2. There are no pieces between the king and the rook.
  3. The king is not currently in check.
  4. The king does not pass through or finish on a square that is attacked by an enemy piece.
Conditions 3 and 4 can be summarized by the mnemonic:
Castling rules often cause confusion, even occasionally among high-level players. Alexander Beliavsky and Viktor Korchnoi both had to consult the arbiter during tournaments on whether castling was legal when the rook was on or passed over an attacked square, Yuri Averbakh once mistakenly thought that Black queenside castling was illegal when b8 was attacked, and Nigel Short once attempted to castle queenside as Black when d8 was under attack. Illegal castling has also occasionally occurred in serious games between top players when they forgot that the king or rook had previously moved and returned to its home square, and has not always been noticed by the opponent. Yasser Seirawan once accidentally castled queenside as White with his queen's rook on b1, and Alexander Alekhine once "castled his queen". To clarify:
  • The rook can be under attack.
  • The rook can pass through an attacked square.
  • The king can have been in check earlier in the game.

    Tournament rules

Under FIDE rules and USCF rules, and enforced in most tournaments, castling is considered a king move, so the king must be touched first; if the rook is touched first, a rook move must be played instead. As usual, the player may choose another legal destination square for the king until releasing it. When the two-square king move is completed, however, the player is committed to castling if it is legal, and the rook must be moved accordingly. The entire move must be completed with one hand. A player who attempts to castle illegally must return the king and rook to their original squares and then make a legal king move if possible. If there is no legal king move, the touch-move rule does not apply to the rook.
These tournament rules are not commonly enforced in nor commonly known by casual players.

Castling rights

An unmoved king has castling rights with an unmoved rook of the same color on the same rank, even if castling is not legal in that particular position. In the context of threefold and fivefold repetition, two otherwise identical positions with different castling rights are considered to be different positions.
In a 1986 game between Anatoly Karpov and Tony Miles, play continued from the diagrammed position as follows:
With his 26th move, Karpov attempted to claim a draw by threefold repetition, thinking that the positions after his 22nd, 24th, and 26th moves were the same. It was pointed out to him, however, that the position after his 22nd move had different castling rights than the positions after his 24th and 26th moves, rendering his claim illegal. As a result, Karpov was penalized five minutes on his clock. After thinking for about ten minutes, Miles decided to agree to a draw anyway.

Notation

Both algebraic notation and descriptive notation indicate kingside castling as 0-0 and queenside castling as 0-0-0. Portable Game Notation and some publications use O-O for kingside castling and O-O-O for queenside castling instead. ICCF numeric notation indicates castling based on the starting and ending squares of the king; thus, castling kingside is written as 5171 for White and 5878 for Black, and castling queenside is written as 5131 for White and 5838 for Black.

History

Castling has its roots in the king's leap. There were two forms of the leap: the king would move once like a knight, or the king would move two squares on its first move. The knight move might be used early in the game to get the king to safety or later in the game to escape a threat. This second form was played in Europe as early as the 13th century. In North Africa, the king was transferred to a safe square by a two-move procedure: the king moved to the player's second, and the rook and king moved to each other's original squares.
Various forms of castling were developed due to the spread of rulesets during the 15th and 16th centuries which increased the power of the queen and bishop, allowing these pieces to attack from a distance and from both sides of the board, thus increasing the importance of king safety.
The rule of castling has varied by location and time. In medieval England, Spain, and France, the white king was allowed to jump to c1, c2, d3, e3, f3, or g1 if no capture was made and the king was not in check and did not move over check; the black king might move analogously. In Lombardy, the white king might also jump to a2, b1, or h1, with corresponding squares applying to the black king. Later, in Germany and Italy, the rule was changed such that the king move was accompanied by a pawn move.
In the Göttingen manuscript and a game published by Luis Ramírez de Lucena in 1498, castling consisted of moving the rook and then moving the king on separate moves.
The current version of castling was established in France in 1620 and in England in 1640. It served to combine the rook's move and the king's jumping move into a single move.
In Rome, from the early 17th century until the late 19th century, the rook might be placed on any square up to and including the king's square, and the king might be moved to any square on the other side of the rook. This was called free castling.
In the 1811 edition of his chess treatise, Johann Allgaier introduced the 0-0 notation. He differentiated between 0-0r and 0-0l. The 0-0-0 notation for queenside castling was introduced in 1837 by Aaron Alexandre. The practice was adopted in the first edition of the influential Handbuch des Schachspiels and soon became standard. In English descriptive notation, the word "Castles" was originally spelled out, adding "K's R" or "Q's R" if disambiguation was needed; eventually, the 0-0 and 0-0-0 notation was borrowed from the algebraic system.

Strategic and tactical concepts

Strategy

Castling is generally an important goal in the opening: it moves the king to safety away from the of the board, and it moves the rook to a more active position.
The choice regarding to which side one castles often hinges on an assessment of the trade-off between king safety and activity of the rook. Kingside castling is generally slightly safer because the king ends up closer to the edge of the board and can usually defend all of the pawns on the castled side. In queenside castling, the king is placed closer to the center and does not defend the pawn on the a-; for these reasons, the king is often subsequently moved to the b-file. In addition, queenside castling is initially obstructed by more pieces than kingside castling, thus taking longer to set up than kingside castling. On the other hand, queenside castling places the rook more efficiently on the central d-file, where it is often immediately active; meanwhile, with kingside castling, a tempo may be required to move the rook to a more effective square.
Players may forgo castling for various reasons. In positions where the opponent cannot organize an attack against a centralized king, castling may be unnecessary or even detrimental. In addition, in certain situations, a rook can be more active near the edges of the board than in the center; for example, if it is able to fight for control of an open or semi-open file.
Kingside castling occurs more frequently than queenside castling. It is common for both players to castle kingside, less common for one player to castle kingside and the other queenside, and uncommon for both players to castle queenside. If one player castles kingside and the other queenside, it is called opposite castling or opposite-side castling. Castling on opposite sides usually results in a fierce fight, as each player's pawns are free to advance to attack the opponent's castled position without exposing the player's own castled king. Opposite castling is a common feature of many openings, such as the Yugoslav Attack.

Tactics involving castling

Tactical patterns involving castling are rare. One pattern involves castling queenside to deliver a : the king attacks a rook, while the rook attacks a second enemy piece. In the example shown, from the game Mattison–Millers, Königsberg 1926, Black played 13...Rxb2 and resigned after 14.0-0-0+, which wins the rook.
Chess historian Edward Winter has proposed the name "Thornton castling trap" for this pattern, in reference to the earliest known example, Thornton–Boultbee, published in the Brooklyn Chess Chronicle in 1884. Other chess writers such as Gary Lane have since adopted this term.
Another example of tactical castling is illustrated in the diagrammed position from the correspondence game Gurvich–Pampin, 1976. After 1.Qxd8+ Kxd8 2.0-0-0+ Ke7 3.Nxb5, White has won a rook by castling with check and simultaneously unpinning the knight.
Such a double attack can also be made by castling kingside, although this is much rarer. In this position from the blindfold game, 2007, the move 19...0-0 threatens to win the knight on g5, which cannot move without losing the rook on h7. White cannot attempt to win back the piece with a fork due to the threat of back rank mate: 20.Rh6 Bxg5 21.Rxg6+ Kh7 22.Rxg5 would be met by 22...Rf1. Karjakin had to concede a piece and resigned 14 moves later.