The rules take twenty seconds to learn and the strategy takes years, because the strongest move in dots and boxes is usually the one that hands your opponent free boxes on purpose. That is not a paradox — it is arithmetic, and this page shows the arithmetic.
How to play dots and boxes
Take turns drawing one line between two neighbouring dots. Close the fourth side of a box and you own it — and you draw again. When the grid is full, whoever owns more boxes wins.
The rule that turns it into a game
Claiming a box does not end your turn. If your next line closes another box you go again, and again, and again. That is why one turn can swallow an entire run of boxes, and why handing over a single box usually means handing over everything attached to it.
Never the third side
Drawing the third side of a box gives it to your opponent. Because they then move again, they also get whatever the box was connected to. Every beginner learns this within three games, usually with some indignation.
Dots and boxes strategy
Once both players avoid the third side, something odd happens: the safe moves start running out. That is not a failure of the game, it is the game.
Chains, and why the whole thing is really about them
Play safe lines until there are none, and the board falls apart into chains and loops. A chain is a run of boxes open at both ends; a loop closes on itself. Whoever is forced to open the first long chain loses it, and then usually has to open the next one too.
So the real contest is not about taking boxes. It is about who runs out of safe moves first — and that is decided long before the first box changes hands.
The double-cross: giving boxes away to win
When your opponent opens a chain, take all of it except the last two boxes, and leave those two behind. They must take them, and then they must open the next chain. It costs two boxes and buys the rest of the board.
This is the move that separates people who know the game from people who have merely played it a lot.
Who wins dots and boxes with perfect play?
We solved the small boards outright — not by searching cleverly, but by evaluating every position there is. A grid of c × r boxes has 2cr + c + r lines, and each line is either drawn or not, so the whole game fits in that many bits.
| Board | Boxes | Dots | Lines | Positions | Result with perfect play |
|---|---|---|---|---|---|
| 1 × 1 | 1 | 4 | 4 | 16 | second player, 1 : 0 |
| 2 × 1 | 2 | 6 | 7 | 128 | drawn, 1 : 1 |
| 3 × 1 | 3 | 8 | 10 | 1,024 | second player, 2 : 1 |
| 2 × 2 | 4 | 9 | 12 | 4,096 | first player, 3 : 1 |
| 3 × 2 | 6 | 12 | 17 | 131,072 | second player, 4 : 2 |
| 4 × 2 | 8 | 15 | 22 | 4,194,304 | first player, 5 : 3 |
| 3 × 3 | 9 | 16 | 24 | 16,777,216 | second player, 6 : 3 |
Read down the dots column. On every board we could solve, the first player wins when the number of dots is odd and never when it is even. Both first-player wins have an odd dot count; every even one is a second-player win or a draw.
That is a pattern across seven small boards, not a proof — and it is worth saying plainly, because the temptation to call it a law is exactly how wrong rules of thumb get into circulation. What it does match is the old folk strategy of counting dots and long chains before you start, which is a genuinely good habit whether or not the tidy version holds on bigger grids.
How often is taking a box actually a mistake?
The solved game answers this exactly. Across every position of the three by three board in which a box is there for the taking:
| Board | Positions with a box on offer | Refusing it is better | Biggest swing |
|---|---|---|---|
| 2 × 2 | 2,654 | 0 | — |
| 3 × 2 | 103,044 | 672 | 4 boxes |
| 4 × 2 | 3,649,460 | 21,012 | 8 boxes |
| 3 × 3 | 15,061,118 | 177,280 | 10 boxes |
Two things fall out of that. The bigger the board, the more often greed is wrong — and on a nine-box grid the mistake can cost ten boxes, which is more than the board holds, because it swings from losing 2 : 7 to winning 7 : 2.
The second is stranger. In every one of those 177,280 positions, refusing does not merely do better — it mirrors. Taking loses by exactly as much as refusing wins: −1 against +1, −2 against +2, all the way to −5 against +5. There is no case anywhere on the board where taking still wins and refusing merely wins by more. Control of the endgame is not a matter of degree; you either have it or you have handed it over.
How strong is the computer?
Three levels, measured rather than asserted — 50 games per pairing on the four by four board, each pairing played twice with the sides swapped:
| Pairing | Stronger side wins | Draws |
|---|---|---|
| medium vs easy | 82 % | 6 |
| hard vs easy | 100 % | 0 |
| hard vs medium | 76 % | 6 |
The levels differ in how much slack they allow themselves, not in how far ahead they look. Hard solves the last twenty lines exactly, which means every double-cross in the endgame is found rather than guessed — on the three by three grid that covers all but the first four moves. Easy never solves anything and takes whatever is offered, which is exactly why it can be beaten.
Play it on paper
This is a pencil game first and a browser game second. There are printable dots and boxes grids here in three sizes with a score line, plus a sheet of four small grids for quick games, and the whole family of them is in games you only need paper for.
If you like this one
- Nim — the other game on this site whose whole strategy is a piece of arithmetic you can carry in your head
- MENACE — a machine that learns noughts and crosses out of matchboxes, with the learning shown as it happens
- Towers of Hanoi — also invented by Édouard Lucas, and also far deeper than it looks
- Four in a Row — another grid game that is solved, and where knowing the solution changes how you open



