Different habitat preferences of species can be explained by progressive stochastic ecquisition of cognitive clues that discriminate habitat features correlating with expected fitness.