Connect 4 Solver

Copper to moveAnalyzing at depth 7…
First

Set up a position in the Connect 4 solver

Replay a game or puzzle on the 7×6 board, then check the recommendation for the side to move. This solver works as a free Connect 4 best move calculator: enter a Classic position in your browser to see the recommended column. It tells you when it can prove the result and gives a depth estimate for positions it cannot settle. To face a computer opponent instead of placing both sides yourself, play Connect 4 online.

How to use the Connect 4 solver

Tap the column letters A to G to drop a disc. Copper moves first by default under the standard rules, or you can switch the starting side to Ice above the board, and the turn switches after every drop. There is no opponent here: you place both colours yourself, which is exactly what you want when the board comes from a game played somewhere else. To take turns with a friend on one screen instead, switch to the 2-player Connect 4 board.

After every drop, the solver searches again and highlights the recommended column in gold. Use Undo to go back one move and compare a different reply. Reset clears the board and keeps your chosen starting colour and depth. Changing the starting colour swaps the colours of the discs already on the board. Use the left and right arrow keys to move between columns, then press Enter or Space to drop.

Entering a mid-game board into the Connect 4 solver

To analyse an in-progress match or puzzle, build the board from an empty grid by dropping discs column by column in turn order. If you only have a screenshot or a physical board without the move log, stack each column from bottom to top while keeping the alternating move count balanced so the correct side is to move.

  • Drop column by column: Select A through G to place alternating Copper and Ice discs. With an even number of discs on the board, the starting colour moves next; with one extra disc, the second colour moves next. Avoid completing a line of four while setting up, since the solver stops recommending moves as soon as a game ends.
  • Step back with Undo: Use Undo to remove only the last disc and re-run the analysis for the turn before. This fixes a slip during setup and lets you test alternative replies one move at a time, while Reset clears the whole board and keeps your starting colour and depth.
  • Switching First flips existing discs: Selecting Copper or Ice under First replays your column sequence from move one with the new starting side, which flips every disc already on the board between Copper and Ice. Use it if you entered a position and realised the other colour opened; if the colours on the board are already right and you need the other side to move next, add or undo one drop instead.

What each Connect 4 solver verdict means

Above the board, the solver names the side to move, recommends a column and gives its verdict. Winning, Losing and Roughly level are estimates from the perspective of the side to move. A positive estimate score favours that side; a negative one favours the opponent. Roughly level means the search found no clear advantage within its limits.

A proven win means the solver found a way to win against every legal reply. A proven loss means the other side can force the win even against the best defence. When the search proves a draw, neither side can force a win against correct play. The turn count includes drops by both sides. A finished board shows its result instead of recommending a move.

Why the Connect 4 solver favours the middle columns

On an empty board, column D is the strongest opening. Along the bottom row, D1 belongs to four possible horizontal lines of four, while A1 belongs to only one. A disc near the centre also gives you more chances to connect diagonally in either direction. Later in a match, check for an immediate win or a threat you must block before choosing a column for its position alone.

Once the middle is taken, the search starts weighing threats instead. Two in a row that can become three next turn is worth more than a scattered disc, and a move that creates two separate threats at once is usually the winning idea.

Search depth in the Connect 4 solver

Depth is the maximum number of turns to look ahead, counting one turn for each disc dropped by either side. Depth 5 (300 ms budget) is useful for a quick check, Depth 7 (750 ms) is the default, and Depth 8 (1,400 ms) looks further. The search deepens one ply at a time and stops if it proves the outcome or reaches its time limit first, reporting the depth it actually completed in the verdict. Immediate tactical checks still surface a winning drop or avoid an instant loss even when the timed search finishes early.

Local Connect 4 solver search vs. an opening book

An opening book or perfect-play database stores precomputed exact results for millions of early Connect 4 positions, so it can return a guaranteed win, loss or draw from move one without searching. By contrast, this local Connect 4 solver runs entirely in your browser inside a Web Worker with no server lookup and no precomputed opening table.

On an empty board or an early mid-game position, seven plies—three and a half turns per side—is far shorter than the twenty to forty-two moves needed to force a result on a 7×6 grid. Because the search cannot see all the way to the end of the game from those boards, default Depth 7 stops at its horizon and scores the resulting positions with a heuristic that values open threats, reachable winning squares and centre-column discs. That is why early positions show a directional estimate instead of a proven verdict, whereas crowded endgames with fewer empty spaces often fit inside the search budget and resolve completely.

Using the Connect 4 solver on a solved game

Connect 4 was solved mathematically in 1988: with perfect play the first player wins by starting in the middle column. This browser tool uses a bounded search, so it may show an estimate even for a position whose exact result is known. Use it to compare replies and recognise patterns such as a double threat, where the opponent can block one winning square but cannot cover the other.

This solver covers the standard seven-by-six board. The site's Pop Out and Reverse Four modes change the rules of the game itself, so a standard solver cannot judge those positions; the rules for each mode are on the Connect 4 rules page, and tactics for all three variants are covered in the strategy guide. When you are ready to test those ideas against a friend on the same screen, open 2-player Connect 4.

Connect 4 solver FAQ

Does the Connect 4 calculator work on a phone?

Yes. The board is sized for a phone screen and the search runs in your browser, so nothing is uploaded and no account is needed.

Why does it suggest a column I thought was bad?

A drop can create two threats at once, even if the opponent can block one on the next turn. To see what the solver is looking at, play the recommended column, try the opponent’s strongest reply, then use Undo to compare alternatives.

Can I set up a position where it is Ice's turn?

Yes. Switch the starting colour to Ice above the board before placing discs, or alternate drops until it is Ice's turn. The solver always analyses for the side to move.

Is the move always perfect?

Only a verdict marked Proven establishes the outcome against correct play. An estimate can change at a greater depth when a threat or defence comes into view. Endgames with few empty spaces are more likely to be resolved completely.

Do saved games from the other pages load here?

No. This page is a scratch board for analysis; saved matches against the computer are on the Connect 4 page, and saved head-to-head local games stay on the 2-player Connect 4 page.

Can I import a game or paste a move sequence into the Connect 4 solver?

No. There is no notation import box, file upload or position URL on this page. Recreate the board by dropping discs column by column from A to G, using Undo to fix mistakes and First to flip the opening colour if needed.

Which result should I trust when Depth 8 and Depth 7 disagree?

Trust the higher completed depth shown in the verdict. Depth 8 searches one ply further ahead with a 1,400 ms budget compared with 750 ms at Depth 7, so a completed depth 8 search can catch a threat or defence that sat just beyond Depth 7. If Depth 8 runs out of time early and reports a lower completed depth such as depth 6 or 7, compare the actual completed depth numbers—or follow any verdict marked Proven.