Two-Player & Party Games

How to Win at Tic-Tac-Toe (and Never Lose)

Updated · 4 min read

On this page
  1. Why perfect play ends in a draw
  2. The moves strategies that never lose have in common
  3. A simple checklist for every turn
  4. Playing as X
  5. Playing as O
  6. Try it the other way around
  7. Casual house rules

You can’t beat a player who never makes a mistake. Tic-tac-toe always ends in a draw if both players make the best possible move every turn (Plus magazine, University of Cambridge). So winning comes down to two skills: never losing, and taking the win when your opponent slips. NRICH, Cambridge’s maths enrichment project, sums it up: play correctly and you never lose, but if your opponent plays correctly, you can’t win (NRICH).

Why perfect play ends in a draw

Tic-tac-toe is small enough to work out completely. A 2008 study from the Indian Institute of Technology Kanpur counted the positions. Many ways of filling the board can’t happen in a real game. X always has the same number of marks as O or one more, and nobody moves after someone has won. Rotations and reflections of the same position count as one, so the whole game comes down to 765 unique positions (Bhatt, Varshney and Deb, GECCO 2008).

The researchers put it plainly: the game doesn’t let anyone win every time, a large share of games end in a draw, and “the best a player can hope is to not lose the game” (GECCO 2008).

The moves strategies that never lose have in common

The Kanpur team used a genetic algorithm to evolve strategies that never lose, then compared 351 very different ones to see what they shared. Three moves kept turning up (GECCO 2008):

  1. If your opponent is one move away from three in a row, block it.
  2. If the center is empty, take it.
  3. If the center is taken, take a corner, then an edge square, in that order.

The authors point out that experienced players will recognize these as the usual good moves for not losing. Since their search only tried to minimize losses, the strategies focused on countering the opponent rather than setting up their own wins (GECCO 2008).

A simple checklist for every turn

The order of this checklist comes from the research above. Step 1 and the fork advice are our own tips.

  1. Win if you can. If you have two in a row and the third square is open, take it. It sounds obvious, but in a fast game it’s easy to block when you could have won.
  2. Block. If your opponent has two in a row with the third square open, take that square.
  3. Take the center.
  4. Take a corner.
  5. Take an edge.

Our tip on forks: a fork is a move that makes two different threats at once. Your opponent can only block one of them, so you win on the next turn. When you’re checking for threats in step 2, look for squares where your opponent could fork you, and take them first.

Playing as X

Going first is an advantage. The Kanpur researchers found their algorithm had a good chance of evolving a strategy that never loses for the first player, which they say agrees with the first player’s advantage (GECCO 2008).

Strategies that never lose can still win more or less often. The researchers scored them across every possible game, counting all the moves an opponent could make, good or bad. One of the most common strategies won 41 games and drew 5 as X, and won 75 and drew 68 as O. Their best hand-tuned strategy for X won 18 of the 19 cases it faced (GECCO 2008).

So two players who both never lose can still differ a lot in how often they win, because the better strategy gives a careless opponent more chances to go wrong.

Playing as O

As the second player, your first job is not to lose. Follow the same priorities: block any line of two, take the center if X left it open, and otherwise take a corner before an edge (GECCO 2008).

The researchers also tested a published heuristic strategy and found three positions where it lost. In one, it took a corner when it should have taken an edge square. In another, it simply failed to block a line (GECCO 2008). Even careful rules can miss a threat, so look at every line before each move.

Our tip: when you’ve blocked X’s threats and the game looks drawn, keep checking. A tired or rushed opponent is the most likely to leave a line open.

Try it the other way around

If draws get boring, try the reverse version from Cambridge’s Plus magazine: play as normal, except the first player to get three in a row loses. The first player has a strategy that never loses. Take the center square on your first move, then copy each of your opponent’s moves on the square directly opposite through the center (Plus magazine).

It works because your marks always mirror your opponent’s. If you were ever forced into three in a row, your opponent would have had to make three in a row on the move before, so they’d lose first (Plus magazine).

Casual house rules

These are suggestions for friendly games, not official rules.

  • Take turns going first. X has the edge, so swap after every game.
  • Play a short match. Since good players draw a lot, keep score over five or ten games and count wins only.
  • Agree on the reverse version ahead of time. Decide before the first move whether three in a row wins or loses.

Frequently asked questions

Is tic-tac-toe the same game as noughts and crosses?

Yes, it's the same three-in-a-row game under another name. NRICH, the University of Cambridge maths project, calls it Noughts and Crosses, while Cambridge's Plus magazine calls it tic-tac-toe.

Has a computer solved tic-tac-toe?

Yes. In a 2008 study at the Indian Institute of Technology Kanpur, a genetic algorithm found 72,657 different strategies that never lose a game.

How do children learn tic-tac-toe strategy?

By practice, according to one well-known study. In a 1993 study by Crowley and Siegler, kindergarten and primary school children played a series of games against a computer opponent, and the results pointed to a hierarchy of rules that children build up with experience. A 2019 Cognitive Science Society paper describes the study and reproduces its results with a computer model.

How many ways can you fill a tic-tac-toe board?

There are 3 to the power of 9, or 19,683, ways to fill the nine squares with X, O or blank. Many of them can never happen in a real game, because X and O take turns and play stops once someone wins.

Sources

  1. In Search of No-loss Strategies for the Game of Tic-Tac-Toe using a Customized Genetic Algorithm (Bhatt, Varshney and Deb, GECCO 2008), Indian Institute of Technology Kanpur / ACM, hosted by the UCL Genetic Programming Bibliography. Accessed October 18, 2026.
  2. Tic-tac-toe, the other way around!, Plus magazine, Millennium Mathematics Project, University of Cambridge. Accessed October 18, 2026.
  3. Noughts and Crosses, NRICH, Millennium Mathematics Project, University of Cambridge. Accessed October 18, 2026.
  4. Flexible Strategy Use in ACT-R's Tic-Tac-Toe (Skirzyński and Wasilewski, Proceedings of the Cognitive Science Society, 2019), eScholarship, University of California. Accessed October 18, 2026.