Updated date:

Never Lose at Tic-Tac-Toe: Winning Strategy and Tactics for Perfect Play

Howard is a fan of strategy games and likes figuring out how to play them better.

Tic-tac-toe, also called Xs and Os or noughts and crosses, is a simple two-player strategy game. It's played on a three by three grid. Players take turns marking their symbol, an "X" or an "O," in a grid. The first player to make three Xs or Os in a row, in a straight or diagonal line, wins the game.

Due to the simplicity of the game and the small playing area, it's easy to figure out what the best moves are. This article isn't going to get bogged down in every possible move and response. We're going to focus on the first few moves and the patterns that we're looking for to win or draw.

tic-tac-toe-impossible-never-lose-perfect-xo-strategy-tactics

Tic-Tac-Toe Strategy

When you move first, the winning strategy is to try to set up a double threat. This means having two marks in a row in two directions at once. Your opponent can only block one of them, and you'll win on the next turn. This is the only way to win against opponents who aren't completely careless about their moves.

When you move second, the best strategy is to prevent your opponent from setting up a double threat. If you can do this, you'll get a draw. In the unlikely event your opponent makes a mistake, you can set up a double threat for the win.

How to Win Playing First (X)

While there are nine squares on the board and, thus, nine possible opening moves, we can simplify it further. The patterns on all four sides of the board are the same. So, there are really only three possible opening moves:

  • A Side
  • The Center
  • A Corner

The top picture identifies all of these positions.

The winning strategy of setting up a double threat can be reached from any of the three starting moves.

Let's take a look at each of them.

Start on the Side

"X" can force a win by starting on the side if "O" responds with four out of the eight possible moves. If "O" plays in one of the near sides or one of the far corners, "X" is guaranteed to win.

The top board on the following picture shows "X" opening on the side and "O" responding with a near side, in red. "X" can then force "O" to block, shown in blue. This allows "X" to set up a double threat by playing the corner, in green. "X" threatens along the diagonal and the bottom row and will win on the next turn.

The lower board shows "X" opening on the side and "O" responding with a far corner. "X" then forces "O" to block. "X" can set up the double threat along the middle row and the diagonal by playing the green move.

tic-tac-toe-impossible-never-lose-perfect-xo-strategy-tactics

Start in the Center

"X" can again force a win with four out of the eight possible responses. If "O" responds with a side move, "X" can force the win by playing any corner.

The following picture shows "X" starting in the center and "O" playing a side. Next, "X" forces "O" to block. Then "X" plays the move in green to threaten along the diagonal and side column.

tic-tac-toe-impossible-never-lose-perfect-xo-strategy-tactics

Start in a Corner

This is the move that puts the most pressure on an average opponent. "X" can force a win if "O" responds with seven out the eight possible moves. If "O" takes any side or any corner, "X" wins with proper play.

The top board below shows "X" starting in a corner and "O" responding with a side. "X" then forces "O" to block. This leaves the move in green, which threatens along the diagonal and left column.

The bottom board shows "X" starting in a corner and "O" responding with a corner. "X" then forces "O" to block. This leaves the move in green, which threatens along the diagonal and right column.

tic-tac-toe-impossible-never-lose-perfect-xo-strategy-tactics

How to Win Playing Second (O)

It's possible to win playing second, but your opponent will have to make a big mistake. Your first priority is not to lose. All you can do is play the best move available. At worst, this will lead to a draw.

We'll take the responses in the order above.

If "X" Started on the Side

"O" can get a draw by playing four of the eight possible responses: a near corner, the center or the opposite side.

If "X" Started in the Center

"O" can get a draw with half of the possible moves. If "O" responds with any corner, "X" won't be able to force a win.

If "X" Started in a Corner

The only safe response for "O" is the center. This leads to a draw with proper play. Moving anywhere else allows "X" to force a win.

The following picture shows the safe moves for "O" if "X" starts on a side, the center, or in a corner.

tic-tac-toe-impossible-never-lose-perfect-xo-strategy-tactics

Can Google's Tic-Tac-Toe on Impossible Setting be Beaten?

If you google "tic tac toe", the top result is a game you can play right on the page. The difficulty settings are "easy", "medium" and "impossible".

The answer is no, this appropriately named setting can't be beaten. With optimal play, it's possible to never lose and this program plays optimally.

If you can consistently achieve a draw on this setting, your play is very strong.

How to Practice

Google's tic-tac-toe is a great place to get familiar with the openings and responses we've covered here.

Playing on the "medium" setting will allow you to practice winning with "X". You can go through each of the starting positions until you're comfortable setting up the double threat with them. You'll notice that there's more than one way to set it up.

Playing on the "impossible" setting will allow you to practice getting a draw with "O". There's no room for error here. If you can always get a draw, you've mastered the defensive side of this game.

How to Beat Your Friends at Tic-Tac-Toe

Once you're comfortable winning from each of the three starting positions, you'll be able to beat average players consistently.

Starting in the corner gives your opponent the most chances to lose, so that's the strongest first move. It's also the easiest one to figure out because there's only one safe response. So, if you keep starting in the corner, the other person will catch on to the pattern. I suggest mixing up your starting moves to keep it more confusing.

Related Articles