cv.cm

Games

How to win at tic-tac-toe and never lose

Tic-tac-toe is solved: with perfect play it is always a draw. You will learn the opening that gives your opponent the most chances to slip, how to win with a fork, and how to make sure you never lose.

4-minute read

Today's result A plan for X and for O that wins against weak play and draws against perfect play.

Against the hard computer the best result is a draw. Practise forks on easy and medium.

Open Tic-tac-toe
Contents
  1. Open Tic-tac-toe on cv.cm

    Choose Against the computer and Medium, and play as X so you move first. X always starts.

    Open Tic-tac-toe
  2. Open in a corner

    A corner is the strongest first move. The only safe reply for O is the centre; any edge or corner reply lets X force a win.

    First moves for X, strongest to weakest.
    First moves for X, strongest to weakest.
  3. Always check two things first

    Before every move, ask: can I complete three in a row now? If not, can my opponent complete three next turn? Win if you can, block if you must.

  4. Build a fork

    A fork is a move that makes two lines of two at once. Your opponent can block only one, so you win with the other. Opposite corners are the classic way to set one up.

    A fork: two lines of two, only one can be blocked.
    A fork: two lines of two, only one can be blocked.
  5. Play O safely

    If X takes a corner, take the centre. If X takes the centre, take a corner. If X has opposite corners and you hold the centre, play an edge, not a corner, or X forks you.

  6. Test yourself on hard

    Switch to Hard. The computer plays perfectly, so every game should end in a draw. If you lose, look at the board: you missed a block or allowed a fork.

FAQ

Can you always win tic-tac-toe?

No. If both players make no mistakes, every game is a draw. You win only when the other player slips.

Is going first an advantage?

Yes. X has more ways to set up a fork, and O has to answer correctly from the very first move.

Why is the centre a good reply?

It sits on four of the eight lines, more than any other square, so it blocks the most threats.

How many possible games are there?

255,168 different games if play stops when someone wins. Counting rotations and reflections as the same, there are 138 different ways the board can look when a game ends.

What is the edge move good for?

It is the weakest opening, but as O against opposite corners it is the only safe reply.