Tic-tac-toe is a solved game, which means there is a strategy that never loses. Play it correctly and the worst result you can get is a draw. Beat a careless opponent and you win. Here is the move order that guarantees it, and the trap that turns an opponent’s mistake into a win. Test it against the perfect computer on the tic-tac-toe board.
Take the centre
If you move first, take the centre. It belongs to four of the eight winning lines, more than any other square, so it gives you the most ways to build a threat and the best position to block one. If the centre is taken when it is your turn, grab a corner instead. Corners sit on three lines each; edges sit on only two and are the weakest squares.
The order of priorities each turn
On every move, run down this list and take the first one that applies:
- Win. If you have two in a line with the third square open, complete it.
- Block. If your opponent has two in a line, block the open square.
- Make a fork. Play a move that creates two separate two-in-a-rows at once, so your opponent can only block one.
- Block a fork. If your opponent could make a fork next move, prevent it, ideally by creating a threat of your own that forces their reply.
- Take the centre, then a corner, then an edge.
Follow this order without exception and you cannot lose. Most losses come from skipping step 2 to chase your own line.
Forks: how the wins actually happen
A fork is two threats in one move. Your opponent blocks one, you complete the other. Against a player who does not see it coming, this is how you win.
The classic setup as the first player: take a corner, and if the opponent replies anywhere but the centre, take the opposite corner. You now threaten to build lines through both corners, and a third corner move often leaves two winning lines open at once.
Defending against a fork
The danger is letting your opponent build a fork against you. The defence is not always to block a square directly. Instead, make your own two-in-a-row so they are forced to block it, which uses up the move they needed to set their trap. Steering their reply like this is the heart of perfect defence, and it is what keeps a sharp game a draw.
Why the computer is unbeatable
The tic-tac-toe board offers a computer that never loses. It works by looking ahead through every possible continuation of the game and scoring each ending as a win, loss or draw, then choosing a move that can never lead to a loss. Because the whole game tree is small, it can search it completely, so its play is genuinely perfect. The best you can do against it is force the draw, which is exactly the skill this strategy teaches.
For why short logic games like this are worth playing, see the benefits of puzzle games, or open the tic-tac-toe board and try to hold the computer to a draw.