Dots and Boxes Strategy: Chains, the Double-Cross and Control
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 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.
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:
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.
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.
More strategy guides
- Sudoku Strategies: How to Solve Any Puzzle Without Guessing
- Minesweeper Patterns: 1-1, 1-2-1, 1-2-2-1 and How to Read the Board
- Solitaire Strategy: How to Win More Games of Klondike
- Chess for Beginners: How to Stop Losing Pieces and Start Winning Games
- Backgammon Strategy: Opening Moves, Safe Play and Winning the Race
- Mahjong Solitaire Tips: How to Clear Every Heap Without Getting Stuck
- Hearts Strategy: What to Pass, When to Duck and How to Shoot the Moon
- Spades Strategy: How to Bid, Play Nil and Stay Out of the Bags
- Best First Words for Five-Letter Word Games, and How to Solve in Four
- FreeCell Strategy: How to Win Almost Every Deal
- Spider Solitaire Strategy: Tips to Win at 1, 2 and 4 Suits
- Checkers Strategy: How to Win More Games of Checkers
- Reversi Strategy: How to Win at Reversi and Othello
- Yacht Dice Strategy: How to Score Higher in Every Game
- Four in a Row Strategy: How to Win at Connect Four
- Dominoes Strategy: How to Win at Dominoes
- Ludo Strategy: How to Win at Ludo
- How to Solve Nonograms: Techniques That Never Need a Guess
- Sea Battle Strategy: How to Win at Battleships
- Tic-Tac-Toe Strategy: How to Never Lose (and When You Can Win)
- Hangman Strategy: The Best Letters to Guess and How to Win
- Water Sort Puzzle Tips: How to Solve Every Level
- Block Puzzle Strategy: How to Score High on an 8×8 Board
- Memory Game Tips: How to Find Every Pair in Fewer Moves
- Snake Game Strategy: How to Get Longer Without Trapping Yourself
- 8 Ball Pool Tips: Aim, Cut Angles, Spin and Winning More Racks
- Brick Breaker Tips: How to Aim the Ball and Clear the Wall Fast
- Word Search Tips: How to Find Words Faster (Tested on 1,000 Puzzles)
- Mini Crossword Tips: How to Solve a 5×5 Fast (Tested on 600 Puzzles)
- Jigsaw Puzzle Tips: Edges, Colour Piles and Finishing Faster (Measured)