How to play chess
- 1Chess is played on an 8×8 board of alternating light and dark squares. Each side starts with a king, a queen, two rooks, two bishops, two knights and eight pawns. White moves first.
- 2The rook moves any distance in straight lines; the bishop any distance diagonally; the queen combines both. The knight jumps in an L — two squares one way and one square perpendicular — and is the only piece that can leap over others.
- 3The king moves one square in any direction. Pawns move one square forward, or two from their starting rank, and capture one square diagonally forward.
- 4Castling moves the king two squares toward a rook and jumps that rook to the other side. It requires that neither piece has moved, the squares between are empty, and the king is not in check and does not pass through or land on an attacked square.
- 5En passant: if a pawn advances two squares and lands beside an enemy pawn, that pawn may capture it as if it had only moved one square — but only on the immediately following move.
- 6A pawn reaching the far rank promotes, usually to a queen, but a rook, bishop or knight may be chosen instead.
- 7You win by delivering checkmate: the enemy king is attacked and no legal move escapes. If a player has no legal move and is not in check, the game is a stalemate — a draw.
- 8Other draws: threefold repetition of the same position, fifty moves by each side with no capture and no pawn move, and insufficient material to mate.
Chess strategy guide
Fight for the centre
Pieces control more squares from the middle of the board, and central pawns restrict where your opponent can put things. Openings like 1.e4 and 1.d4 exist because occupying and contesting e4, d4, e5 and d5 is worth real material over time.
Develop every piece before attacking
The most common beginner mistake is bringing the queen out early and chasing it around the board while the opponent develops with tempo. Knights and bishops first, castle your king to safety, connect your rooks — then look for targets.
Check every capture and check, every move
Before you play anything, scan for all captures, all checks and all threats — yours and theirs. Almost every game below 1500 is decided by a piece left hanging or a two-move tactic that neither side saw. This one habit is worth more than any opening you can memorise.
Know the rough value of the pieces
A pawn is 1, a knight and bishop about 3, a rook 5, a queen 9. The king is priceless. These are guidelines, not laws — two bishops working together are worth more than the sum of their parts, and a knight in a locked position can be worthless — but they will keep you from bad trades.
In the endgame, activate your king
Once the queens are gone, the king becomes a strong attacking piece. Marching it toward the centre and toward passed pawns is often the winning plan. Meanwhile, a passed pawn should be pushed, and rooks belong behind passed pawns — yours or your opponent’s.
The history of chess
Chess grew out of chaturanga, a four-player Indian war game of roughly the 6th century, which became shatranj in Persia and travelled to Europe through the Islamic world. The medieval European version was slow: the queen moved one square diagonally and the bishop jumped exactly two.
The modern game appeared in Spain and Italy at the end of the 15th century, when the queen and bishop gained their long-range moves. The change was so dramatic that the new game was called "mad queen chess". Castling, en passant and the rest of the modern rules settled over the following two centuries, and the first official World Championship was held in 1886.
Chess has been the central proving ground of artificial intelligence since Claude Shannon’s 1950 paper on programming a computer to play it. Deep Blue beat Garry Kasparov in 1997 using exactly the kind of alpha-beta search this page uses, only vastly faster; AlphaZero in 2017 showed that self-play reinforcement learning could surpass it. The engine here is deliberately modest by comparison — it is meant to be beatable.
Chess FAQ
- Is this a strong chess engine?
- It is an honest one, not a strong one. It runs alpha-beta search with quiescence and piece-square evaluation entirely in your browser, reaching a few plies deep within a fixed time budget. Level 4 will beat a casual player; it will not trouble a rated club player.
- Can I castle and capture en passant here?
- Yes. All standard rules are implemented, including both castlings with their full legality conditions, en passant, underpromotion to rook, bishop or knight, stalemate, threefold repetition, the fifty-move rule and insufficient material.
- What is the best first move in chess?
- 1.e4 and 1.d4 are the two most popular, and neither is objectively better. 1.e4 tends to lead to open, tactical games; 1.d4 to slower positional ones. At club level the opening matters far less than not hanging pieces.
- Why did the game end in a draw when I was clearly winning?
- Most likely stalemate — if your opponent has no legal move and is not in check, the game is drawn regardless of material. Threefold repetition and the fifty-move rule can also end a won position. Keep an escape square available for the enemy king when you are mating.
- How do I improve fastest as a beginner?
- Play slowly enough to check every check, capture and threat before moving; study basic checkmates and simple endgames; and review your losses to find the exact move where things went wrong. Openings are the least valuable thing to study first.