How to win at four in a row (and tic-tac-toe)

Both games have been solved by computer, and both teach the same lesson: you win by thinking in threats, not single pieces. These are the ideas strong players rely on, with examples you can try straight away.

What the maths says

Standard four in a row is played on a board 7 columns wide and 6 rows high. It is a solved game: in 1988 James D. Allen and Victor Allis, working independently, proved that the first player always wins with perfect play by starting in the centre column. Open anywhere else and the second player can hold a draw or even win.

That doesn’t make your games a foregone conclusion. Perfect play means calculating thousands of lines. In real games the winner is whoever makes fewer tactical mistakes and understands a handful of strategic ideas. Those ideas are what this guide covers.

Tic-tac-toe is far smaller and also solved: with perfect play on both sides it is always a draw. We’ll get to it at the end.

Why the centre matters

There are 69 possible lines of four on the board: 24 horizontal, 21 vertical and 24 diagonal. Squares are not equal. This table shows how many winning lines pass through each square (top row of the table is the top of the board):

Row A B C D E F G
6 3 4 5 7 5 4 3
5 4 6 8 10 8 6 4
4 5 8 11 13 11 8 5
3 5 8 11 13 11 8 5
2 4 6 8 10 8 6 4
1 3 4 5 7 5 4 3

A piece halfway up column D can belong to 13 different fours; a corner piece to just 3. So:

  • Open in the centre when you move first.
  • If your opponent opens in the centre, stacking on top of them in the same column is one of the soundest replies.
  • The edge columns (A and G) are for defending or finishing, rarely for building.

Defend first, then attack

Before every move, run this check, in this order:

  1. Can I win right now? Look for a playable square that completes four.
  2. Can my opponent win next move? Three in a line with the fourth square available must be blocked. No exceptions.
  3. Does my move hand them a winning square? This is the most expensive mistake, so it gets its own section.
  4. Only then think about your own plan.

It sounds obvious, but most games between beginners are lost by skipping step 2 or step 3, not by a lack of strategy.

Never play under a threat

A threat is an empty square that would complete four for someone. If it is floating (there are empty squares below it), nobody can play it yet. But the moment someone fills the square underneath, the threat becomes live.

row 3:  .  X  X  X  ?  .  .     ? = square that wins for X
row 2:  .  O  O  X  .  .  .     (E2 is still empty)
row 1:  O  X  O  O  X  .  .
        A  B  C  D  E  F  G

If you (O) play column E, your piece lands on E2 and X drops into E3 to win. Column A is just as deadly, because A3 also completes X’s line. You have two forbidden columns. The rule of thumb: the square directly below an opponent’s threat is poison for you. It works the other way too: each floating threat of yours turns the column beneath it into ground your opponent can’t touch. Well-placed threats give you room.

The double threat

The most common way to win is to create two threats at once. Your opponent can only block one.

It comes in two flavours:

  • Two different winning squares, both playable now. For example, three in a row along the bottom with both ends open: . X X X .. Whichever end they block, you take the other.
  • Two threats stacked in the same column. If you have winning squares on E3 and E4, your opponent cannot block E3 without letting you play E4 straight after.

To build them, prefer moves that add to two lines at once. A piece that extends both a diagonal and a row is usually worth more than one that extends a single line.

The odd and even rule

This is the idea that separates serious players from casual ones. Number the rows 1 (bottom) to 6 (top). Because pieces drop and columns fill from the bottom, the late game is full of forced moves: nobody wants to place the piece that lets the other side finish.

In that zugzwang phase (you would rather pass, but you must move), parity decides the game:

  • The first player wants threats on odd rows (1, 3, 5).
  • The second player wants threats on even rows (2, 4, 6).

Here’s why. If columns fill one at a time, the second player can simply answer every move by playing on top of it (“follow-up”). That way the second player ends up on the even squares and the first player on the odd ones. A first-player threat on row 3 eventually falls on their own turn; a first-player threat on row 4 gets blocked for free.

In practice: when you move first, give priority to a winning square on row 3. When the computer moves first, aim for row 2 or row 4, and avoid opening up columns in a way that breaks parity in its favour.

A short worked example

You are X and move first:

  1. X on D1. The centre.
  2. O stacks on D2.
  3. X on C1. Two along the bottom, eyeing three.
  4. O plays E1 to close that side.
  5. X on C2. Now C1–C2 supports both the C column and the C2–D3 diagonal.
  6. If O drifts elsewhere, X on D3 leaves two half-built lines around the centre, and a move later you usually have a double threat.

You don’t need to memorise openings. Look for the pattern: every X move touches the centre and contributes to more than one line.

Try it against the computer in four in a row: on medium it looks four moves ahead, on hard seven, and it explains each move, so you can see exactly when it blocks or sets up a double threat.

And tic-tac-toe

Tic-tac-toe is the perfect training ground for double threats, usually called forks here.

  • The centre sits on 4 lines, each corner on 3 and each edge on only 2. Moving first, open in the centre or a corner.
  • If your opponent opens in a corner, take the centre. It’s the only reply that doesn’t lose.
  • Block before you attack: two in a line with the third square free gets blocked now.

The classic trap, with X opening in a corner (squares numbered 1–9 left to right, top to bottom):

 X | O | .        X | O | .        X | O | .
 . | . | .   →    . | X | .   →    . | X | .
 . | . | .        . | . | .        X | . | O

X opens on 1, O answers on the edge at 2. X takes the centre (5), threatening 9, so O must block on 9. Now X plays 7 and has two threats: the column 1-4-7 and the diagonal 7-5-3. O can only stop one. Answering a corner with an edge loses.

Against the impossible computer, a draw is the best you can get. In ultimate tic-tac-toe (nine small boards inside a big one), remember that every move decides where your opponent plays next: check which board you’re sending them to before you look at your own.

FAQ

Who wins four in a row with perfect play?

The first player, provided they start in the centre column. Opening in any other column lets the second player at least draw.

Is it better to go first or second?

Going first is an advantage in both games. In four in a row it also changes which rows you care about: odd if you start, even if you’re second.

Can you always win at tic-tac-toe?

Not against someone who doesn’t make mistakes: perfect play is a draw. You can beat anyone who answers a corner badly or misses a fork.

Put it into practice

Four in a row

Against the computer or a friend. The AI explains every move.

Play Four in a row →