Tic-Tac-Toe Strategy: How to Never Lose

Updated

Tic-Tac-Toe looks like a children's game, but it is a perfect little lesson in strategy. With correct play from both sides it always ends in a draw, which means you can learn to never lose. Here is how.

Why the first move matters

There are only nine squares, but they are not equal. The centre square belongs to four winning lines, each corner belongs to three, and each edge only to two. That is why strong players open in the centre or a corner. If you go first and take a corner, a careless reply loses by force, so the corner is the opening that sets the most traps.

If your opponent opens in a corner, your only safe reply is the centre. Any other answer gives the first player a winning plan. When your opponent opens in the centre, reply in a corner, not on an edge.

Blocking and forking

Every move should answer two questions. Can I win right now? If not, does my opponent threaten to win on the next move? If so, block. Once both of those are handled, look for a fork: a move that creates two separate threats of three in a row at the same time. Your opponent can only block one of them, and you win with the other.

You can also stop forks before they happen. If your opponent could make a fork next turn, either occupy the key square yourself or force them to respond to a threat of your own so they never get the chance.

Playing for a draw against the best opponent

Against the hard computer on this site, the best you can achieve is a draw. That is not a failure. It is the correct result of perfect play. If you want to win, play the easy or medium levels, where the computer sometimes misses a threat, and practise setting up forks.

A quick drill: play ten games as the second player and try to draw every one. Then switch to going first and try to win by creating a fork. When both come naturally, you have mastered the game.

The full opening book for X

If you start with a corner, the only reply that holds the draw for O is the centre. If O answers with an edge or another corner, X can force a win. After a corner and a centre reply, take the opposite corner. Now O must answer with an edge square. If O plays a corner instead, X blocks and creates a fork, which is two threats at once.

If you start in the centre, O must reply in a corner. An edge reply loses to correct play. After a corner reply you can still get a draw, but you have to block carefully and watch for your own chances to fork.

Surviving as O

As the second player, your goal is to draw, or to win if X makes a mistake. If X starts in the centre, take a corner. If X starts in a corner, take the centre. Answering a centre opening with an edge, or a corner opening with anything other than the centre, gives X a forced win with correct play.

After your first reply, block every line with two X marks in it, and look for a chance to make two lines of your own at once. A fork is the only way to beat a careful opponent.

Why the game is always a draw

There are 255,168 different ways a game of tic-tac-toe can be played, but with correct play from both sides every one of them ends in a draw. That is why the hard computer level cannot be beaten: it plays perfectly. The best result you can get against it is a draw.

That is also why the game is a good way to teach children to think ahead. They learn to block, to look for two threats at once, and to see the board from the other player's point of view.

Questions players ask

Who goes first? X always moves first. Against the computer you play X, and in two player mode you share one screen and take turns.

Is it better to go first? Yes, because X has more chances to make a fork, but a perfect O can still draw. A draw is a good result for the second player.

How can I beat the medium level? Medium sometimes slips. Play a corner first, then look for a fork. If it fails to block the second threat, you win.

Play Tic-Tac-Toe now

More games