Tic-Tac-Toe guide
Tic-Tac-Toe strategy: how to win, and how never to lose
Short answer: go first and take a corner, block every two in a row, and win with a fork, one move that makes two threats at once. You can't win every game, because perfect play from both sides always ends in a draw, but you can make sure you never lose. When our Medium computers play each other, the first player wins 55 games in 100 and the second only 28.
Updated
Can you always win at tic-tac-toe?
No. If both players make the best move every turn, every game is a draw. Our Hard computer never makes a mistake, and against itself it always plays the same perfect game, which always ends in a draw.
What you can do is never lose, and win whenever the other player slips. Most people slip often. In 2,000 games between our Medium computers, which play the best move about 3 times in 10, the first player won 1,107, the second 563, and 330 were draws. So going first nearly doubles your wins against someone who isn't perfect.
The rules in one minute
Two players take turns putting their mark in an empty square of a 3 by 3 grid. The first player is the cross (X), the second is the nought (O). Get three of your marks in a straight line and you win. If all nine squares are full and nobody has a line, the game is a draw.
A line can run across, down or corner to corner, which makes eight lines in all: three rows, three columns and two diagonals. Against the computer you play the cross and move first. Online, the first seat is the cross, and on one screen Player 1 goes first.
Tic-tac-toe is the American name. In Britain the same game is called noughts and crosses, and it's played exactly the same way.
Why the centre and the corners matter
Count how many lines go through each square and the whole strategy falls out. The centre is on four lines: one row, one column and both diagonals. Each corner is on three lines: a row, a column and a diagonal. Each of the four edge squares, the middle of a side, is on only two lines.
More lines means more chances to make three in a row, and more of your opponent's lines blocked at the same time. So the order of value is the centre first, then the corners, then the edges. That is why most good players open in the centre or a corner and avoid the edges.
Playing first: start in a corner
If you move first, take a corner. It's on three lines, and it gives the second player the most ways to go wrong. Whatever they do except one reply, you can force a win.
The one reply that holds the draw is the centre. If your opponent takes the centre after your corner opening, they've found the only safe move, and with sensible play from both sides the game ends level. Anywhere else, an edge or another corner, loses for them if you play on correctly.
Opening in the centre also works, and there the second player has exactly one safe answer too: a corner. Reply with an edge square and you can win. The centre opening is a fine choice when you want the same pressure from a different shape.
The fork: two threats at once
A threat is two of your marks in a line with the third square empty. Your opponent has to block it. A fork is a move that makes two threats at the same time, so they can only block one and you complete the other. Nearly every win in tic-tac-toe is a fork.
Here is one you can play. You're the cross and open in the top-left corner. Your opponent answers with an edge, the top-middle square. Take the centre. You now threaten the diagonal, so they must block in the bottom-right corner. Now take the bottom-left corner. That one mark makes two threats at once: the left column and the other diagonal. They can only block one, and you win.
The same idea works when the second reply is the opposite corner. Take another corner, such as the top-right. They have to block the square between your two corners, and then the bottom-left corner forks the left column and the diagonal.
▶ Try a fork against MediumOpens a game against the computer on Medium. Free, no account.A simple order that never loses
You don't have to remember whole games. On every turn, go down this list and play the first thing that applies:
- Win: if you have two in a line and the third square is empty, take it.
- Block: if your opponent has two in a line with the third square empty, take that square.
- Fork: if a move gives you two threats at once, play it.
- Stop their fork: if your opponent could fork next turn, play there yourself, or make a threat of your own that forces them to answer somewhere harmless.
- Centre: if it's empty, take it.
- Opposite corner: if your opponent is in a corner and the corner opposite is empty, take that one.
- Any empty corner.
- Any empty edge.
Playing second: don't lose
The second player can't force a win against good play, so the goal is a draw and a chance to win if they slip. If the first player opens in a corner, take the centre. If they open in the centre, take a corner. Never answer with an edge square when the opening was a corner or the centre: that's the move that hands them the fork.
After that, follow the list above. Block every threat and check each turn whether they have a fork coming. When the first player has two marks on opposite corners, don't take another corner: take an edge, which forces them to block instead of forking.
Playing the computer
There are three levels. Easy puts its mark on a random empty square, so it blocks you only by luck and a fork beats it almost every time. Medium plays the best move about one time in three and a random one the rest, so it slips up often. Set a fork when it does.
Hard plays the best move every time, so it can't be beaten. The best result against Hard is a draw, and getting one means you played the game perfectly. Try opening in a corner and answering its first move with the list above.
▶ Try to draw with HardOpens a game against the computer on Hard. Free, no account.Did you like this guide?
Play Tic-Tac-Toe now
It’s free in your browser, with no sign-up. Play Tic-Tac-Toe against the computer, with a friend on the same screen, or send a friend a link and play online. Or tap Quick match to play someone new.