The complete guide

How to win at Connect 4 — from the first move to a solved game

Connect 4 has been completely solved: with perfect play the first player always wins. This page takes you from the bare rules all the way to reading a board like the engine does — and every diagram below is a real position whose plan is drawn by the same proof machine that powers the solver.

1 · The game is already solved

The basics first

Connect 4 is played on a 7-column × 6-row board — 42 slots in total. Two players take turns dropping a disc into any column; the disc falls to the lowest empty slot in that column. The first player to align four of their discs in a row — horizontally, vertically, or diagonally — wins. If all 42 slots fill with no winner, the game is a draw.

A couple of words you'll see everywhere here:

  • Square — the standard game-theory term for a board position, even though the slots on this board look like circles. Every time you see "square", picture one of those holes.
  • Ply — one single disc drop, one player's turn. A full game lasts at most 42 plies (one per slot). With perfect play on both sides the first player wins on ply 41, leaving exactly one empty slot.

There are exactly 69 possible four-in-a-row lines on a 7×6 board: 24 horizontal, 21 vertical, and 24 diagonal. Every strategy in Connect 4 is, at heart, a fight over which of those 69 lines each player can threaten or prevent.

And it turns out the whole fight is already decided

Connect 4 is not a game of luck, and it is not even really a game of opinion. In 1988 Victor Allis proved — and James Allen independently confirmed — that on the standard 7×6 board the first player can always force a win by starting in the middle column. Every single one of the roughly 4.5 trillion reachable positions has a known, exact value.

The solver built into this site is a modern version of that result, written by Pascal Pons. Give it any position and it answers instantly: win, lose, or draw, and in how many moves. The number you see over each column is exactly that — a perfect score, not a guess.

The rigorous version — how Pons’s solver works

The engine searches the game tree with negamax + alpha–beta pruning: it plays out lines, but as soon as a reply is found that is good enough to refute a move, it stops exploring that branch. The board is stored as a bitboard (two 64-bit integers, one per player), so testing for four-in-a-row and generating moves are a handful of bit operations. A transposition table caches positions already evaluated, and an opening book stores the value of every position up to a fixed depth so early moves are answered without search at all.

The score is encoded as distance to the end: a position worth +N means the winner connects four with N empty squares to spare, so larger magnitudes mean faster wins. Move ordering (centre columns first) makes alpha–beta cut enormous parts of the tree, which is why a trillion-position game is solved in milliseconds in your browser.

2 · …but “solved” is not the same as “understood”

A perfect score tells you that a position is winning. It does not tell you why, and it certainly does not teach you to find the win yourself across the board. For that we need a different kind of answer — a human plan.

Allis’s program VICTOR produces exactly that. Instead of searching, it reasons with a small set of rules about which squares each player is guaranteed to get, and assembles them into a pairing: a fixed plan that refutes every threat the opponent could ever make. The rest of this page is that theory, built up one idea at a time — and the “Reveal the plan” button under each board shows VICTOR’s actual, solver-checked pairing for that position.

3 · The secret of the board: odd and even squares

Number the rows 1 to 6 from the bottom. Here is the single most important fact in all of Connect 4: when the endgame arrives and players are forced to fill columns from the bottom up, the first player tends to land on the odd rows (1, 3, 5) and the second player on the even rows (2, 4, 6). Counting squares decides who is forced to play where — a kind of slow-motion zugzwang, the chess term for being forced to make a move you’d rather not.

The whole defensive strategy of the second player flows from this: if they can quietly take every even square, they can neutralise everything the first player builds. Reveal the plan on this drawn position and you’ll see the second player claim eleven even squares — and nothing else is needed.

Second player holds the draw purely by owning the even squares.

4 · Threats: the squares that win

A threat is an empty square that would complete a four-in-a-row for you. Because of the parity above, threats come in two flavours, and they are not equal:

  • Odd threats (on an odd row) are the first player’s weapon. The column holding one keeps an odd number of empty squares, so when the dust settles the first player is handed that square.
  • Even threats (on an even row) are the second player’s weapon — the basis of the whole even-square defence.

If both players have a good threat in different columns, the table is simple: an odd threat beats an even one; two odd threats, or two even ones, cancel; an even threat for the first player against an odd threat for the second is just a draw. Learning to count odd against even is most of what separates a strong player from a beginner.

5 · How to develop — when no rule fires yet

In the first dozen or so moves, no VICTOR rule applies yet — there aren't enough discs for a full pairing proof to exist. The solver still knows the right move, but the reason it's best is positional, not rule-based. This is what the app labels a developing move. Here is how to pick one yourself.

1 · Start in the centre

Column 4 is part of more potential fours than any other column — 51 of the board's 69 four-in-a-row lines pass through it (all 24 horizontals, all 24 diagonals, and 3 verticals). Columns 3 and 5 are next, then 2 and 6, then the edges. If you're not sure what to do, playing toward the centre is almost never a mistake.

2 · Land on your parity row

Before you drop a disc, ask: which row will it land on? Count the discs already in that column — if it's even, the next disc lands on an odd row; if odd, it lands on an even row. As first player you want to land on odd rows (1, 3, 5); as second player you want even rows (2, 4, 6). A move that lands on the wrong row gifts the endgame to your opponent.

3 · Count future threat lines

After dropping, count how many four-in-a-row lines you'd have at least one disc in — the more the better. This is exactly what the board overlay in Learn mode shows you: the opportunity squares (your embryonic threats) and the danger squares (your opponent's). A developing move that opens three new threat lines beats one that opens one, all else equal.

4 · Watch what you give away

Every disc you place is an invitation. Your opponent's next disc lands directly above yours in the same column — make sure that square doesn't hand them an immediate claimeven or a new threat they didn't have before. If your move inadvertently creates a danger square for your opponent on an even row, reconsider.

5 · Avoid stacking threats in one column

Two of your own threats in the same column cancel each other: the opponent blocks once and kills both. Spread your threats across different columns. The most powerful positions are ones where the opponent would need to be in two places at once.

Why the solver still knows best even here

The five heuristics above are educated guesses — they summarise what strong positions look like, not what guarantees them. The solver bypasses all of that: it evaluates the full game tree from the current position and returns the exact score of every column. When it says column 4 scores +15 and column 1 scores +7, it has literally counted every descendant position and confirmed that column 4 leads to a win 15 half-moves faster. The heuristics are a shortcut for humans; the solver has no need of them.

6 · Claiming squares — the nine rules

VICTOR’s rules are all answers to one question: which squares is the controller guaranteed to get, and which threats does that kill? You don’t need to memorise them — just recognise the shapes. Here are the ones that do the work.

Claimeven — the backbone

Two empty squares stacked in a column, the upper one even. If the opponent ever takes the lower (odd) square, you immediately take the even one on top. So every even square is yours for the asking, and every threat passing through it dies. Almost every defensive plan is mostly claimevens.

Allis’s formal rule

Required: two empty squares directly above each other; the upper square is even.
Solves: all groups containing the upper square.

The rest of the family

  • Baseinverse — two squares both playable right now. The opponent can only take one this turn, so you get the other; any four needing both is dead.
  • Vertical — like a claimeven but for an odd upper square: you still get one of the two stacked squares.
  • Lowinverse / Highinverse — two columns combined so the odd squares are split in your favour.
  • Aftereven — a line of your own that you can complete using only even squares; it then also wipes out every threat sitting above those columns.
  • Baseclaim — a claim plus an inverse anchored on the bottom row.
  • Before — answer above a not-quite-finished line so you complete before the opponent can.

Watch several of them cooperate in one defence — a lowinverse, a vertical, three “before” groups and five claimevens, all consistent with each other:

A mixed defence: lowinverse + vertical + before ×3 + claimeven ×5.

7 · Putting it together — the pairing proof

One rule alone proves nothing. The magic is in combining them: if the controller can pick a set of rules that (a) between them refute every single one of the opponent’s possible fours, and (b) never fight over the same square, then the opponent can never connect four — so the controller draws at worst. That set of rules is the pairing.

The hard part is condition (b), consistency. Some rules quietly sabotage each other — Allis worked out a full table of which combinations are legal. This site implements that table exactly, and then checks every proof it produces against the perfect solver: across tens of thousands of positions, it has never once claimed a draw or win the solver disagreed with. When you reveal a plan, it is sound.

Baseclaim + aftereven ×3 + baseinverse cover every threat — a proven hold.

Sometimes a single ‘before’ plus claimevens is enough.

8 · Forcing a win

Holding the draw is the defender’s art. Winning needs one extra ingredient — a threat the opponent can never answer.

First player: an odd threat

Give the first player a standing odd threat and the zugzwang does the rest: the opponent is eventually forced to play just below it, handing over the winning square. Everything else on the board is just defence (the very same pairing rules) so the opponent can’t win first. The gold star marks the threat the whole win hangs on:

An odd threat at d3 forces the win; baseinverse + six claimevens hold the rest.

Second player: an aftereven

The second player wins the mirror way. If their defensive plan contains an aftereven — a line of four they complete using only guaranteed even squares — then while refuting everything the first player tries, they quietly finish their own four. The stars show the even squares they’re guaranteed:

The even squares b2–e2 are the second player’s; completing them wins outright.

9 · Playing like a champion

A practical checklist you can actually use over the board:

  1. Open in the centre. The whole first-player win is built on the middle column — it touches the most fours.
  2. Count odd against even. As first player, hunt for odd threats; as second player, for even ones. Whoever has the right kind of threat in a spare column controls the endgame.
  3. On defence, take the even squares. Answer above the opponent’s pieces; you are claiming the even square for free every time.
  4. Think in lines, not moves. Ask “which fours can my opponent still make, and do I have an answer to each?” — that question is the pairing.
  5. Practise with the plan. Open the board, switch to Learn mode, and use “Reveal the plan” until you can predict it yourself.

Open the board and start practising →

The theory here is Victor Allis’s A Knowledge-based Approach of Connect-Four (1988); the perfect solver is Pascal Pons’s. Every pairing on this page is generated live and validated against that solver.