How to Win Four in a Row

The game is solved: the first player can always win. Here is how to play like it, and how to fight back when you go second.

Opponent Level First move

You play red against the computer. With a friend, red and yellow take turns on this screen. Keys 1 to 7 drop a disc in that column.

Start in the centre

The middle column is the most valuable on the board. There are 69 possible lines of four on a 7 by 6 grid, and the cells of the centre column belong to 60 of them in total, against 24 for an edge column. Each of the two middle cells of the centre column is part of 13 different lines; a corner is part of only 3. A disc in the centre helps more of your lines and blocks more of your opponent's.

It is also what perfect play says. Connect Four was solved in 1988, independently by James Dow Allen and Victor Allis: if the first player drops the first disc in the centre column, they can force a win on or before the 41st move. A first move in one of the two columns next to the centre leads to a draw with best play, and a first move in any of the four outer columns loses.

Make two threats at once

A threat is a line with three of your discs and an empty space that would make four. One threat is easy to block. Two threats that cannot both be blocked win the game. Build positions where one disc adds to two lines at the same time, for example a horizontal line and a diagonal that share a square, and look for the moment when your next disc creates both threats together.

A common shape for this is the "7": a horizontal line of discs with a diagonal running down from one end, like the digit 7. It sets up threats on two different lines, and the opponent can only stop one.

Watch the square above

Because discs fall, a threat only matters when the space under it is filled. Two practical rules follow:

  • Do not play directly under your opponent's threat. If they need a square on row 3 of a column, a disc you drop on row 2 of that column lets them play there next turn.
  • Leave your own threats waiting. A threat high up in a column cannot be blocked until the column fills up to it. Late in the game, when the other columns fill, your opponent may be forced to play underneath it.

The odd and even rule

Number the rows 1 to 6 from the bottom. As the board fills up near the end of a game, the first player tends to get the squares on odd rows (1, 3, 5) and the second player those on even rows (2, 4, 6). Victor Allis built his solution of the game on this effect, which chess players call zugzwang: being forced to move when you would rather not.

  • If you moved first, aim for a threat on an odd row. If you have one and your opponent has no threat on an odd row, the end of the game usually works out in your favour.
  • If you moved second, aim for threats on even rows, and make sure the first player gets no odd-row threat.

It is a rule of thumb, not a guarantee, because several threats can interact, but it explains many games that seem to be lost "out of nowhere" in the last columns.

Playing second

Against perfect play you lose, but people and computers are not perfect. Take the centre column whenever it is offered, block early before your opponent's lines grow to three, and work on threats in the even rows. Every time you block a line, check whether your blocking disc also builds a line of your own. Against a strong opponent, a draw is a good result for the second player.

Practise against the computer

Medium punishes missed blocks; Hard punishes almost everything in the short term. Try to beat Medium as the first player, then as the second, then move up. The Hint button shows the column Hard would choose: comparing it with your own choice is the quickest way to learn which of the ideas above apply in a position.

For another two-player game where the first moves decide a lot, see how to win at Mancala, including its best openings.

Frequently asked questions

How do you win Connect 4 every time?

Only the first player can, and only with perfect play: start in the centre column and never make a mistake. In practice, take the centre, build two threats at once and use the odd and even row rule.

How do you win Connect 4 as player 2?

Against perfect play you cannot, but you can against people and computers that make mistakes. Take the centre when you can, block early, keep the first player from getting a threat on an odd row, and build your own threats on even rows.

What is the best first move in Connect 4?

The centre column. It is part of the most lines of four, and the game's solution shows the first player can force a win from it. The columns next to the centre lead to a draw with best play.

Is Connect 4 a solved game?

Yes. In 1988 James Dow Allen and Victor Allis independently showed that the first player can force a win by starting in the middle column. John Tromp later confirmed it by computing every position.

What is the 7 trap in Connect 4?

A shape of discs that looks like the number 7: a line along a row with a diagonal coming off its end. It sets up two threats on different lines, and the opponent can block only one.