What this game is
Connect Four looks like a children's game and takes twenty seconds to explain. It is also completely solved: with perfect play on both sides, the player who moves first wins.
Discs are not placed anywhere you like — they are dropped into a column and fall to the bottom. So you never have forty-two moves to choose from, only seven, one per column. But every move changes what the other player can reach on the floor above.
That is the real story of a game: less about building your own row than about who gets the square that matters once the stack grows up to it.
Rules
- The board is seven columns of six. You play the blue discs, the computer plays red, and you drop first.
- A move is a click on any square of a column. The disc falls to the lowest free row of that column; you cannot choose where inside it.
- A column filled to the top is closed.
- The winner is the first to line up four of his own discs — horizontally, vertically or along either diagonal. A row of five or more counts as well.
- If all forty-two squares are filled with no four in a row, the game is a draw, and a draw is added to neither tally below.
- The winning four are ringed in yellow, and the disc that landed last is marked, so the computer's reply is easy to spot.
How to play better
- The centre column is crossed by 51 of the 69 possible fours, an edge column by just 15, and a square in the middle of the centre column belongs to 13 fours against 3 for a corner. It is no accident that the centre is the only winning first move.
- Count threats, not rows: three discs with an empty square at the end. One threat gets blocked; two at once cannot be. The whole game is about building the second one.
- Watch the parity. Your threats want to sit on the floors the stack will reach on your turn. A threat on the other player's floor hands him the win instead.
- Never play under an enemy four. If your disc lets him complete a row directly above it, you have effectively moved for him.
- The classic trap is the "seven": two discs on a diagonal and two along a row, threatening in two places at once. Double threats are what actually ends games.
- When in doubt, play nearer the middle. Edge columns are worth keeping in reserve: a move there gives you little, but gives away little too.
A bit of history
Milton Bradley published the game as Connect Four in 1974 — a plastic rack the discs drop into with a satisfying clack. Similar games had been sold before, but this is the version that went around the world.
In 1988 the game was solved, independently and almost simultaneously, by James Allen and Victor Allis. The answer: with perfect play the first player wins, and the only winning first move is the centre column. Allis wrote his solution up as a master's thesis, building a program on nine strategic rules rather than on raw search.
None of which makes the game dull to play: knowing that a win exists and being able to find it are different things. The same thing happened to draughts and to Nine Men's Morris — all three are in our reference of solved games.
About the levels
Easy builds no tree at all. It checks two things: can it win right now, and are you about to win next move. If neither, it drops a disc near the middle, slightly at random. A double threat beats it every time — it only ever sees one.
Hard searches six plies with alpha-beta and scores the position over all sixty-nine windows of four that fit on the board: three of its own with an empty square is a plus, three of yours a bigger minus, and a window holding both colours is worth nothing, because nobody can ever win in it.
Expert is the same search with time-limited deepening: four plies, then five, and so on for about a third of a second. It tries columns from the centre outwards, because with alpha-beta the move order decides how much of the tree can be cut away. On an empty board it reaches ten to twelve plies; near the end of a game it sees all the way to the finish.