Skip to the board
BARRELHEAD

Tic-Tac-Toe

Your move.

You play red and go first. Put a piece in any square. Three in a row wins: across, down or corner to corner.

Your pieces:0The computer's pieces:0

Game
Opponent
Start over?

Two games on nine squares

Tic-tac-toe, the game also called noughts and crosses, and the larger game that is built out of it.

The board and the pieces

Nine squares in three rows of three. On this board they are nine painted squares, with bare wood between them where a pencil would draw the lines.

Red and white pieces stand in for X and O. You play red and the computer plays white, unless you swap the colors under Settings.

The board starts empty. The first move is yours, unless you give it to the computer under Settings. Your color and the first move are separate choices there.

The classic game

The two sides take turns putting one piece in an empty square. A piece never moves and is never taken.

Three in a row wins. The row can run across, down, or from corner to corner. That makes eight rows in all: three across, three down and the two diagonals.

A full board with no row is a draw. It takes nine moves to fill the board, five by the side that started and four by the other.

Ultimate: nine boards in one

Every square holds a small board of its own. Choose Ultimate under Game, next to the board, and each of the nine squares becomes a tic-tac-toe board, 81 small squares in all.

Three in a row in a small board wins that board. Here the small pieces are then taken off it, and one large piece in the winner's color is put in their place.

Three small boards in a row win the game. Across, down or corner to corner, just as in the classic game.

Ultimate: where you may play

The first move can go in any of the 81 squares.

After that, every move decides where the next one is played. The square you pick inside a small board points to the small board in the same place on the large one. Play the top right square of any small board, and the computer has to play in the top right small board.

A finished board sets you free. A small board that has been won, or has filled up without a winner, is closed: nobody plays in it again. If your opponent's move sends you to a closed board, you may play in any small board that is still open.

A chalk frame shows where you may play. One frame when you have been sent to a board, a frame around every open board when the choice is yours.

The Ultimate board with five small pieces on it. A red piece stands in the top right square of the middle small board, and a chalk arrow runs from it to the top right small board, which has a chalk frame around it.
Red played the top right square of the middle board, so white has to play in the top right board, the one with the chalk frame.

How a game of Ultimate ends

Three small boards in a row and the game is won.

A small board that fills up with no row counts for no one. Its nine pieces stay where they are, and neither side can use that square of the large board.

No square left to play is a draw. That happens when every small board is closed and nobody has three of them in a row.

Sources

The rules of Ultimate were checked against the rules section of the Wikipedia article on Ultimate tic-tac-toe, and both games against the engine that runs this board. The article does not say who gets a small board that fills up without a winner. Here nobody does.

Questions people ask

Can you always win at tic-tac-toe?

No. If both sides play correctly, the game is a draw. The classic game is small enough to play out in full. There are 255,168 different games from the empty board to the end. The side that starts wins 131,184 of them, the other side wins 77,904, and 46,080 are drawn.

Those numbers count every game, the careless ones included. Take the best move each time and all that is left is the draw.

What is the best first move?

A corner, because it leaves the other side only one good answer. Every first move leads to a draw against correct play, so the best one is the one that is easiest to go wrong against.

  • After a corner: only the center holds the draw. The seven other replies lose.
  • After the center: the four corners hold the draw. The four squares in the middle of a side lose.
  • After the middle of a side: four replies hold the draw and four lose.

"Lose" here means lose against correct play. The engine that runs this board played every line out to check.

Does it matter who goes first?

Not between two players who make no mistakes. In practice it helps: the side that starts makes five of the nine moves and has the first chance to set a trap.

Is tic-tac-toe the same as noughts and crosses?

Yes. Noughts and crosses is the British name for the same game, and Xs and Os is another. Here the two marks are red and white pieces.

In Ultimate, can I play in a small board that is already won?

No. A small board is closed as soon as it has a winner, and also when it is full. If a move sends you to a closed board, you choose freely among the open ones.

What happens to a small board nobody wins?

It counts for neither side. The pieces stay on it, it is closed for the rest of the game, and no row of three boards can run through it.

Can a game of Ultimate end in a draw?

Yes. When the last open small board closes and neither side has three small boards in a row, the game is drawn.

Has Ultimate tic-tac-toe been solved?

Not with these rules. The game is far too large to play out in full the way the classic game can be.

A close relative has been settled. In the version where a small board that is already won stays open as long as it has empty squares, a proof from 2020 shows that the side that moves first can always win. That rule is not used here.

What else is Ultimate tic-tac-toe called?

Super tic-tac-toe, meta tic-tac-toe and strategic tic-tac-toe are names for the same game.

Why does the board come closer when I tap it?

Because the small squares of Ultimate are smaller than a fingertip on a phone. There the first tap on a small board brings it closer, the second tap picks the square, and a tap outside the small board shows the whole board again.

On a screen where the squares are large enough, or with a mouse, a move is a single click.

Are the classic game and Ultimate kept apart?

Yes. Each has its own board, its own saved game and its own record. Switching under Game leaves the other game where it was, and it is still there when you switch back.

How games are won

Open in a corner

Against a corner there is exactly one reply that does not lose, and it is the center. Anyone who answers with another corner or with the middle of a side has lost already, provided you find the moves.

Answer a corner with the center, and the center with a corner

When the computer starts, those are the replies that keep the draw. Against a first move in the center, a piece in the middle of a side loses. Against a first move in a corner, everything except the center does.

Make two threats at once

Two of your pieces in a row with the third square empty is a threat, and one threat can be blocked. Two at the same moment cannot. Nearly every game of tic-tac-toe that is won is won that way.

The best known trap starts corner, center, opposite corner. If the second player now takes one of the two free corners, the first player takes the last one, which blocks a row and makes two threats with the same piece.

The classic board. Red pieces stand in three corners, white pieces in the center and the fourth corner, and two of the empty squares have chalk rings in them.
Red has three corners. Both squares with a ring finish a row, and white can block only one.

Win before you block

When the computer has two in a row with the third square open, you have to take that square. Look at your own rows first, though: if you can finish one, do that, because the game is over before the block is needed.

In Ultimate, look at where your move sends

Every square is two decisions at once: what the piece does in its own small board, and which small board it hands to the other side. A square that you want, but that sends the computer to a board where it can finish a row, is usually a bad trade.

Think twice before sending to a finished board

A move into a square that points at a closed board gives the other side a free choice of every open board. Sometimes the move is worth it. The engine here counts the free choice as an advantage in its own right.

A small board is worth what its rows are worth

The center board lies on four of the eight rows of the large board, a corner board on three, and a board in the middle of a side on two. The more rows a small board can still help to win, the more it is worth fighting for.

A small board that only lies on rows the other side has already cut is worth little, however easy it is to win.

Use the hint as a second opinion

The Hint button shows what the engine would play at full strength. In the classic game that is perfect play: follow it every move and you cannot lose, whatever the level.

How the computer plays here

Five levels in each game, one engine. In the classic game the top level cannot be beaten. In Ultimate it can, though not easily.

How it thinks

The computer tries its moves, your answers and its answers to those, as many moves deep as the level allows, and plays the move that leaves it best off if you reply as well as you can.

The classic game has at most nine moves, so the stronger levels simply play it out to the end and know the result. The weaker ones stop early and count rows that can still be won.

Ultimate is too large for that, so positions are scored. For every small board the engine knows how likely each side is to win it. Those chances were worked out once for all 19,683 ways a small board can look, as the share of wins when the empty squares are filled at random. The score is then the chance of taking all three boards in each of the eight rows of the large board, added up for its side, minus the same sum for yours.

All of this happens on your own device, in your browser.

Beginner

Classic: takes a win when it sees one, but seven times in ten it misses that your row needs blocking, and otherwise it plays anywhere.

Ultimate: sees only its own move and the small board it is played in, and picks freely among moves that look about equally good.

Easy

Classic: blocks your rows, except in one move out of five, but has no feeling for the center and the corners.

Ultimate: sees your answer as well, so it does not hand you a small board outright, except in one move out of three. It still counts small boards one at a time, without the rows of the large board and without looking at where its move sends you.

Medium

Classic: prefers the center and the corners and nearly always blocks, but does not see a double threat coming.

Ultimate: uses the full score, with the rows of the large board and the board each move sends you to. It is careless in about one move out of seven.

Hard

Classic: looks four moves ahead, far enough to see double threats from both sides. In one move out of eight it looks only two moves ahead, and can walk into a trap.

Ultimate: looks four moves ahead and is never careless.

Expert

Classic: plays without error and cannot lose. Among the moves that are equally good against a perfect opponent, it picks the one that gives an opponent who plays at random the most ways to go wrong.

Ultimate: gets one second for every move in place of a fixed depth, and after the first few moves always plays the best move it has found.

The classic levels, measured

Two good players draw at tic-tac-toe, so the levels are not measured against each other. Each level has played 2,000 games against the same imperfect opponent: one that takes a win when it has one, blocks a row of two four times out of five, and otherwise plays anywhere.

  • Beginner: 468 wins, 362 draws, 1,170 losses.
  • Easy: 678 wins, 621 draws, 701 losses.
  • Medium: 752 wins, 1,099 draws, 149 losses.
  • Hard: 987 wins, 966 draws, 47 losses.
  • Expert: 1,229 wins, 771 draws, no losses.

Every level wins more and loses less than the one below it.

The Ultimate levels against each other

In Ultimate each level has played the level below it from an empty board, taking turns to go first.

  • Easy against Beginner: 877 wins, 39 draws, 84 losses.
  • Medium against Easy: 899 wins, 51 draws, 50 losses.
  • Hard against Medium: 327 wins, 60 draws, 13 losses, over 400 games.
  • Expert against Hard: 28 wins, 2 draws, no losses, over 30 games.

The last figure rests on few games, because Expert uses its full second for every move.

What the hint is

The Hint button is the engine at full strength. In the classic game that is the same perfect play as Expert. In Ultimate it is one second of search with no variety, which is Expert without the changes it makes to its opening moves.

Using it does not make the level you are playing any stronger: 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.

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.

Classic

No games played yet.

Red for the games you won, white for the ones you lost. Classic and Ultimate are counted apart, and this is the record of the one on the board. It is kept in this browser and nowhere else.

Start over?