Skip to main content

Dots and Boxes

Draw one line between neighboring dots. Close a box to score and play again. Plan the chains you leave behind.

Lines0

You · A 0Computer · B 0

Scroll inside the board to reach every edge.

Close a box → score and draw again. Tab to a line · Enter/Space to draw.

You · A to move

About Dots and Boxes

Dots and Boxes is a paper-and-pencil strategy game about claiming squares. Unlike alignment games, territory depends on who draws the final edge, not who drew most of the earlier edges.

This browser version uses three board sizes: 4, 9 or 16 boxes, with 12, 24 or 40 available lines. Play a bounded practice computer or a second person on the same device.

How to play Dots and Boxes

  1. 01Choose a 2×2, 3×3 or 4×4 box board, a computer opponent or local two-player mode, and who moves first. In computer mode you are A and the computer is B.
  2. 02Click an unused horizontal or vertical edge between adjacent dots. Drawing a line normally passes the turn. Diagonal lines and previously drawn edges cannot be played.
  3. 03Complete the fourth side of a box to claim it and move again. One shared edge can close two boxes at once; both belong to the player who drew that edge.
  4. 04When every box has an owner, more boxes wins. An equal score is a draw. There are no levels, countdown or move limit beyond the available edges.
  5. 05Undo removes the previous placement in local mode. Against the computer it returns to before your last line, including all computer replies. Restart, changing size, opponent or first player starts a fresh match.

Dots and Boxes controls

Mouse or touch
Click or tap the middle of an unused edge. Each edge has a separate hit target; the largest board scrolls horizontally on narrow screens.
Keyboard
Tab or Shift+Tab through unused lines and press Enter or Space to draw. Occupied edges cannot be drawn again.
Recovery
Undo returns to your previous turn against the computer, or removes the last line locally. Restart clears the board; board and opponent settings stay.

Dots and Boxes: levels and progress

There is no numbered campaign. The 2×2 board makes shared-edge captures easy to see; 3×3 and 4×4 allow longer chains and more decisions before safe edges run out.

Changing the first player explores the same board from another side. Match settings and valid history are saved locally when browser storage is available. The computer uses a bounded heuristic rather than a perfect solver.

Dots and Boxes tips and strategies

Count sides before drawing

A box with two sides is dangerous: adding a third leaves an immediate scoring line. Compare unused edges before opening it.

Inspect a whole chain

Once a player starts closing neighboring three-sided boxes, each capture grants another turn. Look beyond the first box to see what the entire run could cost.

Use shared edges

If two boxes are each missing their common edge, drawing it scores both and retains the turn. Earlier edge ownership does not affect who gets these boxes.

  • Avoid drawing the third side of a box while safe edges remain.
  • A long chain can give the opponent several consecutive boxes.
  • Watch shared edges: one move can score two boxes.
  • The computer captures boxes, avoids third sides and compares forced chain concessions; it does not play perfectly.

Dots and Boxes FAQ

Can two people play?

Yes, choose Local 2-player and take turns on the same device. There are no rooms or remote multiplayer.

Why do I get another turn?

Closing one or two boxes grants another line. Your turn ends only after drawing a line that closes no box, or after the board is full.

Does it save my match?

When local storage is available, the board settings and legal move history are saved in this browser. Clearing browser data removes them; there is no account sync.

How many lines are on a board?

A board with n×n boxes has 2n(n+1) edges: 12, 24 and 40 in this version.

Is the computer unbeatable?

No. It captures immediately available boxes, avoids creating a third side where possible, and estimates forced concessions. It does not solve every long-chain strategy.

Does restarting change the grid?

Restart clears the current grid. Select another size or first player to change the setup.