Tents Solver, Step by Step
Tap a square to plant a tree, tap again to remove it. Type each row's number of tents down the left and each column's along the top.
How to use the tents solver
Set the width and height, tap each square that holds a tree, and type the number of tents for every row and column. Press Explain the next step: the solver places the tents that are certain, shades squares that must be grass, outlines what changed, and says why. Show the answer places them all at once and checks the solution is the only one. The puzzle is also called tents and trees.
The rules of tents
Every tree has a tent of its own directly beside it: above, below, left or right, never diagonally. There are exactly as many tents as trees, and they pair off one to one. No two tents touch, not even at a corner. The numbers at the side of each row and the top of each column say how many tents it holds.
How to solve tents, step by step
Grass first. A square with no tree directly beside it can never hold a tent, and neither can any square touching a tent, corners included, nor the rest of a row or column that already has its number. Rows and columns marked 0 are all grass. Fill the tight lines. When a row or column has exactly as many open squares left as tents it still needs, they are all tents. Count the gaps. Tents cannot sit side by side, so a gap of open squares holds at most half its length, rounded up; when the gaps in a line can only just hold its number, the odd ones fill end to end, every other square. Give each tree its tent. A tree with one open square left beside it has its tent there. When those run out, the solver tries a square both ways and keeps the one that does not break a rule.
How it was checked
The solver was run on all 150 puzzles of the daily tents. It found each stored answer and found it to be the only one, and every step it explained was checked against those answers: it never placed or ruled out a tent wrongly. All 150 were explained from start to finish. It was also run on 30 larger boards up to 14 by 14, most of which need a trial or two.
More logic puzzles
There is a new daily tents every day. The light up solver and the nonogram solver explain their steps the same way. For a puzzle you hold in your hands, see our brain teasers. There are more solvers on the puzzle tools page.
Frequently Asked Questions
How do you solve a tents puzzle?
Mark grass first: squares with no tree beside them, squares touching a tent, and rows or columns marked 0. Then fill any row or column with exactly as many open squares as tents it needs, and give a tree its tent when it has only one open square beside it.
What are the rules of tents and trees?
Every tree gets its own tent directly above, below, left or right of it, so tents and trees pair off one to one. No two tents touch, even diagonally, and the numbers say how many tents are in each row and column.
Can a tent be next to two trees?
Yes, a tent can sit beside two trees, but it belongs to only one of them. The other tree still needs a tent of its own.
Can tents touch diagonally?
No. Tents never touch at all, not side to side and not at a corner, so every square around a tent is grass.
Does every tents puzzle have one solution?
A well-made one does. The solver checks, and says if the numbers you entered allow more than one.