How to Win at Tic-Tac-Toe (or Never Lose): The Complete Strategy
Tic-Tac-Toe is the first strategy game most of us ever learn, and it hides a neat secret: it is completely solved. With the right approach you can guarantee you will never lose — and you can force a win whenever your opponent slips. This complete guide covers the rules, the exact move-priority list that makes you unbeatable, the fork tactic that wins games, why two perfect players always draw, the best opening move, common mistakes, and the questions people ask most. Read it once and you will never lose a game of noughts and crosses again.
What Is Tic-Tac-Toe?
Tic-Tac-Toe — called noughts and crosses in Britain and much of the Commonwealth — is a two-player game played on a 3×3 grid. One player marks squares with X, the other with O, and they take turns. The goal is to be the first to place three of your marks in a straight line: horizontally, vertically, or diagonally. If the grid fills up with no line of three, the game is a draw, affectionately known as a “cat's game.” The rules are trivial, but the game is a genuine gateway to strategic thinking — and you can play it right now against an unbeatable computer on our free Tic-Tac-Toe game.
The Rules in Full
- The board. A 3×3 grid of nine squares, all empty to start.
- Turns. Players alternate. Traditionally X goes first, which is a small advantage.
- Marks. On your turn you place your mark in any one empty square.
- Winning. The first player to get three of their marks in a straight line — across a row, down a column, or along either diagonal — wins immediately.
- Draw. If all nine squares fill without a line of three, nobody wins and the game is a draw.
There are eight possible winning lines in total: three rows, three columns, and two diagonals. Keeping all eight in mind at once is the key to both attacking and defending well.
The Move-Priority List That Never Loses
Here is the heart of the matter. Because Tic-Tac-Toe is a solved game, there is a fixed order of priorities that, if you follow it every turn, guarantees you will never lose. Each turn, go down the list and play the first rule that applies:
| # | Rule | What it means |
|---|---|---|
| 1 | Win | If you have two in a row with the third square open, complete it and win. |
| 2 | Block | If the opponent has two in a row, take the third square to stop them. |
| 3 | Fork | Play a move that creates two separate threats at once. |
| 4 | Block a fork | Stop the opponent from creating a double threat. |
| 5 | Centre | Take the middle square if it is free. |
| 6 | Opposite corner | If the opponent is in a corner, take the corner diagonally opposite. |
| 7 | Empty corner | Otherwise take any free corner. |
| 8 | Empty side | Failing all else, take a free edge square. |
This priority list is exactly what our Hard computer follows in spirit — computed by a minimax search rather than a lookup table, but producing the same flawless play. Learn it, and the worst you can ever do is draw.
The Winning Weapon: The Fork
Blocking keeps you alive, but forks are how you actually win against imperfect opponents. A fork is a single move that creates two winning threats at the same time. Since your opponent can only block one threat per turn, the other one wins the game for you on your next move.
The classic fork setup starts by taking two corners that share a line with a third empty square. For example, if you hold two opposite corners and the centre, you can often reach a position where playing a third corner threatens two lines at once. The whole art of winning Tic-Tac-Toe is steering toward a fork while making sure your opponent can never build one against you — which is exactly what priority rules 3 and 4 above are for.
Why Perfect Play Always Draws
If both players follow the priority list perfectly, the result is always a draw. This is the defining fact of Tic-Tac-Toe: it is a solved game with a known, forced outcome. There are only 255,168 possible games (and far fewer once you account for symmetry), which is small enough that the entire game tree was analysed long ago. The conclusion is unambiguous — neither X nor O can force a win against a careful opponent.
That is precisely why our Hard computer can never be beaten. It explores the consequences of every move and always chooses one that cannot lose. Against it, a draw is the best result available — and earning that draw means you played perfectly too, which is a genuine accomplishment.
The Best First Move
When you go first, your strongest opening is a matter of long-settled analysis. The corneris widely considered the best first move against a fallible human opponent, because it sets the most traps: an opponent who does not reply in the centre can quickly be forked. The centreis the safest move and the one that most restricts your opponent, since it participates in four of the eight winning lines. The edge is the weakest opening and is best avoided. Whatever you open with, the key defensive fact is this: if your opponent opens in a corner, you must reply in the centre — anything else can lose.
A Worked Example
Suppose you are X and open in the top-left corner. A weak opponent replies on an edge — say the top side — instead of taking the centre. You immediately grab the centre. Now you threaten the top-left to bottom-right diagonal. Your opponent must block the far corner. You then take the bottom-left corner, which creates two threats at once: the left column and the bottom-left-to-top-right diagonal. Your opponent can only block one. On your next move you complete the other and win. That is a fork in action — and it all began because the opponent skipped the centre.
Playing as the Second Player (O)
Going second is harder, because you are always responding rather than setting the agenda — but a careful O never loses. The single most important rule is your very first reply. If X opens in the centre, take a corner. If X opens in a corner, you must take the centre — this is the one reply that cannot lose, and any other risks being forked. If X opens on an edge, you can safely take the centre, an adjacent corner, or the opposite edge. From there, keep applying the priority list: block every two-in-a-row immediately, and watch two moves ahead for any square that would give X a double threat. Defence, not attack, is O's path to a guaranteed draw.
How the Computer Plays Perfectly
Our Hard opponent does not use a memorised opening book — it calculates. On every turn it runs a minimax search: it imagines playing each available square, then imagines your best reply, then its best reply to that, and so on until every line reaches a win, loss, or draw. Each ending is scored — a win for the computer is positive, a loss negative, a draw zero — and faster wins and slower losses are preferred. The computer then picks the move whose worst-case outcome is best. Because Tic-Tac-Toe's game tree is tiny, it can explore it completely, which is why the Hard AI plays flawlessly. We verified this by exhaustively simulating every possible opponent line against the AI as both first and second player and confirming it never once loses — a small but genuine proof of correctness behind the game you are playing.
Common Mistakes to Avoid
- Ignoring the centre. The middle square touches four of the eight winning lines. Give it away and you hand your opponent the initiative.
- Missing a block. The most common way to lose is to chase your own line while the opponent quietly completes theirs. Scan all eight lines every single turn.
- Only ever making one threat. A single threat is always blockable. If your plan is not building toward a fork, a good opponent will simply defend forever and draw.
- Wrong reply to a corner opening. If your opponent opens in a corner and you do not take the centre, you can be forked and lose. Centre is the only safe reply.
- Playing an edge early. Edge squares belong to only two winning lines each — the weakest squares on the board. Prefer the centre and corners.
Variations Worth Trying
Because standard Tic-Tac-Toe is a forced draw between skilled players, people have invented many twists that restore the challenge:
- Misère (reverse) Tic-Tac-Toe. The goal is flipped — you lose if you make three in a row, so the aim is to force your opponent into a line.
- Ultimate Tic-Tac-Toe. A 3×3 grid of nine smaller boards, where your move dictates which small board your opponent must play in next. It is dramatically deeper and is not a solved draw in practice.
- Gomoku (Five in a Row). Played on a much larger grid where you need five in a row — the same idea scaled up into a serious strategy game.
- 3D Tic-Tac-Toe. Played across stacked layers, where winning lines can run through three dimensions.
Each keeps the familiar mark-and-line core but sidesteps the forced draw, which is why they have stayed popular with players who have “solved” the original.
A Short History
Games of aligning marks are ancient. A very similar game called terni lapilli was played in the Roman Empire, and three-in-a-row games appear across many cultures and centuries. The name “tick-tack-toe” is more recent, tied to a children's rhyme, and the game became a fixture of Western childhood in the twentieth century. It also holds a special place in computing history: in 1952, OXO, a Tic-Tac-Toe program, became one of the earliest known video games, running on the EDSAC computer at the University of Cambridge — a reminder that this simple grid helped launch the entire idea of playing games against a machine.
Is Tic-Tac-Toe Good for Your Brain?
For such a small game, Tic-Tac-Toe is a wonderful first lesson in strategic thinking. It teaches you to look ahead — to imagine your opponent's reply before you move — and to recognise patterns and threats at a glance. It introduces the powerful idea of the fork, the double threat that appears in many deeper games from chess to Connect Four. And because a game takes under a minute, it is an ideal way to practise these habits repeatedly. For children especially, it is the perfect on-ramp to logical reasoning and planning.
Frequently Asked Questions
How do you never lose at Tic-Tac-Toe?
Follow the priority list every turn: win if you can, otherwise block the opponent's two-in-a-row, otherwise make or block a fork, otherwise take the centre, then a corner, then a side. Play this way and you will never lose — at worst you will draw.
What is the best first move in Tic-Tac-Toe?
A corner sets the most traps against a human opponent, while the centre is the safest and most restrictive move. Both are strong; an edge is the weakest opening. Whatever you choose, remember that if your opponent opens in a corner, you must reply in the centre.
Does the first player always win?
No. With perfect play the game is always a draw. Going first (as X) is a slight practical advantage because you set the tempo and can lay traps, but a careful second player can always avoid losing.
What is a fork in Tic-Tac-Toe?
A fork is a move that creates two winning threats at once. Your opponent can only block one of them, so the other wins the game on your next turn. Creating forks is the main way to beat an imperfect opponent.
Is Tic-Tac-Toe a solved game?
Yes. The entire game has been fully analysed, and the outcome under perfect play is always a draw. Because it is solved, a computer can play flawlessly and never lose — which is exactly what the Hard level of our game does.
Can you beat an unbeatable computer?
No — a perfect computer cannot be beaten, only drawn. If you play flawlessly against our Hard AI you will earn a draw every time, which is the best possible result. To win, drop it to Easy or Medium, where the computer plays less than perfectly.
Start Playing
The best way to lock in this strategy is to play. Our free online Tic-Tac-Toe lets you challenge an unbeatable computer at three difficulty levels or play a friend in two-player mode, with a live scoreboard and a winning-line highlight so you can see exactly how each game was decided. It runs entirely in your browser — no download, no signup. Take the centre, set up a fork, and see if you can hold the Hard AI to a draw.