Dots and Boxes

Dots and Boxes

Blue 0Red 0
Blue to move

How to play: Click between two adjacent dots to draw a line. Closing the fourth side of a box claims that box (your color) and gives you another turn. Most boxes wins. The 6x6 dot grid forms 25 boxes.

About Dots and Boxes

Dots and Boxes is a deceptively deep paper-and-pencil classic invented by French mathematician Édouard Lucas in 1889. Players take turns drawing one line between adjacent dots; whoever closes the fourth side of a box claims it and goes again. Once you understand the chain rule, an innocent-looking grid becomes a battle of forced moves and double-cross sacrifices.

Our online version uses a 6×6 dot grid (25 boxes total, first to 13 wins) with three AI difficulty levels. Easy plays randomly. Medium safely avoids giving boxes away. Hard understands chain length and double-cross strategy — it will deliberately give up small chains to control the long ones.

How to Play Dots and Boxes

  1. Pick mode + AI difficulty. Blue moves first.
  2. Click between two adjacent dots to draw a line.
  3. Closing a box (drawing its fourth side) gives that box your color AND another turn.
  4. Keep going while you keep closing boxes — chain reactions are common.
  5. If you don’t close a box, turn passes to the other player.
  6. Most boxes wins when all 25 are claimed.

Strategy Tips

  • Avoid creating a 3-sided box when possible — it gives the opponent a free box.
  • Count chains. When forced to give boxes, give the shortest chain. The opponent gets those boxes but you control what happens next.
  • Double-cross. When taking a long chain, leave the LAST TWO boxes unfinished by drawing across the middle of the second-to-last box. Your opponent gets 2 boxes but is forced to start the next chain — you keep control.
  • Parity matters. On a 5×5 box grid (25 boxes), the player who is forced to break long chains usually loses. Count chains early.
  • Don’t waste safe moves. Every line that doesn’t create a 3-sided box is a free move — use them all before being forced.
  • Watch the opponent’s safe moves. If they’re running out, you can force them into giving up a chain.

A Brief History

Édouard Lucas published Dots and Boxes (originally “La Pipopipette”) in 1889 as part of his recreational-math collection. The game became a classroom favorite worldwide because it needs nothing but paper and a pen. Mathematician Elwyn Berlekamp wrote an entire book on the surprising depth of optimal play — “The Dots-and-Boxes Game: Sophisticated Child’s Play” — still a standard reference among combinatorial game theorists.

Frequently Asked Questions

Why do I get another turn when I close a box?

That’s the core rule of Dots and Boxes — closing a box rewards you with both the box and another move. This is what creates chain reactions and the entire strategic depth of the game.

What’s a “chain”?

A chain is a sequence of boxes connected so that closing one forces the next — each box’s open side leads into the next box. Long chains can claim 5+ boxes in a single turn.

What is a double-cross?

An advanced sacrifice: when you’ve started taking a long chain, instead of finishing the last 2 boxes you draw a line through the middle, giving them to your opponent but forcing THEM to start the next chain. It’s how strong players control parity.

How does the AI decide what to play?

Easy plays mostly random. Medium prefers safe moves that don’t give the opponent a 3-sided box. Hard simulates each candidate move, follows the chain it creates, and picks the move giving away the smallest chain when forced.

Can the game end in a tie?

Only on grids with an even number of total boxes. With 25 boxes (5×5), one player always wins.

How long does a game take?

About 5–10 minutes. The early game is fast (lots of safe moves), the chain-crashing endgame can be intense.

What happens if I draw the wrong line by accident?

There is no undo — same as paper-and-pencil. Click Reset to start over. Click between dots carefully and aim for the midpoint between two dots.

Is the first player at an advantage?

On most grid sizes the first player has a slight edge if they understand chain control. With 25 boxes the advantage is small enough that skill dominates.


Skip to Accessibility Panel