Game guide · Board game

How to play Dots and Boxes

A pencil, a grid of dots and two players: the game everyone knows from school takes a minute to learn, but the chain tricks that win it are a real puzzle. The rules, the strategy and the trick the strong players use.

4 min read · Updated · Free, in your browser

AllFun Dots & Boxes: glowing dots on a dark sheet, with mint and coral lines and the boxes each player has taken
AllFun Dots & BoxesFour computer levels, three boards, and online play.

What dots and boxes is

Dots and boxes, sometimes called the dots and lines game, is a game for two drawn on a grid of dots. Players take turns joining two neighbouring dots with a line. The one who draws the fourth side of a little square claims it, and must then draw another line. When the grid is full, whoever owns more squares wins. There is no luck at all: both players see everything, so the better plan wins.

Playing dots and boxes on AllFun

AllFun Dots & Boxes gives you three boards: Small with 3×3 boxes, Classic with 5×5 and Big with 7×7. Play the computer at Easy, Medium, Hard or Master, choose 2 Players to share one screen, or use Play Online and Play with a friend to play on two screens.

Touch the sheet and the line nearest your finger lights up; slide to choose and let go to draw. With a mouse, the line under the pointer lights up and a click draws it. A line that would hand your opponent a box turns red first, so mistakes are easy to spot while you learn. Against the computer you also get three hints and three undos in every game.

The rules

Drawing lines

On your turn, draw one straight line between two dots that sit next to each other, across or down. Diagonal lines are not allowed, and a line can only be drawn once.

Taking boxes

  • If your line completes the fourth side of a box, the box is yours. On AllFun it fills with your colour and your initial.
  • Closing a box gives you another turn. You keep drawing as long as each line closes at least one box.
  • A single line between two three-sided boxes closes both at once.
  • If your line closes nothing, the turn passes to the other player.

Winning

The game ends when every line has been drawn. Count the boxes: more wins. All three AllFun boards have an odd number of boxes (9, 25 or 49), so a game never ends level. Who draws first changes from one game to the next.

Tips that win games

  1. Avoid the third side. In the opening, any line that gives a box its third side lets your opponent take it. Draw safe lines while there are any.
  2. Think in chains. Later the board splits into corridors of boxes. Once one box in a corridor is opened, the whole corridor can be eaten in one turn.
  3. Give the smallest chain. When no safe line is left, open the shortest chain you can, so your opponent gains as little as possible.
  4. Learn the double-deal. When you take a long chain, stop two boxes short: draw the line at the far end so that both last boxes go to your opponent. They take two, but then they must open the next chain for you.
  5. Count the long chains. A chain of three or more boxes is long. On boards with an odd number of boxes on each side, like all three here, the player who drew first wants an even number of long chains and the other player an odd number. Steer the middle game towards your number.
  6. Watch for loops. A closed ring of boxes costs four boxes to decline instead of two, so it is worth less to the player in control.

A short history

The game was first described in print in 1889 by the mathematician Édouard Lucas, and it has been a favourite of classrooms and long journeys ever since. Mathematicians took it seriously in the twentieth century: the chain counting and the double-deal above come from their study of the game, and small boards have since been solved by computer.

Dots and boxes FAQ

Do I have to draw again after closing a box?

Yes. Closing a box always gives you another line, and in the AllFun game the turn stays with you until you draw a line that closes nothing.

Is it ever a good idea not to take a box?

Yes, at the end of a long chain. Leaving the last two boxes to your opponent with the double-deal forces them to open the next chain, which is often worth much more.

Which board size should a beginner choose?

Start on Small, 3×3, against Easy or Medium. Classic is the usual size, and Big gives long chains and the most room for planning.

Can I play a friend online?

Yes. Choose Play with a friend, create the invite and send the link or the room code. Your friend needs no account.

Ready for a game? AllFun Dots & Boxes is free and opens right here in your browser.

Play Dots & Boxes