GN Math logoGN Math
Dots and Boxes

Dots and Boxes

Dots and Boxes takes the notebook game from the back of a math class and puts it on a crisp black-and-white grid. You and your opponent take turns linking two neighboring dots. Finish all four sides of a square and you own it.

This copy is part of Christopher Müller's open-source PaperGames set. It loads in an ordinary browser tab, so you can play unblocked on a laptop or phone without installing anything. Play the computer at one of three difficulty levels, or pass the screen back and forth with a friend.

How to play Dots and Boxes

Grids come in four sizes, from 4x4 up to 8x8 boxes. The first player opens. Each turn you add one line, either across or up and down, between two dots that sit next to each other. Lines already on the board are taken.

When your line completes the fourth side of a box, you claim it and draw again right away. Player 1 marks boxes with a cross and uses solid lines, while Player 2 uses dotted lines and circles. Your turn only ends when you draw a line that closes nothing.

After the last line goes down, the player with more boxes wins, and equal counts are a draw. You can choose to be Player 1 or Player 2 against the computer, and Undo lets you step back through moves.

Controls

ActionKeyboardMouseTouch
Draw a lineArrow keys to choose, Enter to drawClick the gap between two dotsTap the gap between two dots
Play the computer—Click vs Computer, set side, level and size, then New gameTap the same options
Play a friend—Click 2 Player (local)Tap 2 Player (local)
Undo a move—Click UndoTap Undo

Tips

  • Before each line, look at the two boxes it touches. If either would end up with three sides, your opponent gets it for free.
  • Early on, play lines that keep every box at two sides or less. The longer you avoid giving anything away, the better.
  • Long rows of two-sided boxes form chains. Opening one usually hands the whole chain to the other player, so count them.
  • When you are forced to give something up, offer the smallest group first. Losing two boxes is better than losing six.
  • Start on the 4x4 grid to learn how chains form, then move to 6x6 or 8x8 where the endgame matters much more.

If you like Dots and Boxes, try these

  • Hex

    Line drawing against a rival continues on a hexagon diamond, racing to link your two edges first.

  • Slant Diagonals

    Lines on a grid of points become a solo puzzle, filling squares with diagonals that never form a loop.

Questions

How hard is the computer in Dots and Boxes?

Easy draws lines at random. Medium takes free boxes and avoids handing them over. Hard also picks the least costly line to give up when every option opens a box.

Does the game keep my match if I reload?

Yes. Reload the page on the same device and your unfinished board comes back from browser storage.

Can I make the board easier to see?

The Settings menu has options for bigger text, high contrast and spacing. You can also change how quickly the computer replies.

More like this: all strategy games · Math games · 2-player games · every game A–Z

More strategy games

See all →
Xiangqi game screenXiangqiStrategyHex game screenHexStrategyCanvas Tower Defense game screenCanvas Tower DefenseStrategyCompact Conflict game screenCompact ConflictStrategyElematter game screenElematterStrategyEvolving Civilization game screenEvolving CivilizationStrategyHel's Trial game screenHel's TrialStrategyHex Formation game screenHex FormationStrategyIsoCity game screenIsoCityStrategyOrbitSwarm game screenOrbitSwarmStrategy