Four in a Row

Drop your discs and be first to line up four, across, down or diagonally.

How to control it: Click (or tap) the column where you want to drop your disc.

How to play Four in a Row

Tips that actually help

  • Open in the centre column. More four-in-a-row lines pass through the middle column than through any other, so a disc there is doing more work from the moment it lands.
  • Build sideways rather than straight up. A vertical three is the easiest threat to answer: one disc on top finishes it. A horizontal or diagonal three can have an open square at each end, and only one can be blocked.
  • The move that wins games is the double threat: two different playable squares that would each complete a four. Your opponent blocks one and you take the other. Look for these before anything else.
  • Count odd and even rows. Because you move first, in a column where you simply alternate you tend to land on rows one, three and five from the bottom, and the computer on rows two, four and six. A threat whose winning square sits on an odd row tends to fall to you; one on an even row tends to fall to the computer.
  • Before you drop, look at the square directly above the one you are about to fill. If that square completes a four for the computer, you have just lifted it into place. Late in a game, when the safe columns run out, this is how most losses happen.
  • Once you hold a threat that cannot be removed, stop building and play quiet moves. The win arrives when your opponent runs out of harmless squares and has to open the one you are waiting on.
  • Scan the diagonals after every disc the computer plays. The eye follows rows and columns and skips the slants, and the slants are where a lost game usually comes from.

Playing Four in a Row comfortably

This is a game that waits for you. There is no clock and nothing moves on its own, so you can leave the board mid-game and come back. While the computer works out its reply it says so and ignores the board until it has moved, so a stray tap during its turn costs you nothing. Your discs are red and the computer's amber, on a blue board with white empty holes; the amber is much lighter, so the two differ in brightness as well as colour. Clicking anywhere in a column plays that column, so a tap that lands three rows lower than you meant still makes the move you intended.

Two things are worth knowing. It is a mouse or touch game only, with no keyboard control at all. And nothing is saved: reload the page and the board is empty again, with no record of the game you were in. There is no sound of any kind. Focus mode, above the board, hides the rest of the page; the Text size button in the corner enlarges the writing here but not the board, which draws its own picture inside its own frame. For something with no opponent waiting on you, Sudoku and Mahjong are next door.

If something is not working

I clicked a column and no disc appeared

Either the column is full to the top, or it is still the computer's turn — the board stops accepting clicks while it is thinking. Try a column with an empty circle at the top.

The computer is taking a long time

At Depth 7 or 8 it examines an enormous number of positions, which can take several seconds on an older machine. It works in the background, so the page will not freeze. Set Depth to 4 or lower if you would rather it answered straight away.

How do I start a new game?

Press Restart, under the Depth box. It clears the board at once, without asking you to confirm, and gives you the first move again. There is no undo in this game, so Restart is the only way backwards.

The game stopped while the board was still half empty

That is normal. It ends the moment four discs are in a line in any direction, rather than carrying on to fill the board. If you cannot see where, follow the diagonals.

Where Four in a Row came from

Making a line is one of the oldest ideas in games: noughts and crosses works that way, and so do the five-in-a-row games played on a go board. This one adds a single rule that changes its character. The discs fall. You do not choose a square, you choose a column, and gravity decides the rest. That is why the game does not collapse into a draw the way noughts and crosses does, and it is why every disc is a small gift: whatever square you fill, you hand your opponent the square above it.

The seven-column, six-row version has been solved. In October 1988 Victor Allis, then a master's student at the Vrije Universiteit in Amsterdam, showed in his thesis that the player who moves first can force a win with perfect play, and that the centre column is the only opening that does it: from any other first move the second player can hold a draw. The result has not spoiled the game, because perfect play means holding a tree of positions that no person can hold. What it does mean is that when you sit down here, the first move is yours, and so in principle is the game.

Common questions

How do I drop a disc?

Click or tap the column you want — your disc drops to the lowest empty slot in that column.

Is there a computer opponent?

Yes, the game plays against you using a Minimax strategy, so it offers a real but fair challenge.

Can I play another person on the same screen?

No. This version is one player against the computer only. If you want to play someone sitting beside you, our Checkers game has a two-player setting that shares one screen.

How do I make the computer easier or harder?

Change the Depth number beside the board. It is how many moves ahead the computer looks. Depth 1 barely plans, Depth 4 is where it starts, and Depth 8 is genuinely strong and slow. You can change it mid-game and it applies to the next reply.

What is the Board Score number?

It is the game's own reading of the position. Your pairs and threes in a line count as positive and the computer's as negative, so a number above zero means the shapes on the board currently favour you. It is a rough guide, not a prediction.

Will it remember a game I have not finished?

No. Nothing is stored on your device. Close or reload the page and you start again from an empty board.

About this version

This is a self-hosted, open-source version of Four in a Row (source), used under its MIT licence and hosted here so it loads fast and shows no third-party adverts inside the game. Browse all of our free games.