Skip to content

How to play tic-tac-toe (noughts and crosses): rules and how never to lose

Two players take turns marking X and O on a 3 by 3 grid; three in a row wins. The rules take seconds, and a short list of priorities means you never lose. Here are both, plus forks and the bigger 4 by 4 board.

By our team. Published . 1 source.

Play it free in Parlour

Tic-tac-toe, called noughts and crosses in the UK and much of the Commonwealth, is a game for two players on a grid of three rows and three columns. One player is X and the other is O. They take turns putting their mark in an empty square, and the first to get three marks in a row, across, down or diagonally, wins. If all nine squares fill up with no line, the game is a draw [1].

The game is solved: if both players play well, it always ends in a draw [1]. That makes the interesting question not how to win against a perfect player, but how never to lose, and how to catch out someone who slips.

The rules

  1. Draw a grid of two vertical and two horizontal lines, making nine squares.
  2. Decide who is X. X usually goes first.
  3. Take turns writing your mark in any empty square. You cannot skip a turn or change a mark.
  4. Three of your marks in a straight line, across a row, down a column or along one of the two diagonals, wins at once [1].
  5. If the grid is full and nobody has a line, the game is a draw, sometimes called a cat's game.

Since going first helps, swap who is X after each game.

Why good games are draws

There are only 765 essentially different positions in tic-tac-toe, and 26,830 possible games once you count rotations and reflections as the same [1]. That is small enough to search completely, so the outcome of perfect play is known: a draw [1]. One of the first video games, OXO, written for Cambridge's EDSAC computer in 1952, already played tic-tac-toe perfectly [1].

How never to lose: the priority list

A well-known program by Newell and Simon from 1972 plays perfectly by checking a short list in order on every move [1]. Take the first one that applies:

PriorityMoveWhat it means
1WinIf you have two in a line and the third square is empty, take it.
2BlockIf your opponent has two in a line, take the third square.
3ForkMake a move that creates two lines of two at once.
4Block a forkStop a move that would give your opponent a fork.
5CentreTake the centre square if it is free.
6Opposite cornerIf your opponent has a corner, take the corner opposite it.
7Empty cornerTake any free corner.
8Empty sideTake any free edge square.

Follow it and you will never lose. The two that win games are 3 and 4: forks.

Forks: how games are won

A fork is a move that makes two lines of two at the same time, each with its third square empty. Your opponent can block only one, so you complete the other next turn.

A typical fork for X:

  1. X takes a corner.
  2. O answers on an edge (a mistake).
  3. X takes the centre or another corner so that two lines through X's marks each need one more square.
  4. O blocks one, and X completes the other.

Blocking a fork is subtler than blocking a line. Sometimes the best defence is to make a line of two of your own, so your opponent must block you instead of setting up their fork. Just make sure the square they block with does not itself create their fork.

The best first move

As X you can open in a corner, the centre or an edge. With perfect play all three lead to a draw [1]. In practice:

  • A corner gives O the fewest safe replies: O must take the centre, or X can force a win [1].
  • The centre sits on four lines (a row, a column and both diagonals), more than any other square, and one study found it the best opening against players who make mistakes [1].
  • An edge is the weakest practical start, because it sits on only two lines.

As O, if X opens in a corner, take the centre. If X opens in the centre, take a corner. Taking an edge in either case gives X a forced win.

Common mistakes

  • Not looking for the opponent's two in a row. Check every line before every move. Blocking is priority 2 for a reason.
  • Answering a corner opening with an edge. It loses by force.
  • Making a line of two that helps them. If the square your opponent must block with gives them a fork, you have set your own trap.

Bigger boards

People often play on larger grids to avoid constant draws. On a 4 by 4 board, the usual goal is four in a row, which is harder to force and gives more room for traps. Ancient three-in-a-row boards have been found from Egypt, and the Romans played a version called terni lapilli, in which each player had only three pieces to move around [1].

Common questions

Can you always win tic-tac-toe?
No. Against a player who makes no mistakes, the best you can do is a draw, whoever goes first [1]. You win by spotting your opponent's errors and setting up forks.
What is the best first move in tic-tac-toe?
All three openings draw with perfect play [1]. A corner leaves your opponent the fewest safe answers, and the centre is the easiest to play well, so both are good choices. An edge is the weakest.
Is it noughts and crosses or tic-tac-toe?
They are the same game. Noughts and crosses is the usual British and Commonwealth name, and tic-tac-toe the American one [1].
What is a fork in tic-tac-toe?
A move that creates two lines of two at once, each with its third square empty. Your opponent can block only one, so you win with the other.
How many possible games of tic-tac-toe are there?
26,830 if rotations and reflections count as the same game, from 765 essentially different positions [1].

Sources

Checked on 11 November 2026.

  1. 1.Wikipedia, "Tic-tac-toe" (rules, names, game counts, Newell and Simon strategy, history): https://en.wikipedia.org/wiki/Tic-tac-toe
More game rules