Connect Four

Drop discs into a 7×6 grid and line up 4 of them before the CPU does. Undo is unlimited and free, and it never rerolls anything: put the same position back, drop into the same column, and the same reply comes back.

Play in your browser About Simple Games

The board, and how you win

The grid is 7 columns wide and 6 rows deep — 42 cells. You and the CPU take turns dropping one disc at a time, and a disc never stays where you point: it falls to the lowest free space in the column you chose.

You win the moment 4 of your discs stand in a line — up a column, along a row, or on either diagonal. The CPU wins the same way. If all 42 cells fill and neither side has made four, the match is a draw.

There is no score in this game and no clock on the screen. A match is a win, a loss or a draw, and your time is recorded quietly for the statistics only.

Dropping a disc

A move is a column, so a column is what you press: the board is 7 tall buttons rather than 42 separate cells.

There is no landing preview: no shadow appears in the slot a disc would fall into while your finger is on a column. A column has exactly one landing space — the lowest free one — so a preview would tell you nothing the column does not already show, and it would cost drawing time on a slow phone for the length of every drag.

Undo, and why there is no Hint

Undo is unlimited and free, and it works from the first launch. No game feature here is ever behind an ad or a purchase, and strength is not something you unlock: all 3 opponents are available from the start.

One press takes the board back to your previous decision point, which means your drop and the CPU’s answer to it come off together. It never leaves you standing in the middle of the CPU’s turn, because that is not a position you ever decided anything from.

The three opponents

Easy, Normal and Hard are the same program with the same judgement of a position. The only thing that changes is how far ahead each one reads before it commits.

OpponentReads aheadWhat that means at the board
Easy1 moveTakes a win it can complete right now, and does not see your threats at all.
Normal4 movesAnswers a threat that is about to land, but walks into a double threat.
Hardup to 8 movesDeepens as far as its search budget allows, then plays the best move of the last depth it finished.

A match you abandon in order to start another one is not recorded as a loss. It counted as played the moment it began, and only a match that actually reached an end changes the record — statistics should not be something that threatens you.

Who drops first, and the match you left

Before a match you choose who opens, with You first or CPU first. You open by default, because the opening seat is the friendlier one — but a default is not a rule, and anyone who wants the harder side can take it.

The choice applies to the next match. It never touches a match already in progress: a match ends on the side it started on.

Reading the board

Two things decide most matches here: the centre column, and the square you hand your opponent every single time you drop.

Questions people ask

Can I play against another person, or online?

No. Every match is against the CPU on your own device — there is no online play and no two-player mode. There is no rating and no ranking either; your record stays on the device where it was made.

If I undo, will the CPU play a different move?

No. It answers the position in front of it, and it settles ties between equally good columns from the match’s seed and the number of discs played — there is no chance left in it to shake loose. Put the board back, drop into the same column, and the same reply comes back. Undo is a take-back, not a reroll.

Why is there no Hint?

Because there is nothing hidden for a hint to uncover. The whole board is visible, so the only thing a hint could do is name the column the CPU would play — which is the CPU playing your side too. Undo is the help instead, and it is unlimited and free.

Is Hard the strongest a computer can play?

No, and that is deliberate. Connect Four is a solved game, so an opponent reading to the end would be one you could never beat. Hard reads up to 8 moves ahead, stops at a fixed search budget, and plays the best move of the last depth it managed to finish.

Can I leave in the middle of a match?

Yes. The board is saved as you play and comes back exactly as you left it, including whose turn it was. Only the undo history is not kept, so a resumed match starts from the position rather than from its move list.

Do I need an internet connection?

The Android app plays from the first launch with no connection, and every match is decided on your device. The browser version needs to load the page once, and then the game itself runs in your browser.

Everything described here is implemented in the open: read the source code on GitHub.