FIG. 116Follow Along
How to play chess, step by step
After just four moves by each side there are 84,998,978,956 possible games.
This device cannot show the 3D model. You can read the guide steps below as text.
1 / 24 A game from 1858 plays itselfIn 1858 Paul Morphy played this game in a box at the Paris opera against the Duke of Brunswick and Count Isouard. Watch it end in checkmate on move 17.
Drag to turn. Scroll or pinch to zoom.
A game that was over before the opera ended
In 1858 the American player Paul Morphy sat in a box at the Paris opera with his back to the stage. Facing him across a chessboard were the Duke Karl of Brunswick and Count Isouard, consulting each other and playing as one side. Frederick Edge, who travelled with Morphy that year, wrote that the Duke had a chessboard even in his opera box and played right through the performance. The game took 17 moves. Morphy gave away a knight, then a rook, then his queen, and finished with a rook move that left the black king no square to go to.
That game plays itself at the start of this page. The pieces drop onto a wooden board, the camera moves in from the room, and the 33 moves (17 by White, 16 by Black) go by in under ten seconds. The rest of the page takes the game apart into the rules it uses. You can drag each piece and see the squares it can reach light up, try the three special moves (castling, en passant and promotion), watch four basic ways to give checkmate, and follow an opening that keeps to five rules of thumb written down by José Raúl Capablanca and Edward Lasker about a century ago.
After that the page turns to the numbers people ask about. How many different games are possible? Your browser counts them itself for the first four moves, and the page compares the count with published values and with Claude Shannon's estimate from 1950. A knight visits all 64 squares, eight queens share a board without attacking each other, and grains of rice double from square to square until one square's heap stands taller than the mannequin beside the table.
The rules here follow the FIDE Laws of Chess that took effect on 1 January 2023. FIDE, the international chess federation, was founded in Paris in 1924 and now has its headquarters in Lausanne. Article numbers in brackets, such as (FIDE 3.8.2), point to the paragraph of the Laws that says the same thing.
The board and how it is set up
A chessboard has 64 squares in an 8 by 8 grid, light and dark in turn. The Laws call the light squares "white" and the dark ones "black" whatever their real colour (FIDE 2.1). The first thing people get wrong when they set up a board is its direction. The board goes between the players so that the corner square nearest each player's right hand is light. On this page that square, h1, has a blue frame in the set-up step.
Each side has 16 pieces: a king, a queen, two rooks, two bishops, two knights and eight pawns. White's pieces start on the first rank and its pawns on the second; Black's pieces start on the eighth rank and its pawns on the seventh. The rooks go in the corners, the knights next to them, then the bishops. The queen goes on the square of her own colour, so the white queen starts on d1 (a light square) and the black queen on d8 (a dark square), and the kings stand beside them on e1 and e8. If the queens are on their own colours and h1 is light, the board is set up right.
White moves first. The players then take turns, one move each, and a turn can never be skipped.
Files, ranks and the names of squares
The eight columns are called files and are lettered a to h from White's left. The eight rows are called ranks and are numbered 1 to 8 from White's side (FIDE 2.4). Every square is named by its file and its rank: a1 is the corner on White's left, h8 the corner diagonally opposite, and e4 the square in front of White's king once the king's pawn has moved two squares.
Moves are written in algebraic notation, which the Laws set out in their Appendix C. Each piece except the pawn has a capital letter: K for king, Q for queen, R for rook, B for bishop and N for knight. A move is the letter and the square the piece goes to, so Nf3 means "a knight moves to f3". Pawn moves are just the square, such as e4. A capture adds an x (Bxf3, or exd5 for a pawn), check adds a plus sign and checkmate a hash sign (Rd8#). Castling is written O-O on the king's side and O-O-O on the queen's side. If two pieces of the same kind could reach the same square, the file or rank they come from is added, as in Rad1. You can type moves in this notation on the stage: click the board, type e4 and press Enter.
How each piece moves
The lessons on the stage put one piece on a nearly empty board and light up every square it can move to. Drag it, or tap it and then tap a lit square, and the lights move with it. In these lessons Black does not answer, so you can keep moving the same piece. Two rules hold for every piece. A piece may not move to a square already occupied by a piece of its own colour, and if it moves to a square occupied by an opponent's piece, it captures that piece, which leaves the board (FIDE 3.1). On this page captured pieces stand in a row beside the board, so you can see what each side has lost.
The king
The king moves one square in any direction: forward, back, sideways or diagonally (FIDE 3.8.1). From the middle of the board that is eight squares, from a corner only three. The king may never move to a square attacked by an enemy piece, and it is never captured. Instead, the game ends when it is attacked and has no way out. That is checkmate, explained further down.
The rook
The rook moves any number of squares along its file or its rank, but it cannot jump over a piece in its way (FIDE 3.3 and 3.5). On an empty board a rook reaches 14 squares wherever it stands, because it always has seven squares along its file and seven along its rank. No other piece has a reach that does not depend on where it is.
The bishop
The bishop moves any number of squares along a diagonal (FIDE 3.2). A diagonal is a line of squares of one colour (FIDE 2.4), so a bishop that starts on a light square stays on light squares for the whole game. That is why each side has two bishops: the one on c1 covers the dark squares and the one on f1 the light ones. A bishop in a corner reaches 7 squares; one in the centre reaches 13.
The queen
The queen moves like a rook and a bishop together: any distance along a file, a rank or a diagonal (FIDE 3.4). In the queen lesson she starts on d4 and the read-out counts the squares she can reach. On an empty board it would be 27, the most of any piece; on the lesson board her own king on a1 takes one of them away, so 26 light up. Long ago the queen was one of the weakest pieces. The section on the old rules below explains how that changed.
The knight
The knight moves to one of the nearest squares that is not on its own file, rank or diagonal (FIDE 3.6). In practice that is an L shape: two squares in one direction and one square to the side. The knight is the only piece that jumps. Pieces between its start and its landing square do not matter, which is why a knight can leave its corner on the very first move while the other pieces are still shut in behind their pawns. Every knight move goes from a light square to a dark one or the other way round. From the centre a knight has eight moves; from a corner only two.
The pawn
The pawn is the only piece that cannot move backwards. It moves one square straight forward if that square is empty. On its first move it may instead move two squares forward if both are empty (FIDE 3.7.1 and 3.7.2). It captures differently from the way it moves: one square diagonally forward, onto a square occupied by an enemy piece (FIDE 3.7.3). A pawn blocked by a piece in front of it cannot move at all unless it has something to capture. In the pawn lesson the white pawn on d2 jumps two squares to d4 and then captures on c5.
What the pieces are worth
Players count material to decide whether a trade is good. Capablanca wrote in 1921 that there is no complete and accurate table of values, only comparisons: a bishop and a knight are about equal for most purposes, a bishop is often worth more than three pawns, a rook is worth a knight and two pawns, and two rooks are slightly stronger than a queen. The engine on this page uses fixed numbers as model values: pawn 100, knight 310, bishop 330, rook 500 and queen 900. The read-out in the Play tab shows the balance in pawns, including a small bonus for well-placed pieces.
Three special moves
Castling
Castling is the only move in which two pieces move at once. The king goes two squares toward one of its rooks, and that rook then jumps to the square the king has just crossed (FIDE 3.8.2). When White castles on the king's side, the king goes from e1 to g1 and the rook from h1 to f1; on the queen's side the king goes to c1 and the rook from a1 to d1. Castling tucks the king behind its pawns and brings a rook toward the middle in a single move.
The right to castle is lost for good if the king has already moved, and with one rook if that rook has already moved (FIDE 3.8.2.1). Castling is also blocked for the moment if any piece stands between the king and the rook, if the king is in check, if the king would have to cross a square attacked by the opponent, or if it would land in check (FIDE 3.8.2.2). The second castling lesson shows this. A black bishop on b5 attacks f1, so the king may not pass that square and short castling is not lit. Long castling still is, because the squares the king uses, d1 and c1, are safe.
Notice what the rule does not say. In long castling the rook passes b1, and b1 may be attacked. Only the squares the king stands on, crosses or reaches must be safe.
En passant
A pawn that moves two squares on its first move could slip past an enemy pawn waiting beside the square it skipped. The rules close that gap. If a pawn moves two squares and lands beside an enemy pawn, the enemy pawn may capture it as if it had moved only one square, landing on the square that was skipped (FIDE 3.7.3.1). The name is French for "in passing". There is a time limit: the capture is legal only on the very next move. If the chance is not taken at once, it is gone (FIDE 3.7.3.2).
The en passant lesson uses a real game from Staunton's Blue Book of Chess, Marache against Morphy. After 7.e5 Black played 7...d5, moving the d-pawn two squares past the white pawn on e5. Marache took it en passant with 8.exd6. The stage stops at that moment and lights up d6.
Promotion
A pawn that reaches the far rank cannot stay a pawn. As part of the same move it must be exchanged for a queen, rook, bishop or knight of its own colour, chosen by the player (FIDE 3.7.3.3). The choice is not limited to pieces that have already been captured (FIDE 3.7.3.4), so a player can have two queens or more. Choosing anything other than a queen is called underpromotion. It sounds pointless, but in some positions only a knight gives checkmate, and two of the puzzles on this page are like that. When you promote on the stage, a small box asks which piece you want.
Check, checkmate and the ways a game is drawn
A king is in check when an enemy piece attacks it (FIDE 3.9.1). A player may never make a move that leaves their own king in check or puts it there (FIDE 3.9.2). That one rule is enough to define the goal of the game. If your king is in check and no legal move gets it out, you have been checkmated and the game is lost (FIDE 1.4.1 and 5.1.1). Nobody ever captures a king.
Three ways out of check
The check lesson puts a black rook on e8 facing the white king on e1 down an open file. White has three kinds of answer, and the stage lights up only those moves, because every other move is illegal.
- Move the king to a square that is not attacked. Here d1 and f1 are free.
- Block the line by putting a piece between the rook and the king. The bishop on d2 can go to e3, the knight on g1 to e2, and the queen to e4.
- Capture the checking piece. The queen on a4 can take the rook on e8 along the diagonal.
When a knight gives check, blocking is impossible because knights jump. When two pieces give check at once, called a double check, only a king move helps. The Réti game in the library ends with a double check followed by mate.
Stalemate
If the player to move has no legal move but is not in check, the game is drawn. This is stalemate (FIDE 5.2.1), and it is the most common way for a beginner to throw away a won game. The stalemate lesson shows a king and queen against a lone king in the corner. The move 1.Qb6 looks as if it closes the net, but it leaves the black king with no move and no check, so the game is drawn at once. The stage then plays the right move, 1.Qb7, which is checkmate because the white king guards the queen.
Other draws
A game is also drawn when neither side can checkmate by any series of legal moves, called a dead position (FIDE 5.2.2). King against king is dead, and so are king and bishop or king and knight against king. A player may claim a draw when the same position is about to appear for the third time, or when 50 moves by each side have passed without a capture or a pawn move (FIDE 9.2 and 9.3). Without any claim, the game is drawn automatically when the same position appears five times, or after 75 moves by each side without a capture or a pawn move (FIDE 9.6). The players can also simply agree to a draw. The Play tab follows the automatic rules.
Four basic checkmates
Most games are decided long before the end, but every player needs a few mating patterns that work every time. The guide plays four of them by themselves. You can pause each one, step back and forward with the arrows, or drag the move slider.
Back-rank mate
A king that has castled usually sits behind three pawns. That shelter becomes a trap if an enemy rook or queen reaches the back rank, because the king's own pawns take away its escape squares. In the lesson the white rook goes from d1 to d8, and that is mate. Players guard against it by giving the king an escape square in good time, often by moving one of those pawns a step.
Two rooks on a ladder
Two rooks can mate a lone king without help from their own king. One rook checks along a rank and pushes the king back; the other guards the next rank so the king cannot come forward again. Then they swap roles. The lesson does it in four moves: 1.Ra5 cuts the king off, 2.Rh6+ pushes it back, 3.Ra7+ pushes it again and 4.Rh8# finishes on the edge.
Queen mate with support
A queen next to the enemy king covers every square around it, but the king could simply capture her. If the queen is protected, by her own king for example, the capture is illegal and it is mate. In the lesson the white king stands on b6 and the queen arrives on b7, beside the black king on a8.
King and queen against king
With only a king and a queen, the stronger side must drive the lone king to the edge. The queen keeps a knight's move away from the king, which boxes it in without giving stalemate, and shrinks the box move by move. Then the white king walks up to protect the queen for the final check. Capablanca wrote that this ending "should always be accomplished in under ten moves". The simple engine on this page plays it from the lesson position in 12, which shows the difference between a short rule-based search and a world champion.
The opening: five ideas
The first dozen moves decide where the pieces will stand for the rest of the game. Capablanca's Chess Fundamentals (1921) and Lasker's Chess Strategy (1915) both give rules of thumb for the opening, and five of them cover most of what a beginner needs.
- Take the centre. The four middle squares, e4, d4, e5 and d5, matter most; Capablanca calls control of the centre "of great importance". A pawn on e4 or d4 also opens lines for the queen and a bishop.
- Bring out the knights and bishops. Lasker writes that "quick development is of the utmost importance": the player who first gets the pieces from their awkward starting squares to useful ones has the better chance.
- Move each piece once. Capablanca: "Before development has been completed no piece should be moved more than once", unless it wins material or is needed for freedom of action.
- Keep the queen back. Lasker calls bringing out the queen early "contrary to the principles governing sound play": the opponent drives her away with moves that develop pieces at the same time.
- Castle. The king goes to safety and a rook comes toward the centre.
The opening step plays an Italian Game, 1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3 d6 6.O-O O-O 7.Re1, and the caption names the idea each move uses. None of these rules is absolute, and the most famous example of breaking them is the opera game itself. Lasker uses it to show what lost time costs. Black's second move, d6, shuts in the bishop on f8, and his third, Bg4, lets White gain time because the bishop has to be exchanged after moving twice. By move 12 White has castled and brought a rook to the open d-file, while Black's king is still in the centre and the bishop on f8 and rook on h8 have not moved.
Puzzles: mate in one
The Puzzles tab has 38 positions in which the side to move can give checkmate in one move. They are grouped by pattern: back rank, a king in the corner, queen with support, two rooks, queen and bishop, smothered mate (a knight checks a king boxed in by its own pieces), rook and knight, knight and rook on the edge, promotion, promotion to a knight, en passant mate, castling mate, and positions from real games. The last group is the final moment of five games: Fool's mate, Scholar's mate, the opera game, Réti against Tartakower, and Marache against Morphy.
Each puzzle was built for this exhibit and checked by the same program that runs the stage. It plays every legal move in the position and looks at what is left. A puzzle is kept only if exactly one move gives mate, so there is never a second answer. The check also makes sure the position could happen in a game: both kings are on the board, the side that has just moved is not in check, and no pawn stands on the first or last rank. If you play a wrong move, the stage tells you whether it was check or not and puts the pieces back. The hint lights up the piece that moves; the answer button draws an arrow.
Some puzzles are Black to move. The board then turns so that Black sits at the bottom.
How many games of chess are there?
At the start White has 20 possible moves: each of the eight pawns can move one or two squares, and each knight has two squares. Black has the same 20 replies, so after one move each there are 400 possible positions. The count goes on like this, one ply at a time (a ply is one move by one side), and grows very fast.
| Plies | Possible games | Ending in checkmate |
|---|---|---|
| 1 | 20 | 0 |
| 2 | 400 | 0 |
| 3 | 8,902 | 0 |
| 4 | 197,281 | 8 |
| 5 | 4,865,609 | 347 |
| 6 | 119,060,324 | 10,828 |
| 8 | 84,998,978,956 | 9,852,036 |
These counts come from the On-Line Encyclopedia of Integer Sequences (sequences A048987 and A079485). The lab under the controls counts the first four rows again in your browser, by playing every legal move from every position, and compares its result with the published numbers. Four plies means 197,281 lines and takes a moment on a phone. Programmers call this kind of count perft, and it is the standard test of a chess move generator: a single missing rule, such as allowing an en passant capture that would expose one's own king, changes the number. The rules on this page were checked this way from the starting position and from five other well-known test positions full of castling, en passant and promotions.
The checkmate column holds a small surprise. No game can end in checkmate before the fourth ply, and exactly 8 games end in mate at the fourth. Fool's mate, 1.f3 e5 2.g4 Qh4#, is one of them.
Shannon's estimate
In 1950 the engineer Claude Shannon published a paper called "Programming a Computer for Playing Chess". He noted that a typical position has about 30 legal moves, so a move by White and a reply by Black give about 10³ possibilities, and that a typical game lasts about 40 moves. That gives 10¹²⁰ possible games. A machine checking one game every microsecond, he wrote, would need over 10⁹⁰ years to choose its first move. The figure is now called the Shannon number. It is an order-of-magnitude estimate, not a count.
Shannon also estimated the number of positions, as 64! divided by 32!, the square of 8! and 2!⁶, "or roughly 10⁴³". The lab works that expression out exactly: it is a 43-digit number that starts 4,634.
Later estimates disagree
In his 1994 thesis at the University of Limburg in Maastricht, Victor Allis put the number of positions higher, at about 10⁵⁰, with an upper bound of 5 × 10⁵² once all the possible promotions are included, and called the 10⁴³ figure too low. For the size of the game tree he used an average of 35 moves per position and a game length of 80 plies, which gives about 10¹²³. Neither number is exact. They count different things in different ways, and the page shows both side by side. None of the sources used here gives an exact count of legal chess positions.
The knight's tour
Can a knight visit every square of the board exactly once? It can, and people have studied the question for centuries. Leonhard Euler presented a paper on it in 1759, printed in 1766, with ways to build tours, including closed ones, in which the last square is a knight's move from the first so the knight could start again.
The Big numbers tab plays a closed tour from b1 and writes the order of the squares on the board. The tour is found with a simple rule of thumb, always jump to the square that has the fewest onward moves left, plus a little backtracking when the rule leads into a dead end. That rule alone finds a complete tour from all 64 starting squares, and the exhibit's check confirms it. You can also try it yourself. Choose a starting square and jump; the hint button lights the squares with the fewest exits.
How many tours are there? In 1996 Löbbing and Wegener published a count of 33,439,123,484,294 closed tours. Brendan McKay recounted with a different method in 1997 and found that the earlier computation had been carried out incorrectly. His total is 13,267,364,410,532 closed tours, counting a tour and its reverse once, or 1,658,420,855,433 if rotations and reflections of the board also count as one. Open tours, which do not return to the start, are far more numerous: the OEIS lists 19,591,828,170,979,904 directed open tours on the 8 by 8 board.
The lab also measures knight distance. From b1 to h8 the knight needs 5 moves, and one of the tasks is to do it in five.
Eight queens
A queen attacks every square on her file, rank and diagonals. How many queens can share a board without any of them attacking another? No more than eight, because each needs a rank to herself. Eight is possible, and there are exactly 92 ways to place them. If placements that are rotations or mirror images of each other count as one, 12 different solutions remain.
Edsger Dijkstra used this puzzle in his notes on the art of programming, EWD 316, to show a method called backtracking. Put a queen on the first rank, then one on the second rank where it is safe, and so on. When no safe square is left, go back one rank and move that queen along. Done carefully, the method meets every possibility once and finds all 92 solutions in a fraction of a second, which is what this page does when it loads.
On the stage you can step through the 92 solutions or place queens yourself. Attacked squares turn red and pairs of queens that attack each other are joined by a red line. When eight queens stand safely, the page tells you which of the 92 you have found and keeps a list in the lab. The table there also gives the counts for other board sizes from the OEIS: no solution on 2 by 2 or 3 by 3 boards, 2 on a 4 by 4 board, 10 on 5 by 5, then 4, 40 and 92.
Rice on the chessboard
An old story asks for a reward in grain: one grain on the first square of the chessboard, two on the second, four on the third, doubling on every square up to square 64. The historian H. J. R. Murray, in A History of Chess (1913), traces "the doubling of the squares of the chessboard" through Arabic sources and early Western manuscripts on mathematics. In the Arabic tale he quotes, the grain is corn. Many modern retellings use rice, and so does this page.
Square k holds 2 to the power k − 1 grains, and the first k squares together hold one grain less than the next square: 2ᵏ − 1. All 64 squares hold 18,446,744,073,709,551,615 grains.
A grain of milled rice weighs roughly 20 mg. That is an estimate: the weight of 1,000 grains is a standard measure for a rice variety and differs from one variety to another, as the FAO's growing guidelines note, so the lab lets you change it. At 20 mg the whole board holds about 3.7 × 10¹¹ tonnes. The FAO's Food Outlook of November 2025 gives the world's rice production for 2024/25 as 549.8 million tonnes, milled. The board would need about 671 years of the whole world's harvest.
The stage shows the first squares grain by grain, then builds a heap beside the table for the rice on a single square, using a slope of 32 degrees and a bulk density of 0.78 tonnes per cubic metre (both estimates). Square 31 alone holds 1,073,741,824 grains, about 21.5 tonnes, and its heap is about 1.8 m high, a little taller than the 1.7 m mannequin. On square 32 the heap is almost 9 m across.
Before 1500: a slower game
Chess has not always had today's rules. Murray traces the European game back to its Indian ancestor, chaturanga, at the beginning of the seventh century, and describes how it passed through Persia and the Arabic world, where it was called shatranj, into Europe. Two pieces were very different. The piece beside the king, the fers or counsellor, moved only one square diagonally. The piece in the bishop's place, the alfil or elephant, jumped exactly two squares diagonally, over anything in between.
William Caxton's The Game and Playe of the Chesse, one of the first books printed in English, still has the old moves. Caxton dated the end of his translation the last day of March 1474; because the year then began at Easter, that is 31 March 1475 by today's reckoning, as the book's editor explains. His queen "goth fro blak to blak, or fro white to white", one step along a diagonal, and his alphyn "renneth iij poyntes", three points counting its own square, which is a jump of two. With pieces that slow, an attack took many moves to build.
Then, in the last years of the 15th century, a new game appears in Italy, France and Spain. Murray writes that it differed from the old in two points only: the queen and the bishop received the moves they still have today. It went by names such as "scacchi de la donna" and "esches de la dame enragée", the game of the queen. By 1600 it had spread through Western Europe, and the faster pieces made the opening matter in a way it had not before.
Switch on "Rules before 1500" and the stage shows a plain old board with marked squares and lights the old moves of the queen and bishop. The difference is easy to see. From d4 the old queen reaches four squares instead of 27, and an old bishop can only ever visit 8 squares of the board, whatever route it takes.
Machines that play chess
The Turk
From the 1770s a cabinet with a seated figure toured Europe and beat visitors at chess. In 1821 Robert Willis published An Attempt to Analyse the Automaton Chess Player of Mr. de Kempelen, arguing from its measurements and its behaviour that it was not a machine at all but was "wholly directed and controlled by a concealed human agent". A strong player sat hidden inside.
Shannon's plan
Shannon's 1950 paper was a plan for a real program. Since nobody can search all 10¹²⁰ games, a machine should look a few moves ahead, give each resulting position a score (material first, then things like the mobility of the pieces and the pawn structure) and choose the move that leads to the best score, assuming the opponent also plays well. Chess programs have worked on that idea ever since. The Computer History Museum's online exhibit Mastering the Game follows the story from there.
Deep Blue
In 1997 IBM's Deep Blue won a six-game match against the world champion Garry Kasparov. IBM gives its speed as 200 million positions evaluated per second on 32 processors. Its designers, Murray Campbell, Joseph Hoane and Feng-hsiung Hsu, described the machine in the journal Artificial Intelligence in 2002.
AlphaZero
In 2017 David Silver and his colleagues described AlphaZero, a program that knew only the rules and learned by playing against itself. Starting from random play, it reached what the authors call a superhuman level in chess, shogi and Go within 24 hours, and defeated a world-champion program in each.
The engine on this page
The opponent in the Play tab is much simpler than either. It was written for this exhibit from the rules alone. It generates every legal move, looks one to three plies ahead with a standard pruning method (alpha-beta search), keeps following captures at the end of the search so it does not stop in the middle of an exchange, and scores positions with the model piece values above plus a small table that rewards central knights, advanced pawns and a sheltered king. At the lowest strength it adds random noise to its choices so it makes a beginner's mistakes, but it never misses a mate in one. Two players can also share one screen.
The engine and the rules behind every lesson are the same code. Before the page is published, a check program counts the move tree from six test positions, solves all 38 puzzles, replays every game in the library and makes sure each ends as stated, and confirms the numbers for the eight queens and the knight's tours.
Things to try
- Let the opera game finish, then press "Watch it slowly" and read the captions at moves 6, 9 and 16.
- In the knight lesson, count how many moves a knight has when it stands in a corner.
- Try to castle through the attacked square in the second castling lesson. The king will not go.
- Promote a pawn to a knight just to see the choice box, then find the two puzzles where only a knight mates.
- In Play, switch on "Attacked squares" and watch the red squares change as the pieces come out.
- Find your own solution to the eight queens and see which of the 92 it is.
- Enter your birthday under Me. The rice board shows how many grains the square of your age holds.
- Switch on the old rules and try to take the old bishop from c1 to d2. It can never get there.
Questions
How do you set up a chessboard?
Turn the board so that the near right corner square is light. Rooks go in the corners, then knights, then bishops. The queen goes on her own colour (the white queen on d1, the black queen on d8) and the king beside her. Pawns fill the second and seventh ranks.
Who moves first in chess?
White always moves first. After that the players take turns, and passing is not allowed.
Which piece is the most powerful?
The queen. From the centre of an empty board she reaches 27 squares. The king is the most important piece, because the game is lost when it is checkmated, but it moves only one square at a time.
Can a knight jump over other pieces?
Yes. The knight is the only piece that jumps, so pieces between its start and its landing square do not block it.
Can a pawn move backwards?
No. A pawn only moves forward: one square, or two on its first move, and it captures one square diagonally forward.
What is en passant?
When a pawn moves two squares and lands beside an enemy pawn, that pawn may capture it as if it had moved one square. It must be done on the very next move or not at all (FIDE 3.7.3.1 and 3.7.3.2).
Can you castle out of check or through check?
No. You cannot castle while in check, the king cannot cross a square that is attacked, and it cannot land in check. The rook, however, may pass an attacked square (FIDE 3.8.2.2).
Can you have two queens?
Yes. A promoted pawn can become any piece but a king, whether or not that piece has been captured, so a second or even a ninth queen is legal (FIDE 3.7.3.4).
What is the difference between checkmate and stalemate?
In checkmate the king is in check and no move saves it; the game is lost. In stalemate the player to move has no legal move but is not in check; the game is drawn (FIDE 5.1.1 and 5.2.1).
What is the fastest possible checkmate?
Fool's mate: 1.f3 e5 2.g4 Qh4#. No game can end in mate before the fourth ply, and exactly 8 different games end in mate at that point (OEIS A079485).
How many possible chess games are there?
Nobody knows exactly. After four plies there are 197,281 possible games and after eight, 84,998,978,956. For the whole game Shannon estimated 10¹²⁰ in 1950 and Allis about 10¹²³ in 1994. Both are rough estimates.
What is the chess clock for?
In games with a time limit, each player has a clock. After making a move you press your side of the clock, which stops your time and starts your opponent's. The Laws describe how it is handled in Article 6.
How many solutions does the eight queens puzzle have?
92, or 12 if rotations and reflections count as the same (OEIS A000170 and A002562).
How many knight's tours are there?
13,267,364,410,532 closed tours, counting a tour and its reverse once (McKay, 1997). An earlier count of 33,439,123,484,294, published in 1996, was wrong.
How much rice is on the chessboard in the story?
18,446,744,073,709,551,615 grains. At about 20 mg a grain that is roughly 3.7 × 10¹¹ tonnes, about 671 years of the world's rice production at the 2024/25 level.
Did the queen always move this way?
No. In medieval chess the queen's predecessor, the fers, moved one square diagonally. The modern queen appeared just before 1500 and had spread through Western Europe by 1600.
How strong is the computer opponent on this page?
It is a small rule-based engine that looks one to three plies ahead. It will beat a beginner and lose to a club player. At the lowest level it makes deliberate mistakes but always takes a mate in one.
Where do the games on this page come from?
The opera game and Réti against Tartakower are from Lasker's Chess Strategy (1915); Marache against Morphy and Anderssen against Hillel are from Staunton's Blue Book of Chess. Both books are on Project Gutenberg. The moves of a game are facts and can be reproduced freely.
Terms
- File, rank: a column (a to h) and a row (1 to 8) of the board.
- Ply: one move by one side. A numbered move in a game score is two plies, one for White and one for Black.
- Check, checkmate: the king is attacked; the king is attacked and cannot escape.
- Stalemate: no legal move and no check. A draw.
- Castling: king two squares toward a rook, rook over to the other side; once a game.
- En passant: capturing a pawn that has just moved two squares as if it had moved one.
- Promotion, underpromotion: a pawn on the last rank becomes another piece; choosing something other than a queen.
- Development: bringing pieces from their starting squares into play.
- Perft: a count of every legal line to a given depth, used to test move generators.
- Knight's tour, closed tour: a knight visits every square once; closed if the last square is a knight's move from the first.
- Fers, alfil: the medieval pieces that became the queen and the bishop.
Sources
- FIDE, Laws of Chess taking effect from 1 January 2023: https://handbook.fide.com/chapter/E012023 (checked 2026-10-20)
- FIDE, Rating Regulations effective from 1 March 2024: https://handbook.fide.com/chapter/B022024 (checked 2026-10-20)
- FIDE, About FIDE (founded in Paris in 1924): https://www.fide.com/about (checked 2026-10-20)
- C. E. Shannon, "Programming a Computer for Playing Chess", Philosophical Magazine 41 (1950), text copy at INFN Pisa: https://www.pi.infn.it/~carosi/chess/shannon.txt (checked 2026-10-20)
- C. E. Shannon, the same paper as a PDF, University of Pavia course page: https://vision.unipv.it/IA1/aa2009-2010/ProgrammingaComputerforPlayingChess.pdf (checked 2026-10-20)
- L. V. Allis, Searching for Solutions in Games and Artificial Intelligence, PhD thesis, University of Limburg 1994 (Maastricht University): https://project.dke.maastrichtuniversity.nl/games/files/phd/SearchingForSolutions.pdf (checked 2026-10-20)
- OEIS A048987, number of possible chess games at the end of the n-th ply: https://oeis.org/A048987 (checked 2026-10-20)
- OEIS A079485, number of chess games that end in checkmate after exactly n plies: https://oeis.org/A079485 (checked 2026-10-20)
- OEIS A000170, number of ways of placing n nonattacking queens on an n × n board: https://oeis.org/A000170 (checked 2026-10-20)
- OEIS A002562, the same with symmetric solutions counted once: https://oeis.org/A002562 (checked 2026-10-20)
- E. W. Dijkstra, EWD 316, A Short Introduction to the Art of Programming, E. W. Dijkstra Archive, University of Texas at Austin: https://www.cs.utexas.edu/~EWD/ewd03xx/EWD316.PDF (checked 2026-10-20)
- J. Bell, B. Stevens, "A survey of known results and research areas for n-queens", Discrete Mathematics 309 (2009): https://doi.org/10.1016/j.disc.2007.12.043 (checked 2026-10-20)
- L. Euler, "Solution d'une question curieuse que ne paroit soumise à aucune analyse" (E309), Euler Archive, University of the Pacific: https://scholarlycommons.pacific.edu/euler-works/309/ (checked 2026-10-20)
- B. D. McKay, "Knight's Tours of an 8 × 8 Chessboard", Australian National University, 1997: https://users.cecs.anu.edu.au/~bdm/papers/knights.pdf (checked 2026-10-20)
- M. Löbbing, I. Wegener, "The Number of Knight's Tours Equals 33,439,123,484,294", Electronic Journal of Combinatorics 3 (1996), with comment: https://www.combinatorics.org/ojs/index.php/eljc/article/view/v3i1r5 (checked 2026-10-20)
- OEIS A001230, number of undirected closed knight's tours on a 2n × 2n board: https://oeis.org/A001230 (checked 2026-10-20)
- OEIS A165134, number of directed Hamiltonian paths in the n × n knight graph: https://oeis.org/A165134 (checked 2026-10-20)
- IBM, Deep Blue: https://www.ibm.com/history/deep-blue (checked 2026-10-20)
- M. Campbell, A. J. Hoane Jr., F. Hsu, "Deep Blue", Artificial Intelligence 134 (2002): https://doi.org/10.1016/S0004-3702%2801%2900129-1 (checked 2026-10-20)
- D. Silver et al., "Mastering Chess and Shogi by Self-Play with a General Reinforcement Learning Algorithm", arXiv 2017: https://arxiv.org/abs/1712.01815 (checked 2026-10-20)
- Computer History Museum, Mastering the Game: https://www.computerhistory.org/chess/ (checked 2026-10-20)
- E. Lasker, Chess Strategy (English translation, 1915), Project Gutenberg: https://www.gutenberg.org/ebooks/5614 (checked 2026-10-20)
- F. M. Edge, The Exploits and Triumphs, in Europe, of Paul Morphy, the Chess Champion (1859), Project Gutenberg: https://www.gutenberg.org/ebooks/34180 (checked 2026-10-20)
- J. R. Capablanca, Chess Fundamentals (1921), Project Gutenberg: https://www.gutenberg.org/ebooks/33870 (checked 2026-10-20)
- H. Staunton, The Blue Book of Chess, Project Gutenberg: https://www.gutenberg.org/ebooks/16377 (checked 2026-10-20)
- W. Caxton, The Game and Playe of the Chesse (1474), Project Gutenberg: https://www.gutenberg.org/ebooks/10672 (checked 2026-10-20)
- R. Willis, An Attempt to Analyse the Automaton Chess Player of Mr. de Kempelen (1821), Project Gutenberg: https://www.gutenberg.org/ebooks/61410 (checked 2026-10-20)
- H. E. Bird, Chess History and Reminiscences (1893), Project Gutenberg: https://www.gutenberg.org/ebooks/4902 (checked 2026-10-20)
- H. J. R. Murray, A History of Chess (1913), Internet Archive: https://archive.org/details/AHistoryOfChessHJRMurray (checked 2026-10-20)
- FAO, Food Outlook, November 2025, rice: https://www.fao.org/3/cd7448en/cd7448en_rice.pdf (checked 2026-10-20)
- FAO, Guidelines on rice production in Fiji (grain weight): https://openknowledge.fao.org/bitstreams/383a4984-bbb8-4bbc-829c-e35db9230af1/download (checked 2026-10-20)





