Four in a Row

Take turns dropping discs into a seven-column grid. Discs fall to the lowest free space. The first player to line up four in a row, across, down or diagonally, wins.

Your move. You are yellow.

How to play Four in a Row

The grid has seven columns and six rows. On your turn, click any square in a column and your disc drops to the lowest empty space in that column. Players alternate turns. Line up four of your discs horizontally, vertically or diagonally to win. If the grid fills with no line of four, the round is a draw. Players take turns going first each round.

Difficulty levels

The computer looks ahead a number of moves before choosing. On Easy it looks two moves ahead and plays a little randomly. Medium looks five moves ahead. Hard looks six moves ahead and rarely misses a threat.

Strategy

  • Own the centre column. It is part of more possible lines than any other column.
  • Build threats in pairs. If you threaten two winning squares at once, your opponent can only block one.
  • Watch the square under a threat. Do not drop a disc that lets your opponent play into a winning spot right above it.
  • Think about odd and even rows. Late in the game, the player who moved first usually benefits from threats on odd rows, counting from the bottom.

About this game

Four-in-a-row games have been played for centuries with counters and grids. Homivoo's computer player uses the minimax search with alpha-beta pruning, a classic technique from game theory, running right in your browser.