Skip to content
Games with logic
100%

Classic rules · 3 × 3 · X starts

Tic-tac-toe

Try the rules first, then threats, defence and choosing between continuations. Each example has its own board: interact with it directly.

Theory

On this page

Two players, nine cells

X goes first, then the players take turns. A mark goes in an empty cell. The first player to make a line of three of their own marks wins.

Where can a mark go?

Tap an empty cell. The next turn uses the other mark.

First, check your own line

A line can run across a row, down a column or along a diagonal. If you can finish one now, there is no need to wait for another turn.

Where can X win now?

Finish a line of three Xs.

Stop the other player's line

If you cannot win immediately, check your opponent. Two of their marks and an empty cell on one line threaten a win next turn.

Where must X defend?

Cover the cell where O could finish a line.

Two threats: a fork

One move can leave two different cells where you could win next turn. This is a fork. It helps only if your opponent cannot win first.

How can X create two threats?

Make a move and look for two different lines you could finish.

Spot a fork before it happens

X has two opposite corners. It is O's turn. Check not only the lines already forming, but also whether X could create two threats.

Where can O keep a safe defence?

Try an edge cell. Which threat makes X respond?

The centre is useful, not a promise of victory

Four lines pass through the centre. But an immediate threat matters more than an attractive square. O must stop X here.

Is the centre safe now?

Test the centre, then find a move that does not give X a win.

A draw can be the right result

A full board with no completed line is a draw. That differs from a position where the game is still going.

One cell remains. Will anyone win?

Fill the last cell and check every line.

Look at the opponent's reply

Compare not just the next mark, but how the game can continue. X chooses the result that is better for X, and O does the same for O. Results are carried back from the end of the game to earlier moves.

Which result can X choose?

Compare the three continuations. Each shows the result when both players make the best replies.

Do not solve the same position again

Rotating the board changes neither the rules nor the result of the position: the cells change places. A computer can save an answer and recognise it after a rotation or reflection.

Does the solution rotate with the board?

Rotate the board and find the same two threats in their new places.

You can now practise individual tactics or play a whole game. Knowing the word minimax is not a requirement for playing.

Practise

Rules and sources

Original diagrams and code; the method was checked against CS50 AI.

Back to top
Privacy