← Back to blog

How to Never Lose at Tic-Tac-Toe

The complete strategy guide. With these rules, you'll never lose again. Β· 8 min read

Tic-tac-toe has a curious mathematical property: it's impossible to lose if you know what you're doing. The game is what mathematicians call "solved" β€” with perfect play by both sides, the result is always a draw. Neither player can force a win against an opponent who plays correctly.

That doesn't mean you can win every game. You can't, against good defense. But it does mean you can never lose. Once you've learned the rules below, every game ends in either a win for you or a draw. Losing simply stops happening.

Here's how.

The two ground rules that solve 95% of games

Before getting into specific positions, internalize these two rules. They handle the vast majority of situations:

Rule 1: Always win if you can. If you have two in a row and an empty third cell that completes the line, play there. End the game. Sounds obvious, but in casual play people miss this constantly because they get distracted by what their opponent is doing.

Rule 2: Always block if you must. If your opponent has two in a row, your immediate next move must be to block the third cell. There is no other priority. If they have two threats at once, you've already lost β€” but if they only have one, you must block it, every time, no exceptions.

Rules 1 and 2 are absolute. They override every other consideration. Apply them every single turn before thinking about anything else.

The hierarchy of moves: what to do when rules 1 and 2 don't apply

When neither player has a two-in-a-row threat, what should you do? Here's the priority order. Always check from the top:

  1. Create a fork. A fork is a move that creates two separate two-in-a-row threats at once. Your opponent can only block one. Next turn, you win.
  2. Block their fork. If your opponent is about to set up a fork, you must prevent it β€” either by directly occupying the fork square, or by creating your own threat that forces them to defend instead.
  3. Take the center. The center cell is the strongest square on the board. It's part of four potential winning lines (the two diagonals, the middle row, the middle column). No other cell is in that many lines.
  4. Play in an "opposite corner." If your opponent occupies a corner, the diagonal opposite corner is often the best response.
  5. Play any empty corner. Corners are each part of three winning lines (one row, one column, one diagonal). They're the second-strongest square type.
  6. Play any empty edge. Edges (the four non-corner, non-center cells) are each part of only two winning lines. They're the weakest squares β€” play them last.

So the cell-strength ranking is simple: center (4 lines) > corners (3 lines each) > edges (2 lines each). Always play the strongest available cell unless a higher-priority rule (1 through 4) applies.

If you're going first (you play X)

Going first is a slight advantage. With perfect play, the best you can do is force a draw β€” but if your opponent makes any mistake, you can capitalize. Here's the opening:

Move 1: Play the center.

X opens in the center β€” the strongest move.

Why? The center is part of four winning lines. Owning it means you have a part of every possible diagonal and the middle row and column. After this move, you're already involved in nearly half the ways to win.

Some sources suggest opening in a corner instead. Corner openings are also strong β€” they force opponents into a narrower range of correct responses. But the center is simpler to play from and just as good with perfect follow-up. We recommend it.

Move 3: Depends on O's response.

Your opponent's reply to your center opening will be either a corner or an edge. They probably won't play an edge (it's a weak move), but if they do, you're in great shape β€” head straight to step 4 below.

If they play a corner β€” which is what a good opponent will do β€” your best move is to play another corner, ideally one that doesn't share a row or column with their corner. For example:

After O takes top-left, X plays the diagonally opposite corner. Now X threatens to fork.

This sets up a potential fork. From this position, X has multiple ways to create two simultaneous threats unless O plays very precisely.

If you're going second (you play O)

Going second is harder. You can still force a draw, but you have to be much more careful about your first move. There's essentially only one correct response if X opens in the center:

If X plays the center, you must play a corner.

If X is in the center, O must respond with a corner β€” never an edge.

If you respond to a center opening with an edge instead, you lose. With perfect play, X can force a win against an edge response. The corner is the only safe answer.

If X plays a corner, you must play the center.

This is the other classic critical situation. If X opens in a corner, your only safe response is the center. If you play anywhere else β€” even another corner β€” X has a forced win.

After X opens in a corner, O must take the center.

If X plays an edge, take the center.

An edge opening is a beginner's move and gives you the easiest defense. Just take the center, then play the priority list. You should comfortably draw, and you have winning chances if X makes another mistake.

Understanding forks (the key to winning, not just drawing)

A fork is when you create two two-in-a-row threats at the same time. Your opponent can only block one of them, so on your next turn you win.

Here's a classic fork setup. Suppose the game has reached this position with X to move:

X plays the top-right corner (highlighted below) to create a double threat.

Now X threatens both the top row (X _ X) and the anti-diagonal (X X X). O can only block one.

The trick to playing forks is recognizing the patterns that set them up. Most forks come from the player having pieces in cells that all share an empty square. When you can see a fork developing, both sides need to take it seriously β€” the attacker plays toward it; the defender either blocks the fork square or creates their own threat to force the attacker to defend instead.

Common mistakes to stop making

Mistake 1: Missing your own two-in-a-row. People obsess over what their opponent might do and miss that they themselves have a winning move available right now. Before every move, scan: "do I have two in a row anywhere with an empty third?" If yes, play it.

Mistake 2: Blocking the wrong threat. If your opponent has two cells in a line, sometimes there are still two potential winning lines through one of those cells. You have to block the one that actually has the empty third square. Look at the whole line, not just the pieces.

Mistake 3: Playing edges early. Edges are the weakest squares. Unless you have a specific tactical reason, prefer center, then corners, then edges. Playing an edge in the opening few moves gives away strategic value for free.

Mistake 4: Ignoring fork threats. Beginners block immediate two-in-a-row threats but ignore positions that are setting up two threats. Look one move ahead: if your opponent's next move could create two threats at once, you have to prevent it now.

Mistake 5: Playing on autopilot. Even when you know the strategy, it's easy to make a thoughtless move on autopilot. Take an extra second on each turn. Check the priority list. The game is short β€” there's no excuse for sloppy moves.

The bottom line

If you internalize the priority list β€” win, block, fork, block-fork, center, opposite corner, corner, edge β€” you will never lose a game of tic-tac-toe again. Against a perfect opponent, you'll draw every time. Against any less-than-perfect opponent, you'll either draw or win, depending on what they let you do.

The game is solved, but most people don't know it's solved. That's your edge.


Practice mode: try to draw against the "Impossible" AI on the classic game. If you can consistently draw, you've fully mastered the strategy.

Play Classic Tic-Tac-Toe β†’

Related reading