Four in a Row

You are red, the computer is yellow. Click or tap a column to drop a disc.

Your move

How to play

The grid has seven columns and six rows. Players take turns dropping a disc into a column, where it falls to the lowest empty space. The first to line up four of their discs horizontally, vertically, or diagonally wins. If the grid fills with no line of four, it is a draw. Your wins, losses, and draws are tallied in this browser.

ActionControls
Drop a discClick or tap a column
Start againThe New game button

How the computer plays

The computer takes a winning move if it has one and blocks yours if you are about to win. Otherwise it avoids moves that would hand you an immediate win and prefers columns near the center. It looks only one move ahead, so plans that take two moves to come together can beat it.

Strategy

  • Start in the center. The middle column is part of more possible lines of four than any other.
  • Set up double threats. A move that creates two different winning squares can’t be fully blocked, because the opponent can only fill one.
  • Watch the vertical and diagonal lines. New players spot horizontal threats and miss the others, on both sides of the board.
  • Mind the square underneath. A winning square only matters once the column below it is filled. Avoid playing directly under your opponent’s threat.

A solved game

Mathematicians proved in 1988 that the first player can always force a win with perfect play, starting in the center column. Against a person or this computer, that perfect line is very hard to follow, so there is plenty of real game left.