Skip to the board
BARRELHEAD

Chess

Your move.

You play white and go first. Tap a piece, then a dot. Win by checkmate: attack the red king so it cannot escape.

How to play

Pieces, in pointsYour pieces:39The computer's pieces:39

Opponent
Start over?

The rules, piece by piece

Chess as it is played everywhere, by the Laws of Chess of FIDE, the world chess federation.

The board and the pieces

Sixty-four squares, and all of them are used. It is the board checkers is played on, turned so that each player has a light square in the corner on the near right. Here the dark squares are painted and the light ones are bare oak.

Sixteen pieces each: a king, a queen, two rooks, two bishops, two knights and eight pawns. On this board every piece is a turned chip with its figure painted on top, and the pawns are the smaller chips.

The setup is the same every game. The row nearest each player holds, from the corners inward, a rook, a knight and a bishop, with the queen and the king in the middle. The white queen starts on a light square and the red queen on a dark one, so the two queens face each other. The eight pawns stand on the row in front.

White moves first, and then the sides take turns. Here you have white and the first move, unless you give the first move to the computer under Settings. Then the computer has white, you have red, and the board is turned so that your pieces are still the ones nearest you.

How the pieces move

The king moves one square in any direction.

The queen moves any number of squares in a straight line: along a row, along a column or along a diagonal.

The rook moves any number of squares along a row or a column.

The bishop moves any number of squares along a diagonal. It never leaves the color of square it starts on, so each side has one bishop for the light squares and one for the dark.

The knight moves in the shape of an L: two squares along a row or a column, then one square to the side. It is the only piece that jumps over others.

The pawn moves straight ahead, one square at a time, and never backward. From the row it starts on it may go two squares, if both are empty. It is the only piece that takes in a different way than it moves: one square diagonally ahead.

You take a piece by moving onto its square. It comes off the board, and here it is set in a stack beside it. Queens, rooks and bishops stop at the first piece in their way: they may take it if it belongs to the other side, and they may not pass it. Taking is never forced.

Castling

Once in a game, the king and a rook may move together. The king goes two squares toward the rook along the back row, and the rook is set down on the square the king passed over. It is one move, the only one that moves two pieces.

It is allowed only when all of this is true:

  • Neither piece has moved. The king and that rook both stand where they started and have never left.
  • Nothing stands between them.
  • The king is not in check. You cannot castle to get out of one.
  • The king does not cross an attacked square or land on one.

The rook is under no such limit. It may be attacked, and on the long side it may pass over an attacked square.

On this board you castle by moving the king two squares. The rook follows by itself. When castling is not allowed, the line under the status says which condition is in the way.

The near row of the board with a white king in the middle and a white rook in each corner. One chalk arrow shows the king going two squares to the right. A second arrow shows the rook in the right corner going to the square on the other side of the king.
Castling on the short side. The king goes two squares toward the rook, and the rook is set down on the other side of it.

Taking in passing

A pawn that moves two squares can be taken as if it had moved one. If a pawn goes two squares from its starting row and lands right beside an enemy pawn, that pawn may take it by moving diagonally onto the square it skipped. The capture is called en passant, French for in passing.

The chance lasts one move. It has to be used on the very next turn or not at all. Only a pawn takes this way, and only a pawn is taken this way.

A red pawn and a white pawn side by side. A chalk arrow shows the red pawn having come two squares straight down. A second arrow shows the white pawn moving diagonally to the square behind the red pawn.
The red pawn has just come two squares. The white pawn beside it may take it by moving to the square it passed.

Promotion

A pawn that reaches the far row becomes another piece. In the same move it is replaced by a queen, a rook, a bishop or a knight of its own color. The choice is yours, and it does not depend on what has been taken: a side can have two queens, or more.

It cannot stay a pawn, and it cannot become a king. The new piece works at once. A pawn that becomes a queen can give check with that same move.

Here the four pieces are set out on the board for you to pick from, the queen first. The pawn joins the stacks beside the board, and the new piece is taken from them if one of its kind stands there.

Check and checkmate

A king that could be taken on the next move is in check. The check has to be answered at once, in one of three ways: move the king to a square that is not attacked, take the piece that gives check, or put a piece in between. A check from a knight cannot be blocked.

You may never leave your own king in check, or move it into one. Such a move is not legal, and this board will not make it. It tells you why. For the same reason the two kings can never stand next to each other.

Checkmate ends the game. If the king is in check and no move gets it out, the side that gave the check has won. The king is never actually taken.

How a game is drawn

Stalemate. If the side to move is not in check but has no legal move, the game is a draw. In checkers a side that cannot move has lost. In chess it has not.

Too few pieces. The game is a draw when neither side could ever give checkmate with what is left: king against king, a king and one bishop or one knight against a king, or kings with bishops that all stand on squares of one color.

Repetition. The game is a draw when the same position has come up three times, with the same side to move and the same moves open to it. The three times need not come one after another.

Fifty moves. The game is a draw when each side has made fifty moves in a row with no capture and no pawn move.

This board calls the last two by itself, and warns you when one of them is close. Under the Laws of Chess a player has to claim them, and the game ends on its own only at five repetitions or seventy-five moves. Players at a board can also agree to a draw or resign. Here New game does that job.

Sources

Checked against the Laws of Chess of FIDE, in the edition in force from 1 January 2023, and against the engine that runs this board. Where the two differ, this page says what happens here.

Questions people ask

Can you castle out of check?

No. A king that is in check may not castle. It may not castle across an attacked square either, or onto one.

What happened earlier does not matter. A king that was in check ten moves ago and got out of it without moving can still castle. The rook may be under attack the whole time.

Can the king take the piece that gives check?

Yes, if nothing protects that piece. A king takes like any other piece. Its one limit is that it may not move onto an attacked square, so it cannot take a piece that another piece guards.

What is the difference between checkmate and stalemate?

Whether the king is in check. In both, the side to move has no legal move. If its king is attacked, that is checkmate and it has lost. If not, that is stalemate and the game is a draw.

A side that is far ahead can throw the win away like this. Leave the lone king a square to step to until you are ready to give the mate.

Do you have to take en passant?

No. Like every capture in chess it is a choice, unless it happens to be the only legal move you have. If you want it, take it at once: the right is gone after one turn.

Can a pawn move or take backward?

Never. A pawn moves straight ahead and takes diagonally ahead. It is the one piece that cannot go back to a square it has left, which is why a pawn move deserves a second look before you make it.

How many queens can you have?

Nine at most: the one you started with and one for each of your eight pawns. A pawn may also become a rook, a bishop or a knight.

Picking something other than a queen is rare. It is right when a knight gives a check that a queen would not, or when a queen would leave the other side in stalemate.

Can a king give check?

No. To attack the other king it would have to stand next to it, and there it would be attacked itself. A king still takes part in most mates, by covering the squares the other king would run to.

What if the same position keeps coming back?

The third time, this board calls the game a draw. What counts is the whole position, not the last few moves: every piece on the same square, the same side to move, the same rights to castle and to take en passant.

The line under the status tells you when a position has come up twice. If you are ahead, that is the moment to play something else.

Who goes first, and does it matter?

White goes first. Moving first is a small advantage: in large collections of games between strong players, White scores somewhat more than half the points. Between two people who are learning, it is nothing next to the first piece left where it can be taken.

To play red here, give the first move to the computer under Settings.

What do the letters in the list of moves mean?

Each move is written as a piece and the square it goes to. K is the king, Q the queen, R a rook, B a bishop and N a knight. A move with no letter is a pawn move. The columns are lettered a to h from White's left and the rows numbered 1 to 8 from White's side, so e4 is three steps in front of White's king.

An x means takes, a plus sign is check and # is checkmate. O-O is castling on the short side and O-O-O on the long side. The list is under the buttons, behind the word Moves.

Has chess been solved?

No. Checkers was solved in 2007: played without a mistake it is a draw. In chess, every position with seven pieces or fewer has been worked out completely. The full game, with thirty-two, is far out of reach.

How games are won

Count what the pieces are worth

Players count in pawns. A pawn is 1, a knight 3, a bishop 3, a rook 5 and a queen 9. The king has no number, because it is never traded. The two numbers beside the board add up what each side has left on that scale, starting at 39.

The numbers are a rule of thumb, not a rule of the game, but they settle most questions about a trade: a rook for a knight loses two points. The engine here counts a little finer. It puts a bishop slightly above a knight, and two bishops together above that.

Look at what the last move attacks

Most games between people who are learning are decided by a piece left where it can be taken for nothing. Before every move, ask two things. What does the move the computer just made attack? And on the square I am about to move to, can my piece be taken?

The lower levels here lose their games the same way, on purpose. Look for what they have left standing.

Bring your pieces out

At the start only the knights and the pawns can move. Use the first moves to get the knights and bishops off the back row and aimed at the middle of the board, where a piece reaches the most squares. One or two pawn moves in the center open the way.

Do not move the same piece twice while others still stand at home, and do not bring the queen out early. It is worth too much to stay where a knight or a bishop can attack it, so every such attack costs you a move.

Castle early

Castling does two jobs in one move. The king leaves the middle, where the columns open up first, and stands behind three pawns. The rook comes out of its corner toward the center.

Then leave those three pawns alone for as long as you can. The engine here takes points off for gaps in the row of pawns in front of a king.

Give the king a way out

The same three pawns can become a cage. If a rook or a queen lands on your back row with check, and your king cannot step forward because its own pawns stand there, that is checkmate. It is called the back-rank mate.

The cure costs one move. Push one of the three pawns a single square at a quiet moment, and the king has somewhere to go.

A red king in the far row with three red pawns in a row right in front of it. A white rook stands in the same row as the king, and a chalk arrow shows it having come straight up the board.
The rook gives check along the back row. The king is shut in by its own pawns: checkmate.

Attack two things at once

One threat can be answered. Two at once usually cannot. A piece that attacks two pieces in one move is called a fork, and the knight is the best at it, because nothing can be put in its way.

A pin is the other common trick: a bishop, rook or queen attacks a piece that cannot step aside, because a more valuable piece stands behind it on the same line. A piece pinned against its king may not leave that line.

Trade when you are ahead

An extra knight among thirty pieces is easy to miss. An extra knight when each side has only a king and a few pawns left wins the game. So when you are ahead, offer even trades of pieces, and when you are behind, avoid them.

Late in the game, with the queens gone, bring the king forward: it is a strong piece once mate is no longer a danger. And push a pawn that has no enemy pawn ahead of it. If it reaches the far row, it becomes a queen.

Learn the two basic mates

With best play a king and a queen mate a lone king in at most ten moves, and a king and a rook in at most sixteen. The method is the same in both. Use the big piece to shrink the space the lone king has, bring your own king up beside it, and give the mate on the edge of the board.

With the queen, watch for stalemate. Practice both until they are automatic: a won game is not won until you can finish it.

Use the hint as a second opinion

The Hint button shows the move the engine would make at full strength. Decide on your own move first, then press it. When the two differ, work out what the engine's move does that yours does not.

How the computer plays here

Five levels, one engine. The four lower ones are made to overlook things the way people do.

How it thinks

The computer tries its moves, your answers and its answers to those, as far ahead as the level allows. At the end of each line it scores the position, and it plays the move that leaves it best off if you reply as well as you can.

The score starts with the pieces: a pawn about one, a knight a little over three, a bishop slightly more than a knight, a rook about five and a queen just under ten. Then it adds and subtracts for where each piece stands and how many squares it can reach, how the pawns hold together, how far a pawn with a clear road has come, and how well each king is covered.

All of this happens on your own device, in your browser, on a thread of its own, so the page keeps answering while the computer thinks. Undo stops it in the middle of a thought.

The opening book

Medium, Hard and Expert begin from a small book of 55 opening lines, four or five moves by each side. The lines were written by hand for this site from well-known openings: the Ruy Lopez, the Italian, the Sicilian, the French, the Caro-Kann, the Queen's Gambit, the Indian defenses, the English and the Réti.

When more than one line fits the position, the engine picks one by chance, so games do not all begin alike. Beginner and Easy never use the book.

Beginner

Looks at its own move and your answer, and no further. For each of your pieces there are about two chances in three that it does not see what that piece can do this move, and it forgets about half of its own. It does not count an exchange to the end, and among moves that look about as good to it, it picks freely.

So it leaves pieces where they can be taken, passes up pieces it could have for nothing, and now and then walks into a mate in one.

Easy

Thinks the same way with better eyes. It misses about one of your pieces in three and forgets one of its own in four.

Medium

Counts every exchange to the end and misses about one piece in six. It still looks only as far as your answer, so a fork or a pin that takes two moves to set up gets through.

Hard

Looks four half-moves ahead, two by each side, and misses about one piece in twenty-five.

Expert

The engine at full strength. It has no fixed depth: it gets one second for each move and looks as far as that allows. It never overlooks anything on purpose and never picks a move by chance.

On the computer where it was measured, that was 14 half-moves from the starting position, seven by each side. In the middle of a game it was between 12 and 20, and with fewer than sixteen pieces left it was 16 to 25. A phone gets less far in the same second.

The levels against each other

Each level has played the level below it. The games began after the openings in the book, and every opening was played twice, once with each color. For the higher level:

  • Easy against Beginner: 366 wins, 12 draws, 22 losses in 400 games.
  • Medium against Easy: 391 wins, 3 draws, 6 losses in 400 games.
  • Hard against Medium: 390 wins, 3 draws, 7 losses in 400 games.
  • Expert against Hard: 80 wins in 80 games.

These steps are very steep, steeper than in any other game here. In chess the distance from someone who has just learned the moves to an engine at full strength is enormous, and five levels have to cover all of it. If a level has become easy, expect the next one to be a jolt.

The bottom of the ladder was checked too. A simple stand-in for a new player took a piece when it saw one free, sometimes moved a threatened piece away, and otherwise moved at random. Over 400 games against Beginner from the starting position it won 188, drew 154 and lost 58. Many of the draws were games it was winning and did not know how to finish.

These are games between programs, measured on 9 and 10 October 2026. No rating has been measured for any level, and no person had played them when this was written.

What the hint is

The Hint button asks the same engine at full strength: one second, no fixed depth, no opening book and never a careless move. Using it does not make the level you are playing any stronger, because every search starts from nothing. Hints are counted, and the count is shown with your record at the bottom of the page.

The other barrels

Checkers is the one where a jump has to be taken, and where a piece that reaches the far row becomes a king, two pieces high.

Backgammon is a race with dice: fifteen pieces a side, and a piece left on its own can be hit and sent back to the start.

Shut the Box is nine numbered tiles and two dice: every roll has to be paid for with tiles that add up to it, and the lower sum left open wins.

Farkle is six dice and a race to 10,000: bank what a turn is worth, or roll again and risk losing all of it.

Yatzy is five dice and a scorecard of thirteen rows: three rolls a turn, and every turn has to be written in a row, even when it is worth nothing there.

Dominoes is twenty-eight tiles and a line that grows at both ends: match a number, draw from the boneyard when nothing fits, and lay your last tile first.

Reversi has one kind of move: put a piece down so that it traps a row of the other color, and the row turns to yours.

Mancala has no dice and nothing hidden: you empty a pit, sow its stones round the board one at a time, and count what ends up in your store.

Chinese Checkers is a race across a star of 121 holes: marbles hop over one another in chains, nothing is ever captured, and the first side to fill the point opposite wins.

Nine Men's Morris is the old game of mills: nine pieces a side, three in a row along a line takes a piece off, and a side left with two pieces or no move has lost.

Tic-Tac-Toe is three in a row on nine squares, and next to it Ultimate tic-tac-toe, where every square holds a small board and each move decides where the next one is played.

Four in a Row is the standing rack laid flat: seven lanes of six places, a piece slides down its lane until it is stopped, and the first side with four in a row wins.

Gomoku is five in a row on a board of fifteen lines each way: pieces go where the lines cross, and three in a row with both ends open has to be answered at once.

Ludo is the race with one die: a six brings a piece out of its yard, landing on another color sends that piece back, and the first side with all four pieces home wins.

No games played yet.

Red for the games you won, white for the ones you lost. Your record is kept in this browser and nowhere else.

Start over?