Connect Four

Drop pieces to connect four in a row before the AI does. Classic vertical strategy game.

Loading game…

About Connect Four

Connect Four has been a staple of family game shelves since Milton Bradley released it in 1974, and it's remained popular for a good reason: the rules take ten seconds to learn, but the game was mathematically "solved" in 1988, proving that the first player can always force a win with perfect play starting in the center column. That gap between simple rules and deep strategic structure is exactly what makes it satisfying to actually play, even knowing the theory.

The board is 7 columns wide and 6 rows tall. Players alternate dropping a piece into any column, and gravity pulls it down to the lowest open row — you're always choosing a column, never an exact square, which is what gives the game its distinctive tension. The first player to connect four of their own pieces in a row, horizontally, vertically, or diagonally, wins. Our AI opponent evaluates the board several moves ahead using a minimax search, weighing not just immediate wins and losses but which player controls the center columns, where the most possible four-in-a-row lines pass through. Three difficulty levels adjust how deep the AI thinks and how often it plays a deliberately weaker move, so newcomers can build confidence on Easy while Hard genuinely tests players who already know the center-column theory.

How to Play

  1. 1Tap a column to drop your piece into the lowest open row in that column
  2. 2Take turns with the AI opponent, dropping one piece per turn
  3. 3Connect four of your own pieces in a row — horizontally, vertically, or diagonally — to win
  4. 4If the entire board fills up with no four-in-a-row, the game is a draw
  5. 5Choose difficulty: Easy, Medium, or Hard before starting

Tips & Strategy

  • Start in the center column whenever possible — it's part of more potential four-in-a-row lines than any edge column.
  • Watch for a move that creates two winning threats at once (a "double threat") — your opponent can only block one of them.
  • Think about odd and even rows: in a full board, whoever's threats land on the right row parity often has the long-term advantage.
  • Don't just react to your opponent's last move — check the whole board for a setup that lets you create a double threat two moves out.
  • Playing second? Mirror the center-column strategy immediately to avoid falling behind against a strong opponent.

Frequently Asked Questions

Is Connect Four a solved game?

Yes — it was mathematically solved in 1988. With perfect play, the player who moves first and starts in the center column can always force a win. Against imperfect play (including most humans), the outcome still depends heavily on who spots the best moves.

How does the AI opponent work?

It uses a minimax search with alpha-beta pruning, looking several moves ahead and scoring positions by center-column control and potential four-in-a-row lines. Higher difficulty levels search deeper and skip fewer good moves.

What's the best opening move?

Dropping into the center column is the strongest opening — it participates in more possible winning lines (horizontal, vertical, and both diagonals) than any other column.

How big is the board?

The standard Connect Four board is 7 columns wide and 6 rows tall, for 42 total spaces.

Leaderboard

You might also like