Detection patterns

Try to fill each collumn and row with exactly one block. Do this in such a way that any nontrivial shift of the pattern will have an overlap of at most one with the orginal pattern.

With autofill a detection pattern of the given size is generated. By dragging the right lower corner you can adjust the dimension of the pattern. With score you can determine the maximal possible overlap achievable by translation.