How to play.

You and the computer compete to claim the most squares.

Join the dots

  1. Choose a board of 2 × 2, 3 × 3 or 4 × 4 boxes, a computer strategy and who moves first. Select Start new game.
  2. On your turn, choose an unused horizontal or vertical line between neighboring dots. Diagonal lines are not allowed.
  3. The player who adds the fourth side of a box claims it and scores one point. A shared line can close two boxes at once: both belong to that player.
  4. Closing at least one box gives you another move. Keep playing while you close boxes; a move that closes none passes the turn.
  5. When every line is drawn, the player with more boxes wins. Equal scores are a draw. Select Play again for another match.

Read the board

Your lines are green and your claimed boxes show Y. The computer’s lines are coral and its boxes show C. The latest line has an outline. Every legal line stays visible until the match ends.

Computer strategies

Calm takes available boxes and prefers lines that leave fewer three-sided boxes. Crafty uses the same opening approach, then searches all continuations when eleven or fewer unused lines remain. It accounts for extra turns. Neither setting promises unbeatable play.

Keyboard

Tab enters or leaves the board. Arrow keys move between line buttons, favoring the same row or column. Home and End select the first and last line. Enter or Space draws the selected unused line on your turn. Drawn lines remain focusable so you can read their ownership.

Saved play

The current match is saved in this browser. Refreshing restores its lines, scores and next turn, including an unfinished computer turn. Starting a new match replaces the current one after confirmation. If storage fails, play remains available in this tab; use the displayed recovery action. Manage saved play.

Rule reference

The standard rules were checked against the University of Cambridge NRICH activity Put Yourself in a Box. Inklattice uses original code and geometric artwork. It is an independent browser version of the traditional pencil-and-paper game.

Play Dots and Boxes →