How to play tic-tac-toe
Tic-tac-toe is played on a grid of 3 by 3 squares. One player is X, the other is O, and you take turns placing your mark in an empty square. The first player to get three marks in a row, across, down or diagonally, wins. If all nine squares are filled and nobody has a line, the game is a draw.
Here you can play against the computer or against a friend on the same phone or computer. Who goes first alternates every game, and the score stays on screen while you play.
The three levels
- Easy: the computer often picks a square at random. Good for beginners and for playing with children.
- Hard: it plays the best move most of the time but sometimes slips up. Stay sharp and you can beat it.
- Impossible: it works through every possible continuation before it moves and never loses. Your goal is a draw.
Strategy: how never to lose
- Start in a corner or the centre. They are part of the most lines: the centre is in four, each corner in three.
- Always block. Before every move, check whether your opponent has two in a row with the third square empty.
- Look for a fork. A move that creates two threats at once cannot be stopped: your opponent can block only one, and you win with the other.
- If your opponent opens in a corner, take the centre. Answering a corner with an edge square is the mistake that gives away the most forks.
Can you always win?
No. Tic-tac-toe is a solved game: if both players make no mistakes, every game ends in a draw. There are 255,168 possible games. The first player wins 131,184 of them, the second player 77,904, and 46,080 end in a draw, so going first is an advantage. That is why the Impossible level never loses: it checks every line of play from the current position before choosing a square.
Tic-tac-toe, noughts and crosses, morpion…
In the United States and Canada the game is called tic-tac-toe. In the UK, Ireland, Australia and New Zealand it is usually noughts and crosses, after the O (a nought) and the X (a cross). The rules are the same everywhere.
Other languages have their own names: tres en raya in Spanish, morpion in French, tris in Italian, jogo da velha in Brazil and jogo do galo in Portugal. The Romans played something similar called terni lapilli ("three little stones"), and in 1952 a version called OXO, written for the EDSAC computer at the University of Cambridge, became one of the very first video games.
Frequently asked questions
Is it free?
Yes. You play straight in your browser, with no sign-up and nothing to download.
Does it work on my phone?
Yes. You can also add it to your home screen from the browser menu to open it like an app, even offline.
Can you beat the computer?
On Easy and Hard, yes. On Impossible, the best result you can get is a draw.
Who goes first?
You start the first game as X. After that, who goes first alternates every game.