Many animals will choose where they stand in order to maximise their camouflage. For example, the common baron caterpillar (pictured) has a prominent stripe along its length that looks exactly like the central rib of the mango leaves on which it feeds.
Natural selection has clearly favoured caterpillars that line themselves up with the leaf rib so they blend in better, but it seems unlikely that individual caterpillars know why they do this – it’s simply a behaviour that’s programmed into their genes. This is true of all invertebrates and most fish, reptiles and amphibians, but some more intelligent species – particularly among birds and mammals – show some awareness.
Japanese quail, for instance, are ground-nesting birds who lay eggs with speckled patterns that vary widely from one bird to another. A 2013 study at Abertay University in Dundee found that quail who laid darker eggs were more likely to select darker nesting sites, and vice versa.