ChessDrill

Chess 960 Position Generator

8
7
6
5
4
3
2
a1
b
c
d
e
f
g
h
FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
Position ID: 518

What is Chess 960?

Chess 960, also known as Fischer Random Chess, is a variant of chess where the pieces on the back rank start in a random order. The pawns stand on their usual squares, and Black's pieces mirror White's. There are exactly 960 possible starting positions, numbered 0 to 959; position 518 is the classical setup.

The pieces on the back rank are placed by these rules:

1. The two bishops stand on squares of opposite colors.
2. The king stands somewhere between the two rooks.
3. The queen and the knights take any of the remaining squares.
4. Black's pieces stand opposite White's, on the same files.

Castling works as in classical chess: after castling, king and rook end up on the same squares as they would in a normal game (g1 and f1, or c1 and d1 for White).

The starting position is written as a FEN code. A FEN code consists of 6 parts, separated by spaces: the placement of the pieces, the side to move, the castling rights, the en passant square, the halfmove clock and the fullmove number.

The placement lists the 8 ranks from Black's side (rank 8) to White's side (rank 1), separated by slashes. Each rank is read from the a-file to the h-file: a digit stands for that many empty squares, a letter for a piece. Uppercase letters are White's pieces, lowercase letters Black's:

P / p - Pawn
N / n - Knight
B / b - Bishop
R / r - Rook
Q / q - Queen
K / k - King