Four in a Row
Drop red and yellow discs and line up four before your opponent does. Play the computer at four levels or a friend on the same screen.
What is Four in a Row?
Four in a Row is the classic disc-dropping strategy game, free to play in your browser. Take turns dropping red and yellow discs into a seven-column, six-row upright board. Each disc falls to the lowest empty space in its column, and the first player to line up four of their own discs in a row, across, up and down or diagonally, wins. Fill the whole board without a line of four and the game is a draw.
Play against the computer at four levels, from Beginner, which makes plenty of mistakes, to Master, which plays from a solver-proven opening book and calculates the game to the end whenever it can, or hand the phone or tablet to a friend for a two-player game on one screen. Choose who goes first or let the players take turns starting. Hint shows the column the engine would choose, Undo takes a move back, the scoreboard keeps your record at every level, and an unfinished game is saved in your browser so you can pick it up later.
How to play Four in a Row
- Choose your opponent, the computer's level and who moves first at the top; changing any of them starts a new game. Against the computer you play red.
- Tap or click a column to drop a disc into it. On a touch screen you can also press, slide along the board to line up the disc and let go; with a keyboard, use the left and right arrows and press Enter or Space, or press 1 to 7.
- Your disc falls to the lowest free space in that column. Then it's the other player's turn.
- Get four of your discs in a straight line, horizontally, vertically or diagonally, to win. Watch your opponent's lines too, and drop a disc in the way when they have three.
- If all 42 spaces fill up with no line of four, the game is a draw. Press Play again for a rematch.
Four in a Row tips and strategy
- Start in the middle column. A disc there can be part of more lines of four than a disc anywhere else.
- Look before you drop: every turn, check whether your opponent can win with their next disc, and block it.
- Don't fill the space directly under an opponent's three-in-a-row gap. If you do, they drop their disc on top of yours and win.
- Build two threats at once. Your opponent can only block one of them.
- Threats on the right rows win long games. As the first player, an open three that needs a disc on row 1, 3 or 5 (counting from the bottom) tends to pay off when the board fills up; as the second player, aim for rows 2, 4 and 6.
- Stuck on a move? Press Hint to see the column the engine likes best, then work out why.
Four in a Row strategy: how to win more games
Most games between beginners are won by a threat nobody saw. Make it a habit to scan all four directions after every move, yours and your opponent's. Strong players think in threats: a threat is an empty space that would complete four for one player. A threat you can't be stopped from filling right now wins at once, so the real fight is about creating two threats at the same time, or one threat directly above another, so that blocking the lower one hands you the upper one.
Later in the game the board fills up and the columns that are still open start to matter more than the discs already in them. Neither player wants to drop a disc directly beneath the other's threat, so columns get 'poisoned' and the game becomes a matter of who is forced to give way first. With perfect play from the start, the first player wins by opening in the centre column, but only by finding the right move at every turn, which is why even strong players lose to good threats.
The four computer levels
Beginner looks only a move or two ahead and often plays a random column, so it's easy to beat and good for learning. Casual looks a few moves ahead with a little randomness and punishes obvious mistakes. Strong searches about ten moves deep and is a real challenge. Master is as close to perfect as we could make it: when it moves first, its opening moves come from a book that our solver proved keeps the first player's forced win, and from then on it tries to calculate the game right to the end on every move, taking up to about four seconds to think. Once it has found a forced win it never lets it slip.
The engine uses bitboards, the compact representation used by serious game solvers, with alpha-beta search, a transposition table and threat-based move ordering, and it runs in a background thread so the page stays smooth while it thinks. The Hint button asks the same engine, on a shorter time limit, for its choice in your position.
Rules and a little history
The standard board has seven columns and six rows, 42 spaces in all, and each player has 21 discs. Players alternate, one disc per turn, and a disc always lands in the lowest empty space of the column it was dropped into; you can't skip a turn or place a disc in mid-air. Four in a line in any direction wins, and a line of five or more counts too. Games of this kind, sometimes called drop four or gravity tic-tac-toe, have been played with pencil and paper and wooden frames for well over a century. In 1988 computer scientists James D. Allen and Victor Allis independently proved that the first player can always force a win on the standard board.
Four in a Row FAQ
Is Four in a Row free?
Yes. It's free to play in any modern browser with no account and no download.
How do you play four in a row?
Two players take turns dropping a disc into one of seven columns. The disc falls to the lowest empty space. The first to line up four of their discs horizontally, vertically or diagonally wins; if the board fills up first, it's a draw.
Can I play Four in a Row with a friend on one device?
Yes. Choose Friend (same screen) as the opponent, and the two of you take turns on the same phone, tablet or computer. The scoreboard keeps count of Red's and Yellow's wins.
Can you always win four in a row if you go first?
In theory, yes: with perfect play the first player wins by starting in the middle column. In practice it takes exact play for the whole game, and a single slip can hand the win to the second player.
Does it work on phones and tablets?
Yes. Tap a column, or slide your finger along the board to aim and lift to drop. Use Full screen for the biggest board, in portrait or landscape.
Is my game saved if I close the page?
Yes. The current game and your scores are kept in your browser and are waiting for you when you come back.
More games
Tic-Tac-Toe
Classic tic-tac-toe and Ultimate Tic-Tac-Toe against an Easy, Medium or unbeatable computer, or a friend on the same screen.
PLAY →Rocket Checkers
Play checkers against the computer at four levels or a friend on the same screen. Real rules, forced captures, multi-jumps, hints and undo.
PLAY →Rocket Chess
Play chess against the computer at four levels or a friend on the same screen. Full rules, hints, undo and a saved game.
PLAY →