Inversion of pheromone preference optimizes foraging in C. elegans

Foraging animals have to locate food sources that are usually patchily distributed and subject to competition. Deciding when to leave a food patch is challenging and requires the animal to integrate information about food availability with cues signaling the presence of other individuals (e.g., pheromones). To study how social information transmitted via pheromones can aid foraging decisions, we investigated the behavioral responses of the model animal Caenorhabditis elegans to food depletion and pheromone accumulation in food patches. We experimentally show that animals consuming a food patch leave it at different times and that the leaving time affects the animal preference for its pheromones. In particular, worms leaving early are attracted to their pheromones, while worms leaving later are repelled by them. We further demonstrate that the inversion from attraction to repulsion depends on associative learning and, by implementing a simple model, we highlight that it is an adaptive solution to optimize food intake during foraging.


Introduction 31
Decisions related to foraging for food are among the most critical for an animal's survival. 32 They can also be among the most challenging, because food is usually patchily distributed in 33 space and time, and other individuals are attempting to find and consume the same resources 34 (Abu Baker and Brown, 2014;Driessen and Bernstein, 1999;Stephens and Krebs, 1987). 35 An important decision, which has been the focus of considerable effort in models of 36 foraging behavior, is for how long to exploit a food patch. Most models involve patch 37 assessment by individuals and postulate that the leaving time depends on local estimates of 38 foraging success (Eric L. Charnov, 1976;Oaten, 1977;Stephens and Krebs, 1987). As such,39 foragers are predicted to depart from a food patch when the instantaneous intake rate drops 40 below the average intake rate expected from the environment, a phenomenon that has been 41 animals use pheromones and other odors to orientate their searches (Wyatt, 2014). This, 48 however, implies determining whether pheromones point towards a resource supporting 49 growth and reproduction or an already exploited one. 50 To acquire this knowledge, animals have to learn from experience. In the context of 51 social foraging it has been shown that individuals might need to rely only on the most recent 52 experience (Krebs and Inman, 1992). As such, the valence (positive or negative signal) of 53 pheromones acquired during the most recent feeding activity is crucial for the success of the 54 foraging process. While this has been shown in bumblebees feeding on transient resources 55 (Ayasse and Jarau, 2014), we still don't know whether it is important for other animals 56 feeding in groups. Moreover, it is not clear if the ability to use associative learning (Ardiel and 57 Rankin, 2010) to change the valence of pheromones could improve foraging success. 58 The nematode Caenorhabditis elegans is a powerful model system to investigate how 59 information about food availability and pheromones can shape foraging in patchy habitats. C. 60 elegans, indeed, feeds in large groups on ephemeral bacterial patches growing on 61 decomposing plant material, a habitat that can be mimicked in a petri dish (Frézal and Félix, 62 2015;Schulenburg and Félix, 2017). Importantly, C. elegans can evaluate population density 63 inside food patches using a suite of pheromones, belonging to the family of ascarosides, which 64 are continuously excreted by worms (Greene et al., 2016;Ludewig and Schroeder, 2013). 65 Finally, it has been shown that pheromones and food availability control the leaving times of 66 foraging worms. In particular, the rate at which individuals abandon the patch increases when 67 food becomes scarce and pheromones are at high concentrations ( Fig. 1A) (Harvey, 2009;68 Milward et al., 2011). 69 70 71 accumulated. By the end, food is scarce and pheromone concentration is even higher. B. In the 75 behavioral assay, as animals feed and leave from a food patch, they are presented with the choice 76 between a spot containing the pheromone blend and a spot containing a control solvent. In the two 77 spots sodium azide is added in order to anesthetize the animals and prevent them from leaving the 78 chosen spot. C. Individual worms leave the food patch at different times. The average number of 79 worms that abandoned the food patch at each hour is shown (mean worm count  SEM across 80 replicates, n. experiments = 2). D. Animals leaving the food patch earlier prefer the pheromone blend 81 while those leaving later, when the food is almost depleted, avoid the pheromone blend. In the plot, 82 chemotaxis index is calculated on the number of naïve MY1 young adult hermaphrodites that, at each 83 hour, reach the two spots (mean CI  SEM across replicates, n. experiments = 2, 12 replicates each).

84
The red region in each plot approximately indicates when food in the patch is exhausted.

85
In the present study, we experimentally investigated the behavioral responses of C. 86 elegans to food depletion and pheromone accumulation in food patches. We confirmed that 87 individual worms consuming a food patch leave at different times, and we found that worms 88 7 worms have an incentive to switch to the other occupied patch during the initial phase (blue 138 area in Fig. 2B). 139 How many worms should then switch? If we assume that worms attempting to switch 140 may in fact end up in any of the occupied patches (including the initial one) with equal 141 probability, then all worms should attempt to switch. This result is independent of any other 142 parameters, such as number of patches or initial distribution of worms (see Supplement). If 143 we assume that switching to other occupied patches is costly, then the optimal switching 144 probability will be lower, but the predictions of the model remain qualitatively unaltered (see 145 Supplement). This model therefore predicts an Evolutionary Stable Strategy (that also 146 happens to maximize food intake) in which some worms leave a patch before it is depleted 147 and follow the pheromone cue ( Fig. 2A). This initial phase helps equalize worm occupancy 148 and feeding across food patches. 149 Once worm numbers are equalized in the two easy-to-find food patches, worms feed 150 until the food becomes scarce. At this point, worms benefit from leaving the depleted patches 151 (gray area in Fig. 2B) and avoiding pheromones, since pheromones now mark depleted food 152 patches. The inversion of pheromone preference therefore helps worms to disperse to 153 unoccupied food patches. This simple model thus predicts both different leaving times and the 154 inversion of pheromone preference and highlights that, together, these phenomena might 155 maximize food intake of worms foraging in a patchy environment.

162
During the first phase, worms equalize occupancy the occupied patches. Then, all worms stay in their 163 patches until food becomes scarce. In this last phase, worms benefit from dispersing to the unoccupied 164 patch avoiding pheromone cues. This would be favored by a change in pheromone preference. B.

165
Instantaneous feeding rates for the scenario in panel A. Dashed lines indicate the feeding rate in case 166 each individual remains in its original patch (red the overcrowded one and orange the undercrowded 167 one). Solid lines indicate the feeding rate of worms that switched to the other occupied food patch 168 following pheromones, with the thickest line indicating when this is coupled with dispersing to the 169 unoccupied food patch by avoiding pheromones (optimal strategy).

170
Nevertheless, the model does not encode any specific mechanism underpinning the 171 inversion of pheromone preference. The most parsimonious explanation is that animals 172 leaving the patch earlier might differ from worms leaving later simply due to their feeding 9 status. Indeed, early-leaving worms abandon the food patch when food is still abundant and 174 therefore, they are more likely to be well-fed. By contrast, worms leaving later-when the 175 food is scarce-are more likely to be famished. 176 However, worms leaving earlier are also exposed to pheromones in the presence of 177 abundant food, while worms leaving later experience high levels of pheromones in association 178 with scarce food. These conditions are analogous to those that have been shown to support 179 associative learning in C. elegans (Ardiel and Rankin, 2010). Similarly to the well-known case 180 of associative learning with salt (Hukema et al., 2008;Saeki et al., 2001), in our experiment 181 worms could be initially attracted to pheromones because of the positive association with the 182 presence of food. Attraction could later turn into repulsion if worms start associating 183 pheromones with food scarcity. 184 To distinguish between the change in pheromone preference being caused by feeding 185 status alone or by associative learning, we performed experiments in which young adult 186 hermaphrodites were conditioned for five hours in the four scenarios corresponding to the 187 combinations of +/-food and +/-pheromone blend. After conditioning, animals were assayed 188 for chemotaxis to the pheromone blend (see Materials and methods section, Fig. 3A and S1B). 189 We found that worms go to the pheromone blend when they are conditioned with + food + 190 pheromone blend whereas they avoid it when they are conditioned with -food + pheromone 191 blend (Fig. 3B, blue and yellow bars, mean CI ++ = 0.38  0.07 vs mean CI -+ = -0.15  0.04). 192 Interestingly, worms conditioned without the pheromone blend do not exhibit a particular 193 preference for their pheromones (Fig. 3B, red and turquoise bars, mean chemotaxis index for 194 the + food -pheromone blend and the -food -pheromone blend scenarios are 0  0.07 and -195 0.02  0.06, respectively). Worms therefore exhibit attraction when pheromones are paired 196 with abundant food and aversion when pheromones are associated with absence of food. 197 Otherwise, C. elegans does not show a specific preference for pheromones. These findings are 198 consistent with the hypothesis that the C. elegans preference for the pheromone blend 199 changes due to associative learning. 200 Conditioning in the two scenarios without pheromone blend added had to be 201 performed at low worm density due to uncontrolled pheromone accumulation. Indeed, when 202 conditioned at high worm density, animals in the + food -pheromone blend scenario were still 203 exposed to the pheromones that they kept excreting during the 5-hour conditioning period 204 inset, turquois bar). The variation here is even bigger, likely due to the fact that the 208 pheromone cocktail produced by starved worms can be different from the pheromone blend 209 we used, which was obtained from well-fed worms (Kaplan et al., 2011). 210 The outcome of this series of experiments with the pheromone blend can be 211 recapitulated with pure synthetic ascarosides (Fig. S2). This allowed us to address the fact 212 that the pheromone blend contains, in addition to a cocktail of ascarosides, other products of 213 worm metabolism, compounds deriving from the decomposition of dead worms and bacteria, 214 and perhaps other unknown substances. Overall, these results provide additional evidence 215 that it is associative learning with ascaroside pheromones that underlies the inversion of 216 pheromone preference observed in our original foraging experiment (Fig. 1).

232
To provide further support that the C. elegans preference for pheromones can change 233 through associative learning, we asked whether the change in preference occurs also via the 234 association with a repellent compound, namely glycerol (Hukema et al., 2008). To answer this 235 question, we performed a learning experiment in which young adult hermaphrodites were 236 conditioned for one hour in four different scenarios deriving from all the possible 237 combinations of +/-repellent (glycerol) and +/-pheromone blend. During conditioning, 238 animals are free to dwell in a plate seeded with E. coli OP50, and therefore they are always 239 exposed to a high concentration of bacterial food. Here, uncontrolled pheromone 240 accumulation was not an issue thanks to the short conditioning period. After conditioning, 241 worms are tested for chemotaxis to the pheromone blend (

258
We found that the preference for the pheromone blend, which is retained in the -259 repellent + pheromone blend scenario ( red and turquois bars respectively). In other words, animals do not exhibit a particular 13 preference for pheromones, except when they are exposed to pheromones and food (in the 265 absence of the repellent). Exposure to the repellent in the presence of food and pheromones is 266 required to disrupt attraction. The outcome of this experiment provides further support that 267 C. elegans can change its preference for the pheromone cocktail it produces through 268 associative learning. 269

Discussion 270
We have assessed the response of C. elegans to food depletion and how this influences worms' 271 response to their pheromones. In agreement with previous studies, our findings indicate that 272 worms exhibit different leaving times when feeding in groups on transient bacterial food 273 patches. Interestingly, the leaving time affects C. elegans preference for its pheromones, with 274 animals leaving early being attracted to their pheromones and worms leaving later being 275 repelled by them. We showed that this inversion from attraction to repulsion depends on 276 associative learning and appears to be an adaptive solution to optimize food intake during 277 foraging. 278 Our model shows that a change from pheromone attraction to repulsion is required to 279 optimize food intake when three different factors are combined. First, food patches that give 280 diminishing returns, which should be abandoned when the environment provides a better 281 average intake rate. This first factor has been thoroughly studied both theoretically and 282 experimentally in the context of optimal foraging and the marginal value theorem (Eric L. 283 Charnov, 1976;Krebs et al., 1978;Oaten, 1977;Stephens and Krebs, 1987;Watanabe et al., 284 2014), and in this respect our model simply reproduces previous results. 285 The second factor is competition for limited resources, which in our model creates the 286 need to switch between pheromone-marked food patches in order to distribute the 287 individuals more evenly. This redistribution closely resembles the Ideal Free Distribution, 288 which postulates that animals should distribute across patches proportionally to the 289 resources available at each source (Bautista et al., 1995;Fretwell and Lucas, 1969;Houston 290 and McNamara, 1987;Kennedy and Gray, 1993). However, here, our model does depart from 291 previous studies. The Ideal Free Distribution applies to cases in which the benefit per unit 292 time decreases with the number of individuals exploiting the same resource. This is the case 293 for habitat choice (where the distribution was first proposed, Fretwell and Lucas, 1969), or if 294 the instantaneous feeding rate decreases with the number of feeders (Houston and McNamara, 295 1987). It is not however the case in many foraging scenarios, including the one represented by 296 our model (and implicitly by most optimal foraging models), in which animals can feed 297 unimpeded by each other. In these cases, a higher number of animals simply means that the 298 resource is depleted faster (this can be seen in Fig. 2B: At time t=0, animals feed at the same 299 rate in both food patches). Simply adding competition to standard optimal foraging models 300 will not change their results qualitatively. Animals will stay in each food source until the food 301 is so scarce that the instantaneous feeding rate falls below the environment's average. This 302 will happen earlier for more crowded food sources, but animals will never need to switch 303 across food sources before they are depleted. 304 The third key factor in our model is non-stationarity: We assume that all pheromone-305 marked food patches were colonized and will be depleted at roughly the same time. This fact 306 creates the need to switch before the current patch is depleted, because by then most of the 307 benefit from undercrowded (but pheromone-marked) food patches will be gone. This non-308 stationary environment has received less attention than the previous factors. It is typical of 309 species with boom-and-bust life cycles such as C. elegans (Frézal and Félix, 2015), but may 310 also be applicable to other cases, such as migratory species (which arrive synchronously to a 311 relatively virgin landscape), fast-dispersing invader species or, in general, species that occupy 312 a non-stationary ecological niche. 313 temperature, oxygen and carbon dioxide levels) and from other individuals (pheromones) to 315 efficiently navigate their habitat. An important evolutionary adaptation in this regard is that 316 the C. elegans preference for each of these stimuli can change through experience, including 317 acclimation (Fenk and de Bono, 2017) and associative learning phenomena (Ardiel and 318 Rankin, 2010;Colbert and Bargmann, 1995;Rankin, 2004). We have identified associative 319 learning as the most plausible phenomenon underpinning the change in pheromone 320 preference. During feeding, worms learn to give a positive or negative preference to 321 pheromones depending on the context in which they experience them, in particular the 322 presence or absence of food (Wyatt, 2014). A similar learning process occurs in bumblebees 323 that, in their natural habitat, do not land or probe flowers that have been recently visited and 324 marked by chemical footprints left by themselves or other bees. It has been shown that only 325 experienced foragers, i.e. those that learnt to associate the chemical footprints with the 326 absence of nectar in marked flowers, can successfully avoid them and increase their overall 327 nectar intake (Ayasse and Jarau, 2014). This suggests that associative learning based on 328 pairing pheromones or similar chemical signals with food availability might be frequently 329 observed in animals feeding in groups, not only eusocial insects, as a strategy to increase food 330 intake. 331 We have shown that dispersal of feeding stages of C. elegans from occupied patches is 332 regulated by the recent experience of food availability and pheromones, which indicates, at 333 any time, whether it is better to follow the scent of pheromones or to avoid it. A mechanism 334 based on the synergistic interaction between food and pheromones also regulates C. elegans 335 dispersal over longer time scales and, in general, its boom-and-bust life cycle (Edison, 2009;336 Frézal and Félix, 2015). Indeed, scarce food and high concentration of pheromones promote 337 the entry into a resting stage (the dauer larva), allowing worms to survive unfavorable 338 seasons and disperse to uncolonized rotten material, where abundant food, in turn, resumes 339 development to adulthood (Frézal and Félix, 2015). Our findings establish an interesting 340 parallel between mechanisms promoting dispersal over short and long temporal scales and 341 highlight the important role that non-dauer stages play in exploiting transient bacterial 342

patches. 343
As a final remark, our results suggest that C. elegans preference for pheromones might 344 not be innate, as it was previously stated (Greene et al., 2016;Macosko et al., 2009;Pungaliya 345 et al., 2009;Simon and Sternberg, 2002;Srinivasan et al., 2012Srinivasan et al., , 2008 and question what it 346 means to be a naïve worm. Worms that we call "naïve" are directly assayed for chemotaxis 347 after being simultaneously exposed to both bacterial food and ascaroside pheromones, which 348 are continuously excreted by the animals during their growth (Kaplan 2011). Hence, it is 349 possible that the attraction that "naïve" worms exhibit is due to the positive association with 350 food that they learn to make during growth on the plate.  (76)

Strains and culture conditions 484
We used a Caenorhabditis elegans strain recently isolated from the wild, MY1 (Lingen, 485 Germany). The strain has been obtained from the Caenorhabditis Genetic Centre (CGC). 486 Animals were grown at 21-23 °C (room temperature) on nematode growth media (NGM) 487 plates (100 mm) seeded with 200 l of a saturated culture of E. coli OP50 bacteria (Stiernagle, 488 2006). As for OP50 culture, a single colony was inoculated into 5ml of LB medium and grown 489 for 24 h at 37 °C. 490

Pheromones 491
We obtained the crude pheromone blend by growing worms in liquid culture for 9 days (at 492 room temperature and shaking at 250 rpm) (Von Reuss et al., 2012). Individuals from one 493 plate were washed and added to a 1-liter flask with 150ml of S-medium inoculated with 494 concentrated E. coli OP50 pellet made from 1 liter of an overnight culture. Concentrated E. coli 495 OP50 pellet was added any time the food supply was low, i.e. when the solution was no longer 496 visibly cloudy (Stiernagle, 2006). The pheromone blend was then obtained by collecting the 497 supernatant and filter-sterilizing it twice. A new pheromone blend was produced every 3 498 months. Pure synthetic ascarosides (ascr#5 and icas#9) were obtained from the Schroeder 499 lab and kept at -20°C in ethanol. Each time an experiment was performed, an aqueous 500 solution at the desired molar concentration was prepared (10 M for ascr#5 and 10 pM for 501 icas#9). The control solvent for the pheromone blend is S-medium, while the control solvent 502 for the pure ascarosides is an aqueous solution with the same amount of ethanol present in 503 the ascaroside aqueous solution (Srinivasan et al., 2012). 504

Choice after food assay 505
It is a chemotaxis assay modified from Bargmann et al. (1991) and Saeki et al. (2001), 506 performed on naïve worms that encounter a food patch before making the choice between the 507 pheromone blend and the control solvent. We used 100 mm NGM plates in which we 508 deployed 20 l of the pheromone blend, 20 l of control solvent and 15 l of a diluted OP50 E. 509 coli culture at equal distance from each other (Fig. S1A). In the pheromone and control spots, 510 2 l of 0.5 M sodium azide was added in order to anaesthetize the animals once they reached 511 the spots. Since the anesthetic action of sodium azide lasts for about 2 hours in this set-up, 512 another 1l was added two hours after the beginning of the assay in both spots. ~200 naïve 513 animals were placed close to the patch of bacteria, so that they stop and feed in the patch 514 before they chemotaxis towards the two cues. Worms are left to wander freely on the assay 515 plate for 5 hours. The number of worms around the two spots was counted every hour and 516 the chemotaxis index was calculated based on the number of new worms that reached the two 517 spots during each hour. 518

Chemotaxis assay 519
Chemotaxis assay has been performed in 60 mm NGM plates, in which worms are given the 520 choice between pheromone (either 20 l of the pheromone blend or 20 l of a pure ascaroside 521 in aqueous solution) and a control solvent (20 l) (Bargmann and Horvitz, 1991;Saeki et al., 522 2001). The two spots are deployed ~3 cm apart from each other (Fig. S1B). Shortly before the 523 start of the assay, 1 l of 0.5 M sodium azide is added to both spots in order to anaesthetize 524 the animals once they reach the spots. ~50 animals are placed equidistant from the two spots 525 and left to wander on the assay plate for 1 hour at room temperature (Fig. S1B). The assay 526 plates were then cooled at 4°C and the number of worms around each spot was counted using 527 a lens. The chemotaxis index is then calculated as To keep the concentration constant, when the pheromone blend was not added, we diluted 550 OP50 with 200 l of S-medium. Animals stay in the conditioning plates for one hour at room 551 temperature before being assayed for chemotaxis to the pheromone blend. In the experiments 552 with pure ascarosides ascr#5 and icas#9, the four different scenarios derive from all the 553 possible combinations of +/-food and +/-pure ascaroside (in aqueous solution) and are 554 prepared as the experiment with food and the pheromone blend. However, the concentration 555 of ascaroside that was added in the conditioning plate was higher than the concentration at 556 which the worms were tested for chemotaxis (for ascr#5 was 10 M, while for icas#9 was 10 557 pM icas#9) to compensate for the diffusion of the ascaroside throughout the agar in the 558 conditioning plates. Ascr#5 was added at a concentration of 100 M onto conditioning plates, 559 while icas#9 was added at a concentration of 1 M. Worms spend 5 hours in the conditioning 560 plates at room temperature, after which they are assayed for pheromone chemotaxis. 561

Supplementary data for: 562
Inversion of pheromone preference optimizes foraging in C. elegans 563 564 Figure S1. Layout of plates for chemotaxis assays. A. Choice after food assay: 100 mm petri 565 dish filled with 25 ml of NGM. In blue, the spot with 20 l of the pheromone blend, in grey the 566 spot with 20 l of the control solvent and in brown the food patch, 15 l of a diluted E. coli 567 OP50 culture. In the pheromone and control spots, 2 l of 0.5 M sodium azide was added in 568 order to anaesthetize the animals once they reached the spots. Since the anesthetic action of 569 sodium azide lasts for about 2 hours in this set-up, another 1l was added two hours after the 570 beginning of the assay in both spots. B. Chemotaxis assay: 60 mm petri dish filled with 10 ml 571 of NGM. In blue, the spot with 20 l of either pheromone blend or pure synthetic ascarosides; 572 in grey the spot with 20 l of control solvent. In both spots, 1 l of Na azide 0.5M is added to 573 paralyze the worms once they reached the cue. Worms are placed equidistant from the two 574 spots. 575 27 576 577 Figure S2. Changes in the preference for pure ascarosides, ascr#5 and icas#9, are likely 578 to depend upon associative learning. A. Worms grow at high density and with plenty of 579 food until young adult. Animals are then transferred to conditioning plates, where they spend 580 5 hours, before being assayed for chemotaxis to the pure ascaroside. B. Attraction is turned to 581 repulsion by simultaneously pairing pure ascarosides with absence of food (associative 582 learning). Chemotaxis index is shown for the four different conditioning scenarios: + food + 583 ascaroside (blue bars); -food + ascaroside (yellow bars); + food-ascaroside (red bars); -food 584 -ascaroside (turquois bars). Points indicate the outcome of each independent replicated 585 experiment (n=4 for each ascaroside) while bars indicate mean CI  SEM across independent 586 experiments. 587 588 28 Foraging model 589 We assume that two types of food patches exist: 590 -Food patches marked with pheromones, which have a high average value (they are 591 capable of sustaining worm growth and are easy to find).

592
-Unmarked food patches, which have a low average value as they are more difficult to 593 find). 594 Initially, individuals are distributed across the pheromone-marked patches. Let be the 595 number of patches, the number of individuals in the -th patch (for = 1,2 … ), and the 596 total number of individuals (so = ∑ =1 ). 597 At any time, individuals can take three possible actions: Remain in the current patch, switch 598 to another pheromone-marked patch (so they leave the patch and follow pheromones), or 599 disperse and search for an unmarked patch (so they leave the patch and avoid pheromones). 600 Individuals' instantaneous feeding rate ( ) depends on their choices. Let's start with the 601 choice of dispersal. To model this decision we borrowed the results of classical foraging 602 models from which the Marginal Value Theorem was derived (E L Charnov, 1976). These 603 models describe an individual depleting a food patch, whose environment contains other food 604 patches that remain stationary (i.e. on average the other food patches are not being depleted 605 over time). We also assume that the unmarked food patches remain stationary. In these 606 conditions, one can compute an average expected intake rate from dispersing and searching 607 for unmarked patches, which we will call . This average intake rate takes into account the 608 average quality of the unmarked food patches and the time needed to find and consume them. 609 The optimal strategy is to remain in the current food patch until the instantaneous feeding 610 rate ( ( )) falls below (E L Charnov, 1976). Following these models, we assume that any 611 individual that disperses will experience a constant instantaneous feeding rate . 612 While we can use the formalism of classical foraging models for the dispersal decision, we 613 cannot do the same for the switching decision, because the pheromone-marked food patches 614 are non-stationary (they all get depleted at roughly the same time, a feature characteristic of 615 species with a boom-and-burst life cycle such as C. elegans). We will therefore model explicitly 616 food depletion in all pheromone-marked patches. 617 We assume that individuals at a pheromone-marked food patch feed at a rate proportional to 618 the amount of food left in the patch: ( ) = ( ), 619 where ( ) is the amount of food available at the 620 food patch at time . 1 Therefore, food patches get 621 depleted over time as ( ) = 0 − , where 0 is 622 the initial food density in the pheromone-marked 623 patches and is the number of individuals in the 624 patch. 2 625 Individuals that switch pay a cost for switching.

626
We assume that switching is fast compared to the 627 depletion rate of the food patches, so switching is 628 instantaneous in our model. Individuals that switch 629 will then arrive to any pheromone-marked food 630 1 In general, we have ( ) = ( ), where is a constant. But we can make = 1 without loss of generality (it simply amounts to re-scaling the units of time). 2 Proof: If worms occupy a patch, and each worm feeds at a rate ( ) = ( ), then the food will be depleted at a rate = − . Assuming that mi remains constant over time, the solution to this differential equation is ( ) = 0 − , where 0 is the initial food density.

Notation index
0 : Initial food density in the food patches ( ) : Amount of food at the -th food patch at time .
: Cost of switching ( ): Instantaneous feeding rate : Average instantaneous feeding rate after dispersal : Total food intake. : Payoff (total food intake minus cost) 〈 〉: Expected payoff Δ : Benefit of switching, ∆ = 〈 〉 ℎ − 〈 〉 : Number of food patches : Number of worms in the i-th food patch after the switch (so for any t>0). In the ESS these numbers remain constant until worms start to disperse.
: Initial number of worms in the i-th food patch (before any worm switches or disperses) : patch with equal probability (including their initial one). 631 We assume that evolution has maximized the total food intake, which is the integral of the 632 instantaneous intake rate ( ( )) over a long period of time. The exact length of this period 633 does not actually matter, because in all relevant cases we will be comparing strategies that 634 end with dispersal, and therefore get the same intake rate at the end. We will always work 635 with differences between the payoffs of these strategies, so these final periods will cancel out. 636 Therefore, for simplicity we will always integrate to = ∞. 637 Finally, we assume that individuals have strong sensory constraints: They only perceive their 638 instantaneous feeding rate ( ( )), not having information about any of the other parameters 639 (number of patches, number of individuals per patch, etc.). However, their behavior can be 640 adapted to be optimal with respect to the average values of these parameters over the 641 species' evolutionary history. 642 In these conditions, the following Evolutionary Stable Strategy (Maynard Smith, 1982, 1974 exists: At time = 0, all individuals have a probability * of switching (so a fraction * of the 644 individuals will switch). Then they all remain in the food patches until their instantaneous 645 feeding rate falls below , at which point they disperse. 646

Proof 647
We will prove each part of the Evolutionary Stable Strategy separately: 648 1. Individuals will not disperse until the food patches are depleted 649 Dispersing gives an instantaneous average payoff of , so individuals should never disperse 650 if their instantaneous intake rate is above (i.e. if the food density in their current patch is 651 ( ) > ). 652 2. The probability to switch ( ) has a stable equilibrium ( * ) 653 If all individuals follow the Evolutionary Stable Strategy, at time = 0 a fraction of them 654 switches, changing the distribution of individuals across food patches. Let 1 , 2 … be the 655 number of individuals in each food patch after the switch. These numbers are related to the 656 initial distribution as 657 which is the number of individuals that remained in the -th patch plus the number of 658 individuals that arrive to the -th patch after the switch. 659 After the switch, all individuals will remain in their new food patch until the instantaneous 660 feeding rate reaches . This will happen at time , = ( 0 / ) for the i-th food patch. It's 661 now convenient to split the calculation of the total intake ( ) in the two periods before and 662 after dispersal. Then, for an individual that spends its time between the switch and the 663 dispersal at the -th patch, the total intake is 664 ( Note that the solution to the first integral is just the amount of food eaten in the patch 665 ( 0 − ), distributed equally across the individuals populating it. 666 Now we can compute the expected payoff for each decision (〈 〉), which is the expected total 667 food intake minus any costs incurred by the behavior. Individuals that switch have an equal 668 probability of ending up in any of the food patches, so their expected payoff is simply the 669 average of the payoffs across the food patches minus the cost of switching: 670 In contrast, individuals that remain have a probability / of being in the -th patch, so their 671 expected payoff is 672 We now compute the benefit of switching, 673 It is now convenient to define 674

675
, which is the deviation in the initial number of individuals from the average number of 676 individuals in every food patch. We also substitute according to Equation 1, getting 677 The equilibrium value of , or * will be such that Δ = 0, so 678

680
We did not find a simple analytical expression for the value of * , but we can make several 681 observations:

682
-If all Δ are zero, the first term of Δ is always zero, so Δ ≤ 0 and switching is never 683 advantageous (therefore, * = 0). This makes intuitive sense: If all Δ are zero, the 684 individuals were initially distributed in the optimal way (equally distributed across the 685 food patches), so switching cannot bring any benefit.

686
-If = 0, then * = 1 regardless of the value of the rest of the parameters ( . This is always negative as long as > , because is always positive and all terms inside the sum are squared.

31
<-0 −ℎ ∑ ∆ =1 , then * is greater than 0 and a fraction of the population will switch. If 696 , then * = 0. 697 In the equilibrium, no mutant has an incentive to deviate from its strategy, since both 698 switching and remaining give the same payoff. Furthermore, the equilibrium is stable: When 699 > * , Δ becomes negative, meaning that individuals that switched get lower payoff than 700 individuals that remained, and pushing the population towards lower . Conversely, when 701 < * , individuals that switched have an advantage and the system is pushed towards higher 702 . 703 3. Individuals must not switch more than once 704 Individuals that switched at have the same probability of being in every food patch. A new 705 switch will leave these probabilities unchanged 4 , so will not affect the expected payoff. 706 Therefore, individuals have no incentive to switch more than once. 707 4. Individuals must switch at = 0. 708 A mutant that delays the switch to some later time > 0 will spend its time before the switch 709 in an overcrowded patch (on average) and will therefore get lower final payoff than the wild-710 type that switches at time = 0. Let's see it mathematically, comparing the expected payoff 711 for switching at = 0 and the expected payoff for switching at = : , which is always positive 5 . Therefore, switching at = 0 is advantageous. 714 5. Individuals must disperse once their current food patch is depleted 715 4 We assume that the population is large enough so that a single mutant does not alter the distributions significantly. , where Δ is defined as in Equation (3), and we define = 1− − . We will show first that Δ and are perfectly anticorrelated (i.e. if Δ > Δ , then < for any , ). Then, we will show that this implies that ∑ ∆ =1 must be negative. and are perfectly anticorrelated: Both Δ and depend on . Let's see that their derivatives with respect to it have opposite signs: From Equation ( . Now, given that all the Δ in the first sum are greater than all the Δ in the second, and that Δ and are perfectly anticorrelated, all the in the first sum must be smaller than all the in the second. Therefore, we can find a number 0 which is in the middle of the two groups of , so that ∑ ∆