Over at TalkingBrains, Greg Hickok points to a review on embodied cognition that has several neat examples of how distinct behavior arises just by placing an agent in the correct environment:

Robots with two sensors situated at 45 degree angles on the robot’s “head” and a simple program to avoid obstacles detected by the sensors will after a while tidy a room full of randomly distributed cubes into neat piles:

and

Female crickets need to find male crickets to breed with. Females prefer to breed with males who produce the loudest songs… Female crickets have a pair of eardrums, one on each front leg, which are connected to each other via a tube. It so happens that the eardrums connect to a small number of interneurons that control turning; female crickets always turn in the direction specified by the more active interneuron. Within a species of cricket, these interneurons have a typical activation decay rate. This means that their pattern of activation is maximized by sounds with a particular frequency. Male cricket songs are tuned to this frequency, and the net result is that, with no explicit computation or comparison required, the female cricket can orient toward the male of her own species producing the loudest song. The analysis of task resources indicates that the cricket solves the problem by having a particular body (eardrum configuration and interneuron connections) and by living in a particular environment (where male crickets have songs of particular frequencies).

(Emphasis added.)

This, of course, is a perfect example of why we need ethology in order to understand the nervous system – behaviors only make sense in the context of the ecology that they operate in!