A few days ago I spotted a bright green (geometrid?) caterpillar on an Alder twig. It was very obvious and conspicuous on the dark leafless winter twig and I was wondering how long before a bird would spot it and scoop it away. I looked at it from close by and noticed something blackish, blurry, developing on the inside and guessed this might be (a) parasitic wasp(s). I went inside again and then saw a robin snatching up the caterpillar, within minutes. It made me wonder whether perhaps the caterpillar had deliberately sought a spot, where it could easily be seen and be eaten by a bird, so that the parasitic wasps inside would never hatch? In other words, would an individual caterpillar be able to 'know' that it is parasitised and would it willingly sacrifice itself for the sake of its species?
Perhaps this could be an example of 'zombie behaviour' where a parasitised larvae does not attempt to conceal itself from a predator to enable the parasite to complete its life cycle in another host. See 'zombie snails'.