Puzzles Guides About Contact All puzzles →
All guides
Strategy Connect Four 8 min read

Connect Four and the centre column

Connect Four has been solved completely: the first player wins with perfect play, and the winning first move is the middle column. Understanding why turns a guessing game into a plan.

Level Strategy Puzzle Connect Four About 8 minutes

Why the middle column is worth so much

A win is four in a row, in any of four orientations. Count how many possible winning lines pass through each square and the board turns out to be wildly uneven.

The seven columns are not equal. A disc in the middle column can participate in far more winning lines than one on the edge, simply because lines through the middle have room to extend in both directions.

The central square of the board sits on thirteen possible lines. A square in the outermost column sits on three. Every disc you place in the middle is therefore doing roughly four times as much work as one placed at the edge — and every disc your opponent places there is doing the same against you.

The lines radiating through one central square. Horizontals, verticals and both diagonals all pass through it with room to spare, which is exactly what an edge square lacks.

This gives you the shortest useful piece of advice in the game: take the middle, and do not let your opponent have it uncontested. Our computer opponent orders its search from the centre outwards for this reason, which is why it grabs the middle column if you leave it alone.

The double threat is how games are actually won

A single threat — three in a row with an open end — almost never wins, because your opponent simply blocks it. Games are won by creating two threats at once, so that blocking one leaves the other open.

Three in a row with both ends open. There are two squares that would complete the line and only one move available to the defender, so the game is already over regardless of what they do.

So the real objective is not to make a line. It is to build a shape that threatens to make two lines. In practice that means:

  • Prefer moves that create two possibilities over moves that create one. Three in a row closed at one end is worth far less than two in a row with space on both sides.
  • Look for threats on different lines through the same square. A disc that extends a horizontal and a diagonal at once is doing the work of two.
  • Stack threats vertically. Two squares in the same column that both complete a line are unblockable, because filling the lower one hands over the upper one.

Always look at the square you are handing over

This is the single most common way to lose a game you were winning. Discs fall to the lowest empty slot, so every move you make gives your opponent access to the square directly above it.

Before playing a column, check what happens if your opponent immediately plays the same column. If that square completes a line for them, the move loses on the spot no matter how good it looked.

The same logic used offensively is the strongest tactic in the game. If your opponent must eventually play a particular column — because everything else loses — then the square above their forced move is yours. Setting up a winning square there is called a trap, and it wins games several moves before it happens.

Odd and even rows

Stronger players count parity. With seven columns and both sides playing sensibly, threats on certain rows favour the first player and threats on others favour the second, because of who is forced to fill the square underneath. You do not need this to beat the Gentle setting, but it is what separates Fair from Sharp.

What the computer is doing

Our opponent is a plain minimax search. It plays out every legal continuation to a fixed depth, scores the resulting positions, and assumes you will always pick the reply that is worst for it.

  • Gentle looks a couple of moves ahead. It will take an immediate win and block an immediate loss, and it will miss a trap you set two moves out.
  • Fair looks about four moves ahead. It sees most double threats forming and will not usually hand you a winning square above its own move.
  • Sharp searches deeper and will punish a loose move several turns later, which often feels like it guessed. It did not; it simply saw the line.

Two details make the search fast enough to run in a browser without a pause. It examines the centre column first and works outwards, because good moves examined early let it discard whole branches; and it prunes any branch that is already worse than one it has fully examined. Both are standard, and together they cut the work by an enormous factor.

None of the settings are perfect play. Connect Four was solved in the late 1980s, and a truly perfect opponent would beat you every single time it moved first, which is not an enjoyable thing to put on a page.

A plan you can actually follow

  1. Open in the middle. If you move second and the middle is taken, play next to it rather than at an edge.
  2. Check the square above before every move. This one habit prevents most losses.
  3. Build width, not height. Two in a row with room on both sides beats three in a row against a wall.
  4. Block, but block usefully. When you must stop a threat, prefer the blocking square that also extends a line of your own.
  5. Count to four before you commit. Your move, their best reply, your follow-up, their reply. Most traps are visible within that window.

Undo is available on our board, and using it to explore a line you were unsure about is a legitimate way to learn the shapes. The win tally simply keeps count of finished games.

Take the centre and see what changes

Play Fair, open in the middle column every time, and check the square above before each move. Then try letting the computer have the centre and watch how differently it goes.

Open a board