The production of flexible but controlled behavior is the primal function of brains and may be an evolutionary foundation for higher cognitive abilities. We study the nervous system of the worm C. elegans  in search of the building blocks of cognition.

A hungry worm executes a stereotypic behavioral sequence that supports adaptive and goal-directed locomotion. What is it thinking?