Back to index
Overview
Dots and Boxes icon DB

Dots and Boxes

1-2 players · 3-10 min per session

On this 4×4 box board (5×5 dots), claim more completed boxes than the other side after all 40 edges are drawn.

Players: 1-2P Session length: 3-10 min
Board GameStrategyTwo Player

Goal & Core Rules

On this 4×4 box board (5×5 dots), claim more completed boxes than the other side after all 40 edges are drawn.

  • This implementation uses the standard blank-board version of Dots and Boxes: the game starts with every edge empty on a 5×5 dot grid that creates 4×4 scoring boxes.
  • On your turn, click or tap one open horizontal or vertical edge between adjacent dots to claim that line.
  • If your line completes the fourth side of one or two boxes, you immediately score those boxes and keep the turn.
  • If you do not complete a box, the turn passes to the other side.
  • The match ends when all 40 edges are claimed; the side with more boxes wins, and equal boxes produce a draw.
  • All four modes keep the same board rules: VS AI Master and VS AI Story change AI strength only, Two Player is pass-and-play, and Computer vs Computer is a spectator mode.
  • No pre-drawn border, triangular-grid, hex-grid, or special-scoring rule is active in this build—only square boxes on a fully blank rectangular board.

Current implementation: blank rectangular board

This page's game starts with every edge empty on a 5×5 dot grid, which means the real board contains 4×4 boxes. Completing a box scores it and keeps the turn, and every mode uses this same scoring structure.

Swedish board

A well-known setup where the entire outside border is already drawn before the first move. Because perimeter safety disappears immediately, chains and forced sacrifices usually arrive earlier than they do in the current build.

Icelandic board

An intermediate setup with only the left and bottom borders pre-drawn. That asymmetric start creates opening tensions from move one, unlike the fully symmetric blank start used here.

Triangular, hexagonal, and Strings-and-Coins variants

Other rule families change the board graph itself instead of only changing the starting border. They reshape adjacency, chain lengths, and control concepts, and they are not included in this implementation.

Controls

Mouse

  • Hover near an open edge to preview the line you are about to claim
  • Click near an open edge between two adjacent dots to draw that line
  • Use the top bar to switch modes, restart, or open the help text

Keyboard

  • There are currently no dedicated keyboard shortcuts.

Touch

  • Tap near an open edge between two adjacent dots to claim that line
  • Use the top bar for new game, restart, and help
  • In AI modes, wait briefly for the computer's short thinking pause before its move appears

Beginner Tips

  • In the opening, prioritize safe lines that do not create a third side for any box.
  • If you can finish a box, remember the turn stays with you—look for chained follow-up boxes before tapping.
  • Count the boxes in each future chain instead of only the current score; endgame control matters more than a tiny early lead.

Advanced Tips

  • This build's AI explicitly values safe moves, scoring moves, and the size of the gift created by risky edges, so careless third sides are punished quickly.
  • When the safe moves run out, try to force the opponent to open the first long chain. Handing over a short chain can be correct if it gives you control of the larger one.
  • On a blank 4×4 box board, mirror-like openings are common, but the player who better manages double-cross timing usually decides the result.
  • VS AI Story can make occasional mistakes, while VS AI Master searches deeper, so sacrifice timing matters much more on the harder setting.

Origins & History

Dots and Boxes is a 19th-century pencil-and-paper game associated with French mathematician Édouard Lucas, who described it under the name La Pipopipette. Over time it spread internationally under names such as Dots and Dashes, Boxes, and Pigs in a Pen, and its seemingly simple rules later made it a favorite subject in combinatorial game theory. Scientific American's 2001 feature 'Dots-and-Boxes for Experts' is a good reminder that the game's chain endgames fascinate far more than schoolchildren.

Timeline

  1. 1889 Édouard Lucas is credited with publishing an early description of the game that later circulated under the name La Pipopipette.
  2. 1982 Winning Ways for your Mathematical Plays devoted a full chapter to Dots and Boxes, helping cement its place in modern combinatorial game theory.
  3. 2001 Scientific American published Ian Stewart's 'Dots-and-Boxes for Experts,' introducing deeper chain and sacrifice ideas to a broad science readership.

Notable People

  • Édouard Lucas French mathematician credited with the early published form of the game and with the name La Pipopipette.
  • Elwyn Berlekamp Mathematician whose analyses helped popularize Dots and Boxes as a serious strategy and game-theory subject.
  • Ian Stewart Mathematics writer who used Scientific American to explain why expert Dots and Boxes play is strategically rich.

Trivia

  • Blank-start analysis often calls the standard version used here the American board.
  • Variants with pre-drawn borders are commonly called Swedish boards or Icelandic boards.
  • Expert endgames revolve around chains, sacrifices, and timing who must open the first long chain.

FAQ

Which rule set does this page describe?

It describes the standard blank-board rectangular game used in this build: a 5×5 dot grid that creates 4×4 boxes, with extra turns whenever you complete a box and a final score based on total boxes claimed.

How is this different from the Swedish-board variant?

Swedish-board play begins with the entire outer border already drawn. That removes perimeter safety from move one, so forced chains and sacrifices arrive earlier. The current build starts fully blank, so opening safe-move selection matters much more.

How is this different from Icelandic-board play?

Icelandic boards start with only the left and bottom borders pre-drawn, which creates an asymmetric opening immediately. This implementation starts symmetrically with every edge empty, so neither side inherits a prebuilt border or side preference.

Are triangular, hexagonal, or Strings-and-Coins rules included here?

No. Those versions change adjacency, chain shapes, and sometimes even the language used to explain control. This build keeps only square boxes with horizontal and vertical edges on a standard rectangular grid.

What changes between VS AI Master, VS AI Story, Two Player, and Computer vs Computer?

Only the opponent behavior and who is making moves. VS AI Story searches less deeply and can make occasional mistakes, VS AI Master searches deeper, Two Player is local pass-and-play, and Computer vs Computer uses the same scoring rules in full spectator mode.

Related Games