Board & Cards3-5 min
Four in a Row
Drop a disc from the top and line four of them up
How to play
- 1Choose your opponent (computer or two players), the level and your disc colour, then press Start. Orange always moves first.
- 2Tap anywhere in the column you want and the disc falls to the lowest empty square there. The faint disc above the grid shows the column you have selected.
- 3Line up four of your discs across, down or diagonally to win. The winning four is outlined in orange.
- 4A full column cannot take another disc. When all 42 squares are filled with no line, the game is drawn.
- 5Made a mistake? Undo, once per game, takes back your move together with the computer's reply.
- 6When the game ends the winning four stays bright and the rest dims. The result screen names the move and the column the game turned on, with a dot marking that square - meaning the position was still defensible up to then.
Controls
- Click / tap
- Drop a disc into that column
- Left and right arrow keys
- Pick a column (click the board or Tab into it first)
- Enter, Space or the down arrow
- Drop a disc into the selected column
- Number keys 1-7
- Drop straight into that column
- Undo button / Z, Backspace
- Take back one move, once per game
Tips
- The centre column sits in more horizontal and diagonal groups than any other. Playing towards the middle early leaves you with more lines to use later.
- Never play the square directly below a gap your opponent needs for a four. Dropping a disc there is handing them the step they stand on.
- A move that threatens two squares at once cannot be answered, since only one of them can be blocked. Making a horizontal three and a diagonal three share one empty square is the most common way to win.
- If two squares stacked one above the other would both complete a line for you, blocking the lower one only lets you drop into the upper one. When a game turns into mutual blocking, look for that shape.
- The Hard computer does not walk into traps and simply will not play a column that loses. Stacking several threats low on the board and waiting for the columns to fill up around them works better than anything else.
What is Four in a Row?
Drop a disc into the top of the standing grid and it falls to the lowest empty square of that column. Players take turns, and whoever first lines up four of their own discs - across, down or on either diagonal - wins. If all 42 squares fill with no line, the game is drawn.
It looks like a line-making game, and the thing that makes it different is that you cannot play wherever you like. Discs always stack from the bottom, so choosing a column also decides which square you open up for your opponent, the one directly above. That is why the real question is rarely which threat to block but who benefits from the square above it, and why a game this short still rewards reading several moves ahead.
In 1988 the game was proved by computer to be a first-player win with perfect play, and the winning line starts with a disc in the centre column. That is why the computer here always takes column 4 on an empty board.
The Hard computer spends 0.85 seconds per move, deepening its search one move at a time: 11 moves ahead from an empty board and further than that later on, and once few squares remain it calculates to the end and proves which columns lose. It scores a position by looking at every group of four squares that could still be completed, adding in whether the empty square in each group sits on an odd or an even row - that is, which player will end up owning it. Normal reads 6 moves ahead and plays its second choice about one time in ten; Easy looks a single move ahead and misses roughly half the blocks it needs to make.
Frequently asked questions
Is it really a first-player win?
Yes. Two researchers proved it independently in 1988: the first player wins with a disc in the centre column followed by perfect play all the way. Starting anywhere else gives that guarantee away. People rarely play perfectly to the end, but it is why every piece of opening theory starts in the middle.
How do the three levels differ?
Easy looks one move ahead. It never misses a win of its own, but it fails to block about half the wins you are about to make and otherwise plays loosely towards the centre. Normal reads 6 moves ahead and avoids losing columns, though roughly one move in ten is its second choice. Hard spends 0.85 seconds per move deepening its search - 11 moves from an empty board - and calculates the endgame exactly. Over twenty self-play games Hard beats Easy 20-0 and Normal 20-0.
Can I choose to move second?
Yes. In settings pick your disc as Orange, which moves first, or White, which moves second. Playing White against Hard is good defensive practice, and records are kept per level either way.
Can I see where the game turned?
The result screen names the move number and the column it turned on. From that move onwards your opponent could not be stopped with correct play; before it, the position was still defensible. The square is marked with a dot on the board so you can see at once where it was.
How many undos do I get?
One per game. Against the computer it takes back your last move and the reply that followed; in two-player mode it takes back the single previous move. Once the game is over you cannot undo.
Where is my record kept?
Wins and losses per level, your current streak and your longest streak are stored in this browser only. A draw keeps a streak alive, and quitting a game against the computer part-way counts as a resignation loss. Clearing your browser data clears it too.