Octopuses show surprising cognitive abilities: solving mazes, learning cues, and remembering solutions. Furthermore, recent studies suggest that octopuses may display the first "personalities" ever measured in an invertebrate: confronted with the same threats and food stimuli, individual octopuses react differently. Until recently, such traits were thought to be exclusive to higher vertebrates and to develop primarily among long-lived, social animals. Longevity, it was thought, justifies the biological "investment" in big, complex brains. Why would the short-lived, solitary octopus develop such traits? Mather postulates that animals that pursue varied food sources in changeable, perilous habitats must develop a wide range of hunting and defensive strategies. Variation in the temperament of individuals enhances survival in a volatile, competitive milieu by ensuring that different individuals respond differently to changing conditions so some will thrive.