How to win tic tac toe: the strategy for X and for O
Why perfect tic tac toe is a draw, the fork that beats everyone else, the best first move and the replies that never lose, then a version for a whole room.
Nobody wins tic tac toe against a player who makes no mistakes. Norman Do of the University of Melbourne put it plainly in the Gazette of the Australian Mathematical Society in 2005: with best play on both sides, "neither player can force a win".
So you win on the other player's mistakes, and the mistakes worth knowing are few. This guide shows the move that wins, the fork, then the best play going first and going second.
Every line of play below was checked by a short program that plays every game to its end. It finds the same 255,168 possible games that Do counts, before the board's symmetry is taken into account.
Then the guide shows how a whole room plays it in Tic Tac Toe on Decka, with two teams voting on every move from their phones.
How to play tic tac toe
Two players take turns to put their mark on an empty square of a 3 × 3 board, one with X and the other with O. This guide calls the player who moves first X.
The first to get three marks in a row wins: across, down or corner to corner. That makes eight lines to aim for, three rows, three columns and two diagonals. A full board with no line is a draw.
The fork: how you beat a careful player
A careful player blocks any two in a row the moment it appears. To beat one, you need two threats at once, so they can block only one of them. That move is a fork.
The pictures below come from a game of Tic Tac Toe on Decka, where Team X and Team O vote on each move. Team X opened in the top left corner, and Team O answered on the edge beside it, the top middle.
X took the centre, which threatened the diagonal, so O had to block in the bottom right. Now Team X votes on its third mark.


The bottom left makes two threats. One is the left column, open at the middle left. The other is the diagonal from the bottom left through the centre, open at the top right.


O blocked the middle left, and X took the top right to finish the diagonal.

O's real mistake came on its first move, not its last. The next two sections show why.
How to win tic tac toe going first
Every first move draws against best play. So choose the one that leaves the other player the fewest safe answers, and that is a corner.
After a corner, only one of O's eight replies holds the draw: the centre. Every other reply loses, because you can force a fork with your third mark.
The game above shows how. When O answers on an edge, take the centre. O must block the far corner. Then take a corner that shares an empty line with your first mark, and that is the fork.
When O does take the centre, take the corner opposite your first mark. O must now answer on an edge. If O takes a corner instead, you block in the last corner, and that block makes two threats at once.
Opening in the centre leaves O four safe replies, the four corners. Opening on an edge leaves four as well, so the corner gives O the most ways to go wrong.
How not to lose tic tac toe going second
Going second, you are playing for a draw. Against a corner, take the centre, the only reply that does not lose. Against the centre, take a corner, since all four edges lose.
Against an edge, take the centre, a corner beside that edge, or the edge opposite it. The other four replies lose.
Then watch your second move. After a corner, your centre and X's opposite corner, take an edge, because a corner loses. After the centre, your corner and X's opposite corner, take a corner, because an edge loses.
From there, block every two in a row the moment it appears. Before each move, check whether X could make two threats at once next turn, and stop it.
Game 2 of the same match went this way with the roles swapped. Team O opened in the centre, X answered in a corner, O took the opposite corner, and X took another corner. Both teams blocked every line after that.

Tic tac toe in disguise: the game of fifteen
Do's article describes Magic Fifteen, one of three games presented in the book Winning Ways for Your Mathematical Plays. Two players take turns to pick a whole number from 1 to 9, never one already taken. The first to hold three that add up to 15 wins.
Do calls it "tic-tac-toe in disguise", and a magic square shows why.
Write 2, 7 and 6 across the top, 9, 5 and 1 across the middle, and 4, 3 and 8 across the bottom. Every row, column and diagonal adds up to 15, and no other three of the numbers do.
So picking a number is taking a square, and the strategy above still holds. The 5 is the centre, and the even numbers are the corners.
Play tic tac toe with a whole room: Team X against Team O
In Tic Tac Toe on Decka, the room splits into Team X and Team O, and each team plays as one player. Everyone scans the code on the big screen and joins on their phone.
The team to move votes, and the square with the most votes is played. The other team guesses the square on their own phones, and every right guess makes that player a mind reader.
The big screen counts the votes and never shows where they are, because the other team is watching it. When a move lands, it shows how many saw it coming.
A team that knows every reply above still has to agree on one in 8 seconds. That is where a room of good players misses a block.
A match is best of 3, and a drawn game doesn't count. After three drawn games, more games won takes the match, then the team that voted faster, then a coin toss.
Ultimate tic tac toe, when the classic board is too easy
Once a room knows the replies above, the classic board turns into a run of draws. Ultimate tic tac toe puts nine small boards inside one big board, and every move is made in one of them.
The square you take sends the other side to the matching small board. Take the top right square of any small board, and they must play in the top right board next.
Three in a row on a small board takes it, and three small boards taken in a row win. So every move is two choices: the square, and the board the other side plays in next.
Sending them to a board that is already won or full lets them play anywhere. That free choice is usually worth not giving away.


A tic tac toe tournament for everyone in the room
Choose Bracket: everyone plays, and the room becomes a knockout of one-on-one matches, each played on the two players' phones. Every move has 10 seconds, or 15 on Ultimate, and a player whose clock runs out gets a random square.
Everyone knocked out joins the crowd and calls who takes the featured match before its first move. The last two play the final while the big screen shows their board and each player's thinking time a move.



FAQ
Common questions
Can you always win tic tac toe?
No. If neither player makes a mistake, the game is a draw. You win only when the other player slips, and a fork is how you punish the slip.
What is the best first move in tic tac toe?
A corner. Every first move draws against best play, but after a corner the other player has only one safe reply, the centre.
How do you never lose tic tac toe?
Answer a corner with the centre and the centre with a corner. Then block every two in a row at once, and stop any move that would give the other player two threats.
What is a fork in tic tac toe?
A move that makes two lines of two at once, each with its third square empty. The other player can block only one, so the next move wins.
Is tic tac toe a solved game?
Yes. Norman Do calls it a solved game: with best play on both sides, neither player can force a win.
How many people can play tic tac toe on Decka?
From 2 to 600. Room vs room splits them into two teams that vote on every move, and a bracket gives everyone their own matches until one champion is left.
Run this with your own team
Your audience joins from their phones with a code — nothing to install.
Free account, no credit card.Create a free account
Explore Tic Tac Toe