Connect 4 is the classic two-player gravity-based strategy game. Drop colored discs into a 7-column grid and connect four in a row — horizontally, vertically, or diagonally — to win.
About Connect 4
Connect 4 (also known as Four in a Row, Captain’s Mistress, or Plot Four) is a two-player perfect-information game played on a 7-column, 6-row vertical grid. Players take turns dropping colored discs into a column; the disc falls to the lowest unoccupied cell in that column. The first player to align 4 of their discs in a row, column, or diagonal wins. Connect 4 has been mathematically solved: with perfect play, the first player (Red) always wins by playing the center column first. Our AI uses a strong heuristic — win > block > center preference — providing a real challenge while remaining beatable for skilled players.
How to Play Connect 4
- Click any column to drop your disc. The disc falls to the lowest empty cell in that column.
- Players alternate turns. In vs AI mode, you play Red and the AI plays Yellow. In 2-player mode, players share the device.
- Connect four of your discs in a row to win — horizontally, vertically, or in either diagonal direction.
- If the entire board fills (42 discs) with no four-in-a-row, the game is a draw.
- Press New game to start over.
Tips and Strategy
- Open with the center column (column 4). It is part of more 4-in-a-row lines than any other column.
- Always block your opponent’s 3-in-a-row. One missed block ends the game.
- Look for “double threats” — positions where you create two simultaneous winning lines. The opponent can only block one.
- Avoid placing your disc directly under an opponent’s threat — it gives them a free win.
- Diagonal threats are easier to overlook than horizontal ones. Scan diagonals on every turn.
- Track parity. With perfect play, Red wins on odd-numbered rows; Yellow needs even-row threats.
- Avoid columns 1 and 7 in the opening. Center columns participate in more winning lines.
History and Origin
Connect 4 was invented in the 1970s by Howard Wexler and David Bhang and patented by Milton Bradley (now Hasbro), who released it commercially in 1974. It became one of the best-selling board games of all time. In 1988, James D. Allen and Victor Allis (independently) proved that Connect 4 is a first-player win with optimal play. Modern computer Connect 4 solvers run in seconds. The game remains popular as a quick, accessible strategy game and a teaching tool for game theory.
Variations and Game Modes
Variants include Connect 5 (10×9 grid, 5-in-a-row), Pop-out (players can remove their bottom-row discs), Pop-10 (first to remove all opponent discs wins), Connect 4x4x4 (3D version), and Gomoku (5-in-a-row on a Go board).
Frequently Asked Questions
How do you win at Connect 4?
Connect four of your discs in a row — horizontally, vertically, or diagonally. The center column is the strongest opening. Always block opponent threats and look for “double threats” that win on your next move.
Can the first player always win Connect 4?
Yes, with perfect play. Mathematicians have proven that the first player (Red) always wins if they play the center column first and continue with optimal moves. Against a perfect opponent, the second player cannot win.
How big is the Connect 4 board?
7 columns wide and 6 rows tall, totaling 42 cells. Each column holds up to 6 discs.
What is the best Connect 4 opening?
The center column (column 4) is the strongest opening. It participates in 13 of the 69 possible 4-in-a-row lines — significantly more than any other column.
Can Connect 4 end in a draw?
Yes. If all 42 cells fill with no four-in-a-row, the game is a draw. With imperfect play, draws happen occasionally; with perfect play, Red always wins.
How does the AI in this Connect 4 work?
The AI checks for immediate winning moves first, then blocks opponent winning moves, then prefers center columns by a fixed priority order. It is strong but not perfect.
What is a “double threat” in Connect 4?
A move that creates two simultaneous 3-in-a-rows. The opponent can only block one of them, so you win on your next move regardless of which they block.
Can children play Connect 4?
Yes. Connect 4 is suitable for ages 6 and up. The visual nature makes the rules instantly clear, and games are short enough for young attention spans.