Ethanol-guided behavior in Drosophila larvae

Chemosensory signals allow vertebrates and invertebrates not only to orient in its environment toward energy-rich food sources to maintain nutrition but also to avoid unpleasant or even poisonous substrates. Ethanol is a substance found in the natural environment of Drosophila melanogaster. Accordingly, D. melanogaster has evolved specific sensory systems, physiological adaptations, and associated behaviors at its larval and adult stage to perceive and process ethanol. To systematically analyze how D. melanogaster larvae respond to naturally occurring ethanol, we examined ethanol-induced behavior in great detail by reevaluating existing approaches and comparing them with new experiments. Using behavioral assays, we confirm that larvae are attracted to different concentrations of ethanol in their environment. This behavior is controlled by olfactory and other environmental cues. It is independent of previous exposure to ethanol in their food. Moreover, moderate, naturally occurring ethanol concentration of 4% results in increased larval fitness. On the contrary, higher concentrations of 10% and 20% ethanol, which rarely or never appear in nature, increase larval mortality. Finally, ethanol also serves as a positive teaching signal in learning and memory and updates valence associated with simultaneously processed odor information. Since information on how larvae perceive and process ethanol at the genetic and neuronal level is limited, the establishment of standardized assays described here is an important step towards their discovery.

Therefore, it is plausible that several studies have been able to show that D. melanogaster larvae preferentially migrate to substrates that contain ethanol. For instance, different wild-type strains derived from Australian populations revealed strong preferences for 6% ethanol [31][32][33] . Even 17% ethanol was attractive for two larval strains that were either homozygous for the Adh F or the Adh S allele 34 . Adh F and Adh S describe two functional allozymes that exist in natural populations of Drosophila species on several continents 35,36 . The polymorphism is maintained by natural selection; while Adh F is showing a higher enzymatic activity for ethanol, Adh S is more resistant to higher environmental temperatures 37 . However, there are also studies in which ethanol is not attractive to larvae 15,38,39 , which complicates the interpretation of the various results. Therefore, we analyzed ethanol guided behavior by using a set of simple and robust experimental designs.
In recent years, a set of well-defined larval behavioral assays was established to investigate substrate choice, feeding, survival, and associative learning and memory 14,18,19 . It is therefore possible to analyze how larvae react to individual chemical components of its environment. Fructose, for example, provides nutrition and acts as a positive teaching signal during learning 20,21 . On the other hand, many chemicals that humans categorize as bitter are also repulsive to the larvae (for example among others caffeine, denatonium, or quinine) and can act as a negative teaching signal (caffeine, quinine) 18,19,22,40 . Sodium chloride even proved to be dichotomous, being attractive and a positive teaching signal at low concentrations and repellent and a negative teaching signal at high concentrations 41,42 . Using a set of standardized assays, we have now addressed the effect of ethanol on larval behavior. Our results support previous studies suggesting that the odorant ethanol is attractive to larvae in a dose dependent manner at moderate naturally occurring concentrations and has a positive effect on larval survival. The larval ethanol choice is based on smell and taste. Finally, ethanol can be used in associative olfactory learning paradigms to establish appetitive memories as it provides a positive teaching signal.

Results
Drosophila melanogaster larvae are attracted to ethanol. Several studies have repeatedly shown that D. melanogaster larvae are attracted to ethanol [31][32][33][34] . However, in almost all studies there are slight differences in the applied assays, used substrates and mode of ethanol presentation. This might influence the observed results. In some cases ethanol is attractive and in others not 15,38,39 . Therefore, we first reanalyzed the attractiveness of ethanol in a widely applied standardized assay. We analyzed the preference of wild-type Canton-S to ethanol by observing their approach behavior to a substrate that contains different concentrations of ethanol (Fig. 1). The ethanol concentration ranged from 1 to 50%. Ethanol concentrations above 50% prevent the agarose plates from solidifying and thus could not be analyzed. We found that Canton-S and w 1118 larvae are attracted to ethanol in a dose-dependent manner (Fig. 1b). The attractiveness of ethanol peaked at around 4-10% ethanol for Canton-S. For 10% and 20% ethanol Canton-S-larvae showed higher preferences than w 1118 larvae. Additionally, we observed the attractiveness to 8% ethanol of the Canton-S larvae for 120 min (Fig. 1c). The attraction to ethanol remained equally stable and no sedative effect on larval locomotion was seen during this prolonged ethanol exposure. However, larvae respond differently over time to 20% ethanol. The initial attractiveness turns into an aversion after about 15 min of ethanol exposure (Fig. 1c). To investigate the influence of ethanol preexposure on the substrate choice of larvae we compared how animals reared on standard food (containing 1% ethanol) versus animals reared for one or two generations on ethanol-free food respond to 8% ethanol (Fig. 1d). Canton-S larvae grown for one or two generations on ethanol-free food preferred the ethanol containing site similar to larvae raised on standard food. These results show that D. melanogaster larvae are attracted to ethanol in a concentration-dependent manner.
Ethanol attraction changes during post-embryonic development. The life cycle of D. melanogaster comprises three larval stages (L1, L2 and L3), clearly separated by two molting stages, which occur approximately 48 and 72 h after egg laying (AEL). To understand whether ethanol choice changes during larval development, we analyzed eight groups of Canton-S larvae from 36 -120 h AEL every 12 h for their 8% ethanol attraction (Fig. 2). We chose this concentration because it was most preferred by the larvae in the first experiment (Fig. 1). Each of the tested groups showed an attraction to ethanol (Table 1). However, during the first and second molt, the preferences are reduced (Fig. 2, Table 1). Furthermore, in L3 larvae the preference decreases with age.
Ethanol has nutritional benefit for the larva. Ethanol can be used as energy source (reviewed in 43 ).
However, the nutrient gain for the larva appears to be lower, as survival rates on ethanol substrates are lower than those of adult Drosophila 44,45 and also than those of larvae on sugar diets 20 . To complicate matters, ethanol is pharmacologically active and in higher concentrations toxic and needs to be neutralized [46][47][48] . These diametrically opposed effects complicate the interpretation of ethanol-dependent survival studies. To resolve and better interpret these effects, we analyzed ethanol dependent survival under standard conditions applied for other environmental cues 18,20,23 . We put L2 Canton-S larvae in food vials (to ease comparison with previous studies [18][19][20] containing 1% agarose and either no ethanol, 4%, 8%, 12%, or 20% (Fig. 3). We calculated a survival rate by counting the number of living larvae and pupae for eight days in a 24 h cycle (Fig. 3b,c). The results show two effects: at 4% ethanol, more larvae survive than on control agarose until pupation (73.8% versus 35.8%; Fig. 3b,c, light blue line) and at higher concentration of 12% and 20% only few animals survive until pupation (21.40% and 12.40%, respectively; Fig. 3b,c, black line for 12% and dark blue line for 20%). The larval survival rates on control agarose and 8% ethanol are right in between (Fig. 3b, 44.9% versus 60.9%, green versus blue line). However, of these animals less larvae pupated on 8% ethanol in comparison to control agarose condition (Fig. 3c). To disentangle the olfactory from contact cues we refined our behavioral approach by presenting ethanol in custom-made Teflon containers with perforated lids. This eliminates a physical contact with the substrate to specifically address the olfactory response of larvae (Fig. 4). We compared the attraction of 8% ethanol to three well-known attractive odorants: 1-octanol (1-OCT), amyl acetate (AM), and benzaldehyde (BA) [15][16][17] . Canton-S larvae showed olfactory preference for all four odorants (Fig. 4b). Thus, D. melanogaster larvae perceive ethanol as an attractive olfactory stimulus. In the next step we analyzed whether the larva can detect other odorants in a homogeneous ethanol background, which is a basic requirement for further odorant-ethanol learning experi-  www.nature.com/scientificreports/ ments (Fig. 4d). Since BA triggered the greatest behavioral response, we used this stimulus to test whether larvae can still perceive it on 5%, 8%, 10% and 20% ethanol containing agarose plates (Fig. 4d). For all four ethanol concentrations wild-type Canton-S larvae were similarly attracted to BA (Fig. 4d). Therefore, in the assay D. melanogaster larvae could distinguish BA from a week or high concentrated ethanol background.
Ethanol provides a teaching signal for larval olfactory learning. Larvae of D. melanogaster are able to associate odorants (conditioned stimulus) with cues of different sensory modalities (unconditioned stimulus) to establish appetitive or aversive olfactory memories. So far, tastants, temperature, vibration, electric shock, and light have been identified as teaching signals (reviewed in 14 ). In contrast to adult flies, ethanol has not yet been tested as reinforcer. Therefore, we performed standardized learning experiments to validate the potential of ethanol in differential conditioning. In this assay larvae are trained three times with a given concentration of ethanol (2.5%, 8%, or 20% as a teaching signal) and then tested on an agarose plate for their odorant preference between the previously ethanol paired and the non-paired odorant (Fig. 5). Higher ethanol concentrations of 8% and 20%, in contrast to a lower concentration of 2.5%, provide an appetitive teaching signal for larval olfactory learning (Fig. 5b). For appetitive olfactory learning with fructose, it has been reported that larvae show no  Table 1. www.nature.com/scientificreports/  www.nature.com/scientificreports/ memory when tested in the presence of the unconditioned stimulus. This is probably because in the presence of food the larvae do not have to search for food 41,49 . This also seems to be the case for ethanol, since larvae trained with 8% ethanol only recall odor-ethanol memory on control agarose, but not on a test plate containing 8% ethanol (Fig. 5c). Ethanol memory also appears to be somehow similar to fructose memory, as even 2 M fructose added to the test plate prevents the recall of the odor-ethanol memory.
Ethanol does not alter appetitive and aversive olfactory memory. Treating larvae with 20% ethanol for 20 min impairs aversive odorant-heat shock memory after one-odor conditioning at 35 °C 50 . The effect of ethanol was absent, when the odorant was paired with a higher temperature heat-shock of 41 °C, which likely forms a stronger memory unsusceptible for ethanol treatment. Therefore, we similarly investigated whether the 20 min incubation with 20% ethanol interferes with larval olfactory memory formation when the odorant is paired with fructose or salt (Fig. 6). We found that both, aversive salt memory (1.5 M NaCl; Fig. 6a) and appetitive sugar memory (0.01 M fructose; Fig. 6b), showed no reduction after ethanol treatment in comparison to H 2 O treated larvae. Therefore, the olfactory memory reinforced by salt or fructose was not altered by ethanol treatment.

Discussion
Due to the numerically relatively simple anatomy of the larva, it has an enticing analytical power based on the combination of genetic tractability, the availability of robust behavioral assays, the possibility for transgenic single cell manipulation, and an emerging synaptic connectome of the complete central nervous system. The focus of this work was on the behavioral description of ethanol driven larval behavior in order to provide a basis for subsequent genetic, molecular and cellular studies.
Ethanol is an important stimulus in the environment of adult and larval D. melanogaster (reviewed in 51,52 ). The concentration of ethanol in the natural habitat of this species vary between 0.6% in ripe hanging fruits and up to 4.5% in rotting ones 53 . In some man-made environments, such as wine cellars, the ethanol concentration can reach more than 10% [53][54][55] . Given that adult D. melanogaster often carry yeast to the egg laying sites and inoculate ripening fruits, the induced fermentation and associated ethanol production is likely to result in higher concentrations at the larval stage 56 . Therefore, the naturally occurring range of ethanol concentrations experienced by a larva is in agreement with most of the concentrations tested in our behavioral analysis (Figs. 1, 3, and 5). Only the highest concentration tested (20%, 30%, and 50% ethanol) do not occur in the natural habitat of the larva. Of course, one has to keep in mind that our experiments were performed under laboratory conditions using a substrate of agarose mixed with ethanol. Due to the evaporation of ethanol, which is indeed volatile, especially higher ethanol concentrations could have been lower in reality. However, these effects are likely to be small, as studies have shown that within the first few hours, ethanol levels drop only slightly in a 13% ethanol containing Petri dish 55 . This corresponds approximately to the period of preparation of the plates and the conduction of the ethanol attraction and learning experiments. Similarly, evaporation seems to be of little relevance in the survival experiments, where the experimental vials were changed every day. It was shown that the ethanol concentration in vials closed with polyurethane bungs remains very stable over several days (in bottles with 6% ethanol in the medium the fall is to 3.5% after six days) 55 .
The ethanol attraction is based on various sensory modalities. We show that D. melanogaster larvae preferentially migrate to substrates containing ethanol, regardless of whether they have been previously exposed to ethanol or not. In contrast to adult Drosophila 57 , exposure over several days does not increase the attractiveness of ethanol to larvae (Fig. 1d). Larval attraction appears to follow a Gaussian-shape like dose response curve reaching a plateau between 4 and 10% ( Figs.1 and 2). Our results are in agreement with several published findings that have shown that larvae prefer 1% 58 , 2.5% 59 , 5% 59 , 6% 31-33 , 10% 58,59 , 17% 34 , 20% 59 and even pure ethanol 58 . Thus, our standardized experimental design provides a robust behavioral assay that allows to identify the neural and molecular basis of larval ethanol substrate choice. However, it must be mentioned that there are some studies on larval ethanol substrate choice, where the tested animals show no or only weak attraction to ethanol concentrations from 2 to 6% 38,39,60 and even aversion at higher concentrations 39,60 . However, it is not clear whether, in addition to methodological matters such as a low volume of applied ethanol 38 , other factors such as the enzymatic activity of Adh, the surrounding temperature, specific pre-treatments and the precise experimental procedure are responsible for this [32][33][34]39,59 . Likewise, there are changes across larval development. During first and second molting, the attractiveness of ethanol is reduced (Fig. 2). During these Figure 6. Pre-exposure to ethanol does not change aversive and appetitive olfactory learning. Before the larvae were conditioned, they were separated from their food and treated for 20 min with either water or 20% ethanol. They were then washed and trained with the odors AM and BA and either 1.5 M NaCl or 0.01 M fructose as a teaching signal. (a) Larvae treated with water and 20% ethanol both showed an aversive odor-salt memory (onesample t test, pwater < 0.001, ppre-EtOH < 0.001) that was not different from each other (paired t-test, p < 0.112). Sample size for each box plot is n = 15. (b) Larvae treated with water and 20% ethanol both showed an appetitive odor-fructose memory (one-sample t test, pwater < 0.001, ppre-EtOH < 0.001) that was not different from each other (paired t-test, p < 0.484). Sample size for each box plot is n = 15. Differences against zero are indicated in red at the bottom of each panel. Significant differences of two groups are specifically indicated with an asterisk. www.nature.com/scientificreports/ developmental stages, larval locomotion is generally reduced as they renew their exoskeleton on which all external sensory organs are also located 61 . Our results also suggest that certain mutations may alter the attraction to ethanol, as w 1118 mutants showed a reduced attraction to higher ethanol concentrations compared to the wildtype (Fig. 1). The white gene encodes for an ABC transporter a key player of the eye pigmentation pathway 62 . In addition, white mutant flies also possess abnormally low levels of the biogenic amines serotonin, dopamine, and histamine 63,64 . Whether this plays a role in the lower attractiveness of these mutants towards 10% and 20% ethanol, however, remains to be investigated. Substrate attraction tests (Figs. 1 and 2) allow larvae to come into direct contact with ethanol. Therefore, larvae can potentially be guided by different inputs: the sense of smell or taste, but also by a caloric gain or a pharmacological effect. Examples for such cases are reported for adult D. melanogaster (reviewed in 26,51,65 ). In this work, we have separated gustatory and olfactory inputs from each other. (Please note that the pharmacological effect can only be analyzed by behavioral changes and measurement of endogenous ethanol concentration in the larvae, which were not done in our study). To investigate whether larvae specifically perceive and behaviorally respond to ethanol as an odorant, we have filled the stimulus in containers that allow ethanol to evaporate, but prevent the larvae from directly contacting it and thus excludes feeding or ingesting it (Fig. 4). This has not been studied so far. Larval ethanol attraction for the odorant stimulation was clearly evident (Fig. 4), but reduced compared to the substrate attraction of ethanol (Fig. 1). The behavioral response is almost halved from a median of 0.61 (Fig. 1) to 0.33 (Fig. 4). This means that (1) larvae indeed do perceive ethanol via the olfactory signaling pathway and (2) larvae can perceive ethanol not only as an odor.
Ethanol is both nutritious and toxic for the larva. Survival experiments, as we have shown in Fig. 3, are often used to analyze a positive life-prolonging effect (e.g. based on additional calories of sugar in a minimal diet), or to identify harmful effects that lead to an increased mortality of larvae (e.g. by adding bitter compounds to the food) [18][19][20] . Our results suggest that ethanol performs two opposing functions. Below 8% the positive-most likely nutritional effect-increases larval survival on control agarose; at high concentrations above 8% ethanol toxicity prevails (Fig. 3). Many early studies focused on the effects of ethanol on larval survival and increases were referred to as tolerance (reviewed in 27 ). Nowadays tolerance usually stands for an individual's resistance to the intoxicating effects of ethanol, according to its importance for humans 27 . Similar to our results (Fig. 3), previous work showed that ethanol consumption of up to 4% leads to increased larval fitness 47,48,66,67 . Parson and colleagues showed that ethanol concentrations of 0.5%-3% allow larvae to develop to third instar larvae. At a concentration of 6% or higher this was not the case 48 . Quite similar, McKechnie and Geer showed that wild-type Canton-S larvae transferred to ethanol concentrations of up to 4.5% partially survived into pupae 47 . Thus, in agreement with published results, our data suggest that Drosophila larvae benefit from metabolizing ethanol. Because ethanol is one of the primary alcohols, it is degraded to aldehydes, which then act as acetyl-CoA in metabolic processes such as the Krebs cycle (reviewed in 43 ). Thus, ethanol contributes to the formation of adenosine triphosphate (ATP), which can be used directly or indirectly as an energy source. Studies in larvae have also shown that the carbons of ethanol serve as backbones for triacylglycerols and phospholipids 66,68 . Consequently, larvae prefer ethanol and associate it with a rewarding function, as they benefit from metabolizing the amount of ethanol usually found in their natural environment.
At higher ethanol concentrations the Adh dependent detoxification reaches its limits. In most studies, reduced survival rates occur at concentrations above 9% or 16% of ethanol 28,46,48 (but see also for lower concentrations 47 ). Increasing developmental delay and reduced body size in adulthood have also been described for ethanolcontaining diets of 5%, 10%, and 12% 69 . Our results are therefore comparable with most of the published work, as we show that larvae do not display increased mortality at 8% ethanol, but many of them die quickly at ethanol concentrations of 12% and 20% (Fig. 3). It was shown that high intracellular concentrations of ethanol limits the capacities to synthesis and store glycogen, lipid, protein in the larval fat body cells 66 , and reduces cell division rates in the developing larval central nervous system 69 . Even structural changes within cells of the endoplasmatic reticulum and mitochondria were visible 66 . Therefore, higher doses of ethanol have a deleterious effect at both the cellular and organism levels.
Surprisingly, larvae still seek out these deleterious concentration and process it as rewarding in learning experiments (Figs. 1, 3, 5). Thus, it is tempting to speculate that the answer is based on the organization of the larval microhabitats. Ethanol occurs most often as a gradient in food sources. Therefore, it might be advantageous for the larva to seek out even high ethanol sources in the first step to then consume lower substrate concentrations on site in the second step. In general, however, it appears that larvae respond differently to a given concentration of a chemosensory stimulus depending on their behavioral response. 0.3 M sodium chloride is usually repellent to larvae, but can be used as a positive teaching signal in olfactory learning experiments 42 . 2 M arabinose, a sugar that is sweet but offers no nutritional benefit, is harmful for the larva, but also highly attractive and triggers a reward function during learning 20 . It appears that this is a general function for many chemosensory components, which may be based on mutual neuronal and genetic mechanisms.
Ethanol provides a positive teaching signal. To our knowledge it has not yet been tested whether larvae can utilize ethanol as a positive teaching signal (unconditioned stimulus) in learning and memory assays. Our results suggest that this is the case for concentrations of 8% and 20% ethanol (Fig. 5). Therefore, not only adult flies can use ethanol as a teaching signal 70,71 , but also larvae. The initial memory of adult flies, however, is aversive and only changes after 24 h into a positive long-term memory that lasts several days 70 . However, these results are based on multiple training stimuli that are separated in time (spaced training). Adult training protocols more similar to the larval procedure used here are also able to induce appetitive memories 71 . Thus, the adult behavioral response is much more similar to the larval one than suspected at first glance. In addition, we www.nature.com/scientificreports/ gain increasing insight to understand what stimulation the larva classifies as rewarding. Chemosensory stimuli include ethanol, low salt concentrations, amino acids, ribonucleosides and various sugars (e.g., sucrose, glucose, maltodextrin, sorbitol, ribose), even though some cannot be metabolized (arabinose, xylose) 20,21,42,49,72,73 . Without a direct comparison, it is of course difficult to assess how rewarding ethanol is for the larva. However, a comparison of published values suggests that fructose and a low salt concentration, which are used in most studies, lead to reward memories that are about twice as strong.
We also do not yet have any insights into the neuronal and molecular organization of larval ethanol learning and memory. However, the assay described here allows their analysis. It is worth noting that ethanol memory cannot be retrieved on a fructose test plate (Fig. 5). According to Schleyer and colleagues D. melanogaster larvae search for food after the conditioning phase based on their acquired experience. Thus, the odorant paired with ethanol predicts a certain gain. At the moment of testing, the animals expect such a gain and compare it with their current environmental input. It seems that the larvae do not only expect a positive gain in this situation but also its specific quality. This was shown as sugar memory could be recalled on a positive aspartic acid containing test plate and vice versa 74 . Following the same logic, the absence of ethanol memory recall on a fructose plate thus means that larvae do not distinguish between ethanol and fructose quality. Therefore, it is possible that fructose and ethanol processing circuits overlap in the larval brain. In adult flies food reward and ethanol circuits overlap in context of regulating ethanol preference. Thus is tempting to speculate that this is the case in larvae as well. However, to exclude that sugar presence just distracts larvae from odorant attraction in our experiments further work has to be done.
Outlook. Which cells and molecules might be involved in the perception of ethanol in larvae? Based on studies on olfactory ethanol sensing in adult flies, the octopaminergic system and different olfactory receptors can be considered as an analysis entry point 75,76 . Using the Flywalk 77 or a two odor vial assay 78 to measure naive adult olfactory output, it was shown that the olfactory co-receptor Orco plays an essential role in both assays when ethanol was applied. For the Flywalk analysis the effect could even be refined to the olfactory receptor genes Or42b and Or59b 76 . At the larval stage, only Or42b is expressed in a single ORN of the dorsal organ, the main larval olfactory sense organ 15 . Or42b responds to ethyl acetate, ethyl butyrate, propyl acetate and pentyl acetate; chemicals that are all highly attractive to larvae 16,17 . It is tempting to expect that Or42b serves a similar function at the larval stage. However, ethanol has not yet been tested, and we lack any molecular and neuronal information on its perception in the larva. With respect to learning and memory, we have recently obtained a cellular understanding of the involved neuronal pathways of the larval brain. Four dopaminergic neurons of the primary protocerebral anterior medial (pPAM) cluster encode fructose dependent teaching signals and these neurons are directly connected to the mushroom body, the larval memory center 9,79-82 . Hence, it is now possible to test whether aspects of the ethanol reward learning and memory are also processed by the same neuronal mushroom body network. This would also reveal a conservation of the functional patterns throughout development, since adult appetitive ethanol memory also requires dopaminergic cells and the mushroom body 70 .

Methods
Fly strains. Fly strains were kept on standardized cornmeal medium containing 1% ethanol at 25 °C and 65% humidity under a 14:10 h light:dark cycle. Adult flies were transferred to new food vials every 72 h. Larvae were taken from food vials and briefly washed in tap water to remove food residues. Larvae were then collected with a small brush and transferred to a small drop of tap water in groups of 30 or 12 larvae, respectively. Two fly strains wild-type CS and mutant w 1118 were used in the experiments. For experiments at specific time points during larval development, larvae with defined age were used. If not otherwise mentioned larval of different age were used, except for the wandering larval three. For staging larvae, adult flies were allowed to lay eggs for six hours; larvae were then collected in a 12 h cycle starting 36 h after egg laying (AEL).

Substrate choice.
For gustatory preference tests, Petri dishes (85 mm diameter; Greiner) were filled with 2.5% agarose substrate (VWR Life Science; type number: 97062-250). Agarose and ddH 2 O were mixed and boiled in a microwave oven. A thin layer of the hot mixture was filled into Petri dishes. After cooling, agarose was removed from half of the plate and re-filled with 2.5% agarose substrate containing different concentration of 99.8% ethanol (1%, 2%, 4%, 8%, 10%, 20%,30%, or 50% ethanol; CHEMSOLUTE®; type number: 2273.1000). In all experiment the final volume was kept the same. No obvious change of the texture of the plates was seen with increasing ethanol concentrations up to 50%. Therefore, we currently have no evidence that our results are affected by texture effects, although some are described in the literature 23,24 . To keep an evaporation effect as low as possible, groups of 30 larvae of different ages were placed immediately after plate preparation (in the order of maximum 45 min) in the middle of the Petri dish and allowed to crawl for 5 min (or up to 120 min) at room temperature (RT) 55 . Then, larvae were counted on each side of the Petri dish. A preference index (Pref) was calculated by subtracting the number of larvae on the control agarose side (#nS) from the number of larvae on the side with a stimuli (#S), divided by the total number of larvae (#total): Pref = (#S − #nS)/#total. A positive Pref indicates attraction and a negative aversion to the presented stimuli.
Olfactory attraction. To  www.nature.com/scientificreports/ (1-Oct; Sigma-Aldrich, type number: 101858766 undiluted) or distilled water was filled into custom-made Teflon containers (4.5 mm diameter) with perforated lids and placed on each side of the plate. Immediately after plate preparation, groups of 30 larvae were placed in the middle of the Petri dish and allowed to crawl for 5 min at RT. Then, larvae were counted on each side of the Petri dish. A preference index (Pref) was calculated by subtracting the number of larvae on the side without an odor (#nO) from the number of larvae on the side with an odor (#O), divided by the total number of larvae (#total): Pref = (#O − #nO)/#total. A positive Pref indicates an attractiveness, a negative Pref represents an avoidance.
Olfactory ethanol learning and memory. All experiments were performed on Petri dishes filled with either 2.5% control agarose or 2.5% agarose containing different concentrations of ethanol (8% or 20%), 0.01 M fructose (Carl Roth®; type number: 4981.2) or 1.5 M sodium chloride (Carl Roth®; type number: 3957.2). Agarose and ddH 2 O were mixed and boiled in a microwave oven. A thin layer of the hot mixture was filled into Petri dishes. Closed Petri dishes were kept at room temperature and used on the same day. As olfactory stimuli, we filled 10 µl AM, and 10 µl BA, in custom-made Teflon containers (4.5 mm diameter) with perforated lids. Immediately after plate and container preparation, groups of 30 larvae were placed in the middle of the Petri dish containing a control agarose substrate. All experiments were conducted at RT. Larvae were exposed to AM and allowed to crawl for 5 min. Then, larvae were transferred with a small brush to a new Petri dish containing a positive (ethanol, fructose) or negative (NaCl) reinforcer and exposed to BA for 5 min. Each transfer usually takes about one minute. After three training cycles, larvae were placed on a new Petri dish containing control agarose substrate or agarose substrate containing 8% ethanol, 0.01 M fructose, or 1.5 M sodium chloride and exposed to AM and BA on opposite sides for 5 min. Then, larvae were counted on each side of the Petri dish. A second group of larvae was trained via a reciprocal training regime. For each group an independent olfactory preference index was calculated as described above. A performance index (PI) was calculated by adding the Pref of the first training group (Pref1) to the Pref of the second training group (Pref2) and dividing them by the number of experimental groups (#2): PI = (Pref1 + Pref2)/#2. A positive PI indicates an attractiveness; a negative PI represents an avoidance.
Larval survival on ethanol. To investigate larval survival in the presence of ethanol, 12 wild-type L2 stage larvae were placed in vials containing either 1% control agarose substrate or 1% agarose substrate plus different concentrations of ethanol of 4%, 8% or 20%. Three drops of tap water were daily added to prevent larvae from dehydrating. Larvae that were alive and later the pupal stage were counted from day 1 to day 9. The data are shown as Kaplan-Meier survival curves. The percentage of survival and pupation were calculated as follows: Percentage = (number of living larvae or pupae / total number of larvae or pupae) × 100. For each condition 16 independent experimental groups were analyzed (n = 16).

Data analysis and visualization.
Groups that did not violate the assumption of normal distribution (Shapiro-Wilk test) and homogeneity of variance (Bartlett's test) were analyzed with parametric statistics: paired t-test (comparison between two groups) or Oneway ANOVA followed by planned pairwise comparisons between the relevant groups with a Tukey honestly significant difference HSD post hoc test (comparisons between groups larger than two). Experiments with data that were significantly different from the assumptions above were analyzed with non-parametric tests, such as Wilcoxon signed rank test (comparison between two groups) or Kruskal-Wallis test followed by Dunn's multiple pairwise comparison (comparisons between groups larger than two). To compare single genotypes against chance level, we used one-sample t test. All statistical analyses and data visualization were done with R (V 3.5.1) in RStudio by using stats, dunn.test and ggplot2 package 83 . Figure panels were edited with Adobe Illustrator CS5 (San Jose, CA, USA). The significance level of statistical tests was set to 0.05; the shown confidence interval (ci) is the 95% confidence interval of the data plots. Data are displayed as box plots with the median as the middle line, the box boundaries as 25% and 75% quantiles and the whiskers as 1.5 times the interquartile range. Outliers are shown as dots directly above or below the box plots. Larval and pupal survival rates are shown as Kaplan-Meier curves. Further details are documented in the Supplemental Data files.