How to Never Lose at Tic-Tac-Toe

By Alok Singh · Published

Tic-tac-toe looks like a game of luck, but it's a solved game: if both players play perfectly, every game ends in a draw. That means you can learn a strategy that guarantees you never lose, and wins often against anyone who doesn't know it.

The board

Number the squares like a phone keypad:

1 | 2 | 3
---------
4 | 5 | 6
---------
7 | 8 | 9

The centre is part of four possible lines, each corner of three, and each edge of only two. That's why the centre and corners matter most.

The priority rules

On every move, go down this list and do the first thing that applies:

  1. Win: if you have two in a line and the third square is empty, take it.
  2. Block: if your opponent has two in a line, block the third square.
  3. Fork: make a move that creates two winning threats at once. Your opponent can only block one.
  4. Block a fork: if your opponent could create a fork next move, prevent it, ideally by making a two-in-a-row threat that forces them to respond.
  5. Centre: take the centre if it's free.
  6. Opposite corner: if your opponent is in a corner, take the opposite corner.
  7. Empty corner: take any free corner.
  8. Empty edge: take an edge.

Follow these rules and you will never lose. This is essentially the strategy researchers Allen Newell and Herbert Simon described for a tic-tac-toe program in the 1970s.

Playing first (X)

Open in a corner. Against a perfect opponent every opening draws, but a corner gives an inexperienced opponent the most ways to go wrong.

Opening in the centre is also solid: if O answers on an edge, you can force a win.

Playing second (O)

Your aim is to survive the first few moves without allowing a fork.

The classic trap for O: X at 1, O at 5, X at 9 (opposite corners). Now O must play an edge (2, 4, 6 or 8), not a corner. If O takes a corner such as 3, X blocks at 7 and creates a fork (4 and 8). Taking an edge forces X to block instead.

Spotting forks

A fork is any move that creates two lines with two of your marks and an empty third square. The most common fork shapes use a corner, the centre and another corner, or two corners on the same side. Before every move, ask: "After my opponent's next move, could they have two threats at once?" If so, block it now.

Why every perfect game is a draw

There are 255,168 possible games of tic-tac-toe, but the board is so small that each player can always answer every threat. With perfect play from both sides, neither can force a win. That's what makes it a great first game for teaching children strategic thinking: they can learn rules that always work.

Practise against the computer, then a friend

The fastest way to make the rules automatic is lots of quick games, ideally against an opponent who punishes mistakes.

Play on your iPhone or iPad: Tic Tac Toe : Time Pass (free, by the author of this guide) supports one-player games against the device and two-player games on the same screen.

Variations once you've mastered it

Master the eight priority rules first. After that, you'll never lose a game of ordinary tic-tac-toe again.


← All guides