How to play
Tents, also known as Tents and Trees, is played on a square grid with some trees in it. Pitch tents in the empty cells so that every tree gets exactly one tent of its own directly beside it: above, below, to the left or to the right, never diagonally. Each tent belongs to exactly one tree, so there are as many tents as trees. A tent may stand next to two trees, but it counts for only one of them.
Tents never touch each other, not even at a corner, and the numbers above the columns and to the left of the rows say how many tents each column and row holds. Grass marks are optional notes; the puzzle is solved as soon as all the tents are right. Choose a size from 6×6 to 12×12 and a level, then press Start. The clock stops while you pause or switch to another tab.
Controls
- Mouse: click a cell to switch it from empty to tent, to grass and back to empty. Right-click marks or clears grass. Drag to paint: a drag that starts on an empty cell paints grass, one that starts on grass erases it, and one that starts on a tent keeps the tent and paints grass on the cells you drag over. Click the number of a row or column that has all its tents to fill its empty cells with grass.
- Touch: tap and drag the same way; the page does not scroll while your finger is on the board. “Grass only” makes every tap mark or clear grass. On a phone the larger grids get a Zoom button; while zoomed, move the board with two fingers or pinch, and the numbers stay at the edges.
- Keyboard: arrow keys move the cursor (the first press only shows it), Space or Enter switches the cell, T tent, G grass, Backspace empties it, Shift+arrow paints grass and L fills the cursor’s finished row and column. Ctrl+Z / Ctrl+Y undo and redo; H hint, C check, P pause, N new game (size and level), F full screen.
A grey number with a tick has exactly its tents; a red ring around a number means too many tents or too little room left. A red ring with an exclamation mark flags touching tents (also joined by a red bar), a tent with no tree, tents that would have to share a tree and trees with no room left for their tents.
Check crosses out wrong tents and wrong grass in red until your next move. Hint first removes one wrong mark if there is one; otherwise it makes one logical step, outlines the changed cells and says why, or reveals one tent of the solution when no simple step is left.
How it works
Each tent belongs to one tree, so
Because tents never stand side by side, a run of L free cells in a row holds at most ⌈L / 2⌉ tents. When a row needs exactly that many, the tents in a run of odd length sit on every other cell, starting at both ends.
Pairing is a matching problem: put the trees on one side, the tents on the other and join each tree to the tents beside it. Hall’s marriage theorem says that every tent can get a tree of its own exactly when every group of tents has at least as many neighbouring trees as it has tents. The page checks this after every move with an augmenting-path matching algorithm and marks a group that fails, such as two tents whose only tree is the same one.
Every puzzle has exactly one solution. The 1,440 puzzles (120 for each size and level) were made by placing random tents that do not touch, adding a tree beside each one and keeping only grids that a logic solver could finish. Easy needs only counting and the rules above. Medium also needs you to try every way a row’s tents can fit. Hard sometimes needs a short “what if”: assume a tent, follow the consequences and find a contradiction. A separate program then searched every possible tent placement row by row and found exactly one solution for each puzzle. Each puzzle can also appear rotated or mirrored in eight ways.
Tents was invented around 1995 by the Dutchman Leon Balmaekers and first appeared in a Dutch puzzle magazine.
Tips and strategy
- Cells with no tree directly beside them, and every row or column marked 0, are grass.
- After placing a tent, mark grass on the eight cells around it.
- A row that still needs as many tents as it has free cells is all tents; a row that has all its tents is grass everywhere else.
- A tree with only one free side left has its tent there.
- A tent next to only one tree owns that tree, so a cell whose only neighbouring tree is that one is grass.
Frequently asked questions
Do I have to fill every cell with grass?
No. Grass is a note for yourself. The puzzle counts as solved the moment the tents form a correct solution.
Sources
- Hall P (1935). On Representatives of Subsets. Journal of the London Mathematical Society s1-10(1), 26–30. The marriage theorem the page uses to check that every tent can have a tree of its own.
- Ritmeester P (2020). Tents & Trees. Puzzle booklet (PDF) by the editor of the magazine that first published the puzzle. Its invention around 1995 by Leon Balmaekers.