Drop discs into a 7 by 6 grid and line up four. Play the computer on Easy, Medium or Hard, or take turns with a friend on one screen.
To win at Four in a Row, get four of your discs in a straight line before your opponent does: across, up and down, or diagonally. The board has 7 columns and 6 rows, which is 42 squares. Players take turns. On your turn you choose a column and your disc falls to the lowest empty square in it, so you never choose a row. A column holds 6 discs and is then full. If all 42 squares are filled and nobody has four, the game is a draw. The board has 69 possible lines of four: 24 across, 21 up and down, and 24 diagonal. The page marks the disc that was just dropped with a small dot, and when someone wins it highlights the winning four with a bright ring. Player 2's discs have a ring inside them, so the two colours can be told apart without relying on colour. Undo takes back your last move. Against the computer it also takes back the computer's reply, so you are back where you were before your move. Undo is not available after the game has ended; press New game instead.
The computer searches ahead. It tries each column, then each of your replies, and so on, and scores the positions it reaches. The search is a negamax search with alpha-beta pruning, which skips branches that cannot change the result, and it tries the centre columns first because they lead to more cut-offs. A position is scored by counting lines of four that are still open: a disc in the centre column is worth more because it belongs to more lines, a line with three discs and one empty square is a threat, and a threat counts for more when the empty square can be played right now or sits on a row of the right parity (odd rows from the bottom for the first player, even rows for the second). A win found sooner scores higher than a later one. Easy looks up to 3 moves ahead, and 4 times in 10 it looks only one move ahead, so it takes a win it can see but may miss your threat. Medium looks up to 6 moves ahead. Hard looks up to 12 moves ahead. Each level also has a limit on how many positions it examines; when the limit is reached the computer uses the deepest search it finished. Medium and Hard always take a win in one move, and block your win in one move whenever a single move can stop it. If you have two separate winning squares at once, no single move stops both, and that double threat is how you beat them.
Play the centre first. A disc on the bottom row of the centre column belongs to 7 lines of four, one on the bottom row of an edge column to 3, and the busiest squares on the board belong to 13. Look for a double threat: two different squares where you would complete four on your next move. Your opponent can block only one. A line of three with an empty square under the gap is the usual way to build one, so watch the square under every gap, because dropping there hands your opponent the square above. Count rows from the bottom. The game is solved by computer analysis: with perfect play the player who moves first wins by starting in the centre column. That does not make the first player safe in practice, and the computer on Hard is not a perfect player. If you want an easier game, choose Easy or let the computer start. When you play on one device with a friend, the Starts option picks who moves first, and Player 1 is always purple, Player 2 teal.
With a mouse or finger, click or tap a column to drop a disc; the whole column is the button, 36 pixels wide or more on a phone. With a keyboard, Left and Right choose a column, Home and End jump to the first or last, Enter or Space drops a disc, and the keys 1 to 7 drop straight into that column. A screen reader announces each move, including the computer's column, and each column's label lists its discs from the bottom. The game in progress is saved in this browser after every move, so closing the tab and coming back carries on where you stopped. Your wins, win streak and the fewest discs needed for a win against the computer are kept in this browser too; two-player games are not counted. Animations are short and are turned off if your device asks for reduced motion. This page has no sound, no accounts, no online play against other people, and no leaderboard. It does not offer other board sizes or other line lengths.
Get four of your discs in a straight line before your opponent: 4 across, 4 up and down, or 4 on a diagonal. Discs fall to the lowest free square of the column you pick, on a board of 7 columns by 6 rows. If all 42 squares fill with no four, it is a draw.
Yes. Choose 2 players, then take turns on the same device. Player 1 is purple and Player 2 is teal with a ring inside the disc. Starts decides who goes first. These games are not added to your record against the computer.
Easy looks up to 3 moves ahead and sometimes only 1, so it can miss a threat. Medium looks up to 6 moves ahead and Hard up to 12, with a limit on the positions checked. Medium and Hard take any win in one move and block a single threat of one; they cannot stop two at once.
The centre column, number 4 of 7. A disc at the bottom of it is part of 7 possible lines of four, against 3 for an edge column. If you let the computer start, expect it to play there on Hard.
Yes, press Undo during a game. Against the computer it removes your last disc and the computer's reply, so you can try another column. It does not work after the game is over; press New game for a fresh board. In 2 players mode it takes back one disc.
Press Tab to reach the board, then Left and Right to choose a column and Enter or Space to drop. The number keys 1 to 7 drop straight into that column, and Home and End jump to columns 1 and 7.
No. Moves are processed in your browser and not uploaded. The game in progress, your settings (mode, level and who starts) and your win record are saved in this browser's storage and nowhere else. The page counts visits with Google Analytics, never your moves.