How to win at Dots and Boxes

Strategy · · 5 min read

How to win at Dots and Boxes

Dots and Boxes looks like a game of not making mistakes: never draw the third side of a box, and wait for the other player to do it. That is how most people play, and it is enough to beat a beginner. It is not enough to beat someone who knows about chains.

This article explains the three ideas that separate the two: chains, the trick that keeps control of them by giving two boxes away, and the long chain rule, which tells you many moves before the end which player will get control. The arithmetic is no harder than counting dots.

The rules in one minute

Two players take turns drawing one line between two neighbouring dots, across or down. Whoever draws the fourth side of a box claims it and must draw another line. When every line is drawn, the player with more boxes wins. A board of 3×3 boxes has 16 dots and 24 lines, 4×4 has 25 dots and 40 lines, and 5×5 has 36 dots and 60 lines.

Stage one: no third sides

At the start almost every line is safe: it gives nothing away. The one beginner’s rule worth keeping is never to draw the third side of a box while a safe line is left, because the other player takes the box and moves again.

Sooner or later the safe lines run out. By then the boxes have joined up into chains, and whoever has to move must open one and give it away. The whole game is about who that will be.

Chains and loops

A chain is a row of boxes, each with two sides drawn, that can be taken one after another once its first box is opened. A chain of three or more boxes is long; one or two boxes make a short chain. A loop is a chain that closes on itself, so it has no ends.

Short chains are small change. Long chains decide the game, because of the move in the next section.

Give two boxes to keep the rest

When the other player opens a long chain, the obvious answer is to take every box. But then you must draw another line, and if only long chains are left, you open the next one for them.

The strong answer is to take all but the last two boxes, then draw the line at the far end of the chain instead of the one between them. That leaves two boxes the other player can take with a single line. Taking two boxes with one line is called a double-cross. After it they have to move again, and that means opening the next chain for you.

Say the safe lines are gone, the board has a chain of 3 and a chain of 5, and the other player must move. Compare two ways to answer:

  • Take everything: they open the 3, you take all three and must open the 5, and they take five. From here: you 3, them 5.
  • Leave two: they open the 3, you take one box and leave them the last two. They take those two and must open the 5, and you take all five. From here: you 6, them 2.

Keeping control, and when to give it up

The player who keeps doing this is said to have control. It costs two boxes for every long chain, and four for every loop, where you leave two pairs. On the last chain you take everything, because nothing comes after it.

Control is not always worth its price. If the chains left are short or few, the boxes it costs can be more than it wins, so count before you leave any. When it is your turn to give a chain away:

  • Give away short chains before long ones, and the shortest first.
  • Give a chain of two by drawing the line between its two boxes, not one at the end. The other player then gets two single boxes and has no way to leave you a pair; they have to take them and move.

The long chain rule: who gets control

Control goes to the player who does not have to open the first long chain, and that can be steered long before the chains are finished. Elwyn Berlekamp, the mathematician who wrote the standard book on the game, turned it into a counting rule.

Count the dots on the board and the long chains you expect at the end. When there are no loops, the first player wants dots plus long chains to be even, and the second player wants it odd. On the three boards on Duelto:

  • 3×3, 16 dots: the first player wants an even number of long chains, the second an odd number.
  • 4×4, 25 dots: the first player wants an odd number, the second an even number. Rated games on Duelto are played on this board.
  • 5×5, 36 dots: the first player wants an even number again.

Steering the count, and why the rule works

In the middle of the game, use your safe lines to push the number of long chains your way: a line can split a long chain into two short ones, or join two pieces into one long chain. Loops change the count, so where a loop appears, treat the rule as a guide and count the pairs it costs.

Why it works: count turns, not boxes. Every line either ends a turn or claims a box, and the last line of the game claims one. So a game has one more turn than there are lines that claim nothing, and on a rectangle that comes to the number of dots plus the number of double-crosses. The last turn takes the last chain, and it belongs to the player with control.

The player with control hands the other player one double-cross for every long chain except the last. So the turns come to dots + long chains − 1, and the first player has the last turn when that is odd, that is, when dots + long chains is even. Check it on the smallest board, a single box: 4 dots, 4 lines, no double-cross, 4 turns, and the second player draws the fourth side.

Practise it against the bot

On Duelto you can play Dots and Boxes right now, without an account: 3×3, 4×4 or 5×5, against a bot at three levels or with a friend on the same screen. Start on 3×3 against Medium and watch for the moment the safe lines run out. Hard plays the endgame perfectly and leaves you a pair whenever it should, so to beat it you have to win the chain count before the endgame starts.

Stuck? The Hint button suggests a move, and after a loss the game shows you the move that cost the most. Once the bot falls, Dots and Boxes online is rated on 4×4: the first player is drawn at random and each has 90 seconds for the whole game, so the counting has to be quick.

Play Dots and Boxes free — against the bot or a real opponent