Puzzhive

Strategy game

Connect Four: Drop a Disc, Line Up Four

Play Connect Four free in your browser against the computer or a friend. Drop discs, line up four in a row, undo a move. No account, no download.

Connect Four

Drop a disc into a column. The first to line up four wins.

Setting up the board…
0 comments

How it plays

Connect Four is a two-player game played on an upright grid of seven columns and six rows. Players take turns dropping a disc into a column, and the disc falls to the lowest empty space in that column. The first player to line up four of their own discs in a row, across, up and down, or diagonally, wins. If the grid fills up first, the game is a draw.

This Connect Four plays right here in your browser. You can play the computer or share one screen with a friend, take moves back with Undo, and start again whenever you like. There is nothing to install and no account to create.

How to play Connect Four here

Choose Play the computer or Two players from the menu above the board. Red always moves first; against the computer, you are red.

To drop a disc, click or tap any square in the column you want. You do not need to aim at the bottom: the disc falls to the lowest free space by itself. On a keyboard, the keys 1 to 7 drop a disc into columns 1 to 7, counted from the left.

  • The line above the board says whose turn it is. Against the computer it shows Computer thinking… for a moment before the reply.
  • The most recent disc has a thin outline, so you can see where the last move went.
  • If a column is already full, the board tells you and nothing is dropped.
  • Undo takes back your last disc. Against the computer it removes the computer's reply as well. In two-player mode it takes back one disc at a time.
  • New game clears the board. Switching between the computer and two players also starts a new game.

When someone completes a line of four, the game stops and the winning discs are outlined. If all 42 spaces are full without a line of four, the game ends in a draw.

Connect Four rules

  1. The board has seven columns and six rows. Red moves first, then the players alternate. Nobody can pass.
  2. On your turn you drop one disc into any column that is not full. It falls to the lowest empty space.
  3. Four of your discs in a straight line wins: horizontal, vertical, or diagonal in either direction. A longer line counts too.
  4. If the board fills up with no line of four, the game is a draw.

That is the whole rule set, which is why Connect Four is quick to learn. The interesting part is that gravity limits your choices: you can only ever play the lowest free space in each column, so every move also decides which space becomes available next, for you and for your opponent.

Playing Connect Four against the computer

The computer plays yellow. On each turn it does three things in order:

  • If it can complete four in a row, it does.
  • If you could complete four in a row with your next disc, it blocks that space. If you have two such threats at once, it can only block one of them.
  • Otherwise it looks four moves ahead (its move, your reply, its next move and your next reply) and scores the positions by the open lines each side has, with extra weight for discs in the centre column. When several columns score the same, it picks one at random, so games do not repeat.

It does not look further ahead than that. A trap that takes more than a few moves to spring, or a move that creates two threats at once, will get past it. If you want a closer match, play a friend in two-player mode.

Connect Four strategy

A few ideas cover most of what separates a beginner from a good player.

Start in the middle. More possible lines of four pass through the centre column than through any other column, so a disc there has the most ways to become part of a win. The outer columns take part in the fewest lines.

Make two threats at once. A threat is a space where your next disc would complete four. One threat can be blocked. Two threats in different places cannot both be blocked in a single move, which makes a double threat the most reliable way to win.

Do not play under a threat. If your opponent needs a space that is not yet playable because the space below it is empty, be careful about filling the space below. As soon as you do, their winning space becomes available and they can take it on their next turn. The same works in your favour: a threat of yours that sits above an empty space can wait until your opponent is forced to play beneath it.

Watch the bottom row early. If your opponent gets three in a row along the bottom with an empty space at both ends, you can only block one end. Stop a bottom-row line at two discs, before it gets that far.

Think about odd and even rows. Late in a game, when the columns are filling up, the player who moved first tends to benefit from threats on odd-numbered rows, counting from the bottom, and the second player from threats on even-numbered rows. It is a rule of thumb rather than a guarantee, but it explains why some threats never get used.

Where the game comes from

Connect Four was published by Milton Bradley in 1974. In 1988 it was solved independently by James D. Allen and Victor Allis: with perfect play from both sides, the first player can force a win by starting in the centre column. Perfect play means looking far deeper than any person can at the board, so between real players the outcome is decided by who spots the threats first.

FAQ

How do you win at Connect Four?

Get four of your own discs in a straight line: across a row, up and down a column, or along either diagonal. A line of five or more also wins, because it contains a line of four. On this board the winning discs are outlined when the game ends.

Does it matter who goes first in Connect Four?

Yes. The first player has an advantage: in 1988 the game was solved, and with perfect play the first player can force a win by starting in the centre column. Between ordinary players that edge is much smaller, so it is fair to take turns going first. On this page red always moves first.

Can I play Connect Four with a friend?

Yes. Choose Two players and pass the screen between moves: red moves first, then yellow. Undo takes back one disc at a time in this mode. There is no online matchmaking; both players use the same device.

How strong is the computer?

It always takes a winning move, blocks a single threat of yours, and otherwise looks four moves ahead. It does not plan further than that, so a player who sets up two threats at once, or a trap that takes longer to spring, can beat it.

What happens if the board fills up?

If all 42 spaces are filled and nobody has four in a line, the game is a draw. Press New game to start again, or Undo to go back and try a different move.

Can I take a move back?

Yes. Undo takes back your last disc. Against the computer it also removes the computer's reply, so it is your turn again. You can keep pressing Undo to go further back, even after the game has ended.

More games

If you enjoy Connect Four, try Dots and Boxes, another quick game for two where you claim squares one line at a time, or Mancala, where you sow stones around the board and capture your opponent's. You can also see all games.

Players’ notes

Stuck on a board, or found a trick worth sharing? Leave a note. No account needed.

No notes yet. Yours would be the first.