Dots and boxes

Take turns drawing lines between dots. Close the fourth side of a box and it is yours, and you draw again. Simple rules, and a surprisingly deep endgame.

Dots and boxes

Tap between two dots to draw a line. On a keyboard: arrows move between lines, Enter or Space draws one.

Your turn.

How to play

  1. The board is a grid of dots. Players take turns drawing one line between two neighbouring dots, horizontally or vertically.
  2. If your line closes the fourth side of a box, the box is yours: it fills with your colour and initial, and you must draw another line. One line can close two boxes at once.
  3. If your line closes nothing, the turn passes to your opponent.
  4. The game ends when every line has been drawn. Whoever owns more boxes wins. On the 4 × 4 board (16 boxes) a draw is possible.

Controls

Mouse and touch

Tap or click between two dots. You don’t need to hit the line exactly: the nearest free line to your finger is drawn. On a computer, hovering shows the line before you draw it.

Keyboard

The arrow keys move between lines (they alternate between horizontal and vertical ones), and Enter or Space draws the selected line.

Strategy

Avoid the third side

Drawing the third side of a box hands it to your opponent on a plate. Early on, both players draw “safe” lines that give nothing away. The real question is who runs out of safe lines first.

Chains

When the safe lines are gone, the open boxes form chains: rows of boxes linked together, where taking one box opens the next. Whoever has to move must open one, and the opponent can usually take the whole chain. Open the shortest chains first.

The double-cross

You don’t always have to take everything. When your opponent opens a long chain, take all but the last two boxes and then draw the line at the far end, leaving those two boxes as a pair. Your opponent takes both with a single line (a “double-cross”) but then has to open the next chain for you. Giving up two boxes to keep control wins most close games. In a loop, the same trick costs four boxes.

The long chain rule

Count the chains of three or more boxes that will form. On a board with an even number of dots (3 × 3 and 5 × 5 boxes), the first player wants an even number of long chains and the second player an odd number; on the 4 × 4 board, with 25 dots, it is the other way round. Steering that count during the safe-line phase decides who keeps control.

AI levels

Easy

It usually takes the boxes it is offered and usually avoids drawing a third side, but not always.

Normal

It always takes boxes when it can and never gives one away while a safe line exists. When it must give, it gives the fewest boxes it can, but it does not know about control.

Hard

It plays the chain game: it counts chains and loops, opens the cheapest ones, and keeps control with double-crosses when that pays. With 20 lines or fewer left it calculates every possible ending, so it plays the endgame perfectly.

FAQ

Why did the AI leave two boxes for me?

That is the double-cross. It gave you two boxes so you would have to open the next chain, which is usually worth much more.

Who starts?

Against the AI you start by default; untick “I go first” to let it open. In two-player mode, player A starts. On small boards moving first or second can matter a lot, so try both.

Is my score saved?

Yes: wins, losses and draws against each AI level and board size are kept in your browser.