A short web article by Ralph Griswold on how to determine the neighborhood constraint set of a black-and-white cell pattern by examining each cell's neighborhood template. It compares three ways of handling edge cells with incomplete neighborhoods: ignoring them, wrapping the pattern as a repeat, and keeping partial neighborhoods. It discusses the Morse-Thue carpet, an aperiodic pattern whose constraint set has 18 templates, and random patterns, which may use all 32 possible constraints. It is illustrated with grid diagrams and neighborhood templates.