Board & Cards10-30 min
Chess
Play the computer, from Easy to Hard
How to play
- 1Choose your colour (White moves first, Black second) and a level, then press Start.
- 2Tap a piece and its legal destinations appear as dots, with circles on pieces you can capture. Tap a square to play the move.
- 3When your king is in check its square turns red, and only moves that answer the check are allowed.
- 4A pawn reaching the last rank opens a window to choose its replacement. A queen is usually, though not always, the right answer.
- 5Made a mistake? Undo takes the position back to before your last move. You can also resign a game that is lost.
Controls
- Click / tap
- Select a piece, then tap a destination square
- Arrow keys
- Move around the squares (click the board once or Tab into it first)
- Enter / Space
- Pick up the piece on the selected square, or play to that square
- Undo button
- Take the position back to before your last move
Tips
- In the opening, take the centre squares (d4, e4, d5, e5), bring the knights and bishops out early, and castle your king into a safe corner.
- Rough piece values: pawn 1, knight and bishop 3, rook 5, queen 9. Use those numbers to check whether an exchange gains or loses material.
- Before each move, ask what your opponent is threatening and whether any of your pieces is undefended. The computer never overlooks an undefended piece.
- The Hard computer sees three moves ahead and no further. It is weak against attacking plans that take four or more moves, and against moves that look like a loss now but pay off later.
- When you are ahead on material, trade pieces and simplify. The fewer pieces remain, the easier it is for the side in front to convert.
- Pawns cannot go back. Push one and the square it left is empty forever - and pushing the pawns in front of a castled king opens the lines your opponent needs. Move them only when you have a concrete reason.
- When you are losing, play for a draw. A bare king with one pawn that captures the last enemy pawn is a draw by insufficient material; so is repeating a position three times, or fifty moves with no pawn move and no capture. All three rules are live here.
- A knight reaches eight squares from the centre of the board and two from a corner. Never leave a knight on the rim - it is the same piece doing a quarter of the work.
What is Chess?
Chess is played on an 8x8 board with sixteen pieces a side - king, queen, rooks, bishops, knights and pawns. Attack the enemy king so that no move of theirs can save it and you have delivered checkmate. It is, by most measures, the most played board game in the world.
The rules here are complete. Castling, where king and rook move together; en passant, capturing a pawn that has just run past yours; promotion of a pawn on the last rank to a queen, rook, bishop or knight - all of it works. So do the draws: stalemate when you have no legal move and are not in check, the fifty-move rule, and threefold repetition. The move generator was verified with perft, the node count every chess programmer uses.
The computer has three levels. Easy looks one move ahead and plays the odd loose move, which is right for someone learning. Normal looks two moves ahead; Hard looks three and plays exchanges out to the end. You can take back your moves, and a game in progress is saved in your browser so you can come back to it later.
The three levels were measured against each other rather than guessed at. Over twenty games with the colours alternating, Normal beats Easy 20-0, and Hard takes 16 wins and 4 draws against Normal without losing once. Hard conceding four draws to Normal is simply because all three share the same evaluation and differ only by a move of depth. On a human scale even Hard is somewhere between beginner and intermediate: dedicated chess programs search tens of moves and millions of positions, while this one has to answer inside a second in your browser. Which is to say it is beatable - and that is the point of a practice opponent.
The game reached Europe from sixth-century India, through the Persian shatranj; the word checkmate comes from the Persian shah mat, the king is helpless. The queen only became the sweeping piece we know in fifteenth-century Europe - before that she moved one square at a time. The first official world champion was crowned in 1886, and in 1997 a computer first beat a reigning world champion in a match. The number of possible games is on the order of 10 to the 120th power, so calculating all of them remains out of reach.
Frequently asked questions
How does en passant work?
When an enemy pawn advances two squares and lands directly beside your pawn, on your very next move only you may capture it diagonally as though it had moved one square. When the capture is available, that square is shown with a dot.
Why can I not castle?
Castling needs the king and that rook never to have moved, the squares between them to be empty, the king not to be in check, and the square it passes over not to be attacked. Tap the king and, when castling is legal, a dot appears two squares across.
What is recorded?
Your wins, losses and draws against each level, and the win with the fewest moves, are stored in this browser only.
What happens to a game in progress?
It is saved after every move, so closing and reopening the page continues the same game. Starting a new game discards the saved one.
Is repeating moves a draw?
Yes. The third occurrence of the same position ends the game as a draw on the spot. The same position means more than the pieces matching - whose turn it is, which castling rights remain and which en passant square is available must all be identical. So if you send a knight out and back and your opponent does the same, the third repetition draws. It is also the most common way to save a losing game.
What is the fifty-move rule?
If fifty moves pass for each side with no pawn moved and no piece captured, the game is a draw. It exists to stop a position neither side can win from running on forever. Pushing a pawn or making a capture resets the count to zero.
Is stalemate a loss?
No, it is a draw. Stalemate is when it is your turn, you are not in check, and you have no legal move at all. It is easy to confuse with checkmate and the result could not be more different: hunting a bare king while far ahead, one careless move turns a won game into a draw. Always leave the enemy king one square to go to while you drive it.
How strong is the computer?
It was measured by playing the levels against each other. Over twenty games with the colours alternating, Normal beats Easy 20-0 and Hard takes 16 wins and 4 draws against Normal. On a human scale even Hard sits between beginner and intermediate, because it has to answer inside a second in your browser and therefore looks only three moves ahead. It is weak against plans that take four or more moves, and against moves that cost material now but pay off later.
Must a pawn on the last rank become a queen?
You may choose a queen, rook, bishop or knight. A queen is almost always strongest, but if promoting to a queen would leave your opponent stalemated and draw the game, a rook is the winning choice. Occasionally a knight promotion that gives an immediate check and forks the queen is the right answer.
How do I know the rules are implemented correctly?
With perft, the check chess programmers all share. Counting every legal move from the starting position by depth should give 20 at one move, 400 at two, 8,902 at three and 197,281 at four, and this engine produces exactly those numbers. If en passant, castling, promotion or check evasion were wrong anywhere, the counts would not match - which makes it the simplest possible evidence that the rules are right.
Why is a pawn 1, a knight 3 and a rook 5?
They are approximations distilled from how many squares each piece reaches on average and from which side won after such exchanges in real games. They are not absolute: a knight outclasses a bishop in a blocked position and the reverse is true in an open one, and trading a rook (5) for knight plus bishop (6) is a loss on paper but depends entirely on the position. Even so, the habit of counting with these numbers just before an exchange cuts blunders dramatically.