Name
connect-four — be first to connect four checkers in a line.
Rules
- Board is 7 columns × 6 rows. Checkers drop from the top and stack from the bottom.
- Players alternate turns. You are amber, the AI is mint.
- First to align four in a row — horizontally, vertically, or diagonally — wins.
- If the board fills with no winner, it's a draw.
Controls
- Tap / click the arrow above any column to drop your checker there.
↶ undo takes back both the AI's and your last move.
↻ new game resets the board.
- Switch sides or play locally with the
Mode selector.
Difficulty
- Easy — AI searches depth 2 (1 full ply + reply). Beatable by a novice.
- Medium — depth 4. Exploits obvious traps.
- Hard — depth 6. Uses alpha-beta pruning and center-weighted evaluation. Tough.
Strategy
Control the center column first — a checker there belongs to four winning lines. Watch for "odd threats" on row 1, 3, 5 if you move first.