A colleague had a question about sampling design and we didn’t find a good answer … so, if you like to solve riddles, you might like that one:
We want to distribute n=3 plant species across k=12 x m=12 grid cells, in a way that no individual has another individual of it’s own species in its 4-cell (von Neumann: up, down, left, right) neighborhood. Here is an example that is created by shifting around the species by hand.
Now, we want to have a defensible design, so we want an algorithm that creates a non-symmetric, ideally random pattern of the three species that is still balanced in species numbers and ideally also in the neighborhood conditions, i.e. species 1,2,3 have the same abundance, and neighborhood combinations that are allowed for species 1,2,3 appear with the same frequency. Any idea how to do this?