# Rules of chess

The rules of chess (also known as the laws of chess) govern the play of the game of chess. Chess is a two-player abstract strategy board game. Each player controls sixteen pieces of six types on a chessboard. Each type of piece moves in a distinct way. The object of the game is to checkmate the opponent's king; checkmate occurs when a king is threatened with capture and has no escape. A game can end in various ways besides checkmate: a player can resign, and there are several ways a game can end in a draw.
While the exact origins of chess are unclear, modern rules first took form during the Middle Ages. The rules continued to be slightly modified until the early 19th century, when they reached essentially their current form. The rules also varied somewhat from region to region. Today, the standard rules are set by FIDE (Fédération Internationale des Échecs), the international governing body for chess. Slight modifications are made by some national organizations for their own purposes. There are variations of the rules for fast chess, correspondence chess, online chess, and Chess960.
Besides the basic moves of the pieces, rules also govern the equipment used, time control, conduct and ethics of players, accommodations for physically challenged players, and recording of moves using chess notation. Procedures for resolving irregularities that can occur during a game are provided as well.

## Initial setup

| | a | b | c | d | e | f | g | h | |
| 8 | | | | | | | | | 8 |
| 7 | | | | | | | | | 7 |
| 6 | | | | | | | | | 6 |
| 5 | | | | | | | | | 5 |
| 4 | | | | | | | | | 4 |
| 3 | | | | | | | | | 3 |
| 2 | | | | | | | | | 2 |
| 1 | | | | | | | | | 1 |
| | a | b | c | d | e | f | g | h | |
Chess is played on a chessboard, a square board divided into a grid of 64 squares (eight-by-eight) of alternating color (similar to the board used in draughts). Regardless of the actual colors of the board, the lighter-colored squares are called "light" or "white", and the darker-colored squares are called "dark" or "black". Sixteen "white" and sixteen "black" pieces are placed on the board at the beginning of the game. The board is placed so that a white square is in each player's near-right corner. Horizontal rows are called ranks, and vertical columns are called files.
Each player controls sixteen pieces:
| Piece | King | Queen | Rook | Bishop | Knight | Pawn |
| Number of pieces | 1 | 1 | 2 | 2 | 2 | 8 |
| Symbols | | | | | | |
At the beginning of the game, the pieces are arranged as shown in the diagram: for each side one king, one queen, two rooks, two bishops, two knights, and eight pawns. The pieces are placed, one per square, as follows:
* Rooks are placed on the outside corners, right and left edge.
* Knights are placed immediately inside of the rooks.
* Bishops are placed immediately inside of the knights.
* The queen is placed on the central square of the same color of that of the piece: white queen on the white square and black queen on the black square.
* The king takes the vacant spot next to the queen.
* Pawns are placed one square in front of all of the other pieces.
Popular mnemonics used to remember the setup are "queen on her own color" and "white on right". The latter refers to setting up the board so that the square closest to each player's right is white.

## Gameplay
### White and black

The player controlling the white pieces is named "White"; the player controlling the black pieces is named "Black". White moves first, then players alternate moves. Making a move is required; it is not legal to skip a move, even when having to move is detrimental. Play continues until a king is checkmated, a player resigns, or a draw is declared, as explained below. In addition, if the game is being played under a time control, a player who exceeds the time limit loses the game unless they cannot be checkmated.
The official chess rules do not include a procedure for determining who plays White. Instead, this decision is left open to tournament-specific rules (e.g. a Swiss system tournament or round-robin tournament) or, in the case of casual play, mutual agreement, in which case some kind of random choice such as flipping a coin can be employed. A common method is for one player to conceal a pawn of each color in either hand; the other player chooses a hand to open and receives the color of the piece that is revealed.

### Movement
#### Basic moves

Each type of chess piece has its own method of movement. A piece moves to a vacant square except when capturing an opponent's piece.
Except for any move of the knight and castling, pieces cannot jump over other pieces. A piece is captured (or taken) when an attacking enemy piece replaces it on its square. The captured piece is thereby permanently removed from the game. The king can be put in check but cannot be captured (see below).
* The king moves exactly one square adjacent to it. A special move with the king known as castling is allowed only once per player, per game (see below).
* A rook moves any number of vacant squares horizontally or vertically. It also is moved when castling.
* A bishop moves any number of vacant squares diagonally. (Thus a bishop can move to only light or dark squares, not both.)
* The queen moves any number of vacant squares horizontally, vertically, or diagonally.
* A knight moves to one of the nearest squares not on the same rank, file, or diagonal. (This can be thought of as moving two squares horizontally then one square vertically, or moving one square horizontally then two squares vertically—i.e. in an "L" pattern.) The knight is not blocked by other pieces; it jumps to the new location.
* Pawns have the most complex rules of movement:
   * A pawn moves straight forward one square, if that square is vacant. If it has not yet moved, a pawn also has the option of moving two squares straight forward, provided both squares are vacant. Pawns cannot move backwards.
   * A pawn, unlike other pieces, captures differently from how it moves. A pawn can capture an enemy piece on either of the two squares diagonally in front of the pawn. It cannot move to those squares when vacant except when capturing en passant.
    The pawn is also involved in the two special moves en passant and promotion.

#### Castling

Castling consists of moving the king two squares towards a rook, then placing the rook on the other side of the king, adjacent to it. Castling is only permissible if all of the following conditions hold:
* The king and rook involved in castling must not have previously moved;
* There must be no pieces between the king and the rook;
* The king may not currently be under attack, nor may the king pass through or end up in a square that is under attack by an enemy piece (though the rook is permitted to be under attack and to pass over an attacked square);
* The castling rook must be on the same rank as the king
An unmoved king and an unmoved rook of the same color on the same rank are said to have castling rights.

#### En passant

When a pawn advances two squares on its initial move and ends the turn adjacent to an enemy pawn on the same rank, it may be captured en passant by the enemy pawn as if it had moved only one square. This capture is legal only on the move immediately following the pawn's advance. The diagrams demonstrate an instance of this: if the white pawn moves from a2 to a4, the black pawn on b4 can capture it en passant, moving from b4 to a3, and the white pawn on a4 is removed from the board.

#### Promotion

If a player advances a pawn to its eighth rank, the pawn is then promoted (converted) to a queen, rook, bishop, or knight of the same color at the choice of the player (a queen is most common). The choice is not limited to previously captured pieces. Hence it is theoretically possible for a player to have up to nine queens or up to ten rooks, bishops, or knights if all of the player's pawns are promoted.

### Check

| | a | b | c | d | e | f | g | h | |
| 8 | | | | | | | | | 8 |
| 7 | | | | | | | | | 7 |
| 6 | | | | | | | | | 6 |
| 5 | | | | | | | | | 5 |
| 4 | | | | | | | | | 4 |
| 3 | | | | | | | | | 3 |
| 2 | | | | | | | | | 2 |
| 1 | | | | | | | | | 1 |
| | a | b | c | d | e | f | g | h | |
A king is in check when it is under attack by at least one enemy piece. A piece unable to move because it would place its own king in check (it is pinned against its own king) may still deliver check to the opposing player.
It is illegal to make a move that places or leaves one's king in check. The possible ways to get out of check are:
* Move the king to a square where it is not in check.
* Capture the checking piece.
* Interpose a piece between the king and the opponent's threatening piece (block the check).
In informal games, it is customary to announce "check" when making a move that puts the opponent's king in check. In formal competitions, however, check is rarely announced.

### End of the game
#### Checkmate

| | a | b | c | d | e | f | g | h | |
| 8 | | | | | | | | | 8 |
| 7 | | | | | | | | | 7 |
| 6 | | | | | | | | | 6 |
| 5 | | | | | | | | | 5 |
| 4 | | | | | | | | | 4 |
| 3 | | | | | | | | | 3 |
| 2 | | | | | | | | | 2 |
| 1 | | | | | | | | | 1 |
| | a | b | c | d | e | f | g | h | |
If a player's king is placed in check and there is no legal move that player can make to escape check, then the king is said to be checkmated, the game ends, and that player loses. Unlike the other pieces, the king is never captured.
The diagram shows an example checkmate position. The white king is threatened by the black queen; the empty square to which the king could move is also threatened; and the king cannot capture the queen, because it would then be in check by the rook.

#### Resigning

Either player may resign at any time, conceding the game to the opponent. To indicate resignation, the player may say "I resign". Tipping over the king also indicates resignation, but it should be distinguished from accidentally knocking the king over. Stopping both clocks is not an indication of resigning, since clocks can be stopped to call the arbiter. An offer of a handshake is sometimes used, but it could be mistaken for a draw offer.
Under FIDE Laws, a resignation by one player results in a draw if their opponent has no way to checkmate them via any series of legal moves, or a loss by that player otherwise.

#### Draws

| | a | b | c | d | e | f | g | h | |
| 8 | | | | | | | | | 8 |
| 7 | | | | | | | | | 7 |
| 6 | | | | | | | | | 6 |
| 5 | | | | | | | | | 5 |
| 4 | | | | | | | | | 4 |
| 3 | | | | | | | | | 3 |
| 2 | | | | | | | | | 2 |
| 1 | | | | | | | | | 1 |
| | a | b | c | d | e | f | g | h | |
The game ends in a draw if any of these conditions occur:
* The player to move is not in check and has no legal move. This situation is called a stalemate. An example of such a position is shown in the adjacent diagram.
* The game reaches a dead position.
* Both players agree to a draw after one of the players makes such an offer.
In addition, in the FIDE rules, if a player has run out of time (see below), or has resigned, but the position is such that there is no way for the opponent to give checkmate by any series of legal moves, the game is a draw.
FIDE's competitive rules of play allow a player to claim a draw in either of two situations:
* Fifty moves have been made by each player without a capture or pawn movement (this is the fifty-move rule);
* The same position has appeared three times (or has appeared twice and the player claiming the draw can force the third appearance); this is the threefold repetition rule.
These rules help prevent games from being extended indefinitely in tournaments.
There is no longer a rule specifically defining perpetual check as a draw. In such a situation, either the threefold repetition rule or the fifty-move rule will eventually come into effect. More often, the players will simply agree to a draw.

##### Dead position

| | a | b | c | d | e | f | g | h | |
| 8 | | | | | | | | | 8 |
| 7 | | | | | | | | | 7 |
| 6 | | | | | | | | | 6 |
| 5 | | | | | | | | | 5 |
| 4 | | | | | | | | | 4 |
| 3 | | | | | | | | | 3 |
| 2 | | | | | | | | | 2 |
| 1 | | | | | | | | | 1 |
| | a | b | c | d | e | f | g | h | |
A dead position is defined as a position where neither player can checkmate their opponent's king by any sequence of legal moves. According to the rules of chess the game is immediately terminated the moment a dead position appears on the board.
Some basic endings are always dead positions; for example:
* king against king;
* king against king and bishop;
* king against king and knight.
Blocked positions can arise in which progress is impossible for either side, such as the diagrammed position; these too are dead positions.
USCF rules, for games played under a time control that does not include delay or increment, allow draw claims for "insufficient losing chances". For example, if each player has only a king and a knight, checkmate is only achievable with the co-operation of both players, even if it is not a dead position.

### Touch-move rule

The touch-move rule is a fundamental principle in chess, ensuring that players commit to moves deliberated mentally, without physically experimenting on the board. According to this rule, a player who touches a piece with the intention of moving it must then move it if legally possible. This rule also applies to capturing: a player who touches an opponent's piece must capture it if a legal capture is available. Special considerations apply for castling and pawn promotion, reflecting their unique nature in the game.
A player who touches a piece to adjust its physical position within a square must first alert the opponent by saying J'adoube or "I adjust". Once the game has started, only the player with the move may touch the pieces on the board.

## Competitive rules of play

The following rules are applicable to games in organized tournaments and matches, sanctioned by FIDE. They mention timing (chess clocks), arbiters (or, in USCF play, directors), keeping score, and adjournment. The FIDE Laws of Chess define the rules for standard chess, rapid chess, blitz chess, and guidelines for Chess960. For standard chess, the players must record the moves, which is optional in rapid chess and blitz Chess. Some rules are specifically adapted for blind and visually impaired players.
These rules are used for over-the-board (OTB) games. The rules for correspondence chess are defined by the ICCF. Rules for computer chess and for online chess played on a computer device are published by other organizers and governing bodies.

### Moving the pieces

Although the touch-move rule is generally observed even in non-organized, non-sanctioned play, the interpretation of that rule to special situations such as capturing, castling, and promotion is not obvious; thus it is elaborated further in FIDE rules.
The movement of pieces is to be done with one hand. Once the hand is taken off a piece after moving it, the move cannot be retracted unless the move is illegal. As for the touch-move rule, an arbiter who observes a violation of this rule must intervene immediately.
When castling, a player should first move the king with one hand and then move the rook with the same hand. In the case of a promotion, if a player releases the pawn on the eighth rank, the player must promote the pawn. After the pawn has moved, the player may touch any piece not on the board and the promotion is not finalized until the new piece is released on the promotion square. Although it is a common practice in informal play, under FIDE rules an upturned rook may not be used to represent a promoted queen; such a move would be treated as a legal rook promotion. If the correct piece is not immediately available, the player may stop the clocks and call the arbiter.

### Timing

Tournament games are played under time constraints, called time controls, using a chess clock. Each player is timed separately and must make moves within the time control or forfeit the game. There are different types of time controls applied. For standard chess, different periods can be defined with different fixed times (e.g. first 40 moves in 100 minutes, next 20 moves in 50 minutes, remaining moves in 15 minutes). For rapid and blitz chess, only one period can be defined where all moves must be performed. Additionally, an increment or delay per move may be defined.
* When a player runs out of time, this event is called flag-fall. A flag-fall has no consequences unless stated as observed by the arbiter, in which case the arbiter must intervene, or claimed by a player.
* When no flag-fall is stated, and one of the following events occur, the result of the game still holds. It is of no relevance if the player runs out of time afterwards, or has already run out of time, but this was not stated:
** If a player delivers a checkmate, the game is over and that player wins.
** If a move results in a stalemate, dead position, fivefold repetition or the seventy-five-move rule applies, the game is over and the game is drawn.
* If a player correctly claims flag-fall, that player wins. But if the claiming player is out of time, or could not still theoretically checkmate the opponent, the game is a draw.
The United States Chess Federation (USCF) rule is different. USCF Rule 14E defines "insufficient material to win on time", that is lone king, king plus knight, king plus bishop, and king plus two knights opposed by no pawns, and there is no forced win in the final position. Hence to win on time with this material, the USCF rule requires that a win can be forced from that position, while the FIDE rule merely requires a win to be possible. (See Monika Soćko rules appeal in 2008 and Women's World Chess Championship 2008 for a famous instance of this rule.)
With mechanical clocks only, flag-fall for both players can occur. With digital clocks, the clock indicates which flag fell first, and this information is valid.
In the last period of a standard chess game or rapid games, if played without increment, a special set of rules applies regarding the clock, referenced as "Quickplay Finishes". These rules allow a player with under two minutes time to request an increment introduced, or request a draw based on claiming no progress or no effort, to be ruled by the arbiter. These rules have been relevant when playing with mechanical clocks, which do not allow setting an increment and are today with digital clocks of second importance only, as playing with increment is recommended.

### Recording moves

Each square of the chessboard is identified with a unique pair of a letter and a number. The vertical files are labeled a through h, from White's left (i.e. the queenside) to White's right. Similarly, the horizontal ranks are numbered from 1 to 8, starting from the one nearest White's side of the board. Each square of the board, then, is uniquely identified by its file letter and rank number. The white king, for example, starts the game on square e1. The black knight on b8 can move to a6 or c6.
In formal competition, each player is obliged to record each move as it is played in algebraic chess notation in order to settle disputes about illegal positions, overstepping time control, and making claims of draws by the fifty-move rule or repetition of position. Moves recorded in any other systems of notation cannot be used in evidence in such a dispute. Other chess notation systems include ICCF numeric notation for international correspondence chess and descriptive chess notation, formerly standard in English speaking countries. The current rule is that a move must be made on the board before it is written on paper or recorded with an electronic device.
Both players should indicate offers of a draw by writing "=" at that move on their score sheets. Notations about the time on the clocks can be made. A player with less than five minutes left to complete all the remaining moves is not required to record the moves (unless a delay of at least thirty seconds per move is being used). The score sheet must be made available to the arbiter at all times. A player may respond to an opponent's move before writing it down.

### Adjournment

    See Adjournment (games) § Chess.
Formerly common, adjournments are no longer standard practice in chess competition.
When an adjournment is made, the player whose move it is writes their next move on their scoresheet but does not make the move on the chessboard. This is referred to as a sealed move. Both opponents' scoresheets are then placed in the sealed-move envelope and the envelope is sealed. The names of the players, the colors, the position, the time on the clocks and other game data are recorded on the envelope; the envelope may also be signed by both players. The arbiter then keeps possession of the envelope until it is time to restart the game, at which time the arbiter opens the envelope, makes the sealed move on the board, and starts the opponent's clock.

### Irregularities
#### Illegal move

An illegal move is a move not made according to a piece's possible defined movements or made according to its possible movements but such that its own king is left or placed in check. Furthermore, pressing the clock without making a move or making a move with two hands is considered and penalized as an illegal move.
A player who makes an illegal move must retract that move and make a legal move. That move must be made with the same piece if possible, because the touch-move rule applies. If the illegal move was an attempt to castle, the touch-move rule applies to the king but not to the rook. If the mistake is noticed, the game should be restarted from the position in which the error occurred. The arbiter should adjust the time on the clock according to the best evidence. Some regional organizations have different rules.
A player may correct an illegal move if the player has not pressed the clock. In standard chess, if a move is found during the game, the position immediately before the irregularity is reinstated. In the most used form of rapid chess and blitz chess if the move is found before the opponent moves, the position immediately before the irregularity is also reinstated.
According to the FIDE Laws of Chess, the first stated completed illegal move results in a time penalty. The time penalty consists of giving the opponent two minutes extra time in standard chess, or one minute extra time in rapid or blitz. The second stated completed illegal move by the same player results in the loss of the game, unless the position is such that it is impossible for the opponent to win by any series of legal moves (e.g. if the opponent has a bare king) in which case the game is drawn. A move is completed when it has been made and the player has pressed the clock.
Under USCF rules, if a player completes an illegal move in blitz chess, the player's opponent may claim a win before making a move (if the opponent has enough material to win). One way to claim this win is to take a King left in check by the opponent. Once the illegal move has been answered, the move stands.

#### Incorrect setup

For standard chess and the most used form of rapid and blitz chess there are the following rules. If it is discovered during the game that the starting position was incorrect, the game is restarted. If it is discovered during the game that the board is oriented incorrectly, the game is continued with the pieces transferred to a correctly oriented board. If the game starts with colors reversed, the game is restarted if less than 10 moves have been made by both players, otherwise the game is continued. If the clock setting is found to be incorrect during the game, it is corrected according to best judgement. Some regional organizations have different rules.

#### Piece displacement

If a player knocks over pieces, it is the same player's responsibility to restore them to their correct positions, on that player's time. If it is discovered that an illegal move has been made, or that pieces have been displaced, the game is restored to the position before the irregularity. If that position cannot be determined, the game is restored to the last known correct position.

#### Illegal position

An illegal position is a position which cannot be reached by any series of legal moves.

### Conduct

Players may not use any notes, outside sources of information (including computers), or advice from other people. Analysis on another board is not permitted. Scoresheets are to record objective facts about the game only, such as time on the clock or draw offers. Players may not leave the competition area without permission of the arbiter.
High standards of etiquette and ethics are expected. Players should shake hands before and after the game. Generally a player should not speak during the game, except to offer a draw, resign, or to call attention to an irregularity. An announcement of "check" is commonly made in informal games but is not recommended in officially sanctioned games. A player may not distract or annoy another player by any means, including repeatedly offering a draw.
Due to increasing concerns about the use of chess engines and outside communication, mobile phone usage is banned. The first forfeit by a high-profile player, for phone ringing during play, occurred in 2003. In 2014 FIDE extended this to ban all mobile phones from the playing area during chess competitions, under penalty of forfeiture of the game or even expulsion from the tournament. The rules allow for less rigid enforcement in minor events.

## Equipment

Pieces of the Staunton chess set design are the standard and are usually made of wood or plastic. They are often black and white; other colors may be used (like a dark wood or even red for the dark pieces) but they would still be called the "white" and "black" pieces (see White and Black in chess). The height of the king should be about 95 mm, within 10 percent. The diameter of the king should be 40 to 50% of its height. The size of the other pieces should be in proportion to the king. The pieces should be well balanced.
The size of the squares of the chessboard should be approximately 1.25 to 1.3 times the diameter of the base of the king, or 50 to 65 mm. Squares of approximately 57 mm (2+1⁄4 inches) normally are well-suited for pieces with the kings in the preferred size range; four pawns should fit on a square. Squares may be the natural color of the wood, or other combinations of dark and light colors.
In games subject to time control, a chess clock is used, consisting of two adjacent clocks and buttons to stop one clock while starting the other, such that the two component clocks never run simultaneously. The clock can be analog or digital though a digital clock is preferred under both USCF and FIDE rulesets. This is because most tournaments now include either an increment (extra time being added prior or after the move) or delay (a countdown to when a clock starts again) to their time controls. Before the start of the game, in FIDE competitions the arbiter decides where the chess clock is placed; in USCF competitions the director may decide, or the director may leave it to the players, in which case the player with the black pieces will decide.

## History

The rules of chess have evolved much over the centuries from the early chess-like games played in India in the 6th century. For much of that time the rules have varied from area to area. The modern rules first took form in southern Europe during the 13th century, giving more mobility to pieces that previously had more restricted movement (such as the queen and bishop). Such modified rules entered into an accepted form during the late 15th century or early 16th century. The basic moves of the king, rook, and knight are unchanged. A pawn originally did not have the option of moving two squares on its first move, and promoted only to a queen upon reaching the eighth rank. The queen was originally the fers or farzin, which could move one square diagonally in any direction. In European chess it became able to leap two squares diagonally, forwards, backwards, or to left or right on its first move; some areas also gave this right to a newly promoted pawn. In the Persian and Arabic game the bishop was a pīl (Persian) or fīl (Arabic) (meaning "elephant") which moved two squares diagonally with jump. In the Middle Ages the pawn could only be promoted to the equivalent of a queen (which at that time was a weak piece) if it reached its eighth rank. During the 12th century, the squares on the board sometimes alternated colors, and this became the standard in the 13th century; whence the word "chequered"/"checkered".
Between 1200 and 1600 several laws emerged that drastically altered the game. Checkmate became a requirement to win; a player could not win by capturing all of the opponent's pieces. Stalemate was added, although the outcome has changed several times (see History of the stalemate rule). Pawns gained the option of moving two squares on their first move, and the en passant rule was a natural consequence of that new option. The king and rook acquired the right to castle (see Castling § History for different versions of the rule).
Between 1475 and 1500, the queen and the bishop also acquired their current moves, which made them much stronger pieces. When all of these changes were accepted, the game was in essentially its modern form.
The rules for promotion have changed several times. As stated above, originally the pawn could only be promoted to the queen, which at that time was a weak piece. When the queen acquired its current move and became the most powerful piece, the pawn could then be promoted to a queen or a rook, bishop, or knight. In the 18th century rules allowed only the promotion to a piece already captured, e.g. the rules published in 1749 by François-André Danican Philidor. In the 19th century, this restriction was lifted, which allowed for a player to have more than one queen, e.g. the 1828 rules by Jacob Sarratt.
Two new rules concerning draws were introduced, each of which has changed through the years:
* The threefold repetition rule was added, although at some times up to six repetitions have been required, and the exact conditions have been specified more clearly (see Threefold repetition § History of the rule).
* The fifty-move rule was also added. At various times, the number of moves required was different, such as 24, 60, 70, or 75. For several years in the 20th century, the standard fifty moves was extended to one hundred moves for a few specific endgames (see Fifty-move rule's history).
Another group of new laws included (1) the touch-move rule and the accompanying "j'adoube/adjust" rule; (2) that White moves first (in 1889); (3) the orientation of the board; (4) the procedure if an illegal move was made; (5) the procedure if the king had been left in check for some moves; and (6) issues regarding the behavior of players and spectators. The Staunton chess set was introduced in 1849 and it became the standard style of pieces. The size of pieces and squares of the board was standardized.
Until the middle of the 19th century, chess games were played without any time limit. In an 1834 match between Alexander McDonnell and Louis-Charles Mahé de La Bourdonnais, McDonnell took an inordinate amount of time to move, sometimes up to 1½ hours. In 1836 Pierre Charles Fournier de Saint-Amant suggested a time limit, but no action was taken. At the 1851 London tournament, Staunton blamed his loss in his match against Elijah Williams on Williams' slow play; one game was adjourned for the day after only 29 moves. The next year a match between Daniel Harrwitz and Johann Löwenthal used a limit of 20 minutes per move. The first use of a modern-style time limit was in an 1861 match between Adolph Anderssen and Ignác Kolisch.

### Codification

The first known publication of chess rules was in a book by Luis Ramírez de Lucena about 1497, shortly after the movement of the queen, bishop, and pawn were changed to their modern form. Ruy López de Segura gave rules of chess in his 1561 book Libro de la invencion liberal y arte del juego del axedrez. In the 16th and 17th centuries, there were local differences concerning rules such as castling, promotion, stalemate, and en passant. Some of these differences persisted until the 19th century; for example, differences in castling rules persisted in Italy until the late 19th century.
As chess clubs arose and tournaments became common, there was a need to formalize the rules. In 1749 Philidor (1726–1795) wrote a set of rules that were widely used, as well as rules by later writers such as the 1828 rules by Jacob Sarratt (1772–1819) and rules by George Walker (1803–1879). In the 19th century, many major clubs published their own rules, including The Hague in 1803, London in 1807, Paris in 1836, and St. Petersburg in 1854. In 1851 Howard Staunton (1810–1874) called for a "Constituent Assembly for Remodeling the Laws of Chess" and proposals by Tassilo von Heydebrand und der Lasa (1818–1889) were published in 1854. Staunton had published rules in Chess Player's Handbook in 1847, and his new proposals were published in 1860 in Chess Praxis; they were generally accepted in English-speaking countries. German-speaking countries usually used the writings of chess authority Johann Berger (1845–1933) or Handbuch des Schachspiels by Paul Rudolf von Bilguer (1815–1840), first published in 1843.
In 1924, Fédération Internationale des Échecs (FIDE) was formed and in 1928 it took up the task of standardizing the rules. At first FIDE tried to establish a universal set of rules, but translations to various languages differed slightly. Although FIDE rules were used for international competition under their control, some countries continued to use their own rules internally. In 1952, FIDE created the Permanent Commission for the Rules of Chess (also known as the Rules Commission) and published a new edition of the rules. The third official edition of the laws was published in 1966. The first three editions of the rules were published in French, with that as the official version. In 1974 FIDE published the English version of the rules (which was based on an authorized 1955 translation). With that edition, English became the official language of the rules. Another edition was published in 1979. Throughout this time, ambiguities in the laws were handled by frequent interpretations that the Rules Commission published as supplements and amendments. In 1982, the Rules Commission rewrote the laws to incorporate the interpretations and amendments. In 1984, FIDE abandoned the idea of a universal set of laws, although FIDE rules are the standard for high-level play. With the 1984 edition, FIDE implemented a four-year moratorium between changes to the rules. Other editions were issued in 1988 and 1992.
The rules of national FIDE affiliates (such as the United States Chess Federation, or USCF) are based on the FIDE rules, with slight variations. Some other differences are noted above. Kenneth Harkness published popular rulebooks in the United States starting in 1956, and the USCF continues to publish rulebooks for use in tournaments it sanctions.
In 2008, FIDE added the variant Chess960 to the appendix of the "Laws of Chess". Chess960 uses a random initial set-up of main pieces, with the conditions that the king is placed somewhere between the two rooks, and bishops on opposite-color squares. The castling rules are extended to cover all these positions.
In the 21st century, rules about such things as mobile phones and unauthorized use of chess engines were introduced.

## Customizations in tournament play

Under FIDE's Laws of Chess, tournament organizers have the option to parameterize some rules to fit their events. This flexibility covers time controls for standard, rapid, and blitz chess, and setting the 'default time' - the period before a player forfeits for being late, which is zero unless otherwise specified. Additionally, measures can be introduced to discourage players from agreeing to short draws. One such case was the "no drawing or resigning during the first 30 moves" rule used at the 2009 London Chess Classic.