Adaptation of Drosophila larva foraging in response to changes in food resources

All animals face the challenge of finding nutritious resources in a changing environment. To maximize lifetime fitness, the exploratory behavior has to be flexible, but which behavioral elements adapt and what triggers those changes remain elusive. Using experiments and modeling, we characterized extensively how Drosophila larvae foraging adapts to different food quality and distribution and how the foraging genetic background influences this adaptation. Our work shows that different food properties modulated specific motor programs. Food quality controls the traveled distance by modulating crawling speed and frequency of pauses and turns. Food distribution, and in particular the food–no food interface, controls turning behavior, stimulating turns toward the food when reaching the patch border and increasing the proportion of time spent within patches of food. Finally, the polymorphism in the foraging gene (rover–sitter) of the larvae adjusts the magnitude of the behavioral response to different food conditions. This study defines several levels of control of foraging and provides the basis for the systematic identification of the neuronal circuits and mechanisms controlling each behavioral response.

Finally, we contrasted the differences in exploratory behavior of rovers and sitters in the different homogeneous substrates (Figure 1-figure supplement 1B-G). In particular, we were interested in evaluating if sitter larvae crawled significantly less than rovers in the first five minutes of the recording in the food substrates, as previously observed in experiments using yeast substrates (Sokolowski, 1980). We did not find significant differences between the crawled distances of rovers and sitters in the substrates that we tested. Thus, when the resources are distributed homogenously, the genetic foraging dimorphism could not be detected.
In summary, we have provided a detailed characterization of larval foraging behavior in homogenous substrates with different types of food. We found that larval crawling speed and probabilities to turn and to pause are behavioral elements that are adapted according to the quality of food.

A phenomenological model of crawling describes larval exploratory behavior in patchy substrates
In ecological conditions, the fruit on which Drosophila eggs are laid and on which the larvae forage decays over time. To maximize their survival chances, and reduce competition, larvae therefore move towards food patches that are more nutritious and simulations. Horizontal line indicates median, the box is drawn between the 25th and 226 75th percentile, whiskers extend above and below the box to the most extreme data 227 points that are within a distance to the box equal to 1.5 times the interquartile range 228 and points indicate all data points. Mann-Whitney-Wilcoxon paired test two-sided. ns: 229 0.05 < p < 1, **** p < 0.0001. 230 crawling speeds of rovers and sitters measured inside (colored bars) and outside (blue 287 bars) food patches: sucrose (S, green), yeast (Y, orange) and apple juice (AJ, 288 magenta). Horizontal line indicates median, the box is drawn between the 25th and 289 75th percentile, whiskers extend above and below the box to the most extreme data 290 points that are within a distance to the box equal to 1.5 times the interquartile range 291 and points indicate all data points. D. sided was performed since the data are not normally distributed. Ns: 0.05 < p < 1, * 302 0.01 < p < 0.05, ** 0.001 < p < 0.01, *** 0.0001 < p < 0.001, **** p < 0.0001. Statistical 303 power and Cohen's size effect of non-significant comparisons is included in Table 4. 304 305 306 We tracked the trajectories with the same methods used in the homogeneous 307 environment ( Figure 3B and Figure 3-figure supplement 1A). Then, we performed the 308 analysis separately for the two different regions: inside and outside the patches, and 309 quantified features of the larval exploratory behavior. Inside yeast and apple juice 310 patches, larvae crawled significantly slower than outside them ( Figure 3C). In yeast 311 patches, both rovers and sitters executed fewer turns inside than outside ( Figure 3D). 312 All larvae made significantly more pauses inside the food patches than outside ( Figure  313 3E). We also observed that the handedness score of the larvae is less broad than in 314 the homogeneous substrates ( Figure 3F), which may be caused by reorientations that 315 are triggered to prevent the larva from exiting the food patch. As expected from the 316 phenotype, sitter larvae crawled a shorter distance in the first five minutes of the 317 recording in the yeast but also the sucrose substrates ( Figure 3G). In general, sitter 318 larvae had slower crawling speeds and executed fewer turns in the patchy 319 environments than rovers (Figure 3-figure supplement 1A, B, C). We also noticed that 320 sitters paused more inside patches than rovers (Figure 3-figure supplement 1D). 321 Outside yeast and apple juice patches, the crawling speed increased but did not return 322 to levels similar to the agar-only condition, suggesting that the behavior of larvae that 323 exit the patch is influenced by the recent food experience or that larvae might still be 324 sensing the food (Figure 3-figure supplement 1E). In line with this, in yeast the number 325 of turns outside the patch was higher than inside the patch. 326

14
Our model predicted that fraction of time spent inside patches should vary 327 according to the substrate: larvae should remain longer inside yeast patches than 328 inside sucrose patches ( Figure 2E). In particular, simulated sitter larvae stayed longer 329 than simulated rovers inside yeast patches. In the experiments, the same trend was 330 observed: for both rovers and sitters the fraction of time spent inside patches was 331 higher in the yeast compared to both sucrose and apple juice patches ( Figure 3H). 332 Sitter larvae stayed significantly longer inside yeast patches than rovers ( Figure 3H). 333 Nevertheless, the percentage of time the larvae spent inside patches in the 334 experiments was very different from our model predictions. Rover (sitter) larvae 335 remained on average 72.6% (72.3%) of the experiment inside sucrose, 85.7% (90.0%) 336 inside yeast and 75.6% (81.3%) inside apple juice patches. Those values were much 337 higher in the experiments than what we predicted with our simulations, and suggest 338 that larvae might employ other mechanisms in addition to slower crawling and more 339 frequent pauses to remain inside the food. 340 To gain more insight into the strategies used by larvae to increase the time 341 spent inside the food patches, we studied the distribution of turns in the food-no food 342 interface. First, we labeled each turn as inwards or outwards depending on whether 343 they were oriented towards or away from the patch center (Tao et al., 2020) ( Figure 3I, 344 left). We observed that inward turns occur more often than outward turns at the border 345 of the patch for the three substrates ( Figure 3B, inward turns are shown in black). To 346 control for possible mechanosensory effects due to the border edges, we prepared 347 new arenas with patches that contained no nutrients, either using the same agar that 348 composed the rest of the arena, or using ultrasound gel (Methods). Larvae in the agar-349 agar or the agar-gel border did not show any changes in their preference to turn 350 towards the patch center, confirming that the behavioral change observed in response 351 to food is specific (Figure 3-figure supplement 2). 352 We then studied the fraction of turns towards the patch center as a function of 353 the distance to the patch center ( Figure 3I, right). For the three types of substrates, the 354 bias to turn inwards was clearly manifested when the larvae experienced the patch 355 border (patch radius: 25 mm, distance bin: 20-30 mm) ( Figure 3J). The bias persisted 356 when the larva exited the patch (distance bins: 30-40, 40-50, 50-60 mm). We did not 357 consider further distance bins in our analysis because most larvae did not reach those 358 locations in our experiments. 359 Therefore, our model predictions do not seem to be well supported by 360 experiments with patchy substrates. In particular, we conclude that when larvae reach 361 the food-no food interface their turning behavior changes. This is accomplished by 362 turning towards the patch center while maintaining the handedness ( Figure 3J and 363 to allow larvae to locate food sources in the environment (Vosshall and Stocker, 2007). 373 We next wondered how much of the tendency to turn towards the patch center once 374 outside the patch could be attributed to processing olfactory cues. 375 Thus, we repeated the patchy experiments with mutant anosmic larvae, where Orco, 376 the obligatory co-receptor for all olfactory neurons, apart the CO2 sensing ones, is 377 mutated (Vosshall and Stocker, 2007) and tested if they show the same distant-378 dependent bias when exploring the patchy substrate. 379 Anosmic larvae extensively explored the patchy substrate ( Figure 4A). In 380 general, they exhibited a small difference in crawling speeds when comparing their 381 behavior inside vs. outside of food patches ( Figure 4B). Curiously, this difference in 382 speeds was non-significant inside vs. outside yeast patches. We also found that the 383 fraction of pauses of anosmic larvae in yeast patches was smaller than that of rovers 384 and sitters ( Figure 3G and Figure 4D). This suggests that yeast patches are not 385 attractive to anosmic larvae, in agreement with the lower fraction of time spent inside 386 yeast patches relative to sucrose and apple juice patches ( Figure 4F). yeast, bottom: apple juice. The distance bin that includes the patch radius is highlighted 402 in yellow. Mann-Whitney-Wilcoxon test two-sided was performed since the data are 403 not normally distributed. Ns: 0.05 < p < 1, ** 0.001 < p < 0.01, *** 0.0001 < p < 0.001, 404 **** p < 0.00001. Statistical power and Cohen's size effect of non-significant 405 comparisons is included in Table 4. 406

407
Next, we investigated if anosmic larvae can bias their turns at the patch border 408 interface without navigating odorant cues. Turns in the trajectory were labeled as 409 inwards or outwards (as in Figure 3I) and the fraction of turns towards the patch center 410 was analyzed as a function of the distance away from the patch center. In sucrose and 411 apple juice substrates, anosmic larvae consistently increased the fraction of inward 412 turns near the patch border (20-30 mm; Figure 4G). This was not the case in the yeast 413 patches, where no bias was detected at the patch border. 414 In sum, we found that anosmic larvae, apart from on yeast, trigger turns towards 415 the patch center at the food-no food interface, suggesting that olfaction is not the only 416 mechanism responsible for the turning bias that increases the fraction of time larvae 417 spend inside patches. 418 Taste very likely influences the probability that larvae remain in the patches. To 419 control for the diffusion of nutrients (sucrose and apple juice) at the edge of a patch, 420 we evaluated the maximum distance at which an increased fraction of turns toward the 421 center was significantly different when compared to the yeast non-responsive anosmic 422 control. At a distance greater than 0.5 cm from the edge, anosmic larvae on sucrose, 423 apple juice, and yeast were indistinguishable, suggesting that diffusion has a limited  Therefore, biased orientations at the patch border are an important mechanism 450 employed by larvae to return to a food source when they detect a change in the 451 substrate quality. This can be achieved without olfactory orientation cues, since 452 anosmic animals can also perform biased turns ( Figure 4G). However, the ratio of time 453 that simulated larvae remain inside patches was still smaller than that measured in the 454 experiments ( Figures 3H and 4F). We reason that other mechanisms, such as working showing inward turn (CW) being selected by the simulated larva. By selecting inward 462 turns, the trajectory approaches the patch center. B. Spatial-dependent probability of 463 turning towards the patch center. Each region is a concentric circle with a fixed 464 probability of drawing inward turns (see Figure 3I, right We next used our model to investigate how a further fragmentation of the food patches 486 affects the ability of larvae to stay in patches where they can feed. To test we fixed the 487 total area of food S and varied the number of patches choosing the center coordinates 488 for each patch randomly ( Figure 5E). We tested 7 levels of fragmentation from 1 to 64 489 patches and to compensate for different patch radii, we adjusted the distance- Sample simulated trajectories for sitter and rover larvae exploring in eight patches: 533 sucrose patch (green), yeast patch (orange). B. Sample experimental trajectories of 534 rover and sitter larvae in an arena with eight patches of food. Three random 535 distributions (exp1; exp2; exp3) were used for each type of food: sucrose patches 536 (green), yeast patches (orange). C. Fraction of time spent inside patches of rovers 537 (darker colors) and sitters (lighter colors) on sucrose (green) and yeast (orange). 538 Horizontal line indicates median, the box is drawn between the 25th and 75th 539 percentile, whiskers extend above and below the box to the most extreme data points 540 that are within a distance to the box equal to 1.5 times the interquartile range and 541 points indicate all data points. D. Average fraction of time spent inside patches of 542 distinct substrates (sucrose, green; yeast, orange) for rovers and sitters as a function 543 of the number of patches. Data represent mean + standard deviation. E. Same as D. 544 but for the average fraction of visited patches. ANOVA test was performed for C and 545 D (normally distributed) and Mann-Whitney-Wilcoxon paired for E (non-normally 546 distributed). Ns: 0.05 < p < 1, * 0.01 < p < 0.05, ** 0.001 < p < 0.01, **** 0.00001 < p < 547 0.0001. Statistical power and Cohen's size effect of non-significant comparisons is 548 included in Table 4. 549 550 23 A first comparison of the trajectories of simulated and experimental larvae exploring 551 in an environment with eight patches shows great similarity ( Figure 6A,B). As predicted 552 by the model, both rovers and sitter spent half of the time inside patches when the area 553 of food was divided in eight compared to two patches ( Figure 5F and 6C,D). 554 Furthermore, the larvae stayed longer on the yeast patches compared to the sucrose 555 ones ( Figure 6C,D), supporting the prediction of the model that larvae will spend less 556 time in less nutritious patches irrespective of the number of available patches. 557 We then analyzed the effect of food quality on the proportion of patches visited by 558 the larvae. There were no significant differences comparing the larvae in yeast and 559 sucrose apart for rover in yeast for two patches. In this case, the model had predicted 560 a difference between yeast and sucrose that is not present experimentally, probably 561 because the larvae spend more time on the patches than what the model predicted via 562 other mechanisms. However, it is clear that larvae spent more time looking for new 563 patches (outside patches, Figure 6C,D) when the quality of food was lower (in sucrose) 564 compared to higher quality (yeast), but they did not reach more patches in our 565 experimental timeline. It is possible that having left a source of poor food, the larvae 566 were more interested in exploring in search of food of better quality. 567 568 Finally, we were particularly interested in testing the prediction that larvae would 569 reach a steady state in the proportion of patches visited as the food would become 570 more fragmented. This was supported by the experiments with two and eight patches 571 despite our suspicion that 572 Overall, the experiments show how larvae tune the elements of the navigation routine 573 to generate a foraging behavior that adapts to the quality and spatial distribution of 574 food resources. modeling. This allowed us to study the role of both internal and external factors on 584 foraging: i) genetics (rovers, sitters, and later orco null anosmic animals), ii) food quality 585 (agar, yeast, sucrose and apple juice) and iii) food spatial distribution (homogeneous 586 and heterogeneous environments). 587 We systematically investigated larval exploratory behavior first in experimental 588 arenas with homogeneously distributed food. Larval crawling speed, turning frequency 589 and fraction of pausing events adapted according to the quality of the food substrate 590 ( Figure 1C-E). The quality of the food had a strong impact on the distance travelled by 591 the larvae. In yeast, larvae moved less and their speed and turn frequency were 592 decreased. They also made more pauses, with the majority remaining stationary, 593 except for internal gut movements (Video 1), which suggested that they were digesting 594 the yeast. The pauses were rarely observed in sucrose, which is metabolized more 595 quickly than yeast, even when mixed with agar ( Figure 1E). 596 We observed that larval trajectories often had a circular shape, revealing an 597 individual preference for a given turning direction in the absence of direction cues, 598 which we quantified as the larval handedness ( Figure 1B To quantify the food exploitation, we measured the fraction of the time each larva spent 617 inside the patches. We found that decreasing the speed and turning frequency and 618 increasing the fraction of pauses is not sufficient to explain why larvae remain inside 619 the food for longer periods. 620

621
In experiments with patchy substrates, we found that larvae spend a longer time inside 622 food patches than predicted with our model ( Figure 3H). The lack of agreement 623 between the experiments and our model was not surprising, since the latter does not  Another sensory modality that could have influenced the larval behavior at the food-no 655 food interphase, is mechanosensation. We excluded the possible role of the border of 656 the patches performing experiments in patches without food (Figure 3-figure  657 supplement 2). However, when larvae are crawling, they leave a print of their denticle 658 attachment on the agar, that could inform them about their previous location and help 659 returning to the food. Overall, the differences in behavior of larvae exposed to different 660 foods, revealed the complexity of the sensory-motor processing involved in foraging. 661 One of the strengths of our phenomenological model is that it incorporates a modular 662 organization of foraging that could reflect how the crawl and turn modules are 663 controlled. First, we modelled a stochastic search where no information regarding food 664 is available outside of the current location, because food is absent or because the 665 larvae cannot sense it. This corresponds to an autonomous search behavior 666 implemented by circuits located in the ventral nerve cord without input from the brain 667 food quality is lower ( Figure 5G). In natural environments, this would enhance the 696 chances that larvae will eventually find a better food source in the surroundings. Our 697 experiments show a slightly different picture, where larvae indeed explore for a longer 698 period when on less nutritious food but the number of patches they find is not increased 699 compared to when they are on a more nutritious food (Fig 6C-D). It is possible that 700 having left a poor food source, the larvae are more likely to continue looking for a more 701 nutritious one, in the short term, instead of visiting and exploiting a new poor patch. The differences we found in the foraging behavior of rovers and sitters are not as 707 drastic as previously reported, where the length of the path of rovers was roughly twice 708 that of sitters when crawling in a yeast paste for five minutes (Sokolowski, 2001). In 709 the homogeneous agar, sucrose, and yeast substrates, we did not observe significant 710 differences in the path length of rovers and sitters (Figure 1-figure supplement 1). This 711 was expected for the no-food condition (agar substrate; (Kaun et al., 2007;Yang et al., 712 2000)), but not in the presence of yeast (Sokolowski, 2001). This could be attributed 713 to differences in the food preparation protocol: we applied a thin layer of yeast on top 714 of the agar surface instead of thick yeast suspension as in (Sokolowski, 1980) to allow 715 recording from underneath the food (Risse et al., 2013). Also, our experiments were 716 conducted in the dark, which might influence behavior (Sokolowski, 1980). 717 Interestingly, when the food is constrained inside patches, as done in the 718 classical work studying the foraging polymorphism, we observed significantly shorter 719 crawling paths of sitters in sucrose and yeast patches ( Figure 3G). Sitters' crawling 720 speed was also slower and they perfomed fewer turns per minute and more pauses 721    randomly generated in the modelling experiment ( Figure 6A lower panel). Using a 12.5-803 mm-radius disc we printed the patches with 25 µl of yeast solution. For sucrose 8 holes 804 were made using a cylinder and then filled with food solution. One larva was placed in 805 each patch, meaning that each larva was exposed to a different distribution of the 806 resources. The experiments were repeated 3 times. 807 Except for the choice of turning angles, the model was the same as the one described 904 above. The biased choice of turns towards the food followed the implementation in 905 (Tao et al., 2020). After drawing a turning angle from the von Mises probability 906 distribution, the turn direction was chosen such that the larva points towards the patch 907 center with probability that depends on the distance between the current position 908 relative to the center of the closest patch ( Figure 5B). When the simulated larva was 909 further than 60 mm away from the closest patch center, no bias was applied in the 910 turning direction since the data was very sparse in this region (most larvae never 911 crawled such long distances away from the patch of food in the experiments). Each We next calculated the angle the larval trajectory makes with the inward vector ⃗ 920 when turning to the left ( 2 ) or to the right ( 3 ). The inward turn is the turn that results 921 in the smallest (as shown in Figure 5A). 922

With more patches: 923
We fixed the total surface area of food to be distributed in patches as S = 2 2 , 924 where = 25 is the radius of the patches from the previous simulations and 925 experiments. Then, the radius of each th patch is given by ′ = √ / . The simulated 926 larvae started within a random food patch, and were tracked for 50 minutes. The 927 simulation parameters were kept the same as in the two patches model, except that 928 39 the distances in the distance-dependent probability to turn inwards were adjusted for 929 smaller patch radius, by multiplying the distance values by ′/ . 930

iii)
Model parameters: 931   A. Each simulated rover (left) and sitter (right) larva (bars with different color shades, N=30) has a fixed turning angle distribution with parameters corresponding to one rover/sitter from the agar experiments. N=30 simulation runs of each larva were performed in the same homogenous environment with sucrose. Horizontal line indicates median, the box is drawn between the 25th and 75th percentile, whiskers extend above and below the box to the most extreme data points that are within a distance to the box equal to 1.5 times the interquartile range and points indicate all data points. B. Same as A. but for yeast patches. C. Average fraction of time spent inside patches of rovers and sitters in agar patches, where the same parameters are used for inside and outside the patches. D. Same as A. for agar patches. Mann-Whitney-Wilcoxon paired test (samples not normally distributed). ns: 0.05 < p < 1, * 0.01 < p < 0.05, ** 0.001 < p < 0.01, *** 0.0001 < p < 0.001. A. Sample trajectories of rover larvae in patchy substrates where certain individuals visited both the two patches (sucrose, green), while others remained in the same patch for the entire duration of the experiment (yeast, orange and apple juice, magenta). Inward (outward) turns are marked in black (grey) circles. The distribution of turning directions is shown on the bottom of each trajectory. B. Left: crawling speed inside patches: sucrose (S, green), yeast (Y, orange), apple juice (AJ, magenta). Data from rover (sitter) larvae shown in darker (lighter) colors. Right: crawling speed outside patches. Horizontal line indicates median, the box is drawn between the 25th and 75th percentile, whiskers extend above and below the box to the most extreme data points that are within a distance to the box equal to 1.5 times the interquartile range and points indicate all data points. C. Average number of turns per minute inside (left) and outside (right) patches. D. Fraction of pauses inside (left) and outside (right) patches. E. Crawling speed outside patches compared to agar only. F. Percentage of larvae that switched handedness from left to right (or right to left) once they crossed the border of the patches. Mann-Whitney-Wilcoxon paired test (samples not normally distributed). ns: 0.05 < p < 1, * 0.01 < p < 0.05, ** 0.001 < p < 0.01, *** 0.0001 < p < 0.001, **** p < 0.0001.   A. Each rover/sitter larva (bars, N=15 for sucrose, N=30 for yeast and apple juice) has a fixed turning angle distribution with parameters corresponding to one rover/sitter from the agar experiments. Simulation runs were performed in the same environment with sucrose (green), yeast (orange), and apple juice (purple) patches. B. Each anosmic larva (bars, N=30 for sucrose, yeast and apple juice) has a fixed turning angle distribution with parameters corresponding to one anosmic larva from the agar experiments. N=30 simulation runs were performed in the same environment with sucrose (green), yeast (orange), and apple juice (purple) patches. Horizontal line indicates median, the box is drawn between the 25th and 75th percentile, whiskers extend above and below the box to the most extreme data points that are within a distance to the box equal to 1.5 times the interquartile range and points indicate all data points. C. Average fraction of time spent inside patches of anosmic larvae in sucrose (S, green), yeast (Y, orange), and apple juice (AJ, magenta) patches. Mann-Whitney-Wilcoxon test two-sided. ns: 0.05 < p < 1, * 0.01 < p < 0.05, ** 0.001 < p < 0.01, *** 0.0001 < p < 0.001.