What is Dots and Boxes?
Dots and Boxes is a classic pencil-and-paper strategy game played on a grid of dots. Players take turns drawing one horizontal or vertical line between neighbouring dots. Whenever a player completes the fourth side of a box, that player claims the box and immediately takes another turn.
The winner is the player with the most boxes when every line has been drawn. This online Dots and Boxes game keeps the classic rules, adds colourful player lines, and lets you play solo, with friends, or against AI players.
- Draw one line on each turn.
- Complete a box to score one point.
- Score a box and you get another move.
- Play with 1 to 4 players.
- Set each player as human or AI.
How to play Dots and Boxes online
Start by choosing a grid size. A 3x3 board is quick and friendly, while 5x5, 6x6, 6x8 and 6x10 boards create longer strategic fights. The 6x8 and 6x10 layouts are six boxes wide, with eight or ten boxes high, so they add depth while still fitting neatly on mobile screens.
Click or tap any open line between two dots. Your latest move glows in your player colour, so it is easy to see what just changed. When a box is captured, it fills with the scoring player's colour and the same player continues.
- Use smaller grids for fast games.
- Use larger grids for deeper strategy.
- Mix human and AI players in any seat.
- Choose Easy, Medium or Hard for each AI player.
- Watch the scoreboard to see who controls the board.
Dots and Boxes strategy
Early moves are about avoiding gifts. A box with three sides already drawn can be completed by the next player, so careless moves create easy points. Strong players look for safe lines that do not create a three-sided box.
The endgame is where Dots and Boxes becomes a strategy game. Chains of boxes can force one player to give a long run of points to another player. Sometimes the best move is not taking every available box, but leaving a controlled sacrifice so you keep the initiative.
- Avoid making the third side of a box too early.
- Take completed boxes when they are offered.
- Count chains before opening a long run.
- Use sacrifices to control who takes the next chain.
- On larger boards, think several turns ahead.
The golden rule: don't make the third side
Most Dots and Boxes games are decided by one habit: never be the player who draws the third side of a box. The moment a box has three sides, your opponent can close it, score it and — because completing a box grants another move — keep going. In the opening, that means playing safe lines that leave every box with no more than two sides, for as long as safe moves last.
Eventually the safe moves run out and someone must open a region by drawing that third side. The whole middlegame is really a fight over who is forced to open first. Counting your remaining safe moves, and steering toward a position where your opponent runs out before you do, is the foundation of strong play.
- A box with three sides is a free gift, so avoid creating one.
- Completing a box earns an extra turn, so captures can cascade.
- Play safe lines that add no third side while any remain.
- The player forced to open the first chain is usually on the back foot.
- Count safe moves and try to leave your opponent with fewer.
Never take every box: the double-cross
The tactic that separates strong players is the double-cross, also called the all-but-two. When your opponent finally opens a long chain, the tempting move is to take every box in it. Instead, take all but the last two, then draw the line that hands those two boxes back — which forces your opponent to open the next chain for you.
By sacrificing two boxes each time, you stay in control: your opponent keeps opening chains and you keep harvesting them, usually winning the overall box count. A closed loop costs four boxes to double-cross instead of two. Whoever controls the chains controls the game, which is why experienced players count the long chains and try to make their number favour them.
- When handed a long chain, take all but the last two boxes.
- Close it so the opponent is forced to open the next chain.
- Sacrificing two boxes keeps control and usually wins the long game.
- For a closed loop, leave four boxes instead of two.
- Count the long chains — controlling their parity decides tight games.
A short history of Dots and Boxes
Dots and Boxes was first described by the French mathematician Édouard Lucas in 1889, who called it la pipopipette. It spread worldwide as a game any two people could play on the back of a notebook, needing only a grid of dots and a pencil.
Behind that simplicity sits surprising depth: the mathematician Elwyn Berlekamp devoted a whole book, The Dots and Boxes Game, to its chain-and-loop theory. The version here keeps the pencil-and-paper rules and adds adjustable grid sizes and AI opponents, so you can practise the double-cross without redrawing a single dot.
AI difficulty levels
Easy AI plays casual moves and sometimes misses strategic danger. Medium AI prioritizes completed boxes and tries to avoid handing over obvious captures. Hard AI looks harder at safe moves, box threats and future chain risk before choosing a line.
The result is a flexible Dots and Boxes online game: you can practise against one AI, create a four-player table, or let several AI players battle while you join in.






