Dots and Boxes is an old pencil-and-paper game, and it hides two different games inside one board. The opening is a quiet game of safe moves, where nobody wants to draw the third side of a box. The ending is a counting game, where every move gives something away and the question is who gives away less. Most players lose in the ending because they didn't notice, during the opening, which way the count was heading.
On this site you always draw first, in red, and the computer draws in blue.
The opening: stay safe and shape the board
A side is safe when it doesn't become the third side of any box. Early on, most sides are safe, and you can draw them freely. Use that time.
- Never draw a third side without a reason. It hands the next player a free box, and often a free move after it.
- Watch the shapes forming. As safe sides run out, the board splits into chains (runs of boxes linked through open sides) and loops (chains that close back on themselves). Short chains of one or two boxes are cheap to give away. Chains of three or more are the prizes.
- Steer the number of long chains. You can often split a long chain in two, or join two short ones, with a single side. Do it while sides are still safe.
The count that decides the game
Expert players use a rule of thumb called the long chain rule. Count the dots on the board and add the number of long chains, meaning chains of three boxes or more. Loops don't count. The player who moved first wants that total to be even. The player who moved second wants it odd.
Since you move first, here is what that means on each board.
- Easy, 3 by 3 boxes. There are 16 dots, so you want an even number of long chains, such as zero or two.
- Medium, 5 by 5 boxes. There are 36 dots, so again you want an even number of long chains.
- Hard, 6 by 6 boxes. There are 49 dots, so you want an odd number of long chains.
When the count goes your way, the computer is the one forced to open the first long chain. You then keep control with the double-cross the explainer describes. Take all but two boxes, and hand those two back so the computer must open the next chain.
A worked ending
Say the safe moves are gone, and the board holds one chain of two boxes and two chains of four. It's your turn. Open the chain of two, not a long one. Draw its middle side, which splits it into two single boxes. The computer can take both, but it must then open one of the chains of four. Take two of those four boxes, then decline the last two with a single side. The computer takes the pair and has to open the other chain of four, which you take in full. You gave away four boxes and took six.
For loops, the decline costs four boxes, not two. Taking the whole loop is sometimes better, so count before you decline.
Mistakes that throw games away
- Grabbing every box in the last chain but one. If more chains remain, taking everything means you must open the next one.
- Declining when it isn't worth it. Giving back two boxes to keep control only pays if what's left is worth more.
- Opening a long chain while a short one is available. Always give away the smallest thing on the board first.
- Ignoring parity until the end. By the time safe moves run out, the count is usually fixed.
Moving through the levels
Difficulty sets both the board size and how the computer handles chains. On Easy it mostly takes free boxes and plays safe, so practise counting chains and opening the shortest one. On Medium it also gives away its shortest chain when forced, so you need the long chain rule to come out ahead. On Hard it uses the double-cross itself. You'll need to plan the chain count during the safe phase and decline at the right moments.