Tap between two dots that sit next to each other to draw a line. With a keyboard, Tab moves between the free lines and Enter draws one. Your lines and boxes are gold, the computer's are blue. Undo takes back your last line and the computer's reply. The levels are the ones from my app: Easy plays loosely, Medium never hands you a box while it has a safe line, and Hard counts chains and loops to the end.
The rules
- Players take turns drawing one line between two dots next to each other, across or down.
- Draw the fourth side of a box and it's yours. Then you draw again, straight away.
- When every line is drawn, whoever owns more boxes wins.
That "draw again" rule is the whole game. It means taking boxes never costs you a turn, so the fight is about who's forced to give boxes away.
1. Don't draw the third side
A box with two sides drawn is safe. Draw its third side and the other player closes it and goes again. So early on, both players draw lines that don't give a third side to any box. Those are the safe lines, and the opening is really a quiet countdown of them.
The safe lines always run out. When they do, somebody has to give something away, and that's where games are decided.
2. See the chains and loops
By the time the safe lines are gone, the open boxes have joined up into strings. A string with ends at the edge of the board, or at a box that's already taken, is a chain. A string that closes on itself is a loop.
Opening any of them lets the other player take the whole thing, box by box.
So the last part of the game is a series of handovers. Each player in turn has to open a chain or a loop, and the other takes it. If nothing else changed, you'd simply open the smallest piece each time, and the player who has to open fewer, bigger pieces would win.
3. Leave two boxes to keep control
Here's the trick that changes everything. When someone opens a long chain, three boxes or more, you don't have to take all of it. Take every box except the last two, then draw the line at the far end instead. That leaves two boxes joined in a little domino. The other player takes those two, and then it's their turn to open the next chain.
You've given away two boxes, but you keep control: every chain after this one comes to you first, and you can do the same again. With a loop it costs four boxes instead of two, because the loop has to be split in the middle.
A single box can't be split like that, and neither can a two box chain if it's opened by its middle line, because then both boxes are ready to take at once. That's why short chains are the cheap ones to give away, and why a careful player always opens a two box chain from the middle.
4. When to take everything
Keeping control isn't always worth it. If the pieces left are small, the two boxes you give away can be worth more than control. The test is simple to say: count what you'd score from here both ways. In practice that means comparing two numbers, the boxes you'd give up by leaving two, against what control will earn you from the chains still on the board.
The practice below is exactly that decision, on real positions from games between my computer players. In each one, the other player has just opened the shaded chain. Do you take all of it, or leave the last two? Every answer was counted all the way to the end of the game.
1. A chain of 3 on a 4x4 board, with a chain of 9 still to come.
Answer to 1
Leave two. Take the first box, then draw the line at the far end of the chain instead of taking the last two. The other player gets two boxes but then has to open a chain of 9. That's worth plus 8 to you by the end of the game, against minus 6 if you grab all 3.
2. A chain of 3 on a 4x4 board, with a chain of 4, a chain of 5 and a loop of 4 still to come.
Answer to 2
Take them all. What's left, a chain of 4, a chain of 5 and a loop of 4, is worth so little to the player in control that keeping control isn't worth the two boxes. You end up plus 2 by grabbing all 3, and level by leaving two.
3. A chain of 4 on a 4x4 board, with a chain of 9 still to come.
Answer to 3
Leave two. Take the first 2 boxes, then draw the line at the far end of the chain instead of taking the last two. The other player gets two boxes but then has to open a chain of 9. That's worth plus 9 to you by the end of the game, against minus 5 if you grab all 4.
4. A chain of 4 on a 5x5 board, with a chain of 8, a loop of 4 and a loop of 4 still to come.
Answer to 4
Take them all. What's left, a chain of 8, a loop of 4 and a loop of 4, is worth so little to the player in control that keeping control isn't worth the two boxes. You end up plus 4 by grabbing all 4, and level by leaving two.
5. A chain of 6 on a 5x5 board, with a chain of 13 still to come.
Answer to 5
Leave two. Take the first 4 boxes, then draw the line at the far end of the chain instead of taking the last two. The other player gets two boxes but then has to open a chain of 13. That's worth plus 15 to you by the end of the game, against minus 7 if you grab all 6.
5. The long chain rule
Control decides the ending, so the middle game is a fight over who'll get it. There's a counting rule for that, known as the long chain rule, and it falls out of the board's own arithmetic.
Every line that closes no box passes the turn. On a square board there are exactly as many of those as the number of dots minus one, plus one more for every double cross, a single line that closes two boxes at once. That second part is what leaving two boxes creates. And the player who has to draw the last of those turn passing lines is the one who opens the final chain.
Put together, with long meaning three boxes or more: the first player wants the number of dots plus the number of long chains to be even, and the second player wants it odd. Loops don't count, because giving away a loop's four boxes creates two double crosses, which leaves the count the same.
| Board | Dots | First player wants | Second player wants |
|---|---|---|---|
| 3x3 boxes | 16 | an even number of long chains | the other parity |
| 4x4 boxes | 25 | an odd number of long chains | the other parity |
| 5x5 boxes | 36 | an even number of long chains | the other parity |
In practice: on a 5x5 board, the first player wants an even number of long chains, so if the board is heading for one long chain, it's worth trying to split it in two, or join on a third. You won't always manage it, but knowing which way you want it tells you which safe lines to draw.
A few habits that win games
- Count the safe lines left before you draw one. Whoever draws the last one makes the other player open first.
- Give away the smallest piece you have, and give away two box chains from the middle.
- When they open a long chain, stop and count before you grab it.
- Don't take a single box early if it opens a long chain for them. A box now can cost you a whole chain later.
Questions
Is it better to go first in dots and boxes?
Not by itself. What matters is who ends up in control of the chains. The long chain rule above tells each player what to aim for, and on a 4x4 board, with 25 dots, the first player wants an odd number of long chains.
What is a double cross?
A single line that closes two boxes at once. It happens when someone leaves two boxes in a domino and the other player takes both with one line.
Should I always take a box when I can?
Almost always early on, but not at the very end. When the last chains are being handed over, taking every box of a long chain can cost you the rest of the game. Leave two and keep control.
Can the computer be beaten?
Easy and Medium, yes, once you think about chains. Hard counts the endgame exactly, so beating it takes control of the chains from the middle game on.
Can I play on my phone?
Yes. My Dots and Boxes app for Android has the same three levels, boards from 3x3 to 5x5, and two players on one phone. It works offline.
Next game, when the safe lines run low, stop and count the chains. That one habit is the difference between taking boxes and winning games.
Dots and Boxes
Three computer levels, boards from 3x3 to 5x5 and two players on one phone, all offline.