Tic-Tac-Toe Strategy: How to Never Lose (and When You Can Win)
Everyone knows tic-tac-toe, also called noughts and crosses, and almost everyone knows that good players always draw. Fewer people know exactly why, or which moves throw a game away. The board is so small that a computer can check every possible game, and that makes it the perfect place to learn the ideas behind every bigger line game: threats, forks and forcing moves.
This guide shows which first move is best, which replies are safe and which lose by force, how forks work and how to block them, and a short move list that never loses. You can practise against Tic-Tac-Toe, our free game: its Classic mode puts you as X against a computer that has checked every position. Every number below comes from an exact search of the game, using its own rules and its own computer player.
The whole game in numbers
The rules fit in one line: players take turns marking an empty square of a 3 × 3 grid, X first, and the first to get three in a row (across, down or diagonally) wins. If all nine squares fill without a line, it's a draw.
Small as it is, the game has 255,168 possible games if you count every move order. X wins 131,184 of them, O wins 77,904 and 46,080 are draws. But those counts treat every move as equally likely, which is not how anyone plays. There are only 5,478 different positions, and 765 if you treat rotations and mirror images as the same. Searching all of them gives the most famous fact about the game: with perfect play from both sides, every game is a draw.
So the real questions are practical ones. Which moves keep you safe? Which mistakes can you punish? And how do you play when the other side never makes one?
Not all squares are equal
There are eight winning lines: three rows, three columns and two diagonals. Count how many of them pass through each square:
The centre is on four lines, the corners on three, and the edges on only two. A mark on more lines makes more threats possible and blocks more of the other player's. That's why the strongest moves are almost always the centre and the corners, and why edge squares are where most mistakes happen.
The first move, and the replies that lose
All three openings (corner, centre or edge) are draws with best play. What makes them different is how many ways the other player can go wrong. Here is every possible reply to each opening, scored by the exact search:
- Corner opening: O has exactly one safe reply, the centre. All seven others lose. That makes the corner the best opening against people: it sets the most traps.
- Centre opening: O must take a corner. All four edges lose.
- Edge opening: four replies lose and four are safe. It's the weakest opening, because you start on a square with only two lines.
When you play O, the rule that follows is simple: if X takes a corner, take the centre; if X takes the centre, take a corner.
Forks: how tic-tac-toe is won
A threat is two of your marks in a line with the third square empty. Your opponent must block it. A fork is a move that makes two threats at once. They can block only one, so you win with the other. Almost every won game of tic-tac-toe ends with a fork, and every good move is either making one, stopping one, or forcing your opponent to block in a place that doesn't help them.
Here is the most common way to punish a bad reply. X opens in the top-left corner and O answers on the top edge, one of the seven losing replies. X takes the centre, which threatens the bottom-right corner, so O has to block there. Now X forks:
Notice that X's centre move did two jobs: it made a threat, which decided where O had to play, and it set up the fork for the next move. Forcing moves like this are the engine of every combination in tic-tac-toe, and in bigger games like Four in a Row and gomoku.
Blocking forks before they happen
Blocking a threat is easy to see. Blocking a fork means seeing it one move early, and that's where most players lose. Two positions to know by heart:
- X corner, O centre, X opposite corner. Now O must play an edge. Taking one of the two free corners lets X take the last corner and fork.
- X centre, O corner, X opposite corner. This time O must play a corner. Any edge loses.
The second trap is a good example of a general rule: when you're defending, it's often best to make a threat of your own that forces your opponent to block somewhere harmless. A threat buys you a tempo. But it cuts both ways: a threat that forces the other player onto a square where they make a fork is a losing move.
Our computer uses exactly that against careless openings. Open on the top edge and it answers in the top-left corner. If you then take the bottom edge, which looks harmless, it takes the centre, threatening the bottom-right corner. You must block there, and its next move forks you:
The move list that never loses
You don't need to memorise positions to play perfectly. A short priority list, the one Allen Newell and Herbert Simon used in a tic-tac-toe program in 1972, never loses. On each turn, take the first move on this list that applies:
- Win: if you have two in a line, complete it.
- Block: if your opponent has two in a line, block it.
- Fork: make two threats at once.
- Block their fork: if they can fork next move, make a threat that forces them elsewhere, or take the fork square yourself.
- Centre: take it if it's free.
- Opposite corner: if they hold a corner, take the one across from it.
- Empty corner.
- Empty edge.
Steps 1 and 2 are what most people already do. Steps 3 and 4 are where games are won and lost.
What each habit is worth
Our computer has checked every position, so you cannot beat it: the best result is a draw. That makes it a good test of how safe a habit is. Because it always answers the same position the same way, we could count every game exactly, with each choice the habit allows equally likely:
Just winning and blocking holds the draw 80.32% of the time, so most of the work is done by the two rules everybody knows. The opening decides the rest. Open in the top-left corner and our computer takes the centre; from there, win-and-block is enough to draw every single game. Open on the top edge and almost half of those same games are lost, because the edge leaves room for the fork you saw above.
One curiosity: the four corners are not quite equal against our computer. When several moves are equally good, it takes the first one in reading order, top-left to bottom-right, so its answers aren't perfectly symmetric. Win-and-block draws every game after the top-left, top-right or bottom-left opening, but only 94.29% after the bottom-right one. The computer still never makes a mistake; it just sets different traps. Playing at random draws only 19.37% of the time.
Playing against people
Against a person, you can do better than draw. As X:
- Open in a corner. Seven of the eight replies lose. Many people answer on an edge or in another corner.
- If they take an edge or a corner, look for the forcing move that makes a threat and sets up a fork, like the centre in the fork example.
- If they take the centre, take the opposite corner. Now they must answer on an edge: if they take one of the free corners, you take the last corner and fork.
As O, the two rules at the start are your safety net: centre against a corner, corner against the centre. After that, look for forks one move ahead, and when you block, try to block with a move that also makes a threat.
How our Tic-Tac-Toe plays
You are X and you always move first. Tap or click an empty square to place your mark, and Clove the cat answers at once with an O. The game opens on our house rule, the Fading Three: each side keeps only three marks, and placing a fourth lifts your oldest one (it wobbles in a dashed ring a move ahead), so no round can end in a draw, and Clove climbs a 12-rung ladder, playing a little sharper each time you beat her. Tap Classic in the corner for the standard game this guide is about. There Clove checks every possible game before she moves, so a draw is a good result: one careless move and she will take the win. The tally shows your wins, draws and her wins.
Ready to play?
Open Tic-Tac-Toe, start in a corner, and see how many draws in a row you can hold against a perfect opponent. Then take the same ideas of threats and forks to a bigger board in Cherry Four in a Row. For more strategy, read our Four in a Row strategy and Sea Battle strategy guides, and find more in the board games category.
More strategy guides
- Sudoku Strategies: How to Solve Any Puzzle Without Guessing
- Minesweeper Patterns: 1-1, 1-2-1, 1-2-2-1 and How to Read the Board
- Solitaire Strategy: How to Win More Games of Klondike
- Chess for Beginners: How to Stop Losing Pieces and Start Winning Games
- Backgammon Strategy: Opening Moves, Safe Play and Winning the Race
- Mahjong Solitaire Tips: How to Clear Every Heap Without Getting Stuck
- Hearts Strategy: What to Pass, When to Duck and How to Shoot the Moon
- Spades Strategy: How to Bid, Play Nil and Stay Out of the Bags
- Best First Words for Five-Letter Word Games, and How to Solve in Four
- FreeCell Strategy: How to Win Almost Every Deal
- Spider Solitaire Strategy: Tips to Win at 1, 2 and 4 Suits
- Checkers Strategy: How to Win More Games of Checkers
- Reversi Strategy: How to Win at Reversi and Othello
- Yacht Dice Strategy: How to Score Higher in Every Game
- Four in a Row Strategy: How to Win at Connect Four
- Dominoes Strategy: How to Win at Dominoes
- Ludo Strategy: How to Win at Ludo
- How to Solve Nonograms: Techniques That Never Need a Guess
- Dots and Boxes Strategy: Chains, the Double-Cross and Control
- Sea Battle Strategy: How to Win at Battleships
- Hangman Strategy: The Best Letters to Guess and How to Win
- Water Sort Puzzle Tips: How to Solve Every Level
- Block Puzzle Strategy: How to Score High on an 8×8 Board
- Memory Game Tips: How to Find Every Pair in Fewer Moves
- Snake Game Strategy: How to Get Longer Without Trapping Yourself
- 8 Ball Pool Tips: Aim, Cut Angles, Spin and Winning More Racks
- Brick Breaker Tips: How to Aim the Ball and Clear the Wall Fast
- Word Search Tips: How to Find Words Faster (Tested on 1,000 Puzzles)
- Mini Crossword Tips: How to Solve a 5×5 Fast (Tested on 600 Puzzles)
- Jigsaw Puzzle Tips: Edges, Colour Piles and Finishing Faster (Measured)