Connect Four Solver
Connect Four is a solved game. The first player can always win with perfect play. Explore how the solver works and test yourself against it.
Mathematically Solved
In 1988, James Allen proved that the first player can always force a win by starting in the center column.
4.5 Trillion Positions
The complete game tree has been computed. Every possible board state has a known outcome.
Play Against Perfection
Our engine uses the full solution database. At max difficulty, it never makes a mistake.
Is Connect Four Solved?
Yes. Connect Four was independently solved by James Allen and Victor Allis in 1988. They proved that with perfect play, the first player always wins by starting in the center column (column 4). If the first player starts anywhere else, the game is either a draw or a second-player win.
In 1995, John Tromp strongly solved the game by computing the exact value of every reachable position. This means for any board state, we know whether it leads to a first-player win, a second-player win, or a draw with best play from both sides.
What Does "Solved" Mean?
A solved game is one where the outcome can be determined from any position, assuming both players play optimally. Connect Four has approximately 4.5 trillion possible positions. The solver has evaluated all of them.
This doesn't mean the game is boring. No human can memorize 4.5 trillion positions. Even the two solvers of the game, when they played each other in 1995, drew their six-game match 3-3. Knowing a game is solved and playing it perfectly are very different things.
How the Solver Works
The engine evaluates positions using alpha-beta pruning with a transposition table built from the complete game solution. At lower difficulty levels, it limits its search depth to simulate human-like play. At maximum difficulty, it accesses the full solution and plays the provably best move in every position.
Test Your Skills
Can you beat a solver that knows every position? Try it and find out.