A good example

Howard E. Evans, Insect Biology, a Textbook of Entomology, Reading (MA), Addison Wesley, 1984, p. 179.

A good example of complex stereotyped behavior capable of modification involves the building of cases by the aquatic larva of caddisfles. As a rule, each species makes a case of characteristic form by combining small items in the environment with silk from its labial glands. But building behavior is sufficiently plastic that cases can often be built under unusual circumstances. Several experiments were performed with a species that normally builds its case of bits of leaves, using its front legs to seek leaf pieces and its middle legs to manipulate them. When larvaa are removed from their cases and one pair of legs is amputated, they are able to build reasonably normal cases in only slightly more time than usual ; another pair of legs assumes the role of the amputated pair. When decased larvae are given no access to leaves but are given other, dissimilar kinds of plant materials, they are also able to build fairly adequate cases. However, when thay are presented with sand grains, they are unable to build a case, even though other species normally use sand grains in case construction.

Obviously the capacity to adapt fixed action patterns to suit the situation has high survival value, for no insect can be assured a perfectly constant environment. There are also times in the life of an insect when searching behavior must be performed ; that is, a caddisworm must find suitable particles from which to build a case.