Play Stockfish Chess Online

Stockfish
thinking
10:00
You
thinking
10:00

The Rules of Chess

Everything below is the full set of rules you need to play a legal game — how the board is laid out, how each piece moves, the three moves that look like exceptions, and the ways a game can end. The diagrams use the same pieces and board colours as the game above, so whatever theme you have picked here is the one you will see when you sit down to play.

Setting up the board

Turn the board so each player has a light square in the near-right corner. The back rank runs rook, knight, bishop, queen, king, bishop, knight, rook — the queen goes on her own colour, which puts the white queen on the light square d1 and the black queen on the dark square d8. Pawns fill the rank in front.

White moves first, then the players alternate, and passing is not allowed: on your turn you must make a legal move. Every piece captures by moving onto an enemy piece's square and taking its place — the pawn is the one exception, and it is covered below.

How the pieces move

The dots on each diagram mark where that piece may go from where it stands. The queen, rook and bishop slide as far as they like along their lines, but they stop at the first piece in the way: they take an enemy piece and are blocked by a friendly one.

King

One square in any direction. He may never step onto a square an enemy piece attacks, and the two kings can never stand side by side. The king is never actually captured — losing him is what ends the game.

Queen

Any number of empty squares along a rank, a file or a diagonal — the rook and the bishop rolled into one. She is the strongest piece on the board, worth roughly two rooks.

Rook

Any number of empty squares in a straight line, along a rank or a file. Rooks come into their own on open files and on the back rank, and they are the only other piece involved in castling.

Bishop

Any number of empty squares along a diagonal. Each bishop is fixed on the colour it started on for the whole game, which is why a pair of them, covering both colours, is worth so much.

Knight

An L shape: two squares along one line, then one square across. The knight is the only piece that jumps — anything standing in between, friendly or not, simply does not matter.

Pawn

Forward one square, or two if it is still on its starting rank, and never backwards. It is the one piece that captures differently from how it moves: one square diagonally forward, marked here in red.

The three special moves

Castling

The king steps two squares towards a rook and that rook hops over to the square on his far side. It is allowed only if neither piece has moved yet, the squares between them are empty, and the king is not in check — nor passing over or landing on a square under attack.

En passant

When a pawn uses its two-square move to slip past an enemy pawn, that pawn may take it as though it had only moved one square, landing on the square behind it. The chance lasts for that one reply only, and is gone if you play something else.

Promotion

A pawn that reaches the far rank is replaced immediately by a queen, rook, bishop or knight of its own colour. Almost always a queen; a knight now and then, when it comes with check. You are not limited to the pieces you have already lost.

How a game ends

Check

The king is under attack and it must be dealt with at once: move him, take the attacker, or block the line. You may never make a move that leaves your own king in check, which is what pins pieces in place.

Checkmate

Check with no legal answer — the game is over on the spot. Here the rook covers the whole eighth rank and the black king is walled in by his own unmoved pawns, a pattern common enough to have a name: the back-rank mate.

Stalemate

Not in check, but no legal move of any kind. That is a draw, not a win. With Black to play here the king is safe where he stands, yet the queen covers all three squares he could go to — so the half point is shared.

A game is drawn in four other ways as well: by agreement between the players, by the same position appearing three times with the same side to move, by fifty moves passing with no capture and no pawn move, or when neither side has enough material to force mate — king and bishop against a lone king, for instance. Games played with a clock add one more: run out of time and you lose, unless your opponent has no way to mate you, in which case it is a draw.

Reading the move list

Moves are written in algebraic notation, the same form the move list beside the board uses and the same form you get from Copy PGN. A move names the piece and the square it lands on — and a pawn move names only the square.

e4a pawn moves to e4
Nf3a knight to f3 — N, because K is the king
Bxc6a bishop captures on c6
exd5the e-file pawn captures on d5
O-Ocastles kingside; O-O-O is queenside
e8=Qa pawn reaches e8 and becomes a queen
Rad1the a-file rook to d1, when either could go
+  #check  ·  checkmate