PatchGrid: Spatial Logic