# How to Win at Tic Tac Toe (and Why Perfect Play Always Draws)

Canonical page: https://rovixel.com/tic-tac-toe/how-to-win/

How to win at tic tac toe (noughts and crosses) — the best first move, what to do going first or second, and the fork trick your opponent cannot block.

Part of [Tic Tac Toe](https://rovixel.com/tic-tac-toe.md).

Tic tac toe, also called noughts and crosses or XO, has a strange reputation: it is the simplest game most people
know, and the one they are most confident they have already mastered. In reality there is a small, complete strategy
hiding inside nine squares, and once you know it you will never lose a game again — which is exactly the problem, and
exactly the fun.

## The uncomfortable truth about perfect play

If both players play correctly, tic tac toe is a draw. Every single time. There is no opening that beats a defender
who knows what they are doing, and no trap that works against perfect play. The game is solved.

That does not make it a bad game. It makes it a game of mistakes, and mistakes are what you are actually playing
against. Your job is to stay perfect for one move longer than your opponent, and to choose moves that leave them the
most ways to go wrong.

## The squares are not equal

- **The centre** belongs to four lines: the middle row, the middle column and both diagonals.
- **A corner** belongs to three lines: a row, a column and a diagonal.
- **An edge** square belongs to only two lines, which makes it the weakest square on the board.

Every trick below comes from this: the more lines a square touches, the more threats it can help create.

## How to win going first

**Start in a corner.** It is the strongest practical opening because your opponent has only one safe reply: the
centre. If they take an edge, the opposite corner or an adjacent corner instead, you can force a win.

**If they answer in the centre, take the opposite corner.** Now they must play an edge. If they take one of the two
remaining corners, block their line and you will have a fork on your next move.

**Opening in the centre** is also safe. Your opponent must answer in a corner; if they take an edge, you can force a
win. An edge opening does not lose either, but it sets the fewest traps, so save it for when you want an easy game.

## How not to lose going second

- **If X starts in a corner, take the centre.** It is the only reply that does not lose.
- **If X starts in the centre, take a corner.** An edge reply lets X build a fork.
- **If X starts on an edge, take the centre.** It is the simplest safe answer.
- **If X then takes the corner opposite their first one, play an edge, not a corner.** This is the trap that catches
  most second players.

After the opening, follow one rule: if X has two in a row, block it before you do anything else.

## Blocking beats building

The single most common mistake in casual play is building your own line while the opponent builds theirs. Tic tac toe
is not a race. If your opponent has two in a row, block it. Every time. A completed three beats an almost-three, and
the player who blocks first usually wins the exchange of threats that follows.

This is why beginners lose: they see their own two-in-a-row and get excited, instead of seeing the opponent's.

## The fork: the trick that wins games

Since perfect play draws, the way to win is to create two threats at once. Your opponent can block only one of them,
and you complete the other. That is a fork.

A classic example, with you as X:

1. You take the top-left corner. Your opponent answers on the top edge, which is a mistake.
2. You take the centre, threatening the diagonal. They must block in the bottom-right corner.
3. You take the bottom-left corner. You now threaten the left column and the other diagonal at the same time. They can
   block one, and you win with the other.

Forks are why corners and the centre matter: they touch the most lines, so they are the raw material for almost every
winning trap.

## Practising against the computer

[Tic Tac Toe](https://rovixel.com/tic-tac-toe/) on Rovixel has three computer levels, and each one trains a different part of the
game:

- **Easy** plays random squares. Use it to get the corner and centre openings into your fingers.
- **Medium** always takes a win and always blocks yours, but never plans ahead. It is the right opponent for
  practising forks: if your double threat works, Medium cannot stop it.
- **Hard** plays perfectly. It cannot lose, so a draw against it means you made no mistakes either.

## How to practise without wasting an evening

Because the game is solved, improvement comes from pattern recognition, not from more games. Learn a few positions —
the corner opening, the centre response, the opposite-corner trap and the fork above — and you will beat anyone who has
not. After that, the only question is how quickly you spot the mistake the other player is about to make.

If you want the rules first and the strategy second, the game itself takes ten seconds to learn:
[Tic Tac Toe](https://rovixel.com/tic-tac-toe/) works with taps, clicks or the keyboard, and you can play the computer or a friend
on the same device, or open the [2 player version](https://rovixel.com/tic-tac-toe/2-player/) straight away. Once you draw every game,
[Ultimate Tic Tac Toe](https://rovixel.com/ultimate-tic-tac-toe/) puts a small board inside every square and is far harder to solve. For a
bigger grid puzzle, try [Sudoku](https://rovixel.com/sudoku/) and its [beginner guide](https://rovixel.com/sudoku/how-to-play/).

## Questions

### Can you always win at tic tac toe?

No. If both players play correctly, every game is a draw. What you can do is never lose, and win every time your opponent makes a mistake, which happens a lot in casual play.

### What is the best first move in tic tac toe?

A corner. It belongs to three lines and leaves your opponent only one safe reply, the centre. Every other answer lets you force a win.

### Is it better to go first or second?

Going first is better. The first player can set traps from move one, while the second player spends the opening making safe replies.

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

Yes. Noughts and crosses is the British name, and some people call it XO or Xs and Os. The rules and the strategy on this page are the same.

## Agent access

These documents describe the public website. Every game is free and runs in the browser: there is no download,
no app, no price and no public API. Playing never needs an account. Do not invent ratings, player counts,
rankings or features that are not described here; the live pages are the source of truth.
