Back to All Games

Dots and Boxes

NEW
StrategyMediumStrategyLogicClassic
You 0AI 0
Your turn

Tap a line between two dots. Complete the fourth side of a box to claim it and take another turn. Whoever owns the most boxes wins.

Draw Line
Tap Between Dots
Claim Box
Complete the 4th Side
Bonus
Completing = Extra Turn
Opponent
Computer AI

Works on both desktop and mobile. Tap or click to play.

About This Game

Play Dots and Boxes free online against the computer. Draw lines, complete boxes, and claim more than your opponent. A classic pen-and-paper game.

How to play Dots and Boxes

Objective: Own more of the 16 boxes than the AI once the whole 5x5 dot grid is filled.

The board is a 5x5 grid of dots forming 16 square boxes. On your turn, tap any faint line between two neighboring dots; drawn lines turn bright cyan and cannot be tapped again. You always move first as the cyan player marked Y, and the orange AI marked A replies about half a second later. Play alternates until all 16 boxes are filled.

You claim a box by drawing its fourth side. When your line completes one or two boxes, they fill with your color and letter and you take another turn instead of passing. Because a single line sits between two boxes, one move can close two at once and keep your turn. If your line completes no box, the turn passes to your opponent.

The scoreboard reads You and AI with current box counts, and a status line below the grid shows Your turn, AI thinking, or the result. When the last box fills, totals decide it: more than the AI shows You win, fewer shows AI wins, eight each shows It's a tie. New Game resets the grid, scores, and turn to you.

The AI follows a fixed three-step rule you can exploit. First it grabs any line that completes a box. If none exists, it plays a safe line that does not give any box a third side. Only when every remaining line would hand you a box does it sacrifice, picking one at random. There are no difficulty settings, timers, or lives.

Tips and strategy

Never draw the third side

A box with two sides is bait: adding its third line lets the AI close it and move again for free. Play lines that leave boxes at zero or one side while safe moves still exist.

Force the sacrifice

The AI only gives away a box when it has no safe line left. Keep playing safe lines so it runs out first and is forced into its random sacrifice, handing you the opening box of a chain.

Chain the double moves

Completing a box grants another turn, so a run of connected three-sided boxes lets you claim several in a row. After the AI sacrifices, find the longest chain and take all of it in one turn.

Close two with one line

A shared wall between two boxes that each already have three sides completes both at once and keeps your turn. Watch for these late in the game; each swings the count by two.

The history of Dots and Boxes

Dots and Boxes was described by the French mathematician Edouard Lucas in the late nineteenth century, who called it la pipopipette. Its simple pencil-and-paper rules hide real depth, studied for decades by the mathematician Elwyn Berlekamp. Much of that theory centers on the deliberate sacrifice, giving away a short chain to force the opponent into a longer one, the tactic that beats this AI.

Frequently asked questions

How many boxes do I need to win?

There are 16 boxes total, so you win with nine or more. Totals are compared when the last box fills: more than the AI shows You win, fewer shows AI wins, and an eight-to-eight split shows It's a tie. Every box counts the same.

Why did I get another turn after drawing a line?

Completing the fourth side of a box gives you a bonus turn instead of passing. If one line closed two boxes at once, you still take just one extra turn but gain two boxes. The turn passes only when your line completes no box.

How hard is the AI, and are there difficulty levels?

There are no difficulty levels. The AI always takes a box it can complete, otherwise plays a line that avoids giving any box a third side, and only sacrifices at random when no safe line remains. It does not plan chains ahead, so careful counting beats it.

Can I undo a move or resize the board?

No. There is no undo, and the grid is fixed at 5x5 dots forming 16 boxes. Your only reset is the New Game button, which clears every line and score and hands the first turn back to you.

Explore More Games

View All →
A
Apex Fury
ArcadeMedium

Survive endless waves of neon enemies in this top-down arcade space shooter. Collect power-ups, dodge bullets, and chase your high score.

FEATURED
M
Mind Maze
PuzzleHard

Navigate through increasingly complex mazes that test your logic and spatial reasoning skills.

POPULAR
K
Kingdom Builder
StrategyMedium

Build your medieval kingdom from scratch. Manage resources, train armies, and conquer neighboring territories.

NEW
S
Shadow Strike
ActionHard

Two shadow ninjas clash in lethal combat. Master punches, kicks, and special attacks to defeat the AI opponent in best-of-3 rounds.

HARD