Dots and Boxes

←↑↓→ / hjkl move between dotsShift + direction draw a line from the dotEnter / N new game (when the board is done)

How to play Dots and Boxes

The game from the back page of every school notebook, exactly as you remember it:

  1. Draw a line between two neighboring dots — click anywhere near the line you want, or use the keyboard: move between dots with the arrow keys and hold Shift to draw in a direction.
  2. Close a box, claim a box. Finish the fourth side of a square and it's stamped yours — and you must draw again, immediately. Close several in a row and the whole run is yours.
  3. Most boxes wins once the grid is full of lines. You draw first as ✕; the bot (or your seatmate) plays ○.

Your game saves itself after every line, so you can drop it mid-move and pick it up minutes later — nothing is lost and nobody is rushed.

From doodle to knife fight: how the game actually works

Dots and Boxes opens as a doodle and ends as a knife fight. The turning point is the moment there are no safe lines left — no line you can draw without giving some box its third side. Everything before that is maneuvering; everything after is arithmetic.

Phase one: don't be generous. A box with two sides is a live grenade — add the third side and your opponent takes it, plus the free move that follows. Early play is simply drawing lines that keep every box at two sides or fewer, while quietly steering which regions of the board will become long chains.

Phase two: count the chains. When safe lines run out, someone has to open a region and lose it. The board has by then organized itself into chains — strings of boxes that fall like dominoes once opened, because each captured box exposes the next one's third side. If you're forced to open something, open the shortest chain: giving away two boxes to protect eight is a trade, not a loss.

Phase three: the double-cross. The expert move our bot refuses to learn. When you're handed a chain, don't take all of it — stop two boxes short and close them off with a single line. Your opponent gets two consolation boxes and, crucially, must open the next chain for you. Keep declining the last two boxes of every chain and you harvest the entire endgame. Try it on the bot: it will politely take your two boxes and hand you the board.

Tips

  • The third side is the sin. Before every line, ask: does this give any box its third side? If yes, and you have any other choice, choose differently.
  • Long chains favor whoever moves second into them. Watch the parity: on odd grids (3×3, 5×5) the first player wants an odd number of long chains; on 4×4, an even number. You don't need this against our bot — but your friends are another matter.
  • The bot telegraphs nothing but forgives less than you'd think. It will never open a chain while a safe line exists, so don't wait for a gift — force the issue by using up safe lines faster than it can.
  • Play 3×3 to practice endings. Nine boxes means the endgame starts by move six or so — it's the fastest way to build chain instincts.

Frequently asked questions

What are the rules of Dots and Boxes?

Two players take turns drawing one line between two neighboring dots. Completing the fourth side of a box scores that box for you — and you must immediately move again. When every line is drawn, whoever owns more boxes wins. That extra-move rule is the entire game: one careless line can hand your opponent a whole run of boxes.

How do you win at Dots and Boxes?

Early on, only draw safe lines — ones that don't give any box its third side. Once no safe lines remain, the player forced to 'open' a region concedes it, so count regions: if you must open something, open the smallest one. Strong players go further with the double-cross trick, sacrificing two boxes to keep control of every chain that follows.

What is the double-cross strategy?

When an opponent opens a chain for you, greed says take every box. The double-cross instead leaves the last two boxes: you close them off with one line, handing your opponent just two boxes — but forcing them to open the next chain for you. Whoever controls the chains this way usually sweeps the endgame. Our bot deliberately never does this, so learning the trick here means you'll beat the bot — and then surprise your friends.

Is the bot beatable?

Yes, on purpose. The bot plays a tidy amateur game: it takes any box you offer, never hands over a box while a safe line exists, and when it must give something up it opens the smallest region. It never uses the double-cross, so a player who understands chains wins every time. It's the friend from study hall, not a chess engine.

Which grid size should I play?

4×4 (the default) is the classic quick game — about two minutes. 3×3 is fast and sharp: with only nine boxes, one mistake usually decides it. 5×5 has longer chains, which makes chain-counting and sacrifice tactics matter much more. Ties are only possible on 4×4, where the sixteen boxes can split evenly.

Can two people play on one computer?

Yes — switch the opponent toggle to 'two players' for hotseat play. ✕ always draws first; pass the mouse (or keyboard) between turns. Your game saves itself after every line, so a half-finished grid is still there if you wander off.

  • Kings in the CornerThe kitchen-table classic you half-remember — build the cross, save the corners for kings, empty your hand first. Beatable AI, shared daily deal.
  • Five DiceThree rolls, thirteen boxes — the classic push-your-luck dice sheet with live score previews and a shared Daily Dice.
  • 2048The slide-and-merge classic, clean and keyboard-first — no ads, no timer, plus a shared Daily Board.
  • SnakeThe arcade classic on a cozy 20×20 grid. Arrow keys or WASD, pauses itself the moment you look away.