4x4 Tic Tac Toe is the X and O game on a grid of sixteen squares, where you need four in a row instead of three. Every winning line runs from one edge of the board to the other, so a single mark can shut a line for good. The computer plays at three levels, or a friend can take the other mark on the same screen.
4x4 Tic Tac Toe rules: four in a row to win
The rules are the ones you know from the 3×3 game, stretched to a bigger grid. X always moves first, then the players take turns placing one mark in any empty square. Marks never move. The first player to fill a whole row, a whole column, or one of the two corner-to-corner diagonals with their own mark wins the round, and a line is drawn through the four winning marks.
A game lasts at most sixteen moves, and the fastest possible win comes on the seventh, when X places a fourth mark. Most games end before the board is full, though. As soon as every line holds both an X and an O, nobody can win, and the game calls the round a draw straight away, even with empty squares left.
The ten lines and the squares that matter
A 4×4 board has ten winning lines: four rows, four columns, and two diagonals. Each corner sits on three of them, a row, a column, and a diagonal, and so does each of the four middle squares. The other eight squares along the edges sit on only two lines, a row and a column.
There's no single center square. The four middle squares share the center, and the two diagonals never cross, because each one passes through a different pair of middle squares. That changes the opening: instead of one obvious first move, you have eight squares worth three lines each.
How each computer level reads 16 squares
Under Opponent, pick Computer and one of three levels, which differ in how far ahead they look:
- Easy drops its mark on any empty square at random, edge squares included, and never blocks.
- Medium takes a square that wins on the spot and blocks any row, column, or diagonal where you hold three. Otherwise it tosses a coin between a random square and the one worth most right now, counting attack and defense together. It never looks a move further, so a fork beats it.
- Hard takes a win when it has one and otherwise looks ahead for about 0.3 seconds, adding a move of depth on each pass. On 16 squares it doesn't narrow the board down: apart from forced blocks, every empty square is tried at every step, and only the clock limits how far it sees. Moving first, it opens on one of the middle four.
Hard plays perfectly only on 3×3, where it checks every possible game. Here a fork prepared beyond its horizon can still get through. Take O under You play as to watch its opening, or X to claim the first three-line square yourself.
Playing a friend: the race to the first fork
Set Opponent to 2 players and the scoreboard switches to Player X and Player O, with a tally kept only for 4×4 rounds. Against a person this board plays differently: nobody checks every square the way Hard does, so the first player to notice two crossing lines often takes the round, and two careful blockers can end in a draw with squares still empty. The 2 player Tic Tac Toe page covers turns, Undo, and fair ways to share the first move on every board.
Is 4x4 Tic Tac Toe always a draw?
With perfect play from both sides, yes. Four in a row on a 4×4 board is a proven draw: the second player can always stop the first from completing a line. Make the board six squares wide and five tall, though, and the first player can force four in a row. That's why the 6×6 board here asks for five.
The classic way to prove a draw is a pairing strategy: pair up squares so that every line holds a pair, then always answer in the partner of the square your opponent just took. That can't work on 4×4. Two lines share at most one square, so ten lines need ten separate pairs, 20 squares, and the board has only 16. In 2017 Jos Uiterwijk published a direct proof with an extension of the idea he calls set matching.
A draw with perfect play doesn't mean every game is drawn. People and computers make mistakes, and on 4×4 the mistake is almost always the same one: missing a fork.
How to win 4x4 Tic Tac Toe with a fork
A fork is a move that leaves you with two lines that each need one more mark. Your opponent can block only one, and you complete the other on your next turn. On 4×4, a fork comes from two of your lines crossing at an empty square, each holding two of your marks and none of your opponent's. Take the crossing square, and both lines have three.
Corners make natural crossing points, because a row, a column, and a diagonal meet there. Put two marks along the top row and two down the left column, keep both lines clean, and the corner between them becomes the winning move. The diagram in the strategy section above shows exactly that position.
Six habits for a 16-square board
- Open on a corner or one of the four middle squares. Each sits on three lines.
- Before every move, check for a three you must block or a three you can finish.
- Then look for crossing pairs: two of your opponent's lines with two marks each that meet at an empty square. Take that square first.
- Don't spend marks on lines your opponent has already blocked. They can never be completed.
- When you're defending, put each mark where it shuts the most open lines.
- Practice forks on Medium, then try to hold a draw against Hard as O.
These habits carry over from the classic game, and how to win at Tic Tac Toe covers them on the 3×3 board in detail.
Tapping and arrow keys on a 4 by 4 grid
Each square takes a quarter of the board's width, so taps rarely miss. Against the computer, Undo removes your last mark and its reply in one press, and New round wipes the grid without touching the tally.
- Keyboard: after Tab, the arrow keys step one square at a time and stop at the edge instead of wrapping. Home and End reach either end of a row, never more than three squares away here, and Enter or Space plays. The 1 to 9 shortcuts belong to the 3×3 board only.
- Screen readers: the grid is announced as a 4 by 4 board, and squares read as their row, column, and mark, with each move and result spoken from the status line.
The 4,4,4 game and the 64-cell cube
Tic Tac Toe on bigger boards belongs to a family mathematicians call m,n,k-games: k in a row on a board m squares by n. Classic Tic Tac Toe is the 3,3,3 game, this one is the 4,4,4 game, and Gomoku is five in a row on 15×15.
Four in a row also has a well-known three-dimensional version, played on a 4×4×4 cube of 64 cells with 76 winning lines. Unlike the flat board, the cube is a win for the first player. Oren Patashnik published a computer-assisted proof in 1980, and Victor Allis and Patrick Schoo solved it again in 1992.
What the game keeps in this browser
The page needs a connection to load. After that, Hard's search runs in your browser, and your moves and scores aren't sent to a server. Four 4×4 tallies, Easy, Medium, Hard, and 2 players, sit in this browser's local storage with your last settings, as the privacy policy describes. A half-played round isn't kept, and Reset scores clears only the tally on screen. For five in a row, try 6x6 Tic Tac Toe, or return to classic Tic Tac Toe and its nine squares.