All tools

Connect Four

Drop discs into a grid and try to connect four in a row.

Red to move

About

Classic Connect Four against a computer opponent or a friend on the same device. Beat the AI on easy, then try medium and hard.

How to use

  1. Pick mode (vs computer or 2-player).
  2. Click a column to drop your disc.
  3. Connect four to win.

FAQ

How does the AI play?+

Minimax with alpha-beta pruning. Easy looks 2 moves ahead, medium 4, hard 6. Theoretical solution shows first player wins with perfect play, but the AI here doesn't play perfectly.

Can I undo a move?+

Yes in 2-player mode. Against the AI, no undos.