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.

The neurons of a worm execute a beatifully orchestrated pattern in time. This pattern drives the behavioral intention of the animal.