Dots & Boxes guide
How to win at Dots and Boxes
Dots and Boxes is the pencil-and-paper game where you take turns joining dots, and whoever closes a box keeps it. Édouard Lucas wrote it up in 1889. Most people learn one trick (don't draw the third side) and stop there. This page has our board's rules, then the part hardly anyone explains to kids: how chains of boxes decide the end of the game.
The rules on our board
The board is 5 dots by 5 dots. That makes 16 boxes and 40 lines to draw. On your turn you draw one line between two dots that sit next to each other, across or up and down. Against the computer you're Player 1, and you always go first.
Draw the fourth side of a box and it's yours: it fills with your colour and you draw again. There's no passing, so every box you close means another line. One line can close two boxes at once: you get both, but still only one more line.
The game ends when all 40 lines are drawn, and whoever owns more boxes wins. With 16 boxes, 9 is a win and 8 each is a draw. Besides the computer, you can play a friend on the same screen, or send a friend an invite link and play on two devices. Online, Play again swaps who goes first.
The first habit: don't draw the third side
A box with three sides drawn is a present for whoever moves next: they close it and go again. So for most of the game the good lines are the ones that don't give any box its third side. Before you draw, count the sides of the one or two boxes the line touches. If either already has two, pick another line.
Early on there are plenty of safe lines. They run out, though, and usually all at about the same time. When they do, nearly every box still open has two sides drawn, and every line left gives somebody boxes. What happens next is decided by chains.
What a chain is
A box with two sides drawn has two sides still open, and each leads either to the edge of the board or into the next open box. Follow them and the boxes join up into chains: rows of boxes, often bending round corners, where closing one box gives the next its third side.
Open one end of a chain and your opponent can eat the whole thing, box after box, because every box they close earns them the line that closes the next. A chain of 3 or more boxes is called a long chain. A chain of 1 or 2 is short.
Sometimes a chain joins back onto itself and makes a loop, like a square of 4 boxes with all 8 outside sides drawn. Loops follow slightly different sums, so we'll leave them out here.
The double-cross: saying no to two boxes
When your opponent opens a long chain for you, don't take all of it. Take every box except the last two. Then, instead of closing the next box, draw the line at the far end of the chain. That line closes nothing, so your turn ends, and the last two boxes are left sharing one empty line.
Your opponent draws that line and gets both boxes with it. A line that closes two boxes at once is called a double-cross. But closing boxes means drawing again, and if every line left is in another chain, they have to open it for you.
Here's a worked example. Two chains are left, one of 4 boxes and one of 6, and your friend has to move. They open the chain of 4. If you take all 4, you have to draw again, and the only lines left are in the chain of 6, so they get all 6: you 4, them 6. If you take 2 and hand back the last 2, they take those and then have to open the chain of 6, and you take all 6: you 8, them 2. Saying no to two boxes turned a 4 to 6 loss into an 8 to 2 win.
Do it on every chain but the last. On the last one there's nothing left to stay in charge of, so take every box.
The long-chain rule
Once the safe lines are gone, whoever has to open the first long chain usually loses, because the other player can hand back two boxes each time and stay in charge until the last chain. So the real fight in the middle of the game is about which of you runs out of safe lines first.
On a board of 5 by 5 dots like ours, the number of long chains tells you. Player 1, who went first, wants an odd number of long chains: one or three. Player 2 wants an even number: two or four.
You can check it with two made-up endings. Say the safe lines run out with one long snake of all 16 boxes. Getting there takes 23 lines that close nothing, so the 24th line falls to Player 2, who has to open the snake, and Player 1 takes all 16. Now say it's two chains of 8 instead. That takes 22 lines, so the 23rd falls to Player 1, who has to open one. Player 2 takes 6, hands back 2, and then gets the whole second chain: Player 2 wins 14 to 2.
The number is settled while there are still safe lines. The lines you draw then decide where the chains form: you can place them so a long chain gets split in two, or cut down to 1 or 2 boxes, or so that two short pieces join into one long one. When the safe lines are nearly gone, stop and count the chains you can see forming before you draw.
For parents and teachers, the reason is a counting rule from Elwyn Berlekamp's book The Dots and Boxes Game: dots plus double-crosses equals turns. Every line that closes no box ends a turn, and the last turn ends with the game. On our board that comes to 40 lines minus 16 boxes plus 1, so 25 (the number of dots), plus one more for each double-cross, since a line that closes two boxes leaves one more line that closes none. Player 1 takes the odd-numbered turns and the player in charge takes the last one. With one double-cross for each long chain but the last, an odd number of long chains gives an odd number of turns, and the last turn goes to Player 1. Short chains and loops can add double-crosses of their own, so strong players count those too.
Mistakes that lose games
If you lose the count and have to open chains, give away the short ones first and keep the long ones for last: every chain you open is one your opponent might take whole.
- Drawing a third side early because the line looks harmless. Count the sides of both boxes it touches.
- Taking every box of a long chain when another long chain is still waiting. Hand back the last two.
- Handing back two boxes on the last chain, which just gives them away.
- Opening a chain of 2 at its end. Draw the line between its two boxes instead: that makes two single boxes, and your opponent can't hand those back to keep you opening chains.
Practising against the computer
Easy draws any line at random. It gives boxes away and can miss a box you've left open for it.
Medium always closes a box when it can. Otherwise it picks a safe line at random, one that gives no box its third side. When none are left it draws any line at random, so it may open a long chain while a short one is still there.
Hard does the same but picks its safe lines from the emptiest part of the board, and when they run out it draws the line that hands over the fewest boxes right then. It doesn't look ahead or count chains: opening a chain of 3 and a chain of 10 both hand over one box straight away, so to Hard they look the same.
Medium and Hard never hand back two boxes: they take every box they're given. So once you've won the count, they'll open chain after chain for you. Hard also opens a chain of 2 at one end, never in the middle, so you can hand both boxes straight back. Medium is the level to practise the double-cross on, then try counting chains against Hard.
Did you like this guide?
Play Dots & Boxes now
It’s free in your browser, with no sign-up. Play Dots & Boxes against the computer, with a friend on the same screen, or send a friend a link and play online. Or tap Quick match to play someone new.