Play Dots and Boxes online for free
Dots and Boxes is the pencil-and-paper game many of us first played at the back of a school notebook. Two players take turns joining dots; whoever closes a box writes their initial in it. This version keeps the paper and the pencil, then adds a computer opponent at four levels, a friend mode for two players on one screen and a coach that explains the strategy while you play. The game is also known as dots and lines, the dot game, boxes, squares or pigs in a pen.
Pick a board from 3 × 3 to 6 × 6 boxes, choose a paper style (notebook, lined pad, kraft paper or chalkboard), and come back every day for the daily puzzle: the same endgame for everyone, with one idea to find.
How to play Dots and Boxes
- Take turns drawing one line between two dots that are next to each other, across or down. Tap or click near the gap.
- Close a box to win it. If your line completes the fourth side of a box, your initial goes in it, and you must draw another line. One line can close two boxes at once.
- Keep going while you can. You can close box after box in a single turn. Your turn ends when you draw a line that closes nothing.
- Most boxes wins. When every line is drawn, count the boxes.
The classic board is 5 × 5 dots, which makes 4 × 4 = 16 boxes, so ties are possible. A 3 × 3 board (9 boxes) is a good place to learn; 5 × 5 and 6 × 6 boards make long, strategic games.
How to win at Dots and Boxes
Beginners think the game is about not giving boxes away. That is only the first half. The game is really won by whoever controls the long chains at the end.
1. Early on: don't draw the third side
A line that gives a box its third side hands that box to your opponent. While there are safe lines left (lines that don't give any box a third side), use them. With coach tips on, a line that gives boxes away turns red and shows how many.
2. Chains and loops
Sooner or later every safe line is gone. The board has then split into chains (rows of boxes where taking one box opens the next) and loops (chains that join back on themselves). Every move now opens one of them for your opponent. Give away the smallest first: single boxes and pairs cost little.
3. The double-cross
When your opponent opens a long chain, don't take it all. Take every box except the last two, then draw the line at the far end of the chain, leaving those two boxes as a pair. Your opponent takes the pair, and then has to open the next chain for you. Giving away 2 boxes to win the next 5 is the whole secret of the game. In a loop, you leave the last four boxes instead. The coach lights up the double-cross line the first time it matters.
4. The long chain rule
Whoever has to open the first long chain (3 or more boxes) usually loses, and that is decided by counting. The long chain rule says: the first player wants the number of dots plus the number of long chains to be even; the second player wants it odd. On the classic 5 × 5 dot board there are 25 dots, so the player who moved first wants an odd number of long chains, and the second player wants an even number. When only a few safe lines are left, steer the board: join two chains into one, cut one in two, or sacrifice a box early to flip the count. Hard and Expert do exactly this.
About the computer
- Easy sometimes misses boxes and gives boxes away. Good for a first game.
- Medium draws its early lines at random but plays every endgame perfectly, double-cross included.
- Hard also counts chains near the end of the opening to make you open the first long one.
- Expert looks further ahead and will sacrifice a box or two on purpose to win control.
After a game against the computer, the coach finds your turning point, the one line that cost you the most, and can show the stronger line on the board.
A short history
The French mathematician Édouard Lucas described the game in 1889 under the name La Pipopipette. It has been a classroom favourite ever since, and it is also a serious subject for mathematicians: Elwyn Berlekamp wrote a whole book about it, The Dots and Boxes Game: Sophisticated Child's Play, which introduced the long chain rule used by the coach here.
Like the game? Try Minesweeper for another quiet logic game, or Backgammon Yatzy and dominoes for classic games against the computer.
FAQ
Is this dots and boxes game free?
Yes. It runs in your browser for free, with no download and no account, on a computer, tablet or phone.
What is the trick to winning Dots and Boxes?
Control the long chains. Late in the game every line gives boxes away, and whoever has to open the first long chain usually loses. When your opponent opens a chain, take all but the last two boxes and leave those two with one line (the double-cross): your opponent takes them but must open the next chain for you. Count the long chains before the safe lines run out so that your opponent is the one who has to open them.
Can I play Dots and Boxes against the computer?
Yes. Easy makes beginner mistakes, Medium plays the endgame perfectly but draws its early lines at random, Hard also fights for control of the chains, and Expert searches the last part of the opening and even gives up boxes on purpose to win control.
Can I play with a friend?
Yes, two players can take turns on the same device: choose 2 players in New game. There is no online multiplayer.
What is the game where you draw lines to make squares called?
Dots and Boxes. It is also called dots and lines, the dot game, boxes, squares, paddocks or pigs in a pen. The French mathematician Edouard Lucas first described it in 1889 as La Pipopipette.
Is Dots and Boxes solved?
Only on small boards. Computers have worked out perfect play for boards up to 4 x 5 boxes (that one is a tie with perfect play), but bigger boards such as 5 x 5 boxes are still unsolved. On this page the computer plays every endgame perfectly.
What board size is best?
4 x 4 boxes (5 x 5 dots) is the classic size: quick enough for one sitting and big enough for real chain fights. 3 x 3 is good for learning, 5 x 5 and 6 x 6 for long strategic games.
What is the daily puzzle?
Each day everyone gets the same Dots and Boxes endgame on a 4 x 4 board. You move first against Expert and must win a set number of boxes. There is one key idea to find; you can retry as often as you like and share your result.