← Back
Italiano English

Dots and Boxes

This is the game so many of us played at school on squared paper, at the back of the classroom. All you need is a grid of dots: players take turns joining one dot to the next, and whoever closes a box claims it. Whoever ends up with more boxes wins.

The rules take half a minute to learn. What is surprising is the real strategy hiding behind them: halfway through, the game changes character completely, and anyone who knows the trick of chains will beat someone who simply grabs every box they can see. This page covers the rules first, then the trick.

The rules

1. One line per turn

The board is a grid of dots. On your turn you draw a single line, that is one segment between two neighbouring dots, horizontally or vertically. Never diagonally. In the game you just click the gap between the two dots: hovering over it lights the line up in grey, so you can see which one you are about to draw before you commit.

2. Close a box and you claim it

When the line you draw is the fourth side of a box, that box is yours: it fills with colour and shows your initial. Yours are blue, the computer's are red.

3. Close a box, move again — this is the rule that decides games

If your line closes a box, you play again. And if your next move closes another one, you play again, and so on. That is why games are decided in bursts: a player can bank ten boxes in a single turn. Anyone who does not know this rule loses without understanding why.

A line that closes two boxes at once (which happens when it sits between two boxes that both already have three sides) wins you both of them in one go.

4. The game ends when the grid is full

Play continues until every line has been drawn. At that point every box has an owner, and whoever has more wins. On a grid with an even number of boxes a draw is possible; with an odd number (5×5, for instance, has 25) someone has to win.

The trick: chains

Early on, every move looks much the same — and largely is: you fill the grid without giving anything away. The point is that sooner or later the safe lines run out. From then on, every available move takes some box to three sides, which means handing it to your opponent. That is where the real game starts.

What "giving away" a box means

A box with three sides already drawn is ready to be closed: whoever is on move takes it for free. So the move to avoid, for as long as you can, is the one that takes a box from two sides to three.

The box on the left has three sides. The dashed line is the fourth: whoever draws it takes the box and moves again.

The chain

A chain is a run of connected boxes, all with two sides drawn, that open one after another. The crucial fact is this: the moment someone is forced to open a chain, the opponent does not take one box, they take the whole thing. Every box they close earns them another move, and that move closes the next box, all the way down the run.

A chain of four boxes. The inner vertical lines are not drawn: whoever closes the dashed one on the right takes the first box, moves again, takes the second, and so on until they have taken all four.

Which gives the single most useful rule in the game:

Whoever is forced to open a chain first loses the whole chain. So by midgame the real goal is not taking boxes: it is leaving the other player without a safe move.

It also follows that when you must open something, open the shortest chain: you give away two or three boxes instead of eight, and keep the long ones for later.

The move almost nobody knows: the sacrifice

This is the refinement that separates playing well from playing very well, and for years I only discovered it by losing to people who used it.

Imagine you have just been handed a chain of six boxes. Instinct says: take them all. But look at what happens next: you have taken all six, the chain is finished, it is still your move — and there is nothing safe left on the board. So you are the one who has to open the next chain, and you hand it over whole. You won six boxes and gave away maybe eight.

The right move is different: take the first four, then, instead of banking the last two as well, draw the line that divides them. You leave your opponent two boxes as a gift — but they are the one who closes those two, and when they are done they are the one left without a safe move, and they have to open the next chain.

The last two boxes of a chain. Drawing the dashed line down the middle gives both away — but forces your opponent to move first on whatever is left.

It is called the two-box sacrifice, or the all-but-two. It costs two points and often earns back many more: it is worth it whenever the next chain is worth more than two boxes. This is exactly what the computer does on Hard, and it is why that level is a good deal tougher.

Controls and options

Grid size

There are three ready-made sizes — Small (5×5, so 25 boxes), Medium (8×8, 64 boxes) and Large (11×11, 121 boxes) — plus a fourth, Custom, where you pick rows and columns yourself, from 3 up to 12 rows and 14 columns. The total number of boxes appears under the choice: handy for not stumbling into a half-hour game by accident.

A small grid makes for a short, tactical game where every box matters; a large one makes for a long game where chain play counts for much more. To learn the strategy I would start on Small or Medium: on Large there are so many chains that they are hard to see at first.

How good the computer is

Your record

There is no clock, deliberately: here the time depends mostly on how long your opponent takes to move, and playing in a hurry is the surest way to give boxes away. What is kept instead is games won out of games played and your best margin, meaning the widest win you have managed. The tallies are separate per difficulty, because beating Easy and beating Hard are not the same achievement. The circular-arrow button clears the record for the level you are playing: the first click asks for confirmation, so nothing gets wiped by accident.

At the end of a game, under the score, you also see how many boxes you gave away. It is the statistic you learn most from: games are almost always lost there, not in the boxes you failed to take.

The game saves itself

If you close the page midway, next time the game offers it back to you with the Resume previous game button. The save lives in your browser, not on a server: clear your browsing data and it goes with it.

Close

© 2026 Luciano Manenti