Skip to content
Random game

How to Win Tic Tac Toe: Strategy, Tricks, and How to Never Lose

On this page
  1. The order to check every move
  2. How forks win games
  3. The best first move
  4. How to never lose as O
  5. Tricks that catch beginners
  6. How to beat the Foony bots
  7. Strategy on the bigger boards
  8. Ultimate Tic Tac Toe
  9. Questions players ask

You can’t win every game of tic tac toe. When both players make no mistakes, the game is always a draw. But you can play so you never lose, and so you win every time your opponent slips. This guide covers the best first move, how to set up two threats at once, the replies that keep you safe, and how to beat each bot on Foony.

The numbers here come from a short program that plays out every one of the 255,168 possible games of tic tac toe. If you’re new to the game, read how to play tic tac toe first. The squares are numbered 1 to 9, left to right, top to bottom.

The order to check every move

Before each move, go down this list and do the first thing that applies:

  1. Win. If you have 2 in a line and the third square is empty, take it.
  2. Block. If your opponent has 2 in a line and the third square is empty, take it.
  3. Make a fork. Take a square that gives you two lines of 2 at once.
  4. Stop a fork. If your opponent could make a fork next turn, take that square, or make a line of 2 so they have to block it instead.
  5. Take the center if it’s empty.
  6. Take the corner opposite a corner your opponent has.
  7. Take any empty corner.
  8. Take an edge.

Steps 1 and 2 are how you stop most losses. Steps 3 and 4 are where games are won.

How forks win games

A fork is a move that makes two lines of 2 at once, each with its third square empty. Your opponent can block only one of them, so you win with the other one.

X on 1, 5, and 7 has two ways to win

Here’s a fork in a real game:

  1. X takes 1.
  2. O takes 2, an edge.
  3. X takes 5. X now threatens 1, 5, 9.
  4. O has to block at 9.
  5. X takes 7. X now threatens 1, 4, 7 and 7, 5, 3.
  6. O blocks one, and X wins with the other.

Every way to win at tic tac toe ends in a fork, or in an opponent who misses a plain line of 2.

The best first move

O's safe and losing replies to each first move

If you’re X, take a corner. Here’s how many of O’s 8 replies lose against best play:

X’s first move O’s replies that lose O’s replies that draw
A corner 7 of 8 Only the center
The center 4 of 8 (the edges) The 4 corners
An edge 4 of 8 The 2 corners next to it, the center, and the far edge

A corner gives your opponent the most ways to go wrong. The center is a close second, and it’s part of 4 lines, more than any other square.

How to never lose as O

When you move second, most games are won or lost on your first reply.

If X takes a corner, take the center. Any other square loses. Then watch for the next trap: if X takes the opposite corner, take an edge, not a corner.

After X 1, O 5, X 9, only an edge is safe

Here’s why the corner loses. After X 1, O 5, X 9, O 3:

  1. O now threatens 3, 5, 7, so X has to block at 7.
  2. X then has 1, 7, and 9. That’s two threats: 1, 4, 7 and 7, 8, 9. O can’t block both.

If X takes the center, take a corner. Every edge loses. If X then takes the corner opposite yours, take another corner, not an edge. After X 5, O 1, X 9, an edge such as O 2 makes X block at 3, and then X threatens both 3, 5, 7 and 3, 6, 9.

If X takes an edge, take the center or a corner next to X’s edge.

Tricks that catch beginners

  • The corner trap. Open in a corner. If your opponent answers anywhere but the center, you can always win.
  • The opposite corner. Open in the center. If your opponent takes a corner, take the corner opposite it. If they then take an edge, you can fork.
  • Make them block. Make a line of 2 that your opponent has to block, on a square that doesn’t give them a line of 2 of their own. Then you choose where the game goes.
  • Change who starts. On Foony, X and O take turns going first in a match. Plan for both sides.

How to beat the Foony bots

Each bot either makes a random move or searches ahead for the best move. The chance of a random move is set by its level:

Bot Random moves How far it searches on 3 by 3
Easy Every move Never searches
Novice 3 in 4 moves 3 moves ahead
Skilled 1 in 2 moves 3 moves ahead
Expert 1 in 4 moves 5 moves ahead
Unbeatable Never Every possible game
  • Easy and Novice often miss a block. Open in a corner and play for a fork.
  • Skilled and Expert play well on most moves, but a random move can still leave a fork open. Open in a corner every game, and take the win when it comes.
  • Unbeatable never loses on 3 by 3. Play the safe replies above and take the draw.

On the Big 5x5 and Huge 7x7 boards, every bot looks only 2 or 3 moves ahead, and only at squares next to marks already on the board. Even Unbeatable can be beaten there. Build a line with both ends open, then add a second threat it can’t see coming.

Strategy on the bigger boards

On 5x5 you need 4 in a row, and on 7x7 you need 5.

  • Start near the middle. A middle square is part of more lines.
  • Block lines early. On 7x7, a line of 3 with both ends open becomes a line of 4 with both ends open, and that can’t be stopped. Block at 3.
  • Make two threats at once. The fork idea works on every board size.

Ultimate Tic Tac Toe

In Ultimate, your opponent plays next in the small board that matches the square you mark.

  • Don’t send your opponent to a board they can win. Before you mark a square, check the small board that matches it.
  • Send your opponent to a board that’s already won or full only when you’re ready for them to play anywhere they like.
  • Win the center board. As on the small board, the middle board is part of the most lines.

Ready to try it? Play Tic Tac Toe against Unbeatable and see if you can hold the draw.

Questions players ask

Can you always win at tic tac toe?

No. If both players make no mistakes, every game is a draw. You can make sure you never lose, and win whenever your opponent makes a mistake.

What is the best first move in tic tac toe?

A corner. Against a corner, 7 of your opponent's 8 replies lose with best play. Only the center holds the draw.

What do you do if your opponent takes the center?

Take a corner. Every edge reply to the center loses with best play, and every corner reply draws.

What is a fork in tic tac toe?

A move that makes two lines of 2 at once, each with its third square empty. Your opponent can block only one, so you win with the other.

Can you beat the Unbeatable bot?

Not on the 3 by 3 board. It checks every possible game, so the best you can do is a draw. On the 5x5 and 7x7 boards it looks only 3 moves ahead, so it can be beaten there.