Four in a row board, 7 columns by 6 rows, with red and gold discs and a winning line of four

Play Four in a Row against the computer

Drop discs into a 7×6 grid and line up four in a row before the computer does. Choose Easy, Medium or Hard, undo any move, and ask for a hint when you are stuck. There is no app, no sign-up and no interstitial before play; it works offline after the first visit and you can play it entirely from the keyboard.

Four in a Row board is loading.

You: red Computer: gold with a diamondYour turn. Click or tap a column to drop a disc.

Start a new game?

Your current Four in a Row will be abandoned.

How to play Four in a Row

  1. You and the computer take turns dropping a disc into one of the seven columns. Discs fall to the lowest free space. You move first.
  2. Line up four of your discs in a row, a column or a diagonal to win. The winning four light up.
  3. If the board fills with no line of four, the game is a draw.
  4. Undo takes back your last drop together with the computer’s reply. Change the computer’s strength in Settings; it applies to the next game.

Keyboard

Left / Right
Move the column cursor
Enter / Space
Drop a disc in the focused column
1 to 7
Drop a disc in that column
U
Undo
Y
Redo
H
Hint
N
New game
?
This help

How to play Four in a Row

  1. The board has 7 columns and 6 rows, standing upright. You play red and always move first; the computer plays gold discs with a small diamond.
  2. Click or tap a column to drop a disc. It falls to the lowest empty space.
  3. The computer replies straight away with a disc of its own.
  4. The first side to line up four discs horizontally, vertically or diagonally wins. The winning four are ringed.
  5. If all 42 spaces fill with no line of four, the game is a draw.
  6. A full column cannot take another disc.
  7. Undo takes back your disc and the computer’s reply together.

Four in a Row strategy: how to win more games

The game looks simple, but it rewards planning several moves ahead. These ideas cover most of what separates a beginner from a strong player.

Play the centre

The middle column is part of more possible lines of four than any other, and the columns beside it come next. Start in the centre and keep a presence there. The computer weighs the centre the same way, which is why it rarely opens on an edge.

Make double threats

A single threat of three in a row is easy to block. Two threats at once cannot both be blocked. The classic case is three discs in a row on the bottom with both ends open: whichever end your opponent covers, you play the other. Build positions where one move creates two threats.

Watch the square under a threat

A threat in the air is only useful when the square below it gets filled. If your opponent would have to play right under your winning square, they cannot move in that column without handing you the game. Count which columns are poisoned for each side; late in the game, running out of safe columns is how most games are lost.

Odd and even rows

Because you move first, you tend to get the odd rows (1, 3, 5 from the bottom) when columns fill up at the end, and the second player the even rows. A threat on an odd row is usually worth more to the first player, and one on an even row to the second.

Always check before you drop

Before each move, ask two questions: can I win right now, and can my opponent win next move? Then check that your disc does not create a space your opponent can use on top of it.

Computer strength: Easy, Medium and Hard

Choose the strength under Settings; it applies from the next game. The computer uses an alpha-beta search and scores every possible line of four on the board, with a preference for the centre and for quicker wins.

  • Easy looks 1 move ahead and chooses with some randomness among moves close to its best. It takes a win when one is on the board and blocks a single open three, but it cannot stop a double threat.
  • Medium, the default, looks 3 moves ahead (plies).
  • Hard looks 7 moves ahead and answers in about 30 milliseconds on a laptop, around a tenth of a second at most.

Can the first player always win?

Yes, on the standard 7×6 board. In 1988 the game was solved independently by two researchers, who showed that the first player can force a win with perfect play by starting in the centre column. In practice perfect play is far beyond what people can calculate, and even the Hard computer here looks only 7 moves ahead, so games stay open. You always move first on this page.

A short history of four in a row

Games of lining up pieces are very old, from tic-tac-toe to gomoku. The version with an upright frame, where gravity decides where each disc lands, became a popular family game in the 1970s and has been played at home ever since under many names. Its small board made it a favourite subject for early computer game research, which led to its solution in 1988.

Stats, hints and undo

Your games played and games won are kept in your browser. A draw counts as played but not won. Four in a Row is turn-based, so there is no timer and no daily game; the header shows whose turn it is and the result when the game ends.

Undo and redo are unlimited within a game. The hint runs a five-ply search for you, highlights where your disc would land and can be applied with one click. The first two hints in each game are free; when ads are switched on later, further hints offer a short ad or a 30-second wait. Each game has a puzzle code such as A7K3Q, and ?p= in the address replays it; with the same code and moves, the computer plays the same way every time.

Plays anywhere, no app, no account

Tap anywhere in a column on a phone, or use the arrow keys and Enter, or press 1 to 7 to drop straight into a column. Tidy Puzzles runs entirely in your browser: there is no app to install, no account to create and no interstitial before you can play. After the first visit the game also works offline, because each puzzle is generated on your device from a seed. Every board can be played with the keyboard alone, on a phone or a desktop, and your stats and unfinished puzzles stay in this browser rather than on a server.

Frequently asked questions

How do you play Four in a Row?

Take turns dropping discs into the seven columns of an upright 7×6 grid. Each disc falls to the lowest free space. The first player to line up four discs across, up or diagonally wins.

Who goes first?

You do, always, playing red. The computer plays gold.

Can the first player always win at four in a row?

With perfect play, yes: on the standard 7×6 board the first player can force a win by starting in the centre, as proven in 1988. Perfect play is very hard for people, though.

What happens if the board fills up?

If all 42 spaces are filled with no line of four, the game is a draw. It ends the game, shows "Draw" and counts as played but not won.

How do I change the difficulty?

Open Settings and choose Easy, Medium or Hard under Computer strength. The new strength applies from the next game.

How strong is the Hard computer?

It looks 7 moves ahead and always takes an immediate win or blocks an immediate threat. It is a solid opponent but not perfect, so it can be beaten with a well-prepared double threat.

What is the best first move?

The centre column. It belongs to more possible lines of four than any other column.

Can I play with the keyboard?

Yes. Left and Right move between columns, Home and End jump to the edges, Enter or Space drops a disc, and 1 to 7 drop straight into that column.

Last updated 2026-09-27. Written and maintained by the Tidy Puzzles team; puzzles are generated on your device. How it works.