ZumaTools

Connect Four

Drop your discs into the grid and be the first to line up four in a row — horizontally, vertically, or diagonally.

Player 1’s turn
0
Player 1
0
Draws
0
Player 2

Everything runs in your browser — no moves are uploaded.

How it works

  1. Choose two-player mode to pass and play on one device, or vs computer to face a four-move-deep AI opponent.
  2. Click or tap any column to drop your disc; it falls to the lowest empty slot, then it is the other side’s turn.
  3. Connect four of your discs in any direction to win the round — use undo (two-player only) or reset to start again.

Frequently asked questions

How does the computer opponent decide its moves?
The computer runs a minimax search that looks four moves ahead, scoring each possible board by counting how many two-, three-, and four-in-a-row lines each side threatens. It prefers central columns because they take part in more winning lines, and it will always take an immediate win or block your immediate win. This makes it a solid medium challenge — beatable with a plan, but unforgiving of careless drops.
What are the rules for winning Connect Four?
Players alternate dropping discs into a seven-column, six-row grid, and each disc falls to the lowest open slot in the chosen column. The first player to line up four of their own discs in a row — horizontal, vertical, or either diagonal — wins immediately. If all 42 slots fill with no line of four, the round is a draw.
Is my game data sent anywhere or saved online?
No. The entire game, including the computer’s minimax calculations, runs in JavaScript on your device with no network requests. The board state and running score live only in the page’s memory, so nothing is uploaded and reloading the tab clears everything.
Can I undo a move if I make a mistake?
Yes, in two-player mode the undo button removes the most recent disc so you can rethink your turn. Undo is disabled against the computer to keep the AI matchup honest, since taking back moves would let you probe the computer’s replies. Reset clears the whole board at any time without touching the round score tally.
Does it work on a phone or tablet?
Yes, the board scales to fit narrow screens and every column responds to taps as well as mouse clicks, with touch targets sized for fingertips. Discs drop with a short falling animation that works the same on touch and desktop. Two players can share one phone by passing it back and forth between turns.

About this tool

This is a full browser version of Connect Four, the classic vertical four-in-a-row game played on a seven-column by six-row grid. You can play locally against a friend by passing one device back and forth, or take on a built-in computer opponent tuned to a medium difficulty. Dropped discs animate as they fall into the lowest open slot, and the moment someone lines up four the winning discs are highlighted so the result is unmistakable.

The computer opponent is a genuine game-tree search, not a scripted set of moves. It uses the minimax algorithm to explore every legal drop up to four plies deep, evaluating each resulting position with a heuristic that rewards central control and counts the open two-, three-, and four-in-a-row windows available to each side. It short-circuits to grab any immediate win and to block yours, giving play that feels deliberate without being unbeatable. All of this runs client-side in your browser, so there is no lag from a server and nothing about your game leaves your device.

Connect Four is a great pick-up game for two people sharing a laptop or phone — a quick round takes a minute or two, and the round-score tally keeps a best-of series honest across a lunch break or a long wait. Against the computer it doubles as a low-pressure way to practice the tactics that make the game deep: setting up double threats, controlling the center columns, and reading your opponent’s forced replies. Because undo is available in two-player mode, it also works well for teaching kids the rules without the frustration of an irreversible slip.

A few practical tips: claim the middle column early, because discs there contribute to the most possible lines of four. Watch for “seven” and other double-threat shapes where a single move creates two winning options at once, since those are almost always game-enders. When defending, block the more dangerous threat and keep an eye on the row above a blocked spot — a careless block can hand your opponent the winning square directly on top. Reset starts a fresh board whenever you want, and the score keeps counting so you can play as many rounds as you like.

Related tools