Tic-tac-toe rules
Two players take turns on a grid. One places X, the other places O, and X always moves first. On your turn you put one mark in any empty cell. The first to line up their marks horizontally, vertically or diagonally wins. If the board fills up with no line, the game is a draw.
| Board | In a row to win |
|---|---|
| 3×3 | 3 |
| 4×4 | 4 |
| 5×5 | 4 |
| 10×10 | 5 |
| 15×15 | 5 |
How to win at tic-tac-toe
The honest answer: if neither player makes a mistake, 3×3 tic-tac-toe always ends in a draw. There are 255,168 possible games, but no strategy forces a win against a careful opponent. What you can do is never lose and punish mistakes.
- Open in the centre or a corner. The centre is part of four lines, a corner of three, an edge of only two.
- If X takes a corner, O must take the centre. Any other reply loses against correct play.
- If X takes the centre, O should take a corner. An edge reply loses.
- Look for a fork, a move that creates two threats at once. Your opponent can only block one.
- Check for two in a row first. Blocking your opponent comes before your own attack, unless your move wins right away.
A classic trap. X starts in the top-left corner and O answers on the top edge next to it instead of the centre. X takes the centre and threatens the diagonal, so O has to block the bottom-right corner. Now X plays the bottom-left corner and has two threats at once, down the left column and along the other diagonal. O can block only one.
Big boards: 10×10 and 15×15
Here you need five in a row, which is essentially Gomoku, one of the oldest line games. Nobody can calculate every line, so tactics and attention decide the game.
- An open three (three in a row with both ends free) is already a threat: left alone, it becomes an open four next move, and an open four cannot be stopped.
- Block a four at once.
- Build in two directions so one move creates two threats. That is the winning fork.
- Play near the centre: lines are shorter by the edges.
For Gomoku on a 15×15 board it has been proven that the first player wins with perfect play. That is why variants such as Renju forbid some moves to the first player.
Computer levels
- Easy often plays at random. Good for kids and first games.
- Medium always blocks your lines and finishes its own, but sometimes slips.
- Hard plays 3×3 perfectly: you cannot beat it, and a draw is the best result. On big boards it is a strong but not perfect opponent.
Tic-tac-toe for two
Choose "2 players" and play on one phone or computer, passing the turn. To decide who goes first, flip a coin. To play a friend online by link, try Highrise Heist below.
When tic-tac-toe gets too easy: Highrise Heist
3×3 tic-tac-toe is solved in a few games. Highrise Heist is a two-player board strategy game you cannot solve in your head: 10 stands, block transfers and a fight for highrises, with an AlphaZero-style AI on 5 levels and online games with a friend by link. Free and no signup.
FAQ
Can you beat the computer at tic-tac-toe?
On Easy and Medium, yes. On Hard the computer plays the 3×3 board perfectly, so the best you can get is a draw: 3×3 tic-tac-toe always ends in a draw when both sides play correctly. On the big boards the Hard computer can be beaten, but you will need a fork, two threats in one move.
Who goes first in tic-tac-toe?
By the rules X goes first. Here you can choose your side: X (you move first) or O (the computer moves first).
How do you play tic-tac-toe with two players?
Choose "2 players" and take turns placing marks on one phone or computer. The score is kept until you change the board or the mode.
How many in a row do you need?
Three on 3×3, four on 4×4 and 5×5, five on 10×10 and 15×15. Rows count horizontally, vertically and diagonally.
What is a fork in tic-tac-toe?
A move that creates two threats to complete a row at once. Your opponent can block only one of them, so a fork almost always wins.
