Connect Four
Play against a real search-based computer opponent at three depths, or against someone else on the same device — with the fact that the game is solved.
The computer never misses a win or a block
Immediate wins and immediate blocks are taken directly rather than left to the search, so even the easiest setting will not walk past a four sitting in front of it. What changes with difficulty is how far ahead it looks for traps — the double threats that decide most real games.
Connect Four was solved in 1988: the first player wins with perfect play, and the winning first move is the middle column. Every other opening loses or draws against a perfect opponent — which is worth knowing before you blame the computer.
Things worth knowing
- The first player wins Connect Four with perfect play — it was solved in 1988, and the winning first move is the middle column. Every other opening loses or draws against a perfect opponent.
- The centre column is worth real points because more winning lines pass through it than through any other. Taking it is almost never wrong.
- The winning pattern to aim for is a double threat: two places to complete a four at once, so blocking one loses to the other. Almost every real game turns on somebody building one or failing to see it.
- Watch the parity of the threats. On a six-row board, threats on odd rows favour the first player and threats on even rows favour the second, which is why strong players count rows before committing.
- A move that gives your opponent a good square directly above it is usually a bad move, whatever else it does. Connect Four punishes the square you hand over more than it rewards the one you take.
How to use
- Choose an opponent and difficulty.
- Drop a disc into any column that is not full.
- Get four in a row in any direction to win.
- Watch for the opponent's threats as well as your own.
Frequently asked questions
Is Connect Four solved?
Yes. It was solved independently by James Allen and Victor Allis in 1988, and the first player wins with perfect play — but only by opening in the centre column. Any other opening either draws or loses against perfect defence, which is a striking result for a game this simple.
Why is the centre column so strong?
Because more possible four-in-a-rows pass through it than through any other column. The centre participates in the most winning lines, so occupying it both creates the most threats and denies the most. This is why every strong player takes it immediately.
How does the computer opponent think?
By searching ahead through possible move sequences and scoring the resulting positions, keeping the move that leads to the best outcome assuming the opponent also plays well. Increasing the difficulty increases how many moves ahead it looks, which is why the harder settings take slightly longer to move.
What is a double threat?
Creating two winning positions at once, so the opponent can only block one. Almost every win against a competent player comes from engineering one, since a single threat is always simply blocked. Setting one up two or three moves in advance is the core skill of the game.
Why does parity matter?
Because discs stack, so the row a square sits in determines who can reach it and when. Experienced players count whether the key squares fall on odd or even rows, since that decides which player will be forced to fill the square below a winning position. It is the least obvious and most decisive part of good play.
Is the game older than the 1974 version?
The commercial Connect Four dates from 1974, but games of the same family are considerably older, and versions were played with counters long before. What the commercial release added was the vertical rack, which is what makes the gravity rule physical rather than a convention.
🔒 This tool runs entirely in your browser. Nothing you enter is uploaded, logged, or stored.