Dots and Boxes is a pencil-and-paper game for two players (sometimes more). It was first published in the 19th century by French mathematician Édouard Lucas, who called it la pipopipette. It has gone by many other names, including the game of dots, dot to dot grid, boxes, and pigs in a pen.
The game starts with an empty grid of dots. Usually two players take turns adding a single horizontal or vertical line between two unjoined adjacent dots. A player who completes the fourth side of a 1×1 box earns one point and takes another turn. (A point is typically recorded by placing a mark that identifies the player in the box, such as an initial.) The game ends when no more lines can be placed. The winner is the player with the most points. The board may be of any size grid. When short on time, or to learn the game, a 2×2 board (3×3 dots) is suitable. A 5×5 board, on the other hand, is good for experts.
The diagram on the right shows a game being played on a 2×2 board (3×3 dots). The second player ("B") plays a rotated mirror image of the first player's moves, hoping to divide the board into two pieces and tie the game. But the first player ("A") makes a sacrifice at move 7 and B accepts the sacrifice, getting one box. However, B must now add another line, and so B connects the center dot to the center-right dot, causing the remaining unscored boxes to be joined together in a chain (shown at the end of move 8). With A's next move, A gets all three of them and ends the game, winning 3–1.