Dots and Boxes Strategy: Chains, the Double-Cross and Control

Updated Oct 16, 2026 · 10 min read

Clover Dots and Boxes Play free in your browser →

Dots and boxes is the game most people learn on the back of a school notebook, and most people play it the same way for the rest of their lives: draw a line, grab any box you can, try not to give one away. That's a fine start, and it loses to anyone who knows the next idea. The game has a hidden layer of chains, sacrifices and counting that decides almost every game between good players before the first box is taken.

This guide explains that layer: safe lines and third sides, how the board breaks into chains and loops, the double-cross that keeps you in control, and how to count who will be forced to open the first long chain. You can try every idea in Clover Dots and Boxes, our free dots and boxes game against Nutmeg the woodpecker. The diagrams and numbers come from the game's own code: its rules, its endgame solver, and thousands of games against its Hard player.

The rules in one minute

The board is a grid of dots (in our game, wooden pegs in a garden bed). Players take turns drawing one line between two dots that sit next to each other, across or up and down. When your line closes the fourth side of a box, the box is yours (a clover for you, a red-capped mushroom for Nutmeg) and you must draw again. Close another box with that line and you go again, so one turn can sweep a whole row of boxes. When every line is drawn, whoever owns more boxes wins.

Clover Dots and Boxes has three board sizes: 3 × 3, 4 × 4 and 5 × 5 boxes. Who starts alternates from one game to the next, and a 4 × 4 board can end in a draw.

The game is old: the French mathematician Édouard Lucas published it in 1889 as "la pipopipette". Most of what's known about playing it well comes from the mathematician Elwyn Berlekamp, whose book "The Dots-and-Boxes Game" (2000) shows how much strategy hides in it.

Phase 1: safe lines and third sides

Early in the game, nobody wants to draw the third side of a box, because the next player simply takes it. So every line is one of two kinds:

A 3 by 3 dots and boxes board in the middle of a game. Four boxes have two sides drawn and are marked 2. Nine free lines are dashed green; seven free lines, each one a side of a box marked 2, are dashed red.
Green lines are safe: they don't give a third side to any box. Red lines each touch a box that already has two sides, so drawing one hands that box over. The colours come from the game's own safe-line check.
  • A safe line gives no box its third side.
  • An unsafe line gives at least one box its third side, and the other player takes it.

At first almost every line is safe. As the board fills, the safe lines run out, and eventually someone has to draw a third side. That moment decides the game, and the whole first half is really a fight over who reaches it first. Clover Dots and Boxes helps you see the difference: as you hover over a line, it shows red if it would hand Nutmeg a box and gold if it closes one for you.

Phase 2: chains and loops

When the safe lines are gone, the boxes that are left have joined into shapes:

  • A chain is a corridor of boxes, each with two sides drawn, that ends at the edge of the board or at boxes already taken. Draw any line inside it and your opponent can take every box in the corridor, one after the other.
  • A loop is a chain that closes on itself, with no ends.
  • A chain of three or more boxes is a long chain. Chains of one or two are short.

The player who must move when no safe line remains has to open one of these shapes, giving it away. The obvious idea is to open the shortest one, take whatever the other player gives back, and repeat. Against a beginner, that's enough. Against someone who knows the next trick, it loses.

The double-cross: take all but two

Suppose your opponent opens a long chain. The beginner takes every box in it, and then, with no safe lines left, has to open the next chain and hand it over. There's a better way. Take every box except the last two, then draw the line at the far end of the chain. That leaves the last two boxes as a pair that your opponent can take with a single line, and then they have to open the next chain.

A 3 by 3 dots and boxes board split into a chain of three boxes along the top row and a chain of six boxes snaking through the two lower rows. A red line on the top-left edge shows Nutmeg opening the chain of three. A dashed gold line on the top edge of the top-right box shows the hand-out line.
Nutmeg opens the chain of three. Take all three and you must open the six: you 3, Nutmeg 6. Take one, then draw the gold line: Nutmeg collects the last two with one line and must open the six for you: you 7, Nutmeg 2. The game's exact search agrees that 7 to 2 is the best you can do.

Giving two boxes away to win six is the heart of dots and boxes strategy. Berlekamp calls leaving the pair a double-dealing move, and the line your opponent then draws, one line that closes two boxes at once, a double-cross. Each time a long chain is opened, the player in control can make this choice, so they keep control until the end: they lose two boxes per chain and win every chain after it.

Some details that matter:

  • It only works on long chains. In a chain of one or two there's nothing to take before the last two, so a short chain simply changes hands (open a two-chain with the line between its boxes, so your opponent can't decline it either).
  • Loops cost four. In an opened loop you can take all but four boxes and leave them as two pairs, so keeping control of a loop costs twice as much.
  • The last chain you take whole. Nothing is left to keep control of, so there's no reason to give anything back.

Control: who opens the first long chain?

Put the double-cross together with short chains and the endgame becomes a counting game. Here is a real 4 × 4 position from the game. No safe line is left, and you have to open something:

A 4 by 4 dots and boxes board with no boxes taken, split into four chains: a single box in the top-left corner marked 1, three boxes marked 3, four boxes in the bottom-left corner marked 4, and eight boxes covering the two right-hand columns marked 8.
Chains of 1, 3, 4 and 8 boxes, you to move. Open the single box: Nutmeg takes it and must open a long chain, and you keep control to the end: 11 boxes to 5. Open any other chain first: 3 boxes to 13. Every opening line was scored by the game's endgame solver.

The single box is a sacrifice that changes who has control. Nutmeg can't double-cross a one-box chain, so after taking it, Nutmeg has to open a long chain. From then on you take all but two of the 3 and the 4, and all eight of the last chain: 1 + 2 + 8 = 11 boxes for you, 1 + 2 + 2 = 5 for Nutmeg. Open the 3, 4 or 8 first and Nutmeg does exactly that to you instead.

That gives the most useful rule in the game: whoever is forced to open the first long chain usually loses. Short chains are tempo: each one passes the obligation to the other player. So late in the opening, while safe lines still exist, good players count. How many safe lines are left? How many long chains are forming? Can I add a line that joins two short chains into a long one, or cut a long chain in two?

Berlekamp turned this into a rule of thumb, the long chain rule: on a board of boxes, the first player wants the number of dots plus the number of long chains to be even, and the second player wants it odd. On a 5 × 5 board, which has 36 dots, the first player wants an even number of long chains. Loops and sacrifices complicate it, but it tells you which shapes to aim for while there's still time to change them.

What each habit is worth

To see how much these ideas matter, we played 2,000 games on the 5 × 5 board for each style below against Clover Dots and Boxes' Hard player, alternating who starts. Hard counts the fight for control while the safe lines run out and plays the endgame perfectly.

Bar chart of games won against Hard on 5 by 5, out of 2,000. Hard's own play, a mirror match: 49.25%. Random safe lines but a perfect endgame: 25.35%. Hard's safe-line play but never double-crossing: 18.95%. Medium, which grabs boxes and gives away the least: 8.25%. Easy: 2.85%.
Each bar is 2,000 games on the 5 × 5 board against Hard. No 5 × 5 game can be a draw, so the rest are losses.

Both halves of the strategy count. Playing the endgame perfectly but drawing safe lines at random halves your chances (25.35%), because you often end up on the wrong side of the count. Counting well but always taking every box is even worse (18.95%): you win the fight for control and then hand it straight back. The "obvious" style, grabbing every box and opening the smallest gift, wins just 8.25%.

Mistakes that cost the most

  • Drawing a third side early. Unless every other line is worse, don't.
  • Taking every box of a long chain when more chains are left. Count first: take all but two.
  • Opening a long chain while a short one is available. Give away the cheap one.
  • Not counting before the safe lines run out. By the time no safe line is left, the result is usually already decided.
  • Opening a two-box chain at its end. Draw the line between the two boxes instead (Berlekamp's hard-hearted handout): it leaves two separate boxes, so your opponent can't hand the pair back to you and keep control. In one 3 × 3 endgame from the game, the exact search scores it 5 boxes to 4 for the middle line, 4 to 5 for either end.

How Clover Dots and Boxes plays

Click or tap between two pegs to draw a line, or drag from one peg to the next; arrow keys and Space work too. Nutmeg plays at three levels. Easy usually takes a box when it can and usually draws safe lines, but often slips. Medium always takes a box, always draws a safe line when one exists, and otherwise gives away the fewest boxes, the beginner's strategy from this guide, without the double-cross. Hard searches the safe lines to win the fight for control and plays every chain endgame exactly. 2 Players shares one screen.

Each box scores 10 points; a win adds 100 plus 10 for every box you won by. Medium doubles every point and Hard triples it. You have three clover leaves: losing a game costs one and a win gives one back. Each game you get three undos and three hints, and a hint shows the line Hard would draw.

The Daily puzzle trains the endgame directly. Everyone gets the same position each day, a 4 × 4 from Monday to Thursday and a 5 × 5 from Friday to Sunday, with no safe lines left. You must finish with at least the number of boxes shown while Nutmeg plays perfectly, and the obvious play (take everything, open the smallest) always falls short, so each one needs a sacrifice or a double-cross.

Ready to play?

Open Clover Dots and Boxes on Medium with the 4 × 4 board, and in every game take all but two of the first long chain Nutmeg opens. Then try today's Daily puzzle. For more strategy games, read our Four in a Row strategy and Reversi strategy guides, and find more in the board games category.

Play Clover Dots and Boxes Free, no download, on phone or computer →

More strategy guides