# Dots and Boxes

Canonical page: https://rovixel.com/dots-and-boxes/

Play Dots and Boxes online for free on a 3×3, 4×4 or 5×5 grid. Take on the computer at three levels or a friend on the same screen.

- How to start: open https://rovixel.com/dots-and-boxes/ and press Play. Free, no download, no sign-up.
- Genres: Strategy, Puzzle, 2 Player
- Session length: Short · a few minutes a round
- Devices: phone, tablet and computer
- Keyboard: Arrow keys to move between lines, Enter or Space to draw, N for the next round, M for music
- Touch: Tap the gap between two dots to draw a line

Dots and Boxes is the pencil-and-paper game many people first played on the back of a school notebook. Start with
a grid of dots, take turns joining two of them with a line, and claim every box you close. This version runs in
your browser on a 3×3, 4×4 or 5×5 grid, against the computer or a friend, on a phone, a tablet or a computer.

## How to play

Players take turns drawing a single line between two dots that sit next to each other, across or down. If your
line completes the fourth side of a box, the box takes your color and you draw again. One line can close two boxes
at once. When every line has been drawn, the player with more boxes wins.

On a keyboard, the arrow keys move a highlight from line to line, and Enter or Space draws the highlighted line.
On a touch screen or with a mouse, tap or click the gap between two dots. N starts the next round and M switches the
music.

## How to win

- **Play safe as long as you can.** A line that gives a box its third side hands that box to your opponent. In the
  opening, draw only lines that touch boxes with at most one side drawn.
- **Sacrifice small.** Sooner or later every remaining line gives something away. Pick the line that gives the
  fewest boxes.
- **Keep control with a double-cross.** When you are taking a long chain, stop two boxes short and draw the far side
  of the last box instead. Your opponent gets two boxes, then has to open the next, bigger chain for you.
- **Think about chains early.** On bigger boards the game is decided by who must open the first long chain. Counting
  them before the safe moves run out is the step that separates good players from great ones.

## Three computer levels and two players

**Easy** draws mostly random lines and is a good way to learn. **Medium** never gives a box away when it can avoid
it and always takes the boxes you leave. **Hard** gives away as little as possible, keeps control of long chains
with the double-cross, and looks ahead at the end of the opening. Choose 2 Players to share the screen with a friend.
Your opponent, level and board size are remembered on this device.

## Who it is for

A round takes one to five minutes depending on the board, which makes it a good game for a short break. It suits
anyone who likes simple rules with a deep strategy underneath. For more turn-based games against the computer, try
[Checkers](https://rovixel.com/checkers/), [Mancala](https://rovixel.com/mancala/) or [Ultimate Tic Tac Toe](https://rovixel.com/ultimate-tic-tac-toe/).

## Tips

- Never draw the third side of a box unless you have to. The other player takes it and moves again.
- Early on, draw lines that touch boxes with at most one side already drawn. These are the safe moves.
- When only unsafe moves are left, give away the smallest group of boxes you can.
- When you take a long chain, consider leaving the last two boxes. Your opponent takes them but then has to open the next chain for you.
- Count the long chains near the end of the opening. Who has to open the first one usually decides the game.

## Questions

### How do you play Dots and Boxes?

Players take turns drawing one line between two neighbouring dots. If your line closes the fourth side of a box, the box is yours and you draw again. When every line is drawn, whoever owns more boxes wins.

### Do I get another turn after closing a box?

Yes. Every time your line completes one or two boxes, you score them and draw another line. That is how a single turn can sweep a whole chain of boxes.

### Which board size should I pick?

3×3 has 9 boxes and takes about a minute, which is good for learning. 4×4 is the classic size. 5×5 has 25 boxes and long chains, so the strategy really starts to matter.

### Can I play against a friend?

Yes. Choose 2 Players and take turns on the same screen. Lines and boxes are colored blue or orange for whoever drew or won them.

### How strong is the computer?

Easy draws mostly random lines. Medium never gives a box away when it can avoid it and always takes the boxes you leave. Hard also gives away as little as possible, keeps control of long chains, and plays the end of the opening out ahead of time.

### Can a game end in a draw?

On the 4×4 board, yes, because 16 boxes can split 8–8. On 3×3 and 5×5 the number of boxes is odd, so someone always wins.

## Agent access

These documents describe the public website. Every game is free and runs in the browser: there is no download,
no app, no price and no public API. Playing never needs an account. Do not invent ratings, player counts,
rankings or features that are not described here; the live pages are the source of truth.
