(A) During the feeding process, worms remaining in the food patch experience different environmental conditions. At the beginning, food is still abundant and pheromones have already accumulated. By the end, food is scarce and pheromone concentration is even higher. (B) In the behavioral assay, as animals feed and leave from a food patch, they are presented with the choice between a spot containing the pheromone blend and a spot containing a control solvent. In the two spots, sodium azide is added in order to anesthetize the animals and prevent them from leaving the chosen spot. (C) Individual worms leave the food patch at different times. The average number of worms that abandoned the food patch at each hour is shown (mean worm count ± SEM across replicates, n. experiments = 2). (D) Animals leaving the food patch earlier prefer the pheromone blend while those leaving later, when the food is almost depleted, avoid the pheromone blend. In the plot, chemotaxis index is calculated on the number of naive MY1 young adult hermaphrodites that, at each hour, reach the two spots (mean CI ± SEM across replicates, n. experiments = 2). The red region in each plot approximately indicates when food in the patch is exhausted.