pips&pegs

Four in a Row

Drop a piece. Connect four. The machine is looking a long way ahead.

Seven columns, six rows, and a rule a child can learn in ten seconds: drop your piece into a column, it falls to the bottom, and the first player to line up four in a row — across, up, or diagonally — wins.

It's also a solved game. With perfect play the first player always wins, by taking the centre column and never letting go. You go first here, so the win is theoretically yours. Getting it is another matter, because on the higher levels the machine searches eight moves deep and it will punish a lazy drop immediately.

How to play Four in a Row

  1. Click any column to drop your piece. It falls to the lowest free slot.
  2. Line up four in a row — horizontally, vertically, or on either diagonal.
  3. Take the centre. The middle column sits on more winning lines than any other, and the game is essentially decided by who controls it.
  4. Watch for the double threat: a move that makes two ways to win at once can't be blocked.

Questions

Is Four in a Row solved?

Yes — completely, since 1988. The first player can always force a win by opening in the centre column and playing correctly thereafter. Every other opening move either loses or draws with perfect play. Knowing that doesn't make it easy: perfect play means never making a single mistake across the whole game, and the machine here is happy to wait for yours.

How strong is the computer?

It depends on the level you pick. On 'easy' it looks two moves ahead and you'll beat it. On 'very hard' it searches eight plies with alpha-beta pruning and evaluates every open line on the board — it will see a trap four moves before you set it, and it will step around it.

What's the one piece of strategy that matters?

Control the centre, and think in pairs of rows. The board has an odd number of rows, which means threats on odd rows favour the first player and threats on even rows favour the second. Strong players count that from the opening; the rest of us just take the middle and hope.

Also on the board

ReversiFlank a line of discs and they all turn over CheckersCaptures are compulsory. Multi-jumps chain.

Read next

Four in a Row strategy: the game is solved (you can still lose)