The study of the evolution of the nervous system and how it has evolved to enable complex behavior and cognition.