Dots and Boxes: the exercise-book game with a mathematician’s history
Classic games · · 3 min read
Almost everyone has played Dots and Boxes on the back page of an exercise book, and almost nobody knows where it came from. Its paper trail is short but good: a French mathematician in the 1880s, a famous book on mathematical games a century later, and a computer that settled one board in 2012.
This article follows that trail, collects the names the game goes by, and describes the variants worth trying once the usual board feels familiar.
Édouard Lucas and la pipopipette
The earliest description usually cited is by Édouard Lucas (1842–1891), a French mathematician remembered for his work on prime numbers and for inventing the Tower of Hanoi puzzle. He called the game la pipopipette. Reference works date it to 1889, and Lucas wrote it up in L’Arithmétique amusante, his book of mathematical recreations, published in 1895, after his death.
His rules are the ones still played: draw a line between two neighbouring dots, and whoever closes a box takes it and draws again. Whether children drew boxes before he wrote the game down nobody can say. A game played in the margins of a notebook leaves no records.
One game, many names
In English it is Dots and Boxes, and also dots and dashes, the game of dots, boxes, or pigs in a pen. Other languages name it after what is on the paper:
- German: Käsekästchen, literally “cheese boxes”, drawn on the squared paper of a school exercise book.
- Dutch: Kamertje verhuren, “renting out rooms”, with every closed box a room for the player who closed it.
- French: la pipopipette in Lucas’s day, today usually the game of little squares, le jeu des petits carrés.
From a puzzle book to Winning Ways
The game became serious mathematics in 1982, when Elwyn Berlekamp, John Conway and Richard Guy gave it a chapter of Winning Ways for your Mathematical Plays, their study of two-player games. That chapter set out the chains, the double-cross and the counting rule that strong players use, the ideas in our Dots and Boxes strategy guide.
In 2000 Berlekamp followed it with a whole book, The Dots-and-Boxes Game, subtitled Sophisticated Child’s Play. The subtitle is the best one-line description of the game there is.
Solved by computer, on one board
Small boards can be searched to the end. In 2012 Joseph Barker and Richard Korf of the University of California, Los Angeles, solved the board of 4×5 boxes: with perfect play from both sides it ends in a tie, 10 boxes each. Their program needed about nine days, and at the time it was the largest board of the game ever solved.
A tie is only possible when the number of boxes is even. Of the boards on Duelto, 3×3 has 9 boxes and 5×5 has 25, so someone always wins; 4×4 has 16, and a game can end 8–8.
Larger boards are another matter. In 2021 computer scientists proved that finding the perfect move on a board of any size is PSPACE-complete, which in plain words means no shortcut is expected to make it easy.
Variants to try
Once the usual board holds no surprises, change the board:
- Swedish board: the whole outer edge is drawn before the game begins, so the boxes along the edge start one line closer to being taken.
- Icelandic board: only two outer sides, the left and the bottom, are drawn in advance.
- Strings and Coins: the same game turned inside out. Coins are joined by strings, players take turns cutting one, and whoever frees a coin takes it and cuts again. It can be played on any network of coins, not only a grid.
- Other grids: triangles or hexagons instead of squares. A triangle is taken by its third side, a hexagon by its sixth.
- Rectangles and more players: the rules work unchanged on a board of any shape, and with three players.
Play it without paper
Duelto plays the usual board, with nothing drawn in advance, in three sizes. You can play Dots and Boxes without an account on 3×3, 4×4 or 5×5: against the bot at three levels, or with a friend taking turns on the same screen, as on paper. With an account, Dots and Boxes online is rated on 4×4 against real opponents.