Tents & Trees

Pitch one tent per tree, on an orthogonally-adjacent cell. Tents never touch — not even diagonally — and each row or column number counts its tents. Click a cell to cycle tent → grass → clear.

The solver keeps a cell state (unknown / grass / tent) and runs cheap local rules — tent spacing, line counting, a board-wide tent budget — to a fixpoint. The star is the matching rule: every solution pairs trees with tents one-to-one, so build the bipartite graph between trees and the cells that could still hold their tents and ask Hall-style questions with a maximum matching (Kuhn's augmenting paths). If the matching cannot saturate the trees, the position is contradictory. If deleting one cell breaks saturation, that cell is a tent in every solution — a vertex-deletion Hall test. If requiring a cell to be matched is infeasible (checked with a Mendelsohn–Dulmage alternating-path exchange), no solution can spare a tree for it, so it is grass. This is the same skeleton as Régin's alldifferent filtering: one maximum matching, then reasoning about what every / no maximum matching can use. The deductions are strong enough that some bundled boards keep only two of their row/column clues — the boards are authored as solved campsites, clues greedily deleted while a fewest-branching search still proves exactly one solution, so every surviving clue is load-bearing.