<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD with MathML3 v1.3 20210610//EN"  "JATS-archivearticle1-3-mathml3.dtd"><article xmlns:ali="http://www.niso.org/schemas/ali/1.0/" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article" dtd-version="1.3"><front><journal-meta><journal-id journal-id-type="nlm-ta">elife</journal-id><journal-id journal-id-type="publisher-id">eLife</journal-id><journal-title-group><journal-title>eLife</journal-title></journal-title-group><issn publication-format="electronic" pub-type="epub">2050-084X</issn><publisher><publisher-name>eLife Sciences Publications, Ltd</publisher-name></publisher></journal-meta><article-meta><article-id pub-id-type="publisher-id">88657</article-id><article-id pub-id-type="doi">10.7554/eLife.88657</article-id><article-id pub-id-type="doi" specific-use="version">10.7554/eLife.88657.3</article-id><article-categories><subj-group subj-group-type="display-channel"><subject>Research Article</subject></subj-group><subj-group subj-group-type="heading"><subject>Genetics and Genomics</subject></subj-group><subj-group subj-group-type="heading"><subject>Neuroscience</subject></subj-group></article-categories><title-group><article-title>Sensory neurons couple arousal and foraging decisions in <italic>Caenorhabditis elegans</italic></article-title></title-group><contrib-group><contrib contrib-type="author" id="author-13584"><name><surname>Scheer</surname><given-names>Elias</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0003-3462-3970</contrib-id><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="other" rid="fund2"/><xref ref-type="fn" rid="con1"/><xref ref-type="fn" rid="conf1"/></contrib><contrib contrib-type="author" corresp="yes" id="author-45343"><name><surname>Bargmann</surname><given-names>Cornelia I</given-names></name><contrib-id authenticated="true" contrib-id-type="orcid">https://orcid.org/0000-0002-8484-0618</contrib-id><email>cori@rockefeller.edu</email><xref ref-type="aff" rid="aff1">1</xref><xref ref-type="other" rid="fund1"/><xref ref-type="fn" rid="con2"/><xref ref-type="fn" rid="conf1"/></contrib><aff id="aff1"><label>1</label><institution-wrap><institution-id institution-id-type="ror">https://ror.org/0420db125</institution-id><institution>Lulu and Anthony Wang Laboratory of Neural Circuits and Behavior, The Rockefeller University</institution></institution-wrap><addr-line><named-content content-type="city">New York</named-content></addr-line><country>United States</country></aff></contrib-group><contrib-group content-type="section"><contrib contrib-type="editor"><name><surname>Kratsios</surname><given-names>Paschalis</given-names></name><role>Reviewing Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/024mw5h28</institution-id><institution>University of Chicago</institution></institution-wrap><country>United States</country></aff></contrib><contrib contrib-type="senior_editor"><name><surname>Cardona</surname><given-names>Albert</given-names></name><role>Senior Editor</role><aff><institution-wrap><institution-id institution-id-type="ror">https://ror.org/013meh722</institution-id><institution>University of Cambridge</institution></institution-wrap><country>United Kingdom</country></aff></contrib></contrib-group><pub-date publication-format="electronic" date-type="publication"><day>27</day><month>12</month><year>2023</year></pub-date><volume>12</volume><elocation-id>RP88657</elocation-id><history><date date-type="sent-for-review" iso-8601-date="2023-04-20"><day>20</day><month>04</month><year>2023</year></date></history><pub-history><event><event-desc>This manuscript was published as a preprint.</event-desc><date date-type="preprint" iso-8601-date="2023-04-15"><day>15</day><month>04</month><year>2023</year></date><self-uri content-type="preprint" xlink:href="https://doi.org/10.1101/2023.04.14.536929"/></event><event><event-desc>This manuscript was published as a reviewed preprint.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2023-06-27"><day>27</day><month>06</month><year>2023</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.88657.1"/></event><event><event-desc>The reviewed preprint was revised.</event-desc><date date-type="reviewed-preprint" iso-8601-date="2023-11-08"><day>08</day><month>11</month><year>2023</year></date><self-uri content-type="reviewed-preprint" xlink:href="https://doi.org/10.7554/eLife.88657.2"/></event></pub-history><permissions><copyright-statement>© 2023, Scheer and Bargmann</copyright-statement><copyright-year>2023</copyright-year><copyright-holder>Scheer and Bargmann</copyright-holder><ali:free_to_read/><license xlink:href="http://creativecommons.org/licenses/by/4.0/"><ali:license_ref>http://creativecommons.org/licenses/by/4.0/</ali:license_ref><license-p>This article is distributed under the terms of the <ext-link ext-link-type="uri" xlink:href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution License</ext-link>, which permits unrestricted use and redistribution provided that the original author and source are credited.</license-p></license></permissions><self-uri content-type="pdf" xlink:href="elife-88657-v1.pdf"/><self-uri content-type="figures-pdf" xlink:href="elife-88657-figures-v1.pdf"/><abstract><p>Foraging animals optimize feeding decisions by adjusting both common and rare behavioral patterns. Here, we characterize the relationship between an animal’s arousal state and a rare decision to leave a patch of bacterial food. Using long-term tracking and behavioral state classification, we find that food leaving decisions in <italic>Caenorhabditis elegans</italic> are coupled to arousal states across multiple timescales. Leaving emerges probabilistically over minutes from the high arousal roaming state, but is suppressed during the low arousal dwelling state. Immediately before leaving, animals have a brief acceleration in speed that appears as a characteristic signature of this behavioral motif. Neuromodulatory mutants and optogenetic manipulations that increase roaming have a coupled increase in leaving rates, and similarly acute manipulations that inhibit feeding induce both roaming and leaving. By contrast, inactivating a set of chemosensory neurons that depend on the cGMP-gated transduction channel TAX-4 uncouples roaming and leaving dynamics. In addition, <italic>tax-4-</italic>expressing sensory neurons promote lawn-leaving behaviors that are elicited by feeding inhibition. Our results indicate that sensory neurons responsive to both internal and external cues play an integrative role in arousal and foraging decisions.</p></abstract><abstract abstract-type="plain-language-summary"><title>eLife digest</title><p>When animals forage for food, they show distinct behavioral patterns in their movement. For instance, the nematode worm <italic>Caenorhabditis elegans</italic> shows two long-term behavioral states when exploring a patch of food: dwelling, when it moves slowly in a small area, and roaming, when it makes quick and wide-ranging movements. The worms will also occasionally suddenly decide to leave a piece of food and go explore the rest of their environment.</p><p>Scientists know that the likelihood of the worms either roaming or dwelling is regulated by neurons passing molecules, such as serotonin and dopamine, to one another. However, it is not known how these two long-term behavioral states impact the momentary decision to leave a piece of food, and which mechanisms may regulate this coupling.</p><p>To investigate, Scheer and Bargmann tracked the movement of genetically modified <italic>C. elegans</italic> and characterized their behavior. This revealed that the decision to leave food is not random but a distinct choice that primarily happens when worms are roaming. A characteristic signature of this response was that worms briefly accelerate immediately before leaving.</p><p>Following this discovery, Scheer and Bargmann identified sensory neurons that are involved in this process. As well as detecting external sensory cues, these neurons also integrate internal signals, like whether the animal can eat, to specify how often a worm will leave food.</p><p>The implications of this research extend beyond the realm of tiny nematodes. This study provides a new framework to examine the relationship between long-term behavior and momentary decision making. Such insights are crucial in understanding brain function across different organisms, including humans. It paves the way for further research into how behavior is regulated on multiple timescales in the brain.</p></abstract><kwd-group kwd-group-type="author-keywords"><kwd>neuromodulation</kwd><kwd>foraging behavior</kwd><kwd>decision-making</kwd><kwd>behavioral states</kwd></kwd-group><kwd-group kwd-group-type="research-organism"><title>Research organism</title><kwd><italic>C. elegans</italic></kwd></kwd-group><funding-group><award-group id="fund1"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100014989</institution-id><institution>Chan Zuckerberg Initiative</institution></institution-wrap></funding-source><principal-award-recipient><name><surname>Bargmann</surname><given-names>Cornelia I</given-names></name></principal-award-recipient></award-group><award-group id="fund2"><funding-source><institution-wrap><institution-id institution-id-type="FundRef">http://dx.doi.org/10.13039/100000025</institution-id><institution>National Institute of Mental Health</institution></institution-wrap></funding-source><award-id>1F31MH113313</award-id><principal-award-recipient><name><surname>Scheer</surname><given-names>Elias</given-names></name></principal-award-recipient></award-group><funding-statement>The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.</funding-statement></funding-group><custom-meta-group><custom-meta specific-use="meta-only"><meta-name>Author impact statement</meta-name><meta-value>A long-term arousal state is linked to the acute decision to leave a food patch by sensory neurons that integrate neuromodulatory information, food intake, and environmental signals.</meta-value></custom-meta><custom-meta specific-use="meta-only"><meta-name>publishing-route</meta-name><meta-value>prc</meta-value></custom-meta></custom-meta-group></article-meta></front><body><sec id="s1" sec-type="intro"><title>Introduction</title><p>Persistent behavioral states subdivide continuous behavior into discrete modules that accomplish adaptive goals (<xref ref-type="bibr" rid="bib63">Tinbergen, 1951</xref>). An example from behavioral ecology is foraging behavior, which is composed of locomotion patterns that unfold across short and long timescales. For example, the brief darting maneuvers that drive prey capture in hunting zebrafish are embedded within persistent locomotory arousal states that last for minutes (<xref ref-type="bibr" rid="bib38">Marques et al., 2020</xref>). In recent years, classical ethological studies of behavioral states have been supplemented with machine vision, clustering, and classification algorithms that are well-suited to quantitative and systematic analysis (<xref ref-type="bibr" rid="bib7">Berman et al., 2014</xref>; <xref ref-type="bibr" rid="bib58">Schwarz et al., 2015</xref>; <xref ref-type="bibr" rid="bib68">Wiltschko et al., 2015</xref>). A current challenge is to identify circuit mechanisms that couple long-term behavioral states to short-term motor actions in foraging and other goal-directed behaviors.</p><p>Foraging behaviors and the neural mechanisms that generate them have been a fruitful subject of study in the nematode <italic>Caenorhabditis elegans</italic>. While exploring a bacterial lawn, which corresponds to a food patch, <italic>C. elegans</italic> adopts two major behavioral states: roaming and dwelling (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib20">Fujiwara et al., 2002</xref>). Roaming is an aroused state characterized by high locomotion speed with few reversals and turns, whereas dwelling is defined by low speed and high reorientation rates (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib20">Fujiwara et al., 2002</xref>). A third behavioral state, quiescence, is induced by stress, molting, or satiety (<xref ref-type="bibr" rid="bib21">Gallagher et al., 2013</xref>; <xref ref-type="bibr" rid="bib27">Hill et al., 2014</xref>; <xref ref-type="bibr" rid="bib53">Raizen et al., 2008</xref>; <xref ref-type="bibr" rid="bib65">Van Buskirk and Sternberg, 2007</xref>). The bistability of roaming and dwelling states is governed by neuromodulatory signaling via the neuropeptide Pigment Dispersing Factor (PDF-1), which promotes roaming by signaling through its cognate receptor PDFR-1, and the biogenic amine serotonin, which promotes dwelling by activating the serotonin-gated chloride channel MOD-1. These modulators act through distributed circuits within the 302 neurons of the animal’s nervous system, with multiple sources of each modulator and multiple receptor-expressing sites (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>).</p><p>Another foraging behavior studied in <italic>C. elegans</italic> is the decision to stay or leave a lawn of bacterial food. Leaving is infrequent on high quality food lawns but increases when feeding is impaired, the bacterial food is inedible, or food is depleted (<xref ref-type="bibr" rid="bib6">Bendesky et al., 2011</xref>; <xref ref-type="bibr" rid="bib43">Milward et al., 2011</xref>; <xref ref-type="bibr" rid="bib47">Olofsson, 2014</xref>; <xref ref-type="bibr" rid="bib59">Shtonda and Avery, 2006</xref>). Animals also leave more frequently from lawns of pathogenic bacteria (<xref ref-type="bibr" rid="bib52">Pujol et al., 2001</xref>) and lawns spiked with aversive or toxic compounds (<xref ref-type="bibr" rid="bib42">Melo and Ruvkun, 2012</xref>; <xref ref-type="bibr" rid="bib50">Pradel et al., 2007</xref>).</p><p>The genes that regulate lawn-leaving behavior overlap with those that regulate roaming and dwelling states, although these behaviors have largely been studied separately. For example, roaming, dwelling, and leaving are all strongly influenced by sensory neurons, particularly those that express the cGMP-gated channel <italic>tax-4</italic> (<xref ref-type="bibr" rid="bib16">Davis et al., 2023</xref>; <xref ref-type="bibr" rid="bib20">Fujiwara et al., 2002</xref>; <xref ref-type="bibr" rid="bib39">McCloskey et al., 2017</xref>; <xref ref-type="bibr" rid="bib43">Milward et al., 2011</xref>; <xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref>), and by endocrine DAF-7 (TGF-beta) and Insulin/DAF-2 (insulin receptor) signaling pathways whose peptide ligands are produced by sensory neurons (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib6">Bendesky et al., 2011</xref>).</p><p>Here, we characterize the behavioral patterns and circuit mechanisms that accompany lawn leaving decisions on short and long timescales. Using high-resolution imaging to monitor the behaviors of many individual animals, we find that leaving is a discrete behavioral motif that is generated probabilistically during the high-arousal roaming state. A signature of leaving behavior is a rapid acceleration in speed immediately before the leaving event. Roaming states evoked by neuromodulatory mutations, acute feeding inhibition, or optogenetic circuit manipulation all stimulate lawn leaving accompanied by the rapid acceleration motif. In addition, chemosensory neurons play an unexpectedly central role in linking internal states and behavioral dynamics.</p></sec><sec id="s2" sec-type="results"><title>Results</title><sec id="s2-1"><title>Animals make foraging decisions at the boundaries of bacterial food lawns</title><p>To study foraging decisions at high resolution, we filmed and quantified the behavior of individual animals on small lawns of bacterial food (~3 mm diameter) on an agar surface (<xref ref-type="fig" rid="fig1">Figure 1A and B</xref>). During a 40-min assay, animals spent ~97% of their time on the lawn, and preferentially occupied the edge of the bacterial lawn where bacterial density was highest (<xref ref-type="fig" rid="fig1">Figure 1C</xref>, <xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1A–D</xref>). As a result, the tip of the animal’s head encountered the lawn boundary approximately once per minute. A few of these encounters resulted in a lawn leaving event, in which the animal exited the bacterial lawn (<xref ref-type="fig" rid="fig1">Figure 1D</xref>, <xref ref-type="video" rid="fig1video1">Figure 1—video 1</xref>). Lawn-leaving occurred in 26% of the assays, with a mean value of one event per 95 min (<xref ref-type="fig" rid="fig1">Figure 1H–I</xref>, <xref ref-type="supplementary-material" rid="fig1sdata1">Figure 1—source data 1</xref>).</p><fig-group><fig id="fig1" position="float"><label>Figure 1.</label><caption><title>Animals make foraging decisions at the boundaries of bacterial food lawns.</title><p>(<bold>A</bold>) Image of <italic>C. elegans</italic> on a small lawn of bacteria. Head is indicated with a green dot, lawn boundary is indicated with a white line. Scale bar is 1 mm. (<bold>B</bold>) Schematic depicting lawn boundary distance measured as the distance from the head to the closest point on the lawn boundary. (<bold>C</bold>) Empirical distribution of lawn boundary distance in wild type datasets. Positive values indicate distances inside the lawn, negative values indicate distances outside the lawn. (<bold>D</bold>–<bold>G</bold>) Four example images from behavioral sequences generating different types of foraging decisions. Scale bar is 0.5 mm in all panels. Head is indicated with a green dot in all panels. In E-G, yellow X indicates the maximum displacement of the head outside the lawn during head pokes. (<bold>D</bold>) Lawn leaving occurs when an animal approaches lawn boundary and fully crosses through it to explore the bacteria-free agar outside the lawn. Yellow X indicates the position on the lawn boundary encountered by worm’s head before exiting the lawn. (<bold>E</bold>) Head Poke Forward occurs when animal continues forward movement on the lawn during and after poking its head outside the lawn. (<bold>F</bold>) Head Poke Pause occurs when animal pauses following head poke before resuming forward movement on the lawn. (<bold>G</bold>) Head Poke Reversal is generated by a reversal following head poke before resuming forward movement on the lawn. (<bold>H</bold>) Number of lawn leaving events per animal in 40-min assay. Bubble sizes are proportional to the percentage of animals that execute each number of lawn leaving events within a 40-min assay. (<bold>I</bold>) Frequency of different foraging decisions. (<bold>J</bold>) Midbody speed aligned to different foraging decision types. Wild type dataset (C,H,I,J): n=1586 animals. Violin plots in (I) show median and interquartile range. In all time-averages, dark line represents the mean and shaded region represents the standard error. See <xref ref-type="supplementary-material" rid="fig1sdata1">Figure 1—source data 1</xref>.</p><p><supplementary-material id="fig1sdata1"><label>Figure 1—source data 1.</label><caption><title>Quantification of various lawn boundary interaction behaviors from experiments in Figure 1.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig1-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig1-v1.tif"/></fig><fig id="fig1s1" position="float" specific-use="child-fig"><label>Figure 1—figure supplement 1.</label><caption><title>Small bacterial lawns are denser at the lawn boundary, and quantification of duration outside the lawn (<bold>A</bold>) A small lawn of bacteria expressing green fluorescent protein (GFP) imaged in the GFP channel.</title><p>White scale bar is 1 mm. (<bold>B</bold>) GFP intensity across the orange transect line plotted in (<bold>A</bold>) shows accumulation of bacterial cells near the lawn boundary in brighter GFP pixels. (<bold>C</bold>) An image of the same lawn in brightfield. (<bold>D</bold>) Brightfield intensity across the orange transect line plotted in (<bold>C</bold>) shows local darkening at the lawn boundary corresponding to bright GFP pixels in (<bold>A</bold>). (<bold>E</bold>) Duration of individual excursions outside the lawn. Quantified across wild type dataset (n=1586 animals). See <xref ref-type="supplementary-material" rid="fig1sdata1">Figure 1—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig1-figsupp1-v1.tif"/></fig><media mimetype="video" mime-subtype="mp4" xlink:href="elife-88657-fig1-video1.mp4" id="fig1video1"><label>Figure 1—video 1.</label><caption><title>Lawn boundary encounters lead to different behavioral responses: lawn leaving, head poke forward, head poke pause, and head poke reversal.</title><p>Green dot indicates the head position. White line indicates the lawn boundary. Forward and Reverse motion indicated in top left corner.</p></caption></media></fig-group><p>Once an animal left the lawn, it typically remained outside of the food for 1–2 min before re-entering the lawn (<xref ref-type="fig" rid="fig1s1">Figure 1—figure supplement 1E</xref>, <xref ref-type="supplementary-material" rid="fig1sdata1">Figure 1—source data 1</xref>). Most edge encounters were not followed by leaving; instead, animals that poked their head outside of the lawn either continued forward locomotion (head poke-forward), paused (head poke-pause), or executed a reversal (head poke-reversal; <xref ref-type="fig" rid="fig1">Figure 1E–G</xref>, <xref ref-type="video" rid="fig1video1">Figure 1—video 1</xref>). Head poke-reversals were the most common event after lawn edge encounter (1.1 events/min), followed by head poke-forward and head poke-pause events; lawn leaving events were the least frequent (<xref ref-type="fig" rid="fig1">Figure 1I</xref>, <xref ref-type="supplementary-material" rid="fig1sdata1">Figure 1—source data 1</xref>).</p><p>High resolution analysis revealed characteristic behavioral dynamics prior to different events. Each head poke encounter with the lawn edge was preceded by an increase in speed over three seconds, and resolved by a reversal, pause, or continued forward movement within 5 s (<xref ref-type="fig" rid="fig1">Figure 1J</xref>). Lawn leaving events encompassed a longer acceleration that began 30 s before the leaving event (<xref ref-type="fig" rid="fig1">Figure 1J</xref>). At longer time scales, the average speed over 1 min before and after the edge encounter varied slightly for different classes of events, with head poke-forward events and lawn-leaving associated with the highest speeds. The different behavioral patterns preceding lawn leaving and head pokes suggest that lawn leaving is a distinct foraging decision, and not a random resolution of an edge encounter. In particular, it suggests that lawn leaving is linked to a persistent behavioral state reflected in ongoing locomotion speed.</p></sec><sec id="s2-2"><title>Lawn leaving behavior is associated with high arousal states on short and long timescales</title><p>To gain further insight into the behavioral states preceding lawn leaving, we coarse-grained our behavioral measurements into 10 s intervals (‘bins’) and expanded the time axis to allow analysis across different durations. On average, a slow rise in speed began two minutes before lawn leaving, with a rapid acceleration in the last minute before leaving (<xref ref-type="fig" rid="fig2">Figure 2A</xref>). We analyzed these behaviors in the context of the well-characterized roaming and dwelling states (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib20">Fujiwara et al., 2002</xref>). Training a two-state Hidden Markov Model (HMM) based on absolute speed and angular speed (reorientations) recovered a bifurcation of roaming and dwelling states (<xref ref-type="fig" rid="fig2s1">Figure 2—figure supplement 1A–D</xref>; Methods). Using these criteria, wild type animals on small lawns roamed for a median of 12% of the duration of the assay (<xref ref-type="fig" rid="fig2s1">Figure 2—figure supplement 1C</xref>, <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>). Although 80% of lawn leaving events occurred within roaming states, less than 1% of the 10 s roaming bins contained a lawn leaving event (<xref ref-type="fig" rid="fig2">Figure 2B</xref>). Five minutes before leaving, 34% of animals were roaming, a fraction that steadily increased such that 80% of animals were roaming immediately before leaving (<xref ref-type="fig" rid="fig2">Figure 2C</xref>, <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>). By contrast, the fraction of animals roaming before head poke-reversals increased only slightly before the event (<xref ref-type="fig" rid="fig2s3">Figure 2—figure supplement 3C</xref>). Within roaming states, the average speed was constant until the rapid acceleration ~30 s prior to lawn leaving (<xref ref-type="fig" rid="fig2">Figure 2D</xref>). To ask if the brief acceleration accounts for the apparent increase in roaming before lawn leaving, we compared the duration of roaming states that preceded lawn leaving to those that did not. We found that roaming states directly before lawn leaving were slightly longer than other roaming state, arguing that acceleration events alone do not drive the correlation between roaming and lawn leaving (<xref ref-type="fig" rid="fig2s1">Figure 2—figure supplement 1E</xref>).</p><fig-group><fig id="fig2" position="float"><label>Figure 2.</label><caption><title>Lawn leaving is associated with high arousal states on multiple timescales.</title><p>(<bold>A</bold>) Midbody forward speed aligned to lawn leaving. Left, heatmap of individual speed traces. Right, mean midbody forward speed computed across the heatmap traces. White space indicates missing data or times when animal was off the lawn. (<bold>B</bold>) Overlap of lawn leaving events with roaming and dwelling. Left, percentage of leaving events found in each state. Right, percentage of 10 s roaming or dwelling bins that contain a leaving event. (<bold>C</bold>) Roaming and dwelling aligned to lawn leaving. Left, heatmap of roaming/dwelling state classifications aligned to lawn leaving event. Center, fraction of animals in roaming or dwelling state prior to leaving. Right, total fraction of time spent roaming and dwelling in all assays that included a lawn-leaving event (n=371). Median is highlighted and interquartile range is indicated by shaded area. (<bold>D</bold>) Roaming speed aligned to lawn leaving. Left, heatmap showing speed of roaming animals before lawn leaving. Right, mean roaming speed computed at times when less than 10% of aligned traces had missing data. White space indicates times when animals were not roaming before leaving. (<bold>E</bold>) Overlap of lawn leaving events with AR-HMM states. Left, percentage of leaving events found in each state. Right, percentage of 10 s bins per AR-HMM state that contain a leaving event. (<bold>F</bold>) AR-HMM states aligned to lawn leaving. Left, heatmap of AR-HMM state classifications. Center, fraction of animals in each state prior to leaving. Right, total fraction of time spent in each AR-HMM state in all assays that included a lawn-leaving event (n=371). Median is highlighted and interquartile range is indicated by shaded area. (<bold>G</bold>) State 3 speed aligned to lawn leaving. Left, heatmap showing speed of animals in state 3 before lawn leaving. Right, mean state 3 speed computed at times when less than 10% of aligned traces had missing data. White space indicates times when animals were not in state 3 before leaving. See <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>.</p><p><supplementary-material id="fig2sdata1"><label>Figure 2—source data 1.</label><caption><title>Quantification of behavioral states surrounding lawn leaving events from experiments in <xref ref-type="fig" rid="fig2">Figure 2</xref>.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig2-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig2-v1.tif"/></fig><fig id="fig2s1" position="float" specific-use="child-fig"><label>Figure 2—figure supplement 1.</label><caption><title>Roaming and dwelling states on small bacterial lawns.</title><p>(<bold>A</bold>) Scatter plot of average absolute speed and angular speed in 10 s intervals for wild type animals on small lawns (n=1586 animals, 380,640 bins). The boundary shown, used for all data in the paper, defines roaming (high speed/low angular speed) and dwelling (low speed/high angular speed). (<bold>B</bold>) Two-state Hidden Markov Model trained on wild-type animals. Roaming Behavior and Dwelling Behavior correspond to 10 s intervals either above or below the separating line in (<bold>A</bold>), respectively. Roaming and dwelling states are inferred from the Hidden Markov Model. Black arrows indicate transition probabilities between states and colored arrows represent emission probabilities. (<bold>C</bold>) Fraction of time spent roaming across wild type animals. (<bold>D</bold>) Complementary cumulative distribution functions (ccdfs) for roaming and dwelling state durations in minutes. (<bold>E</bold>) Empirical complementary cumulative distribution functions (ccdfs) comparing state durations of roaming states that did or did not precede a lawn leaving event. Statistics by Kolmogorov-Smirnov two-sample test. **** p&lt;10<sup>–4</sup>. (<bold>F</bold>) Scatter plot of average absolute speed and angular speed in 10 s intervals for wild type animals on uniform lawns (n=31 animals, 7440 bins). (<bold>G</bold>) Same as (<bold>E</bold>) for animals on small lawns recorded in parallel with animals on uniform lawns (n=31 animals, 7440 bins). (<bold>H</bold>) Animals roam more on uniform lawns than on small lawns. * p&lt;0.05 by Student’s t-test on logit-transformed data. Violin plots show median and interquartile range. See <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig2-figsupp1-v1.tif"/></fig><fig id="fig2s2" position="float" specific-use="child-fig"><label>Figure 2—figure supplement 2.</label><caption><title>Modeling behavioral states across locomotory feature dimensions using an Autoregressive Hidden Markov Model.</title><p>(<bold>A</bold>) Schematic of animal body shape with key body points indicated. (<bold>B–E</bold>) Schematics illustrating derived behavioral features. See Methods for detailed description. (<bold>B</bold>) Midbody speed, (<bold>C</bold>) Midbody angular speed, (<bold>D</bold>) Head radial velocity relative to midbody, (<bold>E</bold>) Head angular velocity relative to midbody. (<bold>F–K</bold>) Quantification of behavioral parameters per animal while in each AR-HMM state. (<bold>F</bold>) Fraction of time spent moving forward, (<bold>G</bold>) Midbody forward speed, (<bold>H</bold>) Midbody angular speed, (<bold>I</bold>) Head angular velocity, (<bold>J</bold>) Head radial velocity, (<bold>K</bold>) Fraction of time spent in each state per animal. (<bold>L</bold>) Transition matrix for four-state AR-HMM. Rows index state at time <italic>t</italic>, columns index state at <italic>t+1</italic>. (<bold>M</bold>) Fraction of AR-HMM states found in roaming and dwelling states. (<bold>N</bold>) Fraction of roaming and dwelling states found in each AR-HMM state. (<bold>O</bold>) Empirical complementary cumulative distribution functions (ccdfs) comparing state durations from the 4-state AR-HMM to those of roaming and dwelling. (<bold>P</bold>) Example behavioral trace with two lawn leaving events. Absolute speed and lawn boundary distance are shown for a continuous 40-min assay. Foraging decisions are annotated with colored tick marks above lawn boundary distance trace. Roaming, Dwelling, and AR-HMM states are annotated above absolute speed with colored bars. Distributions are computed across wild type animals on small lawns (n=1586). Violin plots show median and interquartile range. See <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig2-figsupp2-v1.tif"/></fig><fig id="fig2s3" position="float" specific-use="child-fig"><label>Figure 2—figure supplement 3.</label><caption><title>Head Poke Reversals are associated with small changes in arousal states.</title><p>(<bold>A</bold>) Midbody forward speed aligned to head poke reversals. Left, heatmap of individual speed traces. Right, mean midbody forward speed computed across the heatmap traces. (<bold>B</bold>) Overlap of head poke reversals with roaming and dwelling. Left, percentage of head poke reversals found in each state. Right, percentage of 10 s time bins roaming or dwelling that contain a head poke reversal. (<bold>C</bold>) Roaming and dwelling aligned to head poke reversals. Left, heatmap of roaming/dwelling state classifications aligned to head poke reversals. Center, fraction of animals in roaming or dwelling state prior to head poke reversals. Right, total fraction of time spent roaming and dwelling in all assays that included a head poke reversal. (<bold>D</bold>) Overlap of head poke reversals with AR-HMM states. Left, percentage of head poke reversals found in each state. Right, percentage of 10 s time bins per AR-HMM state that contain a head poke reversal. (<bold>E</bold>) AR-HMM states aligned to head poke reversals. Left, heatmap of roaming/dwelling state classifications aligned to head poke reversals. Center, fraction of animals in each AR-HMM state prior to head poke reversals. Right, total fraction of time spent in each AR-HMM state in all assays that included a head poke reversal. Data aligned to head poke reversals (n=63,585) from wild type animals (n=1586). Dark lines represent the mean and shaded region represents the standard error. In boxplots, median is highlighted, and interquartile range is indicated by shaded area. See <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig2-figsupp3-v1.tif"/></fig><fig id="fig2s4" position="float" specific-use="child-fig"><label>Figure 2—figure supplement 4.</label><caption><title>Lawn boundary distance distributions by HMM state (<bold>A–D</bold>) Empirical distributions of lawn boundary distance by HMM state.</title><p>Positive values indicate distances inside the lawn, negative values indicate distances outside the lawn (See <xref ref-type="fig" rid="fig1">Figure 1</xref>). (<bold>A</bold>) Lawn boundary distance of animals while roaming and dwelling. Statistics by Kolmogorov-Smirnov two-sample test. (<bold>B</bold>) Same as (<bold>A</bold>) but plotted as a cumulative distribution. (<bold>C</bold>) Lawn boundary distance of animals in each state of four-state AR-HMM. Statistics by Kolmogorov-Smirnov two-sample tests with Bonferroni correction. (<bold>D</bold>) Same as (<bold>C</bold>) but plotted as a cumulative distribution. Distributions are computed across wild type animals on small lawns (n=1586). In (<bold>A</bold>-<bold>B</bold>), **** p&lt;10<sup>–4</sup>. In (<bold>C</bold>-<bold>D</bold>), each AR-HMM state is significantly different from all others (a-d), although effect sizes are small.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig2-figsupp4-v1.tif"/></fig><media mimetype="video" mime-subtype="mp4" xlink:href="elife-88657-fig2-video1.mp4" id="fig2video1"><label>Figure 2—video 1.</label><caption><title>Example of animal behavior with roaming and dwelling annotated.</title><p>Animal shown corresponds to the behavior before and after the first lawn leaving event in <xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2P</xref>.</p><p>Green dot indicates the head position. White line indicates the lawn boundary. Forward and Reverse motion indicated in top left corner. Speed indicated top middle. Time stamps indicated top right. Video sped up 7 x.</p></caption></media><media mimetype="video" mime-subtype="mp4" xlink:href="elife-88657-fig2-video2.mp4" id="fig2video2"><label>Figure 2—video 2.</label><caption><title>The same animal and time steps as in <xref ref-type="video" rid="fig2video1">Figure 2—video 1</xref>, except annotated with AR-HMM states instead of roaming and dwelling.</title></caption></media></fig-group><p>The roaming-dwelling HMM was initially developed on uniform bacterial lawns (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>), which elicit more roaming than the small lawns used here (<xref ref-type="fig" rid="fig2s1">Figure 2—figure supplement 1F–H</xref>, <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>). Expanding this model to include posture information identified eight subclasses of dwelling states (<xref ref-type="bibr" rid="bib10">Cermak et al., 2020</xref>). To explore alternative analysis methods, we generated an HMM behavioral state model trained on our experimental conditions. An Autoregressive Hidden Markov model (AR-HMM) (<xref ref-type="bibr" rid="bib9">Buchanan et al., 2017</xref>; <xref ref-type="bibr" rid="bib36">Linderman et al., 2020</xref>), trained over an expanded set of locomotion parameters, converged on four states that largely reflect forward locomotion speed and related features (<xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2A–K</xref>, Methods). These four states provided a different segmentation of locomotory arousal that partly overlaps with roaming and dwelling states (<xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2M–N</xref>). Most lawn leaving events occurred during the high speed, high arousal AR-HMM state 3 (<xref ref-type="fig" rid="fig2">Figure 2E</xref>). Animals spent a median of 9% of the time in state 3 (<xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2K</xref>, <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>), but 5 min before leaving, 26% of animals were in state 3, which ramped to 82% immediately before leaving (<xref ref-type="fig" rid="fig2">Figure 2F</xref>, <xref ref-type="supplementary-material" rid="fig2sdata1">Figure 2—source data 1</xref>). Like roaming, state 3 increased only slightly before head poke reversals (<xref ref-type="fig" rid="fig2s3">Figure 2—figure supplement 3E</xref>). Animals across all behavioral states – roaming, dwelling, and the four AR-HMM states – were similarly distributed across the bacterial lawn, with strong enrichment near the lawn boundary (<xref ref-type="fig" rid="fig2s4">Figure 2—figure supplement 4A–D</xref>).</p><p>Both the two-state model and the four-state model show that arousal states increase before lawn leaving over at least two phases: an enrichment of a high arousal state 3–5 min before leaving, followed by a rapid acceleration in the last 30 s. Because the widely used two-state roaming-dwelling model captured the key features of lawn-leaving as well as these alternative methods, we applied that analysis to subsequent experiments.</p></sec><sec id="s2-3"><title>Food intake regulates arousal states and lawn leaving</title><p>Animals roam more and leave lawns more frequently when bacteria are hard to ingest or have low nutritional value (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib59">Shtonda and Avery, 2006</xref>). Conversely, simply increasing food concentration suppressed roaming and leaving on small lawns (<xref ref-type="fig" rid="fig3">Figure 3A–B</xref>, <xref ref-type="supplementary-material" rid="fig3sdata1">Figure 3—source data 1</xref>; <xref ref-type="bibr" rid="bib6">Bendesky et al., 2011</xref>). To separate the behavioral effects deriving from sensation of food odors from ingestion of food, we treated <italic>E. coli</italic> OP50 bacteria with aztreonam, an antibiotic that renders bacteria inedible to <italic>C. elegans</italic> by preventing bacterial cell septation (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib24">Gruninger et al., 2008</xref>). Both lawn leaving and roaming were dramatically increased on aztreonam-treated <italic>E. coli</italic> lawns (<xref ref-type="fig" rid="fig3">Figure 3C–D</xref>, <xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1A–B</xref>, <xref ref-type="supplementary-material" rid="fig3sdata1">Figure 3—source data 1</xref>, <xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>). Animals on aztreonam-treated lawns maintained the characteristic speed acceleration in the last 30 s before leaving (<xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1C</xref>).</p><fig-group><fig id="fig3" position="float"><label>Figure 3.</label><caption><title>Food intake regulates arousal states and lawn leaving.</title><p>(<bold>A–B</bold>) Increasing bacterial density suppresses roaming and leaving. (<bold>A</bold>) Fraction of time roaming on small lawns seeded with bacteria of different optical density (OD). OD1: n=45, OD2: n=46, OD4: n=47, Statistics by one-way ANOVA with Tukey’s post-hoc test on logit-transformed data. (<bold>B</bold>) Number of lawn leaving events per animal in the same assays as (<bold>A</bold>). Statistics by Kruskal-Wallis test with Dunn’s multiple comparisons test. (<bold>C–D</bold>) Animals on inedible food roam and leave lawns more than animals on edible food. (<bold>C</bold>) Fraction of time roaming on inedible bacteria generated by adding aztreonam dissolved in DMSO to <italic>E. coli</italic> growing on plates.+DMSO/+aztreonam n=64,+DMSO (control) n=66, Statistics by Student’s t-test performed on logit-transformed data. (<bold>D</bold>) Number of lawn leaving events in the same assays as (<bold>C</bold>). Statistics by Mann-Whitney U-test. (<bold>E–J</bold>) Feeding inhibition by optogenetic depolarization of pharyngeal muscles stimulates roaming and lawn leaving. (<bold>E</bold>) Heatmap showing roaming and dwelling for animals before, during, and after 10 min optogenetic feeding inhibition. Data for animals pre-treated with all-trans retinal (+ATR) is shown. (<bold>F</bold>) Fraction of animals roaming before, during, and after optogenetic feeding inhibition. Light ON period denoted by yellow shading (+ATR n=36). Control animals not pre-treated with all-trans retinal (-ATR n=32). Statistics by Student’s t-test comparing +/-ATR data averaged and logit-transformed during intervals indicated by black lines above plots: Minutes 0–10, 12–20, 22–30. (<bold>G</bold>) A greater fraction of animals leave lawns during feeding inhibition. Statistics by Fisher’s exact test. (<bold>H</bold>) Number of lawn leaving events in the same assays as (<bold>G</bold>). Statistics by Wilcoxon rank-sum test. (<bold>I</bold>) Cumulative distribution of time until the first head poke reversal or lawn leaving event during feeding inhibition. Statistics by Kolmogorov-Smirnov two-sample test. (<bold>J</bold>) Roaming animals accelerate before leaving during feeding inhibition. Left, mean roaming speed of animals before leaving. Right, quantification of roaming speed increase from minutes –3 to –1 to the last 30 s before leaving. Statistics by Wilcoxon rank-sum test. Statistics: ns, not significant, * p&lt;0.05, *** p&lt;10<sup>–3</sup>,**** p&lt;10<sup>–4</sup> In time-averages (F,J), dark line represents the mean and shaded region represents the standard error. Violin plots show median and interquartile range. In (H), each dot pair connected by a line represents data from a single animal. In (J), each dot pair connected by a line represents data preceding a single lawn leaving event. Thick black line indicates the average. See <xref ref-type="supplementary-material" rid="fig3sdata1">Figure 3—source data 1</xref>.</p><p><supplementary-material id="fig3sdata1"><label>Figure 3—source data 1.</label><caption><title>Quantification of roaming and lawn leaving from experiments in <xref ref-type="fig" rid="fig3">Figure 3</xref>.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig3-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig3-v1.tif"/></fig><fig id="fig3s1" position="float" specific-use="child-fig"><label>Figure 3—figure supplement 1.</label><caption><title>Further quantification of roaming and leaving behaviors under food intake inhibition.</title><p>(<bold>A–B</bold>) Aztreonam affects roaming and leaving by affecting bacterial growth. In ‘pre-add’ conditions, the drug is added to liquid cultures and agar plates during bacterial growth. In ‘post-add’ conditions, the drug is added after bacterial growth just before testing behavior. (<bold>A</bold>) Fraction of time roaming. Different letters mark significant differences in roaming by logit-transformation followed by one-way ANOVA and Tukey’s post hoc test. (<italic>pre-add</italic>:+DMSO/+aztreonam n=12,+DMSO (control) n=15; <italic>post-add</italic>:+DMSO/+aztreonam n=12,+DMSO (control) n=16). (<bold>B</bold>) Number of lawn leaving events in the same assays as (<bold>A</bold>). Different letters mark significant differences in leaving by Kruskal-Wallis followed by Dunn’s multiple comparisons test. (<bold>C</bold>) Animals on inedible food accelerate before leaving the lawn. Statistics by Wilcoxon rank-sum test. (<bold>D–G</bold>) Quantification of controls relating to optogenetic feeding inhibition experiments. (<bold>D</bold>) Light exposure does not induce roaming in animals not pre-treated with all-trans retinal. Statistics by paired t-test on logit-transformed data. (<bold>E</bold>) Light exposure reliably induces roaming in animals pre-treated with all-trans retinal. Statistics by paired t-test on logit-transformed data. (<bold>F</bold>) Light exposure does not increase the fraction of animals that leave lawns when animals are not pre-treated with all-trans retinal. Statistics by Fisher’s exact test. (<bold>G</bold>) Light exposure does not increase the number of lawn leaving events when animals are not pre-treated with all-trans retinal. Statistics by Wilcoxon rank-sum test. (<bold>H</bold>) Cumulative distribution of time until the first head poke reversal or lawn leaving event while the light is OFF. Statistics by Kolmogorov-Smirnov two-sample test. (<bold>I–J</bold>) Quantification of roaming and leaving in animals with or without pre-treatment with all-trans retinal without light exposure. (-ATR n=67,+ATR n=57). (<bold>I</bold>) Pre-treatment with all-trans retinal does not alter the fraction of time roaming. Statistics by Student’s t-test on logit-transformed data. (<bold>J</bold>) Pre-treatment with all-trans retinal does not alter the number of lawn leaving events per animal. Statistics by Mann-Whitney U test. Statistics: ns not significant (p&gt;0.05), **** p&lt;10<sup>–4</sup> Violin plots show median and interquartile range. In (D,E,G), each dot pair connected by a line represents data from a single animal. In (C), each dot pair connected by a line represents data preceding a single lawn leaving event. See <xref ref-type="supplementary-material" rid="fig3sdata1">Figure 3—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig3-figsupp1-v1.tif"/></fig></fig-group><p>Locomotion speed is regulated by direct interoception of pharyngeal pumping, the motor behavior associated with intake of bacterial food (<xref ref-type="bibr" rid="bib54">Rhoades et al., 2019</xref>). To ascertain whether similar mechanisms affect arousal and lawn leaving, we acutely inhibited pharyngeal pumping by optogenetic activation of the red-shifted channelrhodopsin ReaChR in pharyngeal muscle (<xref ref-type="bibr" rid="bib35">Lin et al., 2013</xref>; <xref ref-type="fig" rid="fig3">Figure 3E–J</xref>). Acute feeding inhibition strongly stimulated both roaming and lawn leaving (<xref ref-type="fig" rid="fig3">Figure 3E–H</xref>, <xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1D–E</xref>, <xref ref-type="supplementary-material" rid="fig3sdata1">Figure 3—source data 1</xref>, <xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>).</p><p>While roaming and head pokes began immediately upon feeding inhibition, leaving events did not occur immediately but instead accumulated throughout the 10-min stimulation interval (<xref ref-type="fig" rid="fig3">Figure 3I</xref>). In each case, leaving was preceded by a 30 s acceleration in speed (<xref ref-type="fig" rid="fig3">Figure 3J</xref>). Thus, feeding inhibition elicits both roaming and lawn-leaving behaviors, and lawn-leaving occurs probabilistically during roaming states.</p></sec><sec id="s2-4"><title>Parallel regulation of arousal states and leaving by neuromodulatory mutants</title><p>To further examine the relationship between arousal states and lawn leaving, we examined mutants with known alterations in roaming and dwelling. Animals deficient in serotonin (<italic>tph-1</italic>), dopamine (<italic>cat-2</italic>), or the neuropeptide receptor NPR-1 (<italic>npr-1</italic>) roam at a higher rate than wild type (<xref ref-type="bibr" rid="bib10">Cermak et al., 2020</xref>; <xref ref-type="bibr" rid="bib12">Cheung et al., 2005</xref>; <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib48">Omura et al., 2012</xref>; <xref ref-type="bibr" rid="bib56">Sawin et al., 2000</xref>). We found that each of these mutants showed increased lawn leaving compared to wild-type controls, strengthening the observed correlation between roaming and leaving rates (<xref ref-type="fig" rid="fig4">Figure 4A–C and E–G</xref>, <xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>). In addition, the fraction of animals roaming increased over several minutes before leaving events, as was observed in wild type animals (<xref ref-type="fig" rid="fig4">Figure 4I–K</xref>). Finally, each mutant accelerated during the 30 s prior to leaving (<xref ref-type="fig" rid="fig4">Figure 4M–O</xref>). Thus, although the molecular basis of arousal is different in each of these mutants, the overall dynamics of roaming and lawn leaving are preserved across genotypes.</p><fig-group><fig id="fig4" position="float"><label>Figure 4.</label><caption><title>Neuromodulatory signaling mutants retain coupling of arousal and leaving.</title><p>(<bold>A–P</bold>) Roaming, lawn leaving, roaming before leaving, and roaming speed quantified across mutants in four neuromodulatory genes known to alter roaming and dwelling: <italic>tph-1</italic>, <italic>cat-2</italic>, <italic>npr-1</italic>, and <italic>pdfr-1</italic>. (<bold>A–D</bold>) Fraction of time roaming. Statistics by Student’s t-test on logit-transformed data. (<bold>E–H</bold>) Number of lawn leaving events per animal. Statistics by Mann-Whitney U test. (<bold>I–L</bold>) Fraction of animals roaming before lawn leaving. Left, fraction of animals roaming in the last 5 min before lawn leaving. WT and mutant roaming fractions were compared over the two minutes prior to leaving (black bar). Right, total fraction of time spent roaming and dwelling in all assays that included a lawn-leaving event. Statistics by Student’s t-test on logit-transformed data. Note that roaming levels were unusually low (<bold>A,B,I,J</bold>) or high (<bold>C,K</bold>) in the wild-type controls for these groups, and therefore genotypes cannot be compared across different experimental panels. (<bold>M–P</bold>) Roaming speed before leaving computed at times when less than 10% of aligned traces had missing data. Paired plots indicate the average speed from minutes –3 to –1 and in the last 30 s before leaving per animal. Statistics by Wilcoxon rank-sum test. Statistics: ns not significant (p&gt;0.05), ** p&lt;0.01, *** p&lt;10<sup>–3</sup>, **** p&lt;10<sup>–4</sup> Violin plots and box plots show median and interquartile range. In time-averages, dark line represents the mean and shaded region represents the standard error. In paired plots (M-P), each dot pair connected by a line represents data preceding a single lawn leaving event. Thick black line indicates the average. (<italic>tph-1</italic> n=139, wild type controls n=127; <italic>cat-2</italic> n=88, wild type controls n=76; <italic>npr-1</italic> n=91, wild type controls n=90; <italic>pdfr-1</italic> n=265, wild type controls n=247). See <xref ref-type="supplementary-material" rid="fig4sdata1">Figure 4—source data 1</xref>.</p><p><supplementary-material id="fig4sdata1"><label>Figure 4—source data 1.</label><caption><title>Quantification of roaming and lawn leaving from experiments in <xref ref-type="fig" rid="fig4">Figure 4</xref>.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig4-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig4-v1.tif"/></fig><fig id="fig4s1" position="float" specific-use="child-fig"><label>Figure 4—figure supplement 1.</label><caption><title>Optogenetic feeding inhibition stimulates roaming and leaving in neuromodulatory mutants.</title><p>(<bold>A–B</bold>) Optogenetic feeding inhibition in <italic>pdfr-1</italic> mutants. (<bold>A</bold>) Left, Fraction of animals roaming before, during and after optogenetic feeding inhibition in <italic>pdfr-1</italic> mutants and paired wild type controls. Statistics by Student’s t-test comparing <italic>pdfr-1</italic> and matched wild type data averaged and logit-transformed in intervals denoted by black bars above: Data compared at 0–10, 12–20, 22–30 min. Right, Difference in fraction of time roaming between light ON and light OFF conditions per animal. Statistics by Mann-Whitney U test. Left and Center, <italic>pdfr-1</italic> animals and wild type controls execute more lawn leaving events under feeding inhibition while light is ON. Statistics by Wilcoxon rank-sum test. Right, difference in number of lawn leaving events between light ON and light OFF conditions per animal. Statistics by Mann-Whitney U test. (<italic>pdfr-1</italic> n=23, wild type controls n=27). (<bold>C</bold>-<bold>D</bold>) Optogenetic feeding inhibition in <italic>tph-1</italic> mutants. Same as (A) for <italic>tph-1</italic> animals and matched controls. Same as (B) for <italic>tph-1</italic> animals and matched controls. (<italic>tph-1</italic> n=18, wild type controls n=16)Statistics: ns not significant (p&gt;0.05), * p&lt;0.05, ** p&lt;0.01, *** p&lt;10<sup>–3</sup>. Violin plots show median and interquartile range. In time-averages, dark line represents the mean and shaded region represents the standard error. In paired plots, each dot pair connected by a line represents data from a single animal. Thick black line indicates the average. See <xref ref-type="supplementary-material" rid="fig4sdata1">Figure 4—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig4-figsupp1-v1.tif"/></fig></fig-group><p>Animals lacking the G-protein-coupled receptor Pigment Dispersing Factor Receptor (PDFR-1) roam less than wild type (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib33">Ji et al., 2021</xref>; <xref ref-type="bibr" rid="bib40">Meelkop et al., 2012</xref>). On the small lawns used here, <italic>pdfr-1</italic> mutants roamed less, but left food lawns at the same low rate as wild type (<xref ref-type="fig" rid="fig4">Figure 4D and H</xref>). Roaming rates increased similarly during the 3 min prior to lawn leaving in wild type and <italic>pdfr-1</italic> animals, suggesting that the coupling of roaming and leaving does not require PDFR-1 signaling (<xref ref-type="fig" rid="fig4">Figure 4L</xref>). Although their basal locomotion speed is lower (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib33">Ji et al., 2021</xref>), <italic>pdfr-1</italic> did accelerate slightly before lawn leaving (<xref ref-type="fig" rid="fig4">Figure 4P</xref>). In summary, neuromodulatory mutants varied in the fraction of time spent roaming and dwelling, but in each case lawn-leaving behaviors were coupled to roaming and a brief speed acceleration.</p><p>Optogenetic inhibition of feeding elicited immediate roaming and probabilistic lawn leaving in both <italic>pdfr-1</italic> and <italic>tph-1</italic> mutants (<xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref>), indicating that neither of these neuromodulators is essential for interpreting feeding inhibition. This was surprising because the <italic>tph-1-</italic>expressing NSM neurons sense bacterial ingestion and signal food availability via serotonin release (<xref ref-type="bibr" rid="bib54">Rhoades et al., 2019</xref>), and were therefore candidates to relay feeding signals. NSM may act through additional transmitters as well as serotonin, or it may be redundant with additional neurons that detect feeding inhibition.</p></sec><sec id="s2-5"><title>Acute circuit manipulation drives deterministic roaming and probabilistic leaving</title><p>As a complement to the neuromodulatory mutants, we employed a circuit-based approach to manipulate arousal levels and examine effects on lawn leaving. Roaming is strongly stimulated by <italic>pdfr-1;</italic> we defined sites of <italic>pdfr-1</italic> expression that stimulate roaming using an intersectional Cre-Lox system that restores <italic>pdfr-1</italic> expression in targeted groups of cells in <italic>pdfr-1</italic> mutant animals (<xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref>, <xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2A</xref>; <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>). Previous work identified a moderate effect of AIY, RIM, and RIA neurons as mediators of <italic>pdfr-1-</italic>dependent roaming (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>). We observed a stronger rescue of roaming upon <italic>pdfr-1</italic> expression solely in the RIB neurons, which are active during rapid forward locomotion (<xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2B–D</xref>; <xref ref-type="bibr" rid="bib33">Ji et al., 2021</xref>; <xref ref-type="bibr" rid="bib66">Wang et al., 2020</xref>).</p><p>Following this result, we asked whether optogenetic activation of RIB might be sufficient for roaming in wild-type animals. PDFR-1 signals through the heterotrimeric G protein Gαs to increase cAMP levels (<xref ref-type="bibr" rid="bib31">Janssen et al., 2008</xref>), and optogenetic activation of groups of PDFR-1-expressing neurons with the bacterial light-activated adenylyl cyclase BlaC increases roaming (<xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib55">Ryu et al., 2010</xref>). We found that acute optogenetic activation of only RIB with BlaC induced immediate roaming in over 80% of animals (<xref ref-type="fig" rid="fig5">Figure 5A–C</xref>, <xref ref-type="fig" rid="fig5s3">Figure 5—figure supplement 3A–B</xref>).</p><fig-group><fig id="fig5" position="float"><label>Figure 5.</label><caption><title>Acute circuit manipulation drives deterministic roaming and probabilistic leaving.</title><p>(<bold>A</bold>) Experimental design. Stimulation of bacterial light-activated adenylyl cyclase (BlaC) with 455 nm light increases cAMP synthesis in RIB::BlaC neurons. (<bold>B</bold>) Heatmap showing roaming and dwelling for RIB::BlaC animals before, during, and after 10-min optogenetic stimulation. (<bold>C</bold>) Fraction of animals roaming before, during, and after optogenetic blue light stimulation. Light ON period denoted by blue shading. Control animals are wild type. Statistics by Student’s t-test comparing RIB::BlaC and wild-type animals averaged and logit-transformed during intervals indicated by black lines above plots: Data compared at 0–10, 12–20, 22–30 min. (<bold>D</bold>) A greater fraction of RIB::BlaC animals leave lawns when the light is ON vs. OFF. Statistics by Fisher’s exact test. (<bold>E</bold>) Number of lawn leaving events under the same conditions as (<bold>D</bold>). Statistics by Wilcoxon rank-sum test. (<bold>F</bold>) Cumulative distribution of time until the first head poke reversal or lawn leaving event while the light is ON. Statistics by Kolmogorov-Smirnov two-sample test. Statistics: ns not significant (p&gt;0.05), ** p&lt;0.01, *** p&lt;10<sup>–3</sup>, **** p&lt;10<sup>–4</sup> In time-averages (C), dark line represents the mean and shaded region represents the standard error. (RIB::BlaC n=35, wild type n=34) In (E), each dot pair connected by a line represents data from a single animal. Thick black line indicates the average. See <xref ref-type="supplementary-material" rid="fig5sdata1">Figure 5—source data 1</xref>.</p><p><supplementary-material id="fig5sdata1"><label>Figure 5—source data 1.</label><caption><title>Quantification of roaming and lawn leaving from experiments in <xref ref-type="fig" rid="fig5">Figure 5</xref>.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig5-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig5-v1.tif"/></fig><fig id="fig5s1" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 1.</label><caption><title><italic>pdfr-1</italic> genomic characteristics and expression patterns.</title><p>(<bold>A</bold>) Genomic region surrounding <italic>pdfr-1</italic> (black boxes represent coding exons, gray boxes are non-coding exons), region deleted in <italic>pdfr-1(ok3425</italic>) mutants, proximal and distal promoters, PCR fragments used in transgenic rescue experiments. (<bold>B</bold>) Rescue of <italic>pdfr-1</italic> roaming phenotype by transgenic expression from the PCR fragments illustrated in (<bold>A</bold>). Different letters mark significant differences in roaming by logit-transformation followed by Tukey’s post hoc test (wild type n=55, <italic>pdfr-1</italic> n=59, PCR fragment #1; <italic>pdfr-1</italic> n=46, PCR fragment #2; <italic>pdfr-1</italic> n=51). Violin plots show median and interquartile range. (<bold>C</bold>) <italic>pdfr-1</italic> expression patterns from the proximal and distal promoters as reported (<xref ref-type="bibr" rid="bib4">Barrios et al., 2012</xref>, <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>) and from this work. See <xref ref-type="supplementary-material" rid="fig5sdata1">Figure 5—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig5-figsupp1-v1.tif"/></fig><fig id="fig5s2" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 2.</label><caption><title>Transgenic rescue of <italic>pdfr-1</italic> in RIB neurons restores roaming (<bold>A</bold>) Schematic depicting intersectional cell-specific rescue of <italic>pdfr-1</italic> using an inverted Cre-Lox strategy.</title><p>(<bold>B</bold>) Restoring <italic>pdfr-1</italic> expression in AIY, RIM, and RIA neurons did not rescue roaming on small lawns (wild type n=64, inverted <italic>pdfr-1</italic> transgene n=64, AIY, RIM, RIA <italic>pdfr-1</italic> rescue n=64, pan-neuronal::Cre rescue n=67). (<bold>C</bold>) Restoring <italic>pdfr-1</italic> expression in RIB neurons rescued roaming comparably to pan-neuronal rescue on small lawns (wild type n=27, inverted <italic>pdfr-1</italic> transgene n=32, RIB <italic>pdfr-1</italic> rescue n=33, pan-neuronal::Cre rescue n=31). (<bold>D</bold>) Differential interference contrast (DIC), GFP fluorescence and composite images of an animal expressing <italic>pdfr-1</italic> in the RIB neurons using the transgenic strategy shown in (<bold>A</bold>). Scale bar is 10 μm. Statistics: In (B-C), different letters mark significant differences in roaming by logit-transformation followed by Tukey’s post hoc test. Violin plots (B,C) show median and interquartile range. See <xref ref-type="supplementary-material" rid="fig5sdata1">Figure 5—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig5-figsupp2-v1.tif"/></fig><fig id="fig5s3" position="float" specific-use="child-fig"><label>Figure 5—figure supplement 3.</label><caption><title>Further quantification and controls of RIB::BlaC experiments.</title><p>(<bold>A–E</bold>) Quantification of RIB::BlaC controls. (<bold>A</bold>) Blue light stimulation does not induce roaming in wild-type animals. Statistics by paired t-test on logit-transformed data. (<bold>B</bold>) Blue light stimulation reliably induces roaming in RIB::BlaC animals. Statistics by paired t-test on logit-transformed data. (<bold>C</bold>) Blue light stimulation does not elevate the fraction of wild-type animals that leave lawns. Statistics by Fisher’s exact test. (<bold>D</bold>) Blue light stimulation does not elevate the number of lawn leaving events per wild type animal. Statistics by Wilcoxon rank-sum test. (<bold>E</bold>) Cumulative distribution of time until the first head poke reversal or lawn leaving event while the light is OFF. Statistics by Kolmogorov-Smirnov two-sample test. (<bold>F</bold>) Roaming animals only accelerate slightly before leaving during RIB BlaC stimulation. Left, mean roaming speed of animals before leaving. Right, quantification of roaming speed changes before leaving. Statistics by Wilcoxon rank-sum test. (RIB BlaC n=35, wild type n=34). Statistics: ns not significant (p&gt;0.05), **** p&lt;10<sup>–4</sup> In paired plots (A,B,D), each dot pair connected by a line represents data from a single animal. Thick black line indicates the average. See <xref ref-type="supplementary-material" rid="fig5sdata1">Figure 5—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig5-figsupp3-v1.tif"/></fig></fig-group><p>RIB::BlaC stimulation also potentiated lawn leaving, with over 70% of animals leaving lawns during the stimulation period (<xref ref-type="fig" rid="fig5">Figure 5D–E</xref>). Like lawn-leaving during optogenetic feeding inhibition, this behavior was probabilistic across the 10-min light pulse (<xref ref-type="fig" rid="fig5">Figure 5F</xref>). Animals accelerated slightly in the 30 s before leaving, but the speed increase appeared less pronounced than in other manipulations, suggesting that RIB activity may partially occlude the acceleration motif in lawn leaving (<xref ref-type="fig" rid="fig5s3">Figure 5—figure supplement 3F</xref>). Neither roaming nor lawn leaving was potentiated by blue light exposure in wild type control animals not expressing BlaC (<xref ref-type="fig" rid="fig5">Figure 5C</xref>, <xref ref-type="fig" rid="fig5s3">Figure 5—figure supplement 3A, C-D</xref>).</p></sec><sec id="s2-6"><title>Chemosensory neurons couple roaming dynamics, internal state, and lawn leaving</title><p>In addition to the neuromodulatory arousal systems, multiple food- and pheromone-sensing chemosensory neurons affect roaming, dwelling, and leaving behaviors (<xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref>). Most of these neurons use the cyclic nucleotide-gated channel gene <italic>tax-4</italic> for sensory transduction, and <italic>tax-4</italic> mutants have diminished roaming behavior (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib20">Fujiwara et al., 2002</xref>; <xref ref-type="fig" rid="fig6">Figure 6A</xref>, <xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref>). However, we found that <italic>tax-4</italic> mutant animals continued to leave lawns – indeed, they left at slightly higher rates than wild-type animals (<xref ref-type="fig" rid="fig6">Figure 6B</xref>, <xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>). Moreover, the temporal relationship between roaming and leaving was altered in <italic>tax-4</italic> mutants, which typically roamed for only ~1 min prior to lawn leaving (<xref ref-type="fig" rid="fig6">Figure 6C</xref>, <xref ref-type="fig" rid="fig6s1">Figure 6—figure supplement 1A–B</xref>). These results indicate that loss of <italic>tax-4</italic> disrupted the characteristic arousal dynamics associated with leaving.</p><fig-group><fig id="fig6" position="float"><label>Figure 6.</label><caption><title><italic>tax-4</italic>-expressing sensory neurons couple roaming and lawn leaving.</title><p>(<bold>A–C</bold>) Roaming and leaving in <italic>tax-4</italic> mutants, and rescue by <italic>tax-4</italic> expression in ASJ neurons (wild type n=143, <italic>tax-4</italic> n=156, <italic>tax-4</italic> ASJ rescue n=148). Additional features of roaming and leaving are shown in <xref ref-type="fig" rid="fig6s1">Figure 6—figure supplement 1</xref>; results with additional rescued neurons are in <xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref>. (<bold>A</bold>) Fraction of time roaming. Statistical tests, one-way ANOVA followed by Tukey’s post hoc test on logit-transformed data. (<bold>B</bold>) Number of lawn-leaving events per animal. Statistical tests, Kruskal-Wallis followed by Dunn’s multiple comparisons test. (<bold>C</bold>) Fraction of animals roaming before lawn-leaving. Left, fraction of animals roaming in the last 5 min before lawn leaving. Roaming fractions were compared over the 2 min prior to leaving (black bar). Right, total fraction of time spent roaming and dwelling in all assays that included a lawn-leaving event. Key, statistical tests of differences in roaming two minutes before leaving by one-way ANOVA followed by Tukey’s post hoc test on logit-transformed data. (<bold>D–E</bold>) Optogenetic feeding inhibition in <italic>tax-4</italic> mutants and rescued strains (wild type n=70, <italic>tax-4</italic> n=66, <italic>tax-4</italic> ASJ rescue n=68). (<bold>D</bold>) Left, Fraction of time spent roaming under optogenetic feeding inhibition in <italic>tax-4</italic> and ASJ rescue strain. Statistics by paired t-test on logit-transformed data. Right, Difference in the fraction of time roaming when the light is ON and OFF. Statistics by one-way ANOVA followed by Tukey’s post hoc test on logit-transformed data. (<bold>E</bold>) Left, Number of lawn leaving events under optogenetic feeding inhibition in <italic>tax-4</italic> and ASJ rescue strain. Statistics by Wilcoxon rank-sum test. Right, Difference in the number of lawn leaving events when the light is ON and OFF. Statistics by Kruskal-Wallis test followed by Dunn’s multiple comparisons test. ns not significant (p&gt;0.05), * p&lt;0.05, *** p&lt;10<sup>–3</sup>, **** p&lt;10<sup>–4</sup> Violin plots and box plots (A,D) show median and interquartile range. In time-averages (C), dark line represents the mean and shaded region represents the standard error. In paired plots (D,E), each dot pair connected by a line represents data from a single animal. Thick black line indicates the average. See <xref ref-type="supplementary-material" rid="fig6sdata1">Figure 6—source data 1</xref>.</p><p><supplementary-material id="fig6sdata1"><label>Figure 6—source data 1.</label><caption><title>Quantification of roaming and lawn leaving from experiments in <xref ref-type="fig" rid="fig6">Figure 6</xref>.</title></caption><media mimetype="application" mime-subtype="xlsx" xlink:href="elife-88657-fig6-data1-v1.xlsx"/></supplementary-material></p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig6-v1.tif"/></fig><fig id="fig6s1" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 1.</label><caption><title>Further quantification of <italic>tax-4</italic> mutants and <italic>tax-4</italic> ASJ rescue on edible food (<bold>A</bold>) Complementary cumulative distribution functions (ccdfs) for overall roam state durations for wild type, <italic>tax-4,</italic> and <italic>tax-4</italic> rescued in ASJ.</title><p>Different letters mark significant differences by Kolmogorov-Smirnov two-sample tests with Bonferroni correction. (<bold>B</bold>) Same as (<bold>A</bold>) for roam state durations before leaving events. Wild type n=143, <italic>tax-4</italic> n=156, <italic>tax-4</italic> ASJ rescue n=148. Statistics: different letters indicate significant differences. See <xref ref-type="supplementary-material" rid="fig6sdata1">Figure 6—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig6-figsupp1-v1.tif"/></fig><fig id="fig6s2" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 2.</label><caption><title><italic>tax-4</italic> rescue in additional <italic>tax-4-</italic>expressing neurons (<bold>A–B</bold>) Quantification of roaming and leaving in <italic>tax-4</italic> mutants with <italic>tax-4</italic> rescued in ASJ, ASK or ASJ +ASK neurons (wild type n=95, <italic>tax-4</italic> n=104, ASJ rescue n=91, ASK rescue n=101, ASJ +ASK rescue n=105).</title><p>(<bold>A</bold>) ASJ or ASJ +ASK <italic>tax-4</italic> rescue restores roaming to <italic>tax-4</italic> mutants. (<bold>B</bold>) ASK <italic>tax-4</italic> rescue suppresses lawn leaving below <italic>tax-4</italic> levels. (<bold>C–D</bold>) Quantification of roaming and leaving in <italic>tax-4</italic> mutants with <italic>tax-4</italic> rescued in AWC or ASI neurons (wild type n=79, <italic>tax-4</italic> n=88, AWC rescue n=68, ASI rescue n=77). (<bold>C</bold>) AWC or ASI <italic>tax-4</italic> rescue fails to restore roaming to <italic>tax-4</italic> mutants. (<bold>D</bold>) AWC <italic>tax-4</italic> rescue restores lawn leaving to wild-type levels. (<bold>E–F</bold>) Quantification of roaming and leaving in <italic>tax-4</italic> mutants with <italic>tax-4</italic> rescued in AQR/PQR/URX neurons (wild type n=35, <italic>tax-4</italic> n=32, AQR/PQR/URX rescue n=19). (<bold>E</bold>) AQR/PQR/URX <italic>tax-4</italic> rescue fails to restore roaming to <italic>tax-4</italic> mutants. (<bold>F</bold>) AQR/PQR/URX <italic>tax-4</italic> rescue fails to restore lawn leaving. Violin plots (A,C,E) show median and interquartile range. Statistics: Different letters mark significant differences. ns not significant (p&gt;0.05), * p&lt;0.05, ** p&lt;0.01, *** p&lt;10<sup>–3</sup>. Statistical tests for differences in fraction of time roaming by one-way ANOVA followed by Tukey’s post hoc test on logit-transformed data. Statistical tests for differences in lawn leaving by Kruskal-Wallis test followed by Dunn’s multiple comparisons test. See <xref ref-type="supplementary-material" rid="fig6sdata1">Figure 6—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig6-figsupp2-v1.tif"/></fig><fig id="fig6s3" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 3.</label><caption><title>Further quantification of <italic>tax-4</italic> mutants and <italic>tax-4</italic> rescue upon optogenetic feeding inhibition (<bold>A-D</bold>) Effects of <italic>tax-4</italic> on roaming and leaving behavior induced by optogenetic feeding inhibition.</title><p>(<bold>A</bold>) Fraction of animals roaming before, during, and after optogenetic feeding inhibition. Light ON period denoted by yellow shading. (<bold>B</bold>) Cumulative distribution of time until the first head poke reversal or lawn leaving event while the light is OFF. Statistics by all pairwise Kolmogorov-Smirnov two-sample tests, Bonferroni corrected. (<bold>C</bold>) Same as (<bold>D</bold>) for when the light is ON. Pairwise significant differences in time to first lawn leaving are indicated in the figure legend. (<bold>D</bold>) Left, Roaming speed before leaving while the light is ON computed at times when less than 10% of aligned traces had missing data. Roaming speed from the last 30 s is averaged and compared by statistical testing: significant differences are reported in the figure legend under ‘before’. Right, paired plots indicate the average speed from minutes –3 to –1 and in the last 30 s before leaving per animal. Each dot pair connected by a line represents data preceding a single lawn leaving event. Thick black line indicates the average. Statistics: ** p&lt;0.01, *** p&lt;10<sup>–3</sup>, Different letters mark significant differences. Violin plots (B,C) show median and interquartile range. See <xref ref-type="supplementary-material" rid="fig6sdata1">Figure 6—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig6-figsupp3-v1.tif"/></fig><fig id="fig6s4" position="float" specific-use="child-fig"><label>Figure 6—figure supplement 4.</label><caption><title><italic>tax-4</italic> mutants leave less on inedible food and ASJ rescue restores leaving.</title><p>(<bold>A–B</bold>) In these panels, wild type n=30, <italic>tax-4</italic> n=22, <italic>tax-4</italic> ASJ rescue n=10 on inedible food generated by pre-treatment of bacterial lawns with aztreonam before growth. (<bold>A</bold>) Wild type, <italic>tax-4</italic> and <italic>tax-4</italic> ASJ rescue animals all roam near-constantly on inedible food. Statistical tests of differences in roaming by one-way ANOVA followed by Tukey’s post hoc test on logit-transformed data. (<bold>B</bold>) <italic>tax-4</italic> mutants leave lawns of inedible bacteria less frequently than wild type. <italic>tax-4</italic> ASJ rescue restores lawn leaving. Statistical tests of differences in lawn leaving by Kruskal-Wallis followed by Dunn’s multiple comparisons test. See <xref ref-type="supplementary-material" rid="fig6sdata1">Figure 6—source data 1</xref>.</p></caption><graphic mimetype="image" mime-subtype="tiff" xlink:href="elife-88657-fig6-figsupp4-v1.tif"/></fig></fig-group><p>Many of the 15 classes of sensory neurons that express <italic>tax-4</italic> have been implicated in roaming or leaving behaviors (<xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref>). We rescued <italic>tax-4</italic> separately in AWC, which senses food odors; ASK, which senses amino acids and pheromones; ASJ and ASI, which sense pheromones, food, and toxins; and URX/AQR/PQR, which sense environmental oxygen (<xref ref-type="bibr" rid="bib5">Ben Arous et al., 2009</xref>; <xref ref-type="bibr" rid="bib6">Bendesky et al., 2011</xref>; <xref ref-type="bibr" rid="bib23">Greene et al., 2016</xref>; <xref ref-type="bibr" rid="bib43">Milward et al., 2011</xref>). Significant effects on roaming or leaving behavior were observed upon ASJ, ASK, or AWC rescue (<xref ref-type="fig" rid="fig6">Figure 6A–C</xref>, <xref ref-type="fig" rid="fig6s1">Figure 6—figure supplement 1</xref> and S2). The strongest effects resulted from <italic>tax-4</italic> rescue in the ASJ neurons, which partially restored roaming levels before lawn leaving (<xref ref-type="fig" rid="fig6">Figure 6A–C</xref>, <xref ref-type="fig" rid="fig6s1">Figure 6—figure supplements 1</xref> and <xref ref-type="fig" rid="fig6s2">2</xref>), and <italic>tax-4</italic> rescue in the ASK neurons, which paradoxically suppressed leaving to a level below that of either wild type or <italic>tax-4</italic> animals (<xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref>). Because ASJ and ASK showed opposite effects in these experiments, we also examined strains in which both neurons were rescued. Combined ASJ and ASK rescue normalized roaming and leaving compared to ASK rescue alone, albeit not to fully wild-type levels (<xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref>). While we have not tested all neurons and combinations, these results suggest that multiple <italic>tax-4-</italic>expressing sensory neurons have roles in arousal-related behaviors and highlight ASJ as a regulator of roaming and leaving dynamics.</p><p>Next, we asked how <italic>tax-4</italic> mutants responded to acute inhibition of feeding. As in wild-type animals, optogenetic inhibition of pharyngeal pumping resulted in an immediate and strong increase in roaming in <italic>tax-4</italic> mutants (<xref ref-type="fig" rid="fig6">Figure 6D</xref>, <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3A</xref>). However, feeding inhibition in <italic>tax-4</italic> mutants increased leaving only slightly, unlike in the wild-type (<xref ref-type="fig" rid="fig6">Figure 6E</xref>, <xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>). Both of these effects were rescued by expressing <italic>tax-4</italic> in ASJ neurons (<xref ref-type="fig" rid="fig6">Figure 6C–E</xref>, <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3B–D</xref>). Similarly, <italic>tax-4</italic> animals on inedible food roamed at the same high rate as wild type animals but produced significantly fewer lawn leaving events (<xref ref-type="fig" rid="fig6s4">Figure 6—figure supplement 4</xref>); rescuing <italic>tax-4</italic> in ASJ restored lawn leaving to wild-type levels. Thus <italic>tax-4</italic> sensory mutants uncouple leaving behavior from its normal context in multiple ways: they can leave edible food lawns without an extended roaming state, and they are less likely to leave when feeding is inhibited, even while they are roaming.</p></sec></sec><sec id="s3" sec-type="discussion"><title>Discussion</title><p>Both in the wild and in laboratory settings, foraging locomotion patterns exhibit scale invariance, meaning that similar statistics of movement displacement and duration arise on short and long timescales (<xref ref-type="bibr" rid="bib2">Ayala-Orozco et al., 2004</xref>; <xref ref-type="bibr" rid="bib51">Proekt et al., 2012</xref>). Long-term arousal changes are regulated by neuromodulators that signal widely throughout the brain (<xref ref-type="bibr" rid="bib19">Flavell et al., 2022</xref>; <xref ref-type="bibr" rid="bib61">Taghert and Nitabach, 2012</xref>; <xref ref-type="bibr" rid="bib67">Weissbourd et al., 2014</xref>), whereas moment-by-moment decision-making involves fast sensorimotor circuits (<xref ref-type="bibr" rid="bib22">Gold and Shadlen, 2007</xref>). Here, we show that <italic>C. elegans</italic> couples food leaving decisions, which unfold over seconds, to high arousal roaming states that last minutes. Although food intake and neuromodulatory signaling both alter the frequency of sustained <italic>C. elegans</italic> roaming states, these changes do not disrupt the coupling of roaming to food leaving decisions. Instead, sensory neurons link roaming and leaving behaviors, integrating these behavioral motifs, their dynamic properties, and their regulation by food intake.</p><sec id="s3-1"><title>Behavioral arousal alters probabilistic decision-making</title><p>From an ethological perspective, lawn-leaving is a classical foraging decision based on an animal’s assessment of the quality of a food patch (<xref ref-type="bibr" rid="bib11">Charnov, 1976</xref>). Previous studies of lawn-leaving have identified features of the environment, like food availability, population density, and toxic repellents, that affect leaving probability as predicted by foraging theory. Here, we have extended these observations using the framework of computational neuroethology (<xref ref-type="bibr" rid="bib15">Datta et al., 2019</xref>), examining behavior in detail across time to identify rare leaving events and the behavioral context in which they occurred. We found that leaving was tightly coupled to roaming both during spontaneous behaviors and after acute manipulations that induced roaming states. In each case, and in neuromodulatory mutants that altered roaming frequency, leaving occurred when animals were roaming, occurred probabilistically over minutes during the roaming state, and was preceded by a brief 30 s acceleration in speed. The stereotyped features of leaving behavior, which were not shared by other lawn edge encounters, suggest that it is a discrete behavioral motif associated with roaming states. Leaving can be viewed as a form of decision-making—a discrete action that drives an adaptive behavioral choice between alternatives, influenced by internal states such as arousal (<xref ref-type="bibr" rid="bib34">Kennedy et al., 2014</xref>).</p><p>Roaming and dwelling comprise a widely used framework for defining arousal states in <italic>C. elegans,</italic> although changing experimental conditions or analysis methods can reveal sub-states or alternative classification frameworks (this work and <xref ref-type="bibr" rid="bib10">Cermak et al., 2020</xref>; <xref ref-type="bibr" rid="bib21">Gallagher et al., 2013</xref>; <xref ref-type="bibr" rid="bib53">Raizen et al., 2008</xref>; <xref ref-type="bibr" rid="bib65">Van Buskirk and Sternberg, 2007</xref>). Classical ethology presents such internal states as hierarchical and mutually exclusive (<xref ref-type="bibr" rid="bib63">Tinbergen, 1951</xref>), while molecular and circuit analysis has extended and refined these ideas (<xref ref-type="bibr" rid="bib1">Asahina et al., 2014</xref>; <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>; <xref ref-type="bibr" rid="bib28">Hindmarsh Sten et al., 2021</xref>; <xref ref-type="bibr" rid="bib29">Hong et al., 2014</xref>; <xref ref-type="bibr" rid="bib44">Moy et al., 2015</xref>; <xref ref-type="bibr" rid="bib49">Pan et al., 2012</xref>). Our results indicate that lawn leaving behaviors are coupled to the roaming state, but within this state they are relatively rare and apparently probabilistic. More detailed studies may reveal additional regulators, such as an individual’s sensory experience, that shape the pattern of leaving behavior (<xref ref-type="bibr" rid="bib13">Coen et al., 2014</xref>).</p></sec><sec id="s3-2"><title>Sensory neurons integrate internal state and external sensation to guide foraging decisions</title><p>Our results identify two distinct biological mechanisms that regulate lawn leaving. First, leaving is coupled to arousal state. Leaving rates are 20-fold higher in roaming animals than in dwelling animals, and the leaving rates of most arousal mutants are largely explained by the fact that they spend more time roaming (<xref ref-type="supplementary-material" rid="supp2">Supplementary file 2</xref>). The second mechanism is controlled by <italic>tax-4</italic> sensory neurons, which shape the behavioral dynamics of roaming and leaving across a range of conditions and stimulate leaving during feeding inhibition.</p><p>At a straightforward level, sensory neurons are well-placed to evaluate environmental quality in the framework of foraging theory. For example, ASK and AWC neurons sense amino acids and food odors (<xref ref-type="bibr" rid="bib3">Bargmann, 2006</xref>), while ASJ neurons sense pheromones and toxins (<xref ref-type="bibr" rid="bib23">Greene et al., 2016</xref>; <xref ref-type="bibr" rid="bib41">Meisel et al., 2014</xref>), and other sensory neurons detect distinct environmental features (<xref ref-type="bibr" rid="bib3">Bargmann, 2006</xref>). Accordingly, many sensory neurons affect roaming, dwelling, or leaving (<xref ref-type="supplementary-material" rid="supp1">Supplementary file 1</xref>), and their relative importance varies with context, such as the presence of chemical repellents or pheromones that signal population density (<xref ref-type="bibr" rid="bib14">Dal Bello et al., 2021</xref>; <xref ref-type="bibr" rid="bib23">Greene et al., 2016</xref>; <xref ref-type="bibr" rid="bib43">Milward et al., 2011</xref>; <xref ref-type="bibr" rid="bib50">Pradel et al., 2007</xref>). Under the conditions used here, ASK neurons suppressed and ASJ neurons promoted roaming and leaving, respectively. Rescuing <italic>tax-4</italic> in ASJ partially restored features of normal leaving dynamics, including roaming before leaving.</p><p>Others have shown that chronic feeding deprivation across hours drives lawn leaving through the action of <italic>tax-4</italic> in several sensory neurons (<xref ref-type="bibr" rid="bib47">Olofsson, 2014</xref>). An unexpected result obtained here was that <italic>tax-4</italic> sensory neurons were required to drive the high leaving rates after acute inhibition of feeding. Together, these results suggest that the sensory neurons are sites at which internal feeding cues, behavioral states, and specific foraging decisions are integrated. Additional experiments are needed to define the full set of sensory neurons that couple feeding inhibition to leaving, the nature of the interoceptive signal from pharyngeal pumping, and the readout of the sensory neurons. Pharyngeal interoception is mediated in part by the serotonergic NSM neurons (<xref ref-type="bibr" rid="bib54">Rhoades et al., 2019</xref>), but we found that serotonin was not essential for the effects of acute feeding inhibition. With respect to interoception, some of the <italic>tax-4-</italic>expressing sensory neurons detect tyramine, one of several biogenic amines that regulate lawn leaving (<xref ref-type="bibr" rid="bib6">Bendesky et al., 2011</xref>; <xref ref-type="bibr" rid="bib46">O’Donnell et al., 2020</xref>), and many detect neuropeptides as well (<xref ref-type="bibr" rid="bib25">Hapiak et al., 2013</xref>).</p><p>Sensory neurons in <italic>C. elegans</italic> and other animals are most often studied in the context of rapid behavioral responses, but they also have critical roles in endocrine signaling. For example, intrinsically photosensitive retinal ganglion cells drive circadian entrainment in mammals (<xref ref-type="bibr" rid="bib26">Hattar et al., 2002</xref>) and in cichlid fish, visual stimuli from females are sufficient to induce an endocrine androgen response in males (<xref ref-type="bibr" rid="bib45">O’Connell et al., 2013</xref>). We speculate that the combination of endocrine signals, neuropeptides, and fast transmitters released by sensory neurons couples roaming states to leaving states. The insulin peptides and DAF-7-TGF-beta protein that regulate roaming, dwelling, and leaving are primarily produced by <italic>tax-4-</italic>expressing sensory neurons, so these neurons bridge sensory and endocrine regulation of foraging (<xref ref-type="bibr" rid="bib62">Taylor et al., 2021</xref>). Expression of these genes is regulated by pheromones and metabolic conditions, providing an additional layer beyond neural activity for long-term regulation of behavioral state. Many <italic>tax-4</italic> sensory neurons also release classical neurotransmitters such as glutamate (ASK, AWC) and acetylcholine (ASJ), and therefore have the potential to modulate rapid behaviors such as the lawn-leaving motif (<xref ref-type="bibr" rid="bib62">Taylor et al., 2021</xref>). Future studies can test this hypothesis while determining the mechanisms by which sensory neurons integrate signals to trigger lawn leaving.</p></sec></sec><sec id="s4" sec-type="methods"><title>Methods</title><table-wrap id="keyresource" position="anchor"><label>Key resources table</label><table frame="hsides" rules="groups"><thead><tr><th align="left" valign="bottom">Reagent type (species) or resource</th><th align="left" valign="bottom">Designation</th><th align="left" valign="bottom">Source or reference</th><th align="left" valign="bottom">Identifiers</th><th align="left" valign="bottom">Additional information</th></tr></thead><tbody><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">Wild type</td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib70">Yoshimura et al., 2019</xref></td><td align="left" valign="bottom">PD1074 (now CGC1)</td><td align="left" valign="bottom">Used in all figures except <xref ref-type="fig" rid="fig4">Figure 4</xref> <italic>tph-1</italic> and <italic>cat-2</italic> controls</td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">Wild type</td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX0001</td><td align="left" valign="bottom">Used as wild type controls in <xref ref-type="fig" rid="fig4">Figure 4</xref> <italic>tph-1</italic> and <italic>cat-2</italic> experiments</td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pharynx ReaChR</td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX16279</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig3">Figures 3</xref> and <xref ref-type="fig" rid="fig6">6</xref> and supplements</td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>pdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14295</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4">Figure 4</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>tph-1</italic></td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://cgc.umn.edu/strain/MT15434">https://cgc.umn.edu/strain/MT15434</ext-link></td><td align="left" valign="bottom">ID_BargmannDatabase:MT15434</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4">Figure 4</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>cat-2</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib60">Stern et al., 2017</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX11078</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4">Figure 4</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>npr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib30">Jang et al., 2017</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX13663</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4">Figure 4</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pharynx ReaChR; <italic>pdfr-1</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX16528</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pharynx ReaChR; <italic>tph-1</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX16529</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">RIB::BlaC</td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX18471</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5">Figure 5</xref>, <xref ref-type="fig" rid="fig5s3">Figure 5—figure supplement 3</xref></td></tr><tr><td align="left" valign="bottom">strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">PCR fragment #1<italic>; pdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14378</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">PCR fragment #2<italic>; pdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14383</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>pdfr-1:: CreONpdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14485</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">RIB <italic>pdfr-1</italic> rescue; <italic>pdfr-1</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX18302</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pan-neuronal <italic>pdfr-1</italic> rescue<italic>; pdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14488</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">AIY, RIM, RIA <italic>pdfr-1</italic> rescue<italic>; pdfr-1</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX14271</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom"><italic>tax-4</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib69">Worthy et al., 2018</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX13078</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6">Figure 6</xref>, <xref ref-type="fig" rid="fig6s1">Figure 6—figure supplements 1</xref> and <xref ref-type="fig" rid="fig6s2">2</xref>, 4</td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">ASJ rescue; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX11118</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6">Figure 6</xref>, <xref ref-type="fig" rid="fig6s2">Figure 6—figure supplements 2</xref> and <xref ref-type="fig" rid="fig6s4">4</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">ASK rescue; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX13361</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">ASJ +ASK rescue; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX11110</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">AWC rescue; <italic>tax-4</italic></td><td align="left" valign="bottom"><xref ref-type="bibr" rid="bib69">Worthy et al., 2018</xref></td><td align="left" valign="bottom">ID_BargmannDatabase:CX13790</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">ASI rescue; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX11558</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">URX/AQR/PQR rescue; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX11113</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6s2">Figure 6—figure supplement 2</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pharynx ReaChR; <italic>tax-4</italic></td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX18452</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6">Figure 6</xref>, <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Caenorhabditis elegans</italic>, N2 hermaphrodite)</td><td align="left" valign="bottom">pharynx ReaChR; <italic>tax-4</italic>; ASJ rescue</td><td align="left" valign="bottom">This paper</td><td align="left" valign="bottom">ID_BargmannDatabase:CX18538</td><td align="left" valign="bottom"><xref ref-type="fig" rid="fig6">Figure 6</xref>, <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3</xref></td></tr><tr><td align="left" valign="bottom">Strain, strain background (<italic>Escherichia coli</italic>, OP50)</td><td align="left" valign="bottom">OP50</td><td align="left" valign="bottom"><italic>Caenorhabditis</italic> Genetics Center (CGC)</td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://cgc.umn.edu/strain/OP50">https://cgc.umn.edu/strain/OP50</ext-link></td><td align="left" valign="bottom"/></tr><tr><td align="left" valign="bottom">Chemical compound, drug</td><td align="left" valign="bottom">Aztreonam</td><td align="left" valign="bottom">Sigma</td><td align="left" valign="bottom">PZ0038</td><td align="left" valign="bottom">CAS:<break/>78110-38-0</td></tr><tr><td align="left" valign="bottom">Chemical compound, drug</td><td align="left" valign="bottom">all trans-Retinal (ATR)</td><td align="left" valign="bottom">Sigma</td><td align="left" valign="bottom">R2500</td><td align="left" valign="bottom">CAS:<break/>116-31-4</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">ImageJ</td><td align="left" valign="bottom">ImageJ (<ext-link ext-link-type="uri" xlink:href="https://imagej.nih.gov/">https://imagej.nih.gov/</ext-link>)</td><td align="left" valign="bottom">RRID:<ext-link ext-link-type="uri" xlink:href="https://identifiers.org/RRID/RRID:SCR_003070">SCR_003070</ext-link></td><td align="left" valign="bottom">Version 1.50i</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">MATLAB</td><td align="left" valign="bottom">Mathworks (<ext-link ext-link-type="uri" xlink:href="https://www.mathworks.com/">https://www.mathworks.com/</ext-link>)</td><td align="left" valign="bottom">RRID:<ext-link ext-link-type="uri" xlink:href="https://identifiers.org/RRID/RRID:SCR_001622">SCR_001622</ext-link></td><td align="left" valign="bottom">Version R2018a, R2020a, R2021a, R2023a</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">FlyCapture</td><td align="left" valign="bottom">Pointgrey (<ext-link ext-link-type="uri" xlink:href="https://www.ptgrey.com/">https://www.ptgrey.com/</ext-link>)</td><td align="left" valign="bottom"/><td align="left" valign="bottom">Version FlyCap2</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">Python</td><td align="left" valign="bottom">Python (<ext-link ext-link-type="uri" xlink:href="https://www.python.org/">python.org</ext-link>)</td><td align="left" valign="bottom">RRID:<ext-link ext-link-type="uri" xlink:href="https://identifiers.org/RRID/RRID:SCR_008394">SCR_008394</ext-link></td><td align="left" valign="bottom">Version 3.8.3</td></tr><tr><td align="left" valign="bottom">Software, algorithm</td><td align="left" valign="bottom">tracking and analysis code</td><td align="left" valign="bottom">this paper; <xref ref-type="bibr" rid="bib57">Scheer and Bargmann, 2023</xref></td><td align="left" valign="bottom"><ext-link ext-link-type="uri" xlink:href="https://github.com/BargmannLab/Scheer_Bargmann2023">https://github.com/BargmannLab/Scheer_Bargmann2023</ext-link></td><td align="left" valign="bottom"/></tr></tbody></table></table-wrap><sec id="s4-1"><title>Nematode and bacterial culture</title><p>Bacterial food used in all experiments was <italic>E. coli</italic> strain OP50. Nematodes were grown at 20 °C on nematode growth media plates (NGM; 51.3 mM NaCl, 1.7% agar, 0.25% peptone, 1 mM CaCl2, 12.9 μM cholesterol, 1 mM MgSO<sub>4</sub>, 25 mM KPO4, pH 6) seeded with 200 μL of a saturated <italic>E. coli</italic> liquid culture that had been grown at room temperature for 48 hr or overnight at 37 °C (without shaking) from a single colony of OP50 in 100 mL of sterile LB (<xref ref-type="bibr" rid="bib8">Brenner, 1974</xref>). All experiments were performed on young adult hermaphrodites, picked as L4 larvae the evening before an experiment. Wild-type controls were the CGC1 (previously PD1074) sequenced strain derived from the N2 Bristol strain (<xref ref-type="bibr" rid="bib70">Yoshimura et al., 2019</xref>), except for <xref ref-type="fig" rid="fig4">Figure 4</xref> <italic>tph-1</italic> and <italic>cat-2</italic> controls, which were the CX0001 isolate of the N2 Bristol strain. Mutant strains were backcrossed into wild type to reduce background mutations. Transgenic strains were always compared to matched controls tested in parallel on the same days. Full genotypes and detailed descriptions of all strains and transgenes appear in <xref ref-type="supplementary-material" rid="supp3">Supplementary file 3</xref>: Strain details.</p></sec><sec id="s4-2"><title>Molecular biology and transgenics</title><p>Strains tested for <italic>pdfr-1</italic> rescue using PCR-amplified genomic fragments (<xref ref-type="fig" rid="fig5s1">Figure 5—figure supplement 1</xref>) were from <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>. For cell-selective <italic>pdfr-1</italic> rescue, an inverted cDNA under the <italic>pdfr-1</italic> distal promoter was the floxed rescue construct (<xref ref-type="fig" rid="fig5s2">Figure 5—figure supplement 2</xref>), and Cre expression was driven by a pan-neuronal promoter (<italic>tag-168</italic>), in RIM (<italic>tdc-1</italic>), in AIY and others (<italic>mod-1</italic>), in RIA (<italic>glr-3),</italic> and in RIB (<italic>sto-3</italic>). A 972 bp region upstream of the <italic>sto-3</italic> gene that drives expression solely in the RIB neurons was cloned using these primers:</p><list list-type="simple"><list-item><p><italic>sto-3:</italic> <named-content content-type="sequence">gatgcccaatcagttttttttcaccaa</named-content>, <named-content content-type="sequence">aagccaaaccaagtgagaagaagtattca</named-content></p></list-item></list><p>Strains and extrachromosomal arrays for <italic>tax-4</italic> rescue were reported in <xref ref-type="bibr" rid="bib37">Macosko et al., 2009</xref> and <xref ref-type="bibr" rid="bib69">Worthy et al., 2018</xref>. The sequences of the promoter ends are given below, along with the concentration at which the plasmid was injected for generating transgenic lines.</p><list list-type="simple"><list-item><p>ASJ <italic>tax-4</italic> rescue <italic>srh-11</italic>: <named-content content-type="sequence">gggcaaggacaatgttgccgcag</named-content>, <named-content content-type="sequence">tgggaataaaataacgacgtatgaata</named-content>, 50 ng/μl</p></list-item><list-item><p>ASK <italic>tax-4</italic> rescue</p></list-item><list-item><p><italic>sra-9</italic>: <named-content content-type="sequence">gcatgctatattccaccaaaagaaa</named-content>, <named-content content-type="sequence">tagcttgtgcatcaatcatagaaca</named-content> 50 ng/μl</p></list-item><list-item><p>AWC <italic>tax-4</italic> rescue <italic>ceh-36</italic>: <named-content content-type="sequence">ctcacatccatctttctggcgact</named-content>, <named-content content-type="sequence">ttgtgcatgcgggggcaggcga</named-content>, 30 ng/μl</p></list-item><list-item><p>ASI <italic>tax-4</italic> rescue <italic>str-3</italic>: <named-content content-type="sequence">gtgaacttgaaaagcgcaagtgatat</named-content>, <named-content content-type="sequence">ttccttttgaaattgaggcagttgtc</named-content>, 100 ng/μl</p></list-item><list-item><p>URX/AQR/PQR <italic>tax-4</italic> rescue</p></list-item><list-item><p><italic>gcy-36</italic>: <named-content content-type="sequence">tggatgttggtagatggggtttgga</named-content>, <named-content content-type="sequence">aaattcaaacaagggctacccaaca</named-content> 2 ng/μl</p></list-item></list><p>Transgenic animals were generated by microinjection of DNA containing the genetic construct of interest, a fluorescent co-injection marker (<italic>myo-2p</italic>::mCherry, <italic>myo-3p</italic>::mCherry, <italic>elt-2p</italic>::nGFP, <italic>elt-2p</italic>::mCherry), and empty pSM vector to reach a final DNA concentration of 100 ng/μL. Transgenes were maintained as extrachromosomal arrays.</p></sec><sec id="s4-3"><title>Small lawn foraging assay</title><p>For all assays, <italic>E. coli</italic> OP50 was grown overnight in a shaking LB liquid culture from a single colony at 37 °C. On the morning of the assay, 400 μL of saturated liquid culture was diluted into 5 mL of LB and allowed to grow to OD1 at 37 °C (~1.5 hours), as measured by spectrophotometer. The liquid culture was then spun down and resuspended in M9 buffer (3 g KH<sub>2</sub>PO<sub>4</sub>, 6 g Na<sub>2</sub>HPO<sub>4</sub>, 5 g NaCl, 1 ml 1 M MgSO<sub>4</sub>, H<sub>2</sub>O to 1 liter) then concentrated to a density of OD2 (and OD1 or OD4 in <xref ref-type="fig" rid="fig3">Figure 3A–B</xref>). To generate the test lawns, 2 μL of this concentrated bacterial resuspension was seeded onto NGM agar in the center of each well of a custom-made laser-cut six-well plate, where each well is 10 mm in diameter (<xref ref-type="bibr" rid="bib60">Stern et al., 2017</xref>).</p><p>50 μL of bacterial resuspension was seeded onto a separate NGM agar plate to be used as a food density acclimation plate. Lawns were grown at 20–22°C for 2 hr before the assay. Adult hermaphrodites picked as L4s 16–20 hr before the assay were then transferred to acclimation plates. After 45–90 min, animals were transferred to an unseeded NGM plate, cleaned of <italic>E. coli</italic>, and transferred singly into each well of the assay plates, where they were placed on bacteria-free agar and allowed to find the small food lawn on their own. Animals of the same genotype were grouped on the same six-well plates and each plate was recorded by a single camera. We used 12 cameras, enabling simultaneous recording of up to 72 individual animals at a time. Temperature and relative humidity within the behavioral recording apparatus were continuously monitored during recordings to ensure that environmental conditions were consistent across filming locations. As a further precaution, the filming locations of each genotype and wild type controls within the recording apparatus were randomized across batches of experiments and days to average out behavioral influences deriving from non-uniform local environmental conditions. Assays were recorded for 1 hr at 3 frames per second using 12 8.8 MP USB3 cameras (Pointgrey, Flea3) and 35 mm high-resolution objectives (Edmund Optics). LED backlights (Metaphase Technologies) provided uniform illumination of the assay plates. Commercial software (Flycapture, Pointgrey) was used to record the movies.</p></sec><sec id="s4-4"><title>Uniform lawn assay</title><p>Assays testing worm behavior on uniform bacterial lawns were performed as in the small lawn foraging assay with the exception that instead of 2 μL of bacteria seeded in the center of the well, 15 μL of OD2 bacterial suspension was spread evenly throughout the well. Bacteria were grown for 2 hr before acclimation and starting the assay.</p></sec><sec id="s4-5"><title>Optogenetic feeding inhibition assay</title><p>Pharyngeal pumping was inhibited by expressing the red-shifted channelrhodopsin ReaChR (<xref ref-type="bibr" rid="bib35">Lin et al., 2013</xref>) under the <italic>myo-2</italic> pharyngeal muscle promoter (a strain generously provided by Steve Flavell). Animals were stimulated while navigating small food lawns described above. Experimental animals were grown on bacterial lawns containing 50 μM all-trans retinal (+ATR) overnight before assays. Control animals were placed on lawns made in parallel that did not contain retinal (-ATR). A 590 nm Precision LED with Uniform Illumination (Mightex) controlled with custom MATLAB software was used to deliver optogenetic stimuli. Animals were acclimated to small lawns (no ATR) for 20 min before being exposed to alternating 10 min intervals of light OFF and light ON using 590 nm light at 60 μW/mm<sup>2</sup> strobed at 10 Hz with a 50% duty cycle (<xref ref-type="fig" rid="fig3">Figure 3</xref>, <xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1</xref>, <xref ref-type="fig" rid="fig6">Figure 6</xref>, <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3</xref>). Recording hardware and software was identical to that of off-food foraging assays without optogenetic stimulation except that 475 nm short-pass filters were used on recording optics (Edmund Optics) to prevent overexposure of the video recording during light pulse delivery.</p><p>For behavioral quantification in <xref ref-type="fig" rid="fig3">Figure 3E–F</xref>, <xref ref-type="fig" rid="fig4s1">Figure 4—figure supplement 1A and C–D</xref>, and <xref ref-type="fig" rid="fig6s3">Figure 6—figure supplement 3A</xref>, only data before, during and after the first light pulse is shown. For aggregate comparisons of within-animal behavior in light OFF vs. light ON conditions, the two light OFF and light ON pulses were merged, that is merging intervals 0–10 min +20–30 min, and 10–20 min + 30–40 min for statistical analyses. For statistical tests comparing the fraction of animals roaming across genotypes or conditions, steady state light intervals were used for averaging and comparing as indicated in the figure legends: 0–10, 12–20, 22–30 min.</p></sec><sec id="s4-6"><title>RIB::BlaC assay</title><p>Activation of the RIB neurons was accomplished using blue light-activated adenylyl cyclase BlaC (<xref ref-type="bibr" rid="bib55">Ryu et al., 2010</xref>). BlaC was cloned into the pSM vector under the <italic>sto-3</italic> promoter to drive expression in the RIB neurons. Stimulation was carried out as described for ReaChR (above), except no all-trans retinal was applied and the animals were exposed to blue light (455 nm) at 3 μW/mm<sup>2</sup> strobed at 10 Hz with a 50% duty cycle (<xref ref-type="fig" rid="fig5">Figure 5</xref>, <xref ref-type="fig" rid="fig5s3">Figure 5—figure supplement 3</xref>). To prevent overexposure of the video recording during light pulse delivery, 525-nm long pass filters were used on recording optics (Edmund Optics). Behavioral quantification for <xref ref-type="fig" rid="fig5">Figure 5B–C</xref> was conducted as above (optogenetic feeding inhibition assay).</p></sec><sec id="s4-7"><title>Inedible food assay</title><p>Experiments with inedible bacterial food generated by addition of aztreonam were performed following the protocol of <xref ref-type="bibr" rid="bib24">Gruninger et al., 2008</xref>. <italic>E. coli</italic> OP50 was grown in LB from a single colony to saturation overnight. On the morning of the assay, 400 μL of saturated liquid culture was diluted into 5 mL of LB with aztreonam (10 μg/ml) and allowed to grow to OD1 at 37 °C. To generate test lawns, 2 μL of this bacterial suspension was plated on NGM agar test plates containing aztreonam (10 μg/ml). Small lawn assays were performed as described above (see ‘Small lawn foraging assay’), except that bacteria on NGM +aztreonam plates were allowed to grow for 4 hr before assay testing. To test for any acute behavioral responses to aztreonam, we also performed a control ‘post-add’ experiment, in which 2 μL of either 4 μg/mL aztreonam dissolved in DMSO or DMSO alone was added to normal small bacterial lawns after 4 hr of growth on NGM agar (<xref ref-type="fig" rid="fig3s1">Figure 3—figure supplement 1</xref>).</p></sec><sec id="s4-8"><title>Behavioral tracking and lawn feature detection</title><p>Because each video recorded the behavior of up to 6 individual animals, videos were manually cropped so each surrounded just a single animal using FFmpeg software (<xref ref-type="bibr" rid="bib64">Tomar, 2006</xref>). To extract animal positions and postures, captured movies were analyzed by custom made scripts in MATLAB (Mathworks, version 2021a) using the Image Processing Toolbox and the Computer Vision Toolbox. In each frame of the movie, the worm is segmented by background subtraction and its XY position is tracked over time using a Kalman filter. From the background-subtracted worm image, a smooth spline of 49 points was computationally applied and features relating to the movement of points along the body were derived following <xref ref-type="bibr" rid="bib32">Javer et al., 2018</xref>. Disambiguation of the head versus tail was determined by assigning the head as the end of the spline that had greater cumulative displacement over the video assay, facilitating determination of times when the animal moved forward and backward.</p></sec><sec id="s4-9"><title>Behavioral features extracted</title><p>Features were defined as described in <xref ref-type="bibr" rid="bib32">Javer et al., 2018</xref>. Briefly, body parts were defined based on a skeletonized spline containing 49 points equally distributed along the length of the worm body. The head comprises spline points 1–8. The midbody comprises spline points 17–33. The positions of head and midbody were calculated by deriving the centroid of each of these point sets by averaging their x and y positions before subsequent analyses (see <xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2</xref>).</p><list list-type="bullet"><list-item><p><italic>Midbody speed:</italic> the derivative of displacement of the midbody across frames. Positive and negative numbers indicate forward and backward motion, respectively. Units: mm/sec.</p></list-item><list-item><p><italic>Midbody angular speed:</italic> The angle change across midbody positions over time: Two vectors are measured: <italic>v<sub>0-1</sub></italic>, representing the change in midbody position from time frame 0–1, and <italic>v<sub>1-2</sub></italic>, representing the change in midbody position from time frame 1–2. the position change over three frames at each time point was quantified. Angular speed is defined as the arc-cosine of the dot product of <italic>v<sub>0-1</sub></italic> and <italic>v<sub>1-2</sub></italic> divided by the scalar product of the norms of these vectors. Units: degrees per second.</p></list-item><list-item><p><italic>Head speed:</italic> the derivative of displacement of the head across frames. Units: mm/second.</p></list-item><list-item><p><italic>Head angular speed:</italic> Same as midbody angular speed but calculated for the head position. Units: degrees per second.</p></list-item><list-item><p><italic>Head radial velocity relative to the midbody</italic>: The derivative of displacement of the head relative to the midbody across frames. This is calculated by subtracting the midbody position from the head position and shifting to polar coordinates (<italic>Φ</italic>,<italic>r</italic>) where <italic>Φ</italic> is the angular dimension and <italic>r</italic> is the radial dimension. Head radial velocity relative to midbody is the derivative of <italic>r</italic> with respect to time. Units: mm/s.</p></list-item><list-item><p><italic>Head angular velocity relative to the midbody:</italic> the derivative of the angular displacement of the head relative to the midbody across frames. The same procedure as above is used to generate polar coordinates. Head angular velocity relative to the midbody is the derivative of <italic>Φ</italic> with respect to time. Units: degrees per second.</p></list-item><list-item><p><italic>Quirkiness:</italic> <inline-formula><mml:math id="inf1"><mml:mi>Q</mml:mi><mml:mo>=</mml:mo><mml:mi mathvariant="normal"> </mml:mi><mml:msqrt><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mfrac><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">a</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="normal">A</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msup></mml:mrow></mml:mfrac></mml:msqrt></mml:math></inline-formula>, where a is the minor and A is the major axis of a bounding box surrounding the animal, respectively. Values closer to 1 means the animal’s shape is more elongated and thinner; closer to 0 indicates a more rounded shape.</p></list-item></list><p>All these features were binned into contiguous 10 s intervals for subsequent analyses. There are also several features only defined for 10 s bins:</p><list list-type="bullet"><list-item><p><italic>Fraction of time moving forward</italic> per bin.</p></list-item><list-item><p><italic>Fraction of time moving reverse</italic> per bin.</p></list-item><list-item><p><italic>Fraction of time paused</italic> per bin.</p></list-item><list-item><p><italic>Midbody forward speed</italic>, the mean of Midbody speed where values are ≥ 0.</p></list-item><list-item><p><italic>Midbody reverse speed</italic>, the mean of Midbody speed where values are ≤ 0.</p></list-item></list></sec><sec id="s4-10"><title>Lawn boundary-related metrics and Lawn boundary interaction behaviors</title><p>The outline of the bacterial lawn was determined by edge detectors applied to the background averaged across movie frames. Across every frame, the closest boundary point to the animal’s head was determined and used to calculate ‘lawn boundary distance’.</p><p>Lawn boundary distance and movement direction were used to classify a set of lawn boundary interaction behaviors. Head pokes were classified based on an excursion of the head that peaks outside the lawn before returning to the lawn interior. In the period following maximal displacement outside the lawn and before resuming locomotion inside the lawn (‘recovery interval’), three types of head pokes were categorized: head poke forward, in which at least half of the recovery interval is spent moving forward, head poke reversal, in which the animal executes a reversal during the recovery interval, or head poke pauses, in which an animal spends at least half of the recovery interval with speed less than 0.02 mm/s. Lawn leaving events were marked as the first frame when the animal’s head emerged from the lawn before its entire body exited the lawn.</p></sec><sec id="s4-11"><title>Quality control for including animals in subsequent analyses</title><p>Behavior and lawn features were detected and tracked over the 1 hr assay but only the latter 40 min of data were retained for analysis to minimize the effects from manipulating animals prior to recordings. Data from single animals were only retained in subsequent analyses if the following conditions were met: (1) the worm was visible in the video for at least half of the time the worm was recorded (cumulatively 30 min), (2) the worm was inside the bacterial lawn for at least one minute within the first 20 min of the video (before usable data was collected), (3) the plate was not bumped during the recording. All criteria were established before data collection.</p></sec><sec id="s4-12"><title>Quantitative locomotion analysis and HMM analyses</title><p>All quantitative analyses of locomotion and Hidden Markov Model building after behavioral tracking were performed in Python. For all analyses of animal locomotion and model-building, behavioral data from animals outside the food lawn was censored.</p><p>To classify roaming and dwelling states, speed and angular speed of animal centroid position was averaged into contiguous 10 s intervals. Roaming and dwelling states were classified as in <xref ref-type="bibr" rid="bib18">Flavell et al., 2013</xref>. Briefly, two classes of intervals corresponding to high angular speed / low speed and low angular speed / high speed were identified and separated by a line drawn at y (mm/sec)=x (deg/sec) /450. Behavior can then be instantaneously classified into roaming intervals when values are above the line, or dwelling intervals, when values are below the line. A two-state categorical Hidden Markov Model was then trained on these behavioral sequences to generate roaming and dwelling hidden states using the SSM package (<xref ref-type="bibr" rid="bib36">Linderman et al., 2020</xref>).</p><p>An Autoregressive Hidden Markov Model (AR-HMM) was trained to segment animal behavioral states on food using a different set of behavioral features relating to forward body movement and head movements: fraction of time moving forward per 10 s bin, midbody forward speed, midbody angular speed, head angular velocity relative to midbody and head radial velocity relative to midbody (<xref ref-type="fig" rid="fig2">Figure 2</xref>, <xref ref-type="fig" rid="fig2s2">Figure 2—figure supplement 2</xref>, see above for feature definitions).</p><p>Formally, at each time step <italic>t</italic>, we have discrete hidden states <inline-formula><mml:math id="inf2"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:mn>1</mml:mn><mml:mo>,</mml:mo><mml:mn>2</mml:mn><mml:mo>,</mml:mo><mml:mo>.</mml:mo><mml:mo>.</mml:mo><mml:mo>.</mml:mo><mml:mi>K</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula>  that follow Markovian dynamics, <inline-formula><mml:math id="inf3"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>,</mml:mo><mml:msubsup><mml:mrow><mml:mo>{</mml:mo><mml:msub><mml:mi>π</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>K</mml:mi></mml:msubsup><mml:mo>∼</mml:mo><mml:msub><mml:mi>π</mml:mi><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo></mml:mrow></mml:mstyle></mml:math></inline-formula>  where <inline-formula><mml:math id="inf4"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msubsup><mml:mrow><mml:mo>{</mml:mo><mml:msub><mml:mi>π</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>K</mml:mi></mml:msubsup></mml:mrow></mml:mstyle></mml:math></inline-formula> is the transition matrix and <inline-formula><mml:math id="inf5"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>π</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mrow><mml:mo>[</mml:mo><mml:mrow><mml:mn>0</mml:mn><mml:mo>,</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo>]</mml:mo></mml:mrow><mml:mi>K</mml:mi></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula> corresponds to the <italic>k</italic>-th row. Given hidden states <inline-formula><mml:math id="inf6"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mstyle></mml:math></inline-formula>, the resulting feature dynamics are given by <inline-formula><mml:math id="inf7"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>∼</mml:mo><mml:mi>N</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:msub><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>−</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>+</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>Q</mml:mi><mml:mrow><mml:msub><mml:mi>z</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:msub></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula>, where <inline-formula><mml:math id="inf8"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>A</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mstyle></mml:math></inline-formula> and <inline-formula><mml:math id="inf9"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>Q</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow></mml:mstyle></mml:math></inline-formula> are real 5x5 linear dynamics and covariance matrices, respectively. <inline-formula><mml:math id="inf10"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>k</mml:mi></mml:msub><mml:mo>∈</mml:mo><mml:msup><mml:mrow><mml:mi mathvariant="double-struck">R</mml:mi></mml:mrow><mml:mn>5</mml:mn></mml:msup></mml:mrow></mml:mstyle></mml:math></inline-formula> is the bias. The linear dynamics matrix A specifies a continuous flow on the feature space. The bias term <inline-formula><mml:math id="inf11"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:mi>b</mml:mi></mml:mrow></mml:mstyle></mml:math></inline-formula> can drive the dynamics in a particular direction. In the case where A is all zeros, the system has no dynamics and this amounts to a Hidden Markov Model with Gaussian emissions. AR-HMMs were also trained using the SSM package (<xref ref-type="bibr" rid="bib36">Linderman et al., 2020</xref>). AR-HMM performance was evaluated by calculating the ratio of the log-likelihood of held-out test data set using the AR-HMM same data under the AR-HMM and a multivariate Gaussian model <inline-formula><mml:math id="inf12"><mml:mstyle displaystyle="true" scriptlevel="0"><mml:mrow><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>∼</mml:mo><mml:mi>N</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>μ</mml:mi><mml:mo>,</mml:mo><mml:mi mathvariant="normal">Σ</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mstyle></mml:math></inline-formula>.</p></sec><sec id="s4-13"><title>Sample size determination, replicates and group allocation</title><p>The number of animals in each experiment is detailed in the figure legends. Assays were typically repeated across at least 2 days of experiments to account for day-to-day variability. Control animals were always run on the same days as experimental animals.</p><p>Using G*POWER 3.1, we chose sample sizes based on the desired ability to detect an effect size of 1 with 80% power and a 5% alpha, yielding a minimum value of n=18 animals per group for a two-sample unmatched comparison of means and n=11 animals per group for a matched comparison of means (<xref ref-type="bibr" rid="bib17">Faul et al., 2009</xref>).</p></sec><sec id="s4-14"><title>Quantification and statistical analysis</title><p>All comparisons in the fraction of time roaming were performed after logit-transformation <inline-formula><mml:math id="inf13"><mml:mi>l</mml:mi><mml:mi>o</mml:mi><mml:mi>g</mml:mi><mml:mi>i</mml:mi><mml:mi>t</mml:mi><mml:mfenced separators="|"><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:mfenced><mml:mo>=</mml:mo><mml:mi mathvariant="normal">l</mml:mi><mml:mi mathvariant="normal">n</mml:mi><mml:mo>⁡</mml:mo><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:mi>p</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn><mml:mo>-</mml:mo><mml:mi>p</mml:mi></mml:mrow></mml:mfrac><mml:mo>)</mml:mo></mml:math></inline-formula>, where p is the fraction of time spent roaming per animal.</p><p>Either Wilcoxon rank sum test or paired t-tests were used to compare matched data (roaming speed at –3 to –1 min vs. last 30 s before leaving, number of lawn leaving events during light OFF vs. ON, fraction of time roaming during light OFF vs. ON).</p><p>The Kolmogorov-Smirnov test was used for comparing cumulative distributions.</p><p>If multiple pairwise tests were done, multiple hypothesis correction was always performed.</p><p>Statistical details for each experiment are described in the figure legends. The p values resulting from all statistical tests performed in the paper can be found in <xref ref-type="supplementary-material" rid="supp4">Supplementary file 4</xref>.</p></sec></sec></body><back><sec sec-type="additional-information" id="s5"><title>Additional information</title><fn-group content-type="competing-interest"><title>Competing interests</title><fn fn-type="COI-statement" id="conf1"><p>No competing interests declared</p></fn></fn-group><fn-group content-type="author-contribution"><title>Author contributions</title><fn fn-type="con" id="con1"><p>Conceptualization, Resources, Software, Investigation, Visualization, Methodology, Writing – original draft, Writing – review and editing</p></fn><fn fn-type="con" id="con2"><p>Conceptualization, Supervision, Funding acquisition, Methodology, Writing – review and editing</p></fn></fn-group></sec><sec sec-type="supplementary-material" id="s6"><title>Additional files</title><supplementary-material id="supp1"><label>Supplementary file 1.</label><caption><title>Sensory neurons and endocrine systems implicated in roaming and leaving behavior.</title></caption><media xlink:href="elife-88657-supp1-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp2"><label>Supplementary file 2.</label><caption><title>Lawn Leaving Events Per minute Roaming/Dwelling.</title></caption><media xlink:href="elife-88657-supp2-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp3"><label>Supplementary file 3.</label><caption><title>Strains and Plasmids.</title></caption><media xlink:href="elife-88657-supp3-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="supp4"><label>Supplementary file 4.</label><caption><title>p-values and Statistical Tests.</title></caption><media xlink:href="elife-88657-supp4-v1.xlsx" mimetype="application" mime-subtype="xlsx"/></supplementary-material><supplementary-material id="mdar"><label>MDAR checklist</label><media xlink:href="elife-88657-mdarchecklist1-v1.pdf" mimetype="application" mime-subtype="pdf"/></supplementary-material></sec><sec sec-type="data-availability" id="s7"><title>Data availability</title><p>All primary behavioral data and relevant code for data analysis are available at Dryad (<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.5061/dryad.47d7wm3jf">https://doi.org/10.5061/dryad.47d7wm3jf</ext-link>) and Github (<ext-link ext-link-type="uri" xlink:href="https://github.com/BargmannLab/Scheer_Bargmann2023">https://github.com/BargmannLab/Scheer_Bargmann2023</ext-link>; copy archived at <xref ref-type="bibr" rid="bib57">Scheer and Bargmann, 2023</xref>) without restriction. Source data files contain the summarized data for all plots in Figures 1-6. All strains and plasmids used are found in Table 3: Strain details are available from the corresponding author without restrictions.</p><p>The following dataset was generated:</p><p><element-citation publication-type="data" specific-use="isSupplementedBy" id="dataset1"><person-group person-group-type="author"><name><surname>Scheer</surname><given-names>E</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2023">2023</year><data-title>Sensory neurons couple arousal and foraging decisions in <italic>C. elegans</italic></data-title><source>Dryad Digital Repository</source><pub-id pub-id-type="doi">10.5061/dryad.47d7wm3jf</pub-id></element-citation></p></sec><ack id="ack"><title>Acknowledgements</title><p>We thank Cheryl Mai for initial analysis of optogenetics experiments. We thank Philip Kidd, Audrey Harnagel, Yarden Wiesenfeld, and Steven Flavell for thoughtful discussions and comments on the manuscript. This work was supported by the Chan Zuckerberg Initiative and by an NIH F31 Predoctoral NRSA Fellowship to E.S.</p></ack><ref-list><title>References</title><ref id="bib1"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Asahina</surname><given-names>K</given-names></name><name><surname>Watanabe</surname><given-names>K</given-names></name><name><surname>Duistermars</surname><given-names>BJ</given-names></name><name><surname>Hoopfer</surname><given-names>E</given-names></name><name><surname>González</surname><given-names>CR</given-names></name><name><surname>Eyjólfsdóttir</surname><given-names>EA</given-names></name><name><surname>Perona</surname><given-names>P</given-names></name><name><surname>Anderson</surname><given-names>DJ</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Tachykinin-expressing neurons control male-specific aggressive arousal in <italic>Drosophila</italic></article-title><source>Cell</source><volume>156</volume><fpage>221</fpage><lpage>235</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2013.11.045</pub-id><pub-id pub-id-type="pmid">24439378</pub-id></element-citation></ref><ref id="bib2"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ayala-Orozco</surname><given-names>B</given-names></name><name><surname>Cocho</surname><given-names>G</given-names></name><name><surname>Larralde</surname><given-names>H</given-names></name><name><surname>Ramos-Fernandez</surname><given-names>G</given-names></name><name><surname>Mateos</surname><given-names>JL</given-names></name><name><surname>Miramontes</surname><given-names>O</given-names></name></person-group><year iso-8601-date="2004">2004</year><article-title>Levy walk patterns in the foraging movements of spider monkeys (Ateles geoffroyi)</article-title><source>Behavioral Ecology and Sociobiology</source><volume>55</volume><fpage>223</fpage><lpage>230</lpage><pub-id pub-id-type="doi">10.1007/s00265-003-0700-6</pub-id></element-citation></ref><ref id="bib3"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Bargmann</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2006">2006</year><source>Chemosensation in C. elegans</source><publisher-name>WormBook</publisher-name><pub-id pub-id-type="doi">10.1895/wormbook.1.123.1</pub-id></element-citation></ref><ref id="bib4"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Barrios</surname><given-names>A</given-names></name><name><surname>Ghosh</surname><given-names>R</given-names></name><name><surname>Fang</surname><given-names>C</given-names></name><name><surname>Emmons</surname><given-names>SW</given-names></name><name><surname>Barr</surname><given-names>MM</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>PDF-1 neuropeptide signaling modulates a neural circuit for mate-searching behavior in <italic>C. elegans</italic></article-title><source>Nature Neuroscience</source><volume>15</volume><fpage>1675</fpage><lpage>1682</lpage><pub-id pub-id-type="doi">10.1038/nn.3253</pub-id><pub-id pub-id-type="pmid">23143519</pub-id></element-citation></ref><ref id="bib5"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ben Arous</surname><given-names>J</given-names></name><name><surname>Laffont</surname><given-names>S</given-names></name><name><surname>Chatenay</surname><given-names>D</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>Molecular and sensory basis of a food related two-state behavior in <italic>C. elegans</italic></article-title><source>PLOS ONE</source><volume>4</volume><elocation-id>e7584</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0007584</pub-id><pub-id pub-id-type="pmid">19851507</pub-id></element-citation></ref><ref id="bib6"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Bendesky</surname><given-names>A</given-names></name><name><surname>Tsunozaki</surname><given-names>M</given-names></name><name><surname>Rockman</surname><given-names>MV</given-names></name><name><surname>Kruglyak</surname><given-names>L</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Catecholamine receptor polymorphisms affect decision-making in <italic>C. elegans</italic></article-title><source>Nature</source><volume>472</volume><fpage>313</fpage><lpage>318</lpage><pub-id pub-id-type="doi">10.1038/nature09821</pub-id><pub-id pub-id-type="pmid">21412235</pub-id></element-citation></ref><ref id="bib7"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Berman</surname><given-names>GJ</given-names></name><name><surname>Choi</surname><given-names>DM</given-names></name><name><surname>Bialek</surname><given-names>W</given-names></name><name><surname>Shaevitz</surname><given-names>JW</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Mapping the stereotyped behaviour of freely moving fruit flies</article-title><source>Journal of the Royal Society, Interface</source><volume>11</volume><elocation-id>20140672</elocation-id><pub-id pub-id-type="doi">10.1098/rsif.2014.0672</pub-id><pub-id pub-id-type="pmid">25142523</pub-id></element-citation></ref><ref id="bib8"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Brenner</surname><given-names>S</given-names></name></person-group><year iso-8601-date="1974">1974</year><article-title>The genetics of <italic>Caenorhabditis elegans</italic></article-title><source>Genetics</source><volume>77</volume><fpage>71</fpage><lpage>94</lpage><pub-id pub-id-type="doi">10.1093/genetics/77.1.71</pub-id><pub-id pub-id-type="pmid">4366476</pub-id></element-citation></ref><ref id="bib9"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Buchanan</surname><given-names>EK</given-names></name><name><surname>Linderman</surname><given-names>S</given-names></name><name><surname>Paninski</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Quantifying the behavioral dynamics of <italic>C. elegans</italic> with autoregressive hidden Markov models</article-title><source>NIPS</source><fpage>1</fpage><lpage>5</lpage></element-citation></ref><ref id="bib10"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Cermak</surname><given-names>N</given-names></name><name><surname>Yu</surname><given-names>SK</given-names></name><name><surname>Clark</surname><given-names>R</given-names></name><name><surname>Huang</surname><given-names>YC</given-names></name><name><surname>Baskoylu</surname><given-names>SN</given-names></name><name><surname>Flavell</surname><given-names>SW</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Whole-organism behavioral profiling reveals a role for dopamine in state-dependent motor program coupling in <italic>C. elegans</italic></article-title><source>eLife</source><volume>9</volume><elocation-id>e57093</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.57093</pub-id><pub-id pub-id-type="pmid">32510332</pub-id></element-citation></ref><ref id="bib11"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Charnov</surname><given-names>EL</given-names></name></person-group><year iso-8601-date="1976">1976</year><article-title>Optimal foraging, the marginal value theorem</article-title><source>Theoretical Population Biology</source><volume>9</volume><fpage>129</fpage><lpage>136</lpage><pub-id pub-id-type="doi">10.1016/0040-5809(76)90040-x</pub-id><pub-id pub-id-type="pmid">1273796</pub-id></element-citation></ref><ref id="bib12"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Cheung</surname><given-names>BHH</given-names></name><name><surname>Cohen</surname><given-names>M</given-names></name><name><surname>Rogers</surname><given-names>C</given-names></name><name><surname>Albayram</surname><given-names>O</given-names></name><name><surname>de Bono</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2005">2005</year><article-title>Experience-dependent modulation of <italic>C. elegans</italic> behavior by ambient oxygen</article-title><source>Current Biology</source><volume>15</volume><fpage>905</fpage><lpage>917</lpage><pub-id pub-id-type="doi">10.1016/j.cub.2005.04.017</pub-id><pub-id pub-id-type="pmid">15916947</pub-id></element-citation></ref><ref id="bib13"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Coen</surname><given-names>P</given-names></name><name><surname>Clemens</surname><given-names>J</given-names></name><name><surname>Weinstein</surname><given-names>AJ</given-names></name><name><surname>Pacheco</surname><given-names>DA</given-names></name><name><surname>Deng</surname><given-names>Y</given-names></name><name><surname>Murthy</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Dynamic sensory cues shape song structure in <italic>Drosophila</italic></article-title><source>Nature</source><volume>507</volume><fpage>233</fpage><lpage>237</lpage><pub-id pub-id-type="doi">10.1038/nature13131</pub-id><pub-id pub-id-type="pmid">24598544</pub-id></element-citation></ref><ref id="bib14"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Dal Bello</surname><given-names>M</given-names></name><name><surname>Pérez-Escudero</surname><given-names>A</given-names></name><name><surname>Schroeder</surname><given-names>FC</given-names></name><name><surname>Gore</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Inversion of pheromone preference optimizes foraging in <italic>C. elegans</italic></article-title><source>eLife</source><volume>10</volume><elocation-id>58144</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.58144</pub-id><pub-id pub-id-type="pmid">34227470</pub-id></element-citation></ref><ref id="bib15"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Datta</surname><given-names>SR</given-names></name><name><surname>Anderson</surname><given-names>DJ</given-names></name><name><surname>Branson</surname><given-names>K</given-names></name><name><surname>Perona</surname><given-names>P</given-names></name><name><surname>Leifer</surname><given-names>A</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Computational Neuroethology: a call to action</article-title><source>Neuron</source><volume>104</volume><fpage>11</fpage><lpage>24</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2019.09.038</pub-id><pub-id pub-id-type="pmid">31600508</pub-id></element-citation></ref><ref id="bib16"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Davis</surname><given-names>K</given-names></name><name><surname>Mitchell</surname><given-names>C</given-names></name><name><surname>Weissenfels</surname><given-names>O</given-names></name><name><surname>Bai</surname><given-names>J</given-names></name><name><surname>Raizen</surname><given-names>DM</given-names></name><name><surname>Ailion</surname><given-names>M</given-names></name><name><surname>Topalidou</surname><given-names>I</given-names></name></person-group><year iso-8601-date="2023">2023</year><article-title>G protein-coupled receptor kinase-2 (GRK-2) controls exploration through neuropeptide signaling in <italic>Caenorhabditis elegans</italic></article-title><source>PLOS Genetics</source><volume>19</volume><elocation-id>e1010613</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1010613</pub-id><pub-id pub-id-type="pmid">36652499</pub-id></element-citation></ref><ref id="bib17"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Faul</surname><given-names>F</given-names></name><name><surname>Erdfelder</surname><given-names>E</given-names></name><name><surname>Buchner</surname><given-names>A</given-names></name><name><surname>Lang</surname><given-names>AG</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>Statistical power analyses using G*Power 3.1: tests for correlation and regression analyses</article-title><source>Behavior Research Methods</source><volume>41</volume><fpage>1149</fpage><lpage>1160</lpage><pub-id pub-id-type="doi">10.3758/BRM.41.4.1149</pub-id><pub-id pub-id-type="pmid">19897823</pub-id></element-citation></ref><ref id="bib18"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Flavell</surname><given-names>SW</given-names></name><name><surname>Pokala</surname><given-names>N</given-names></name><name><surname>Macosko</surname><given-names>EZ</given-names></name><name><surname>Albrecht</surname><given-names>DR</given-names></name><name><surname>Larsch</surname><given-names>J</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Serotonin and the neuropeptide PDF initiate and extend opposing behavioral states in <italic>C. elegans</italic></article-title><source>Cell</source><volume>154</volume><fpage>1023</fpage><lpage>1035</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2013.08.001</pub-id><pub-id pub-id-type="pmid">23972393</pub-id></element-citation></ref><ref id="bib19"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Flavell</surname><given-names>SW</given-names></name><name><surname>Gogolla</surname><given-names>N</given-names></name><name><surname>Lovett-Barron</surname><given-names>M</given-names></name><name><surname>Zelikowsky</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2022">2022</year><article-title>The emergence and influence of internal states</article-title><source>Neuron</source><volume>110</volume><fpage>2545</fpage><lpage>2570</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2022.04.030</pub-id><pub-id pub-id-type="pmid">35643077</pub-id></element-citation></ref><ref id="bib20"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Fujiwara</surname><given-names>M</given-names></name><name><surname>Sengupta</surname><given-names>P</given-names></name><name><surname>McIntire</surname><given-names>SL</given-names></name></person-group><year iso-8601-date="2002">2002</year><article-title>Regulation of body size and behavioral state of <italic>C. elegans</italic> by sensory perception and the EGL-4 cGMP-dependent protein kinase</article-title><source>Neuron</source><volume>36</volume><fpage>1091</fpage><lpage>1102</lpage><pub-id pub-id-type="doi">10.1016/s0896-6273(02)01093-0</pub-id><pub-id pub-id-type="pmid">12495624</pub-id></element-citation></ref><ref id="bib21"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gallagher</surname><given-names>T</given-names></name><name><surname>Bjorness</surname><given-names>T</given-names></name><name><surname>Greene</surname><given-names>R</given-names></name><name><surname>You</surname><given-names>YJ</given-names></name><name><surname>Avery</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>The geometry of locomotive behavioral states in <italic>C. elegans</italic></article-title><source>PLOS ONE</source><volume>8</volume><elocation-id>e59865</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0059865</pub-id><pub-id pub-id-type="pmid">23555813</pub-id></element-citation></ref><ref id="bib22"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gold</surname><given-names>JI</given-names></name><name><surname>Shadlen</surname><given-names>MN</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>The neural basis of decision making</article-title><source>Annual Review of Neuroscience</source><volume>30</volume><fpage>535</fpage><lpage>574</lpage><pub-id pub-id-type="doi">10.1146/annurev.neuro.29.051605.113038</pub-id><pub-id pub-id-type="pmid">17600525</pub-id></element-citation></ref><ref id="bib23"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Greene</surname><given-names>JS</given-names></name><name><surname>Dobosiewicz</surname><given-names>M</given-names></name><name><surname>Butcher</surname><given-names>RA</given-names></name><name><surname>McGrath</surname><given-names>PT</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2016">2016</year><article-title>Regulatory changes in two chemoreceptor genes contribute to a <italic>Caenorhabditis elegans</italic> QTL for foraging behavior</article-title><source>eLife</source><volume>5</volume><elocation-id>e21454</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.21454</pub-id><pub-id pub-id-type="pmid">27893361</pub-id></element-citation></ref><ref id="bib24"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Gruninger</surname><given-names>TR</given-names></name><name><surname>Gualberto</surname><given-names>DG</given-names></name><name><surname>Garcia</surname><given-names>LR</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Sensory perception of food and insulin-like signals influence seizure susceptibility</article-title><source>PLOS Genetics</source><volume>4</volume><elocation-id>e1000117</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pgen.1000117</pub-id><pub-id pub-id-type="pmid">18604269</pub-id></element-citation></ref><ref id="bib25"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hapiak</surname><given-names>V</given-names></name><name><surname>Summers</surname><given-names>P</given-names></name><name><surname>Ortega</surname><given-names>A</given-names></name><name><surname>Law</surname><given-names>WJ</given-names></name><name><surname>Stein</surname><given-names>A</given-names></name><name><surname>Komuniecki</surname><given-names>R</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Neuropeptides amplify and focus the monoaminergic inhibition of nociception in C<italic>aenorhabditis elegans</italic></article-title><source>The Journal of Neuroscience</source><volume>33</volume><fpage>14107</fpage><lpage>14116</lpage><pub-id pub-id-type="doi">10.1523/JNEUROSCI.1324-13.2013</pub-id><pub-id pub-id-type="pmid">23986246</pub-id></element-citation></ref><ref id="bib26"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hattar</surname><given-names>S</given-names></name><name><surname>Liao</surname><given-names>HW</given-names></name><name><surname>Takao</surname><given-names>M</given-names></name><name><surname>Berson</surname><given-names>DM</given-names></name><name><surname>Yau</surname><given-names>KW</given-names></name></person-group><year iso-8601-date="2002">2002</year><article-title>Melanopsin-containing retinal ganglion cells: architecture, projections, and intrinsic photosensitivity</article-title><source>Science</source><volume>295</volume><fpage>1065</fpage><lpage>1070</lpage><pub-id pub-id-type="doi">10.1126/science.1069609</pub-id><pub-id pub-id-type="pmid">11834834</pub-id></element-citation></ref><ref id="bib27"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hill</surname><given-names>AJ</given-names></name><name><surname>Mansfield</surname><given-names>R</given-names></name><name><surname>Lopez</surname><given-names>J</given-names></name><name><surname>Raizen</surname><given-names>DM</given-names></name><name><surname>Van Buskirk</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Cellular stress induces a protective sleep-like state in <italic>C. elegans</italic></article-title><source>Current Biology</source><volume>24</volume><fpage>2399</fpage><lpage>2405</lpage><pub-id pub-id-type="doi">10.1016/j.cub.2014.08.040</pub-id><pub-id pub-id-type="pmid">25264259</pub-id></element-citation></ref><ref id="bib28"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hindmarsh Sten</surname><given-names>T</given-names></name><name><surname>Li</surname><given-names>R</given-names></name><name><surname>Otopalik</surname><given-names>A</given-names></name><name><surname>Ruta</surname><given-names>V</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Sexual arousal gates visual processing during <italic>Drosophila</italic> courtship</article-title><source>Nature</source><volume>595</volume><fpage>549</fpage><lpage>553</lpage><pub-id pub-id-type="doi">10.1038/s41586-021-03714-w</pub-id><pub-id pub-id-type="pmid">34234348</pub-id></element-citation></ref><ref id="bib29"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Hong</surname><given-names>W</given-names></name><name><surname>Kim</surname><given-names>DW</given-names></name><name><surname>Anderson</surname><given-names>DJ</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Antagonistic control of social versus repetitive self-grooming behaviors by separable amygdala neuronal subsets</article-title><source>Cell</source><volume>158</volume><fpage>1348</fpage><lpage>1361</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2014.07.049</pub-id><pub-id pub-id-type="pmid">25215491</pub-id></element-citation></ref><ref id="bib30"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Jang</surname><given-names>H</given-names></name><name><surname>Levy</surname><given-names>S</given-names></name><name><surname>Flavell</surname><given-names>SW</given-names></name><name><surname>Mende</surname><given-names>F</given-names></name><name><surname>Latham</surname><given-names>R</given-names></name><name><surname>Zimmer</surname><given-names>M</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Dissection of neuronal gap junction circuits that regulate social behavior in <italic>Caenorhabditis elegans</italic></article-title><source>PNAS</source><volume>114</volume><fpage>E1263</fpage><lpage>E1272</lpage><pub-id pub-id-type="doi">10.1073/pnas.1621274114</pub-id><pub-id pub-id-type="pmid">28143932</pub-id></element-citation></ref><ref id="bib31"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Janssen</surname><given-names>T</given-names></name><name><surname>Husson</surname><given-names>SJ</given-names></name><name><surname>Lindemans</surname><given-names>M</given-names></name><name><surname>Mertens</surname><given-names>I</given-names></name><name><surname>Rademakers</surname><given-names>S</given-names></name><name><surname>Ver Donck</surname><given-names>K</given-names></name><name><surname>Geysen</surname><given-names>J</given-names></name><name><surname>Jansen</surname><given-names>G</given-names></name><name><surname>Schoofs</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Functional characterization of three G protein-coupled receptors for pigment dispersing factors in <italic>Caenorhabditis elegans</italic></article-title><source>The Journal of Biological Chemistry</source><volume>283</volume><fpage>15241</fpage><lpage>15249</lpage><pub-id pub-id-type="doi">10.1074/jbc.M709060200</pub-id><pub-id pub-id-type="pmid">18390545</pub-id></element-citation></ref><ref id="bib32"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Javer</surname><given-names>A</given-names></name><name><surname>Ripoll-Sánchez</surname><given-names>L</given-names></name><name><surname>Brown</surname><given-names>AEX</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Powerful and interpretable behavioural features for quantitative phenotyping of <italic>Caenorhabditis elegans</italic></article-title><source>Philosophical Transactions of the Royal Society of London. Series B, Biological Sciences</source><volume>373</volume><elocation-id>20170375</elocation-id><pub-id pub-id-type="doi">10.1098/rstb.2017.0375</pub-id><pub-id pub-id-type="pmid">30201839</pub-id></element-citation></ref><ref id="bib33"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ji</surname><given-names>N</given-names></name><name><surname>Madan</surname><given-names>GK</given-names></name><name><surname>Fabre</surname><given-names>GI</given-names></name><name><surname>Dayan</surname><given-names>A</given-names></name><name><surname>Baker</surname><given-names>CM</given-names></name><name><surname>Kramer</surname><given-names>TS</given-names></name><name><surname>Nwabudike</surname><given-names>I</given-names></name><name><surname>Flavell</surname><given-names>SW</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>A neural circuit for flexible control of persistent behavioral states</article-title><source>eLife</source><volume>10</volume><elocation-id>e62889</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.62889</pub-id><pub-id pub-id-type="pmid">34792019</pub-id></element-citation></ref><ref id="bib34"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Kennedy</surname><given-names>A</given-names></name><name><surname>Asahina</surname><given-names>K</given-names></name><name><surname>Hoopfer</surname><given-names>E</given-names></name><name><surname>Inagaki</surname><given-names>H</given-names></name><name><surname>Jung</surname><given-names>Y</given-names></name><name><surname>Lee</surname><given-names>H</given-names></name><name><surname>Remedios</surname><given-names>R</given-names></name><name><surname>Anderson</surname><given-names>DJ</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Internal states and behavioral decision-making: toward an integration of emotion and cognition</article-title><source>Cold Spring Harbor Symposia on Quantitative Biology</source><volume>79</volume><fpage>199</fpage><lpage>210</lpage><pub-id pub-id-type="doi">10.1101/sqb.2014.79.024984</pub-id><pub-id pub-id-type="pmid">25948637</pub-id></element-citation></ref><ref id="bib35"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Lin</surname><given-names>JY</given-names></name><name><surname>Knutsen</surname><given-names>PM</given-names></name><name><surname>Muller</surname><given-names>A</given-names></name><name><surname>Kleinfeld</surname><given-names>D</given-names></name><name><surname>Tsien</surname><given-names>RY</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>ReaChR: a red-shifted variant of channelrhodopsin enables deep transcranial optogenetic excitation</article-title><source>Nature Neuroscience</source><volume>16</volume><fpage>1499</fpage><lpage>1508</lpage><pub-id pub-id-type="doi">10.1038/nn.3502</pub-id><pub-id pub-id-type="pmid">23995068</pub-id></element-citation></ref><ref id="bib36"><element-citation publication-type="software"><person-group person-group-type="author"><name><surname>Linderman</surname><given-names>S</given-names></name><name><surname>Antin</surname><given-names>B</given-names></name><name><surname>Zoltowski</surname><given-names>D</given-names></name><name><surname>Glaser</surname><given-names>J</given-names></name></person-group><year iso-8601-date="2020">2020</year><data-title>Lindermanlab</data-title><version designator="6c856ad">6c856ad</version><source>Github</source><ext-link ext-link-type="uri" xlink:href="https://github.com/lindermanlab/ssm">https://github.com/lindermanlab/ssm</ext-link></element-citation></ref><ref id="bib37"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Macosko</surname><given-names>EZ</given-names></name><name><surname>Pokala</surname><given-names>N</given-names></name><name><surname>Feinberg</surname><given-names>EH</given-names></name><name><surname>Chalasani</surname><given-names>SH</given-names></name><name><surname>Butcher</surname><given-names>RA</given-names></name><name><surname>Clardy</surname><given-names>J</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2009">2009</year><article-title>A hub-and-spoke circuit drives pheromone attraction and social behaviour in C. elegans</article-title><source>Nature</source><volume>458</volume><fpage>1171</fpage><lpage>1175</lpage><pub-id pub-id-type="doi">10.1038/nature07886</pub-id><pub-id pub-id-type="pmid">19349961</pub-id></element-citation></ref><ref id="bib38"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Marques</surname><given-names>JC</given-names></name><name><surname>Li</surname><given-names>M</given-names></name><name><surname>Schaak</surname><given-names>D</given-names></name><name><surname>Robson</surname><given-names>DN</given-names></name><name><surname>Li</surname><given-names>JM</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Internal state dynamics shape brainwide activity and foraging behaviour</article-title><source>Nature</source><volume>577</volume><fpage>239</fpage><lpage>243</lpage><pub-id pub-id-type="doi">10.1038/s41586-019-1858-z</pub-id><pub-id pub-id-type="pmid">31853063</pub-id></element-citation></ref><ref id="bib39"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>McCloskey</surname><given-names>RJ</given-names></name><name><surname>Fouad</surname><given-names>AD</given-names></name><name><surname>Churgin</surname><given-names>MA</given-names></name><name><surname>Fang-Yen</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Food responsiveness regulates episodic behavioral states in <italic>Caenorhabditis elegans</italic></article-title><source>Journal of Neurophysiology</source><volume>117</volume><fpage>1911</fpage><lpage>1934</lpage><pub-id pub-id-type="doi">10.1152/jn.00555.2016</pub-id><pub-id pub-id-type="pmid">28228583</pub-id></element-citation></ref><ref id="bib40"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Meelkop</surname><given-names>E</given-names></name><name><surname>Temmerman</surname><given-names>L</given-names></name><name><surname>Janssen</surname><given-names>T</given-names></name><name><surname>Suetens</surname><given-names>N</given-names></name><name><surname>Beets</surname><given-names>I</given-names></name><name><surname>Van Rompay</surname><given-names>L</given-names></name><name><surname>Shanmugam</surname><given-names>N</given-names></name><name><surname>Husson</surname><given-names>SJ</given-names></name><name><surname>Schoofs</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>PDF receptor signaling in <italic>Caenorhabditis elegans</italic> modulates locomotion and egg-laying</article-title><source>Molecular and Cellular Endocrinology</source><volume>361</volume><fpage>232</fpage><lpage>240</lpage><pub-id pub-id-type="doi">10.1016/j.mce.2012.05.001</pub-id><pub-id pub-id-type="pmid">22579613</pub-id></element-citation></ref><ref id="bib41"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Meisel</surname><given-names>JD</given-names></name><name><surname>Panda</surname><given-names>O</given-names></name><name><surname>Mahanti</surname><given-names>P</given-names></name><name><surname>Schroeder</surname><given-names>FC</given-names></name><name><surname>Kim</surname><given-names>DH</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Chemosensation of bacterial secondary metabolites modulates neuroendocrine signaling and behavior of <italic>C. elegans</italic></article-title><source>Cell</source><volume>159</volume><fpage>267</fpage><lpage>280</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2014.09.011</pub-id><pub-id pub-id-type="pmid">25303524</pub-id></element-citation></ref><ref id="bib42"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Melo</surname><given-names>JA</given-names></name><name><surname>Ruvkun</surname><given-names>G</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Inactivation of conserved <italic>C. elegans</italic> genes engages pathogen- and xenobiotic-associated defenses</article-title><source>Cell</source><volume>149</volume><fpage>452</fpage><lpage>466</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2012.02.050</pub-id><pub-id pub-id-type="pmid">22500807</pub-id></element-citation></ref><ref id="bib43"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Milward</surname><given-names>K</given-names></name><name><surname>Busch</surname><given-names>KE</given-names></name><name><surname>Murphy</surname><given-names>RJ</given-names></name><name><surname>de Bono</surname><given-names>M</given-names></name><name><surname>Olofsson</surname><given-names>B</given-names></name></person-group><year iso-8601-date="2011">2011</year><article-title>Neuronal and molecular substrates for optimal foraging in <italic>Caenorhabditis elegans</italic></article-title><source>PNAS</source><volume>108</volume><fpage>20672</fpage><lpage>20677</lpage><pub-id pub-id-type="doi">10.1073/pnas.1106134109</pub-id><pub-id pub-id-type="pmid">22135454</pub-id></element-citation></ref><ref id="bib44"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Moy</surname><given-names>K</given-names></name><name><surname>Li</surname><given-names>W</given-names></name><name><surname>Tran</surname><given-names>HP</given-names></name><name><surname>Simonis</surname><given-names>V</given-names></name><name><surname>Story</surname><given-names>E</given-names></name><name><surname>Brandon</surname><given-names>C</given-names></name><name><surname>Furst</surname><given-names>J</given-names></name><name><surname>Raicu</surname><given-names>D</given-names></name><name><surname>Kim</surname><given-names>H</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Computational methods for tracking, quantitative assessment, and visualization of <italic>C. elegans</italic> locomotory behavior</article-title><source>PLOS ONE</source><volume>10</volume><elocation-id>e0145870</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0145870</pub-id><pub-id pub-id-type="pmid">26713869</pub-id></element-citation></ref><ref id="bib45"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>O’Connell</surname><given-names>LA</given-names></name><name><surname>Rigney</surname><given-names>MM</given-names></name><name><surname>Dykstra</surname><given-names>DW</given-names></name><name><surname>Hofmann</surname><given-names>HA</given-names></name></person-group><year iso-8601-date="2013">2013</year><article-title>Neuroendocrine mechanisms underlying sensory integration of social signals</article-title><source>Journal of Neuroendocrinology</source><volume>25</volume><fpage>644</fpage><lpage>654</lpage><pub-id pub-id-type="doi">10.1111/jne.12045</pub-id><pub-id pub-id-type="pmid">23631684</pub-id></element-citation></ref><ref id="bib46"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>O’Donnell</surname><given-names>MP</given-names></name><name><surname>Fox</surname><given-names>BW</given-names></name><name><surname>Chao</surname><given-names>PH</given-names></name><name><surname>Schroeder</surname><given-names>FC</given-names></name><name><surname>Sengupta</surname><given-names>P</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>A neurotransmitter produced by gut bacteria modulates host sensory behaviour</article-title><source>Nature</source><volume>583</volume><fpage>415</fpage><lpage>420</lpage><pub-id pub-id-type="doi">10.1038/s41586-020-2395-5</pub-id><pub-id pub-id-type="pmid">32555456</pub-id></element-citation></ref><ref id="bib47"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Olofsson</surname><given-names>B</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>The olfactory neuron AWC promotes avoidance of normally palatable food following chronic dietary restriction</article-title><source>The Journal of Experimental Biology</source><volume>217</volume><fpage>1790</fpage><lpage>1798</lpage><pub-id pub-id-type="doi">10.1242/jeb.099929</pub-id><pub-id pub-id-type="pmid">24577446</pub-id></element-citation></ref><ref id="bib48"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Omura</surname><given-names>DT</given-names></name><name><surname>Clark</surname><given-names>DA</given-names></name><name><surname>Samuel</surname><given-names>ADT</given-names></name><name><surname>Horvitz</surname><given-names>HR</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Dopamine signaling is essential for precise rates of locomotion by <italic>C. elegans</italic></article-title><source>PLOS ONE</source><volume>7</volume><elocation-id>e38649</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pone.0038649</pub-id><pub-id pub-id-type="pmid">22719914</pub-id></element-citation></ref><ref id="bib49"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pan</surname><given-names>Y</given-names></name><name><surname>Meissner</surname><given-names>GW</given-names></name><name><surname>Baker</surname><given-names>BS</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Joint control of <italic>Drosophila</italic> male courtship behavior by motion cues and activation of male-specific P1 neurons</article-title><source>PNAS</source><volume>109</volume><fpage>10065</fpage><lpage>10070</lpage><pub-id pub-id-type="doi">10.1073/pnas.1207107109</pub-id><pub-id pub-id-type="pmid">22645338</pub-id></element-citation></ref><ref id="bib50"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pradel</surname><given-names>E</given-names></name><name><surname>Zhang</surname><given-names>Y</given-names></name><name><surname>Pujol</surname><given-names>N</given-names></name><name><surname>Matsuyama</surname><given-names>T</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name><name><surname>Ewbank</surname><given-names>JJ</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Detection and avoidance of a natural product from the pathogenic bacterium Serratia marcescens by <italic>Caenorhabditis elegans</italic></article-title><source>PNAS</source><volume>104</volume><fpage>2295</fpage><lpage>2300</lpage><pub-id pub-id-type="doi">10.1073/pnas.0610281104</pub-id><pub-id pub-id-type="pmid">17267603</pub-id></element-citation></ref><ref id="bib51"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Proekt</surname><given-names>A</given-names></name><name><surname>Banavar</surname><given-names>JR</given-names></name><name><surname>Maritan</surname><given-names>A</given-names></name><name><surname>Pfaff</surname><given-names>DW</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Scale invariance in the dynamics of spontaneous behavior</article-title><source>PNAS</source><volume>109</volume><fpage>10564</fpage><lpage>10569</lpage><pub-id pub-id-type="doi">10.1073/pnas.1206894109</pub-id><pub-id pub-id-type="pmid">22679281</pub-id></element-citation></ref><ref id="bib52"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Pujol</surname><given-names>N</given-names></name><name><surname>Link</surname><given-names>EM</given-names></name><name><surname>Liu</surname><given-names>LX</given-names></name><name><surname>Kurz</surname><given-names>CL</given-names></name><name><surname>Alloing</surname><given-names>G</given-names></name><name><surname>Tan</surname><given-names>MW</given-names></name><name><surname>Ray</surname><given-names>KP</given-names></name><name><surname>Solari</surname><given-names>R</given-names></name><name><surname>Johnson</surname><given-names>CD</given-names></name><name><surname>Ewbank</surname><given-names>JJ</given-names></name></person-group><year iso-8601-date="2001">2001</year><article-title>A reverse genetic analysis of components of the Toll signaling pathway in <italic>Caenorhabditis elegans</italic></article-title><source>Current Biology</source><volume>11</volume><fpage>809</fpage><lpage>821</lpage><pub-id pub-id-type="doi">10.1016/s0960-9822(01)00241-x</pub-id><pub-id pub-id-type="pmid">11516642</pub-id></element-citation></ref><ref id="bib53"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Raizen</surname><given-names>DM</given-names></name><name><surname>Zimmerman</surname><given-names>JE</given-names></name><name><surname>Maycock</surname><given-names>MH</given-names></name><name><surname>Ta</surname><given-names>UD</given-names></name><name><surname>You</surname><given-names>Y</given-names></name><name><surname>Sundaram</surname><given-names>MV</given-names></name><name><surname>Pack</surname><given-names>AI</given-names></name></person-group><year iso-8601-date="2008">2008</year><article-title>Lethargus is a <italic>Caenorhabditis elegans</italic> sleep-like state</article-title><source>Nature</source><volume>451</volume><fpage>569</fpage><lpage>572</lpage><pub-id pub-id-type="doi">10.1038/nature06535</pub-id><pub-id pub-id-type="pmid">18185515</pub-id></element-citation></ref><ref id="bib54"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Rhoades</surname><given-names>JL</given-names></name><name><surname>Nelson</surname><given-names>JC</given-names></name><name><surname>Nwabudike</surname><given-names>I</given-names></name><name><surname>Yu</surname><given-names>SK</given-names></name><name><surname>McLachlan</surname><given-names>IG</given-names></name><name><surname>Madan</surname><given-names>GK</given-names></name><name><surname>Abebe</surname><given-names>E</given-names></name><name><surname>Powers</surname><given-names>JR</given-names></name><name><surname>Colón-Ramos</surname><given-names>DA</given-names></name><name><surname>Flavell</surname><given-names>SW</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>ASICs Mediate food responses in an enteric serotonergic neuron that controls foraging behaviors</article-title><source>Cell</source><volume>176</volume><fpage>85</fpage><lpage>97</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2018.11.023</pub-id><pub-id pub-id-type="pmid">30580965</pub-id></element-citation></ref><ref id="bib55"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Ryu</surname><given-names>MH</given-names></name><name><surname>Moskvin</surname><given-names>OV</given-names></name><name><surname>Siltberg-Liberles</surname><given-names>J</given-names></name><name><surname>Gomelsky</surname><given-names>M</given-names></name></person-group><year iso-8601-date="2010">2010</year><article-title>Natural and engineered photoactivated nucleotidyl cyclases for optogenetic applications</article-title><source>The Journal of Biological Chemistry</source><volume>285</volume><fpage>41501</fpage><lpage>41508</lpage><pub-id pub-id-type="doi">10.1074/jbc.M110.177600</pub-id><pub-id pub-id-type="pmid">21030591</pub-id></element-citation></ref><ref id="bib56"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Sawin</surname><given-names>ER</given-names></name><name><surname>Ranganathan</surname><given-names>R</given-names></name><name><surname>Horvitz</surname><given-names>HR</given-names></name></person-group><year iso-8601-date="2000">2000</year><article-title><italic>C. elegans</italic> locomotory rate is modulated by the environment through a dopaminergic pathway and by experience through a serotonergic pathway</article-title><source>Neuron</source><volume>26</volume><fpage>619</fpage><lpage>631</lpage><pub-id pub-id-type="doi">10.1016/s0896-6273(00)81199-x</pub-id><pub-id pub-id-type="pmid">10896158</pub-id></element-citation></ref><ref id="bib57"><element-citation publication-type="software"><person-group person-group-type="author"><name><surname>Scheer</surname><given-names>E</given-names></name><name><surname>Bargmann</surname><given-names>C</given-names></name></person-group><year iso-8601-date="2023">2023</year><data-title>Bargmannlab</data-title><version designator="swh:1:rev:e8499dc99263d2fc09b422059d8cb412270ff33a">swh:1:rev:e8499dc99263d2fc09b422059d8cb412270ff33a</version><source>Software Heritage</source><ext-link ext-link-type="uri" xlink:href="https://archive.softwareheritage.org/swh:1:dir:82725e20889350543367994bd8248a67b817a5d6;origin=https://github.com/BargmannLab/Scheer_Bargmann2023;visit=swh:1:snp:4cbadc84a42cfbcbb49d24be092ef255e6c56592;anchor=swh:1:rev:e8499dc99263d2fc09b422059d8cb412270ff33a">https://archive.softwareheritage.org/swh:1:dir:82725e20889350543367994bd8248a67b817a5d6;origin=https://github.com/BargmannLab/Scheer_Bargmann2023;visit=swh:1:snp:4cbadc84a42cfbcbb49d24be092ef255e6c56592;anchor=swh:1:rev:e8499dc99263d2fc09b422059d8cb412270ff33a</ext-link></element-citation></ref><ref id="bib58"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Schwarz</surname><given-names>RF</given-names></name><name><surname>Branicky</surname><given-names>R</given-names></name><name><surname>Grundy</surname><given-names>LJ</given-names></name><name><surname>Schafer</surname><given-names>WR</given-names></name><name><surname>Brown</surname><given-names>AEX</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Changes in postural syntax characterize sensory modulation and natural variation of <italic>C. elegans</italic> locomotion</article-title><source>PLOS Computational Biology</source><volume>11</volume><elocation-id>e1004322</elocation-id><pub-id pub-id-type="doi">10.1371/journal.pcbi.1004322</pub-id><pub-id pub-id-type="pmid">26295152</pub-id></element-citation></ref><ref id="bib59"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Shtonda</surname><given-names>BB</given-names></name><name><surname>Avery</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Dietary choice behavior in <italic>Caenorhabditis elegans</italic></article-title><source>The Journal of Experimental Biology</source><volume>209</volume><fpage>89</fpage><lpage>102</lpage><pub-id pub-id-type="doi">10.1242/jeb.01955</pub-id><pub-id pub-id-type="pmid">16354781</pub-id></element-citation></ref><ref id="bib60"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Stern</surname><given-names>S</given-names></name><name><surname>Kirst</surname><given-names>C</given-names></name><name><surname>Bargmann</surname><given-names>CI</given-names></name></person-group><year iso-8601-date="2017">2017</year><article-title>Neuromodulatory control of long-term behavioral patterns and individuality across development</article-title><source>Cell</source><volume>171</volume><fpage>1649</fpage><lpage>1662</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2017.10.041</pub-id><pub-id pub-id-type="pmid">29198526</pub-id></element-citation></ref><ref id="bib61"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Taghert</surname><given-names>PH</given-names></name><name><surname>Nitabach</surname><given-names>MN</given-names></name></person-group><year iso-8601-date="2012">2012</year><article-title>Peptide neuromodulation in invertebrate model systems</article-title><source>Neuron</source><volume>76</volume><fpage>82</fpage><lpage>97</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2012.08.035</pub-id><pub-id pub-id-type="pmid">23040808</pub-id></element-citation></ref><ref id="bib62"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Taylor</surname><given-names>SR</given-names></name><name><surname>Santpere</surname><given-names>G</given-names></name><name><surname>Weinreb</surname><given-names>A</given-names></name><name><surname>Barrett</surname><given-names>A</given-names></name><name><surname>Reilly</surname><given-names>MB</given-names></name><name><surname>Xu</surname><given-names>C</given-names></name><name><surname>Varol</surname><given-names>E</given-names></name><name><surname>Oikonomou</surname><given-names>P</given-names></name><name><surname>Glenwinkel</surname><given-names>L</given-names></name><name><surname>McWhirter</surname><given-names>R</given-names></name><name><surname>Poff</surname><given-names>A</given-names></name><name><surname>Basavaraju</surname><given-names>M</given-names></name><name><surname>Rafi</surname><given-names>I</given-names></name><name><surname>Yemini</surname><given-names>E</given-names></name><name><surname>Cook</surname><given-names>SJ</given-names></name><name><surname>Abrams</surname><given-names>A</given-names></name><name><surname>Vidal</surname><given-names>B</given-names></name><name><surname>Cros</surname><given-names>C</given-names></name><name><surname>Tavazoie</surname><given-names>S</given-names></name><name><surname>Sestan</surname><given-names>N</given-names></name><name><surname>Hammarlund</surname><given-names>M</given-names></name><name><surname>Hobert</surname><given-names>O</given-names></name><name><surname>Miller</surname><given-names>DM</given-names></name></person-group><year iso-8601-date="2021">2021</year><article-title>Molecular topography of an entire nervous system</article-title><source>Cell</source><volume>184</volume><fpage>4329</fpage><lpage>4347</lpage><pub-id pub-id-type="doi">10.1016/j.cell.2021.06.023</pub-id><pub-id pub-id-type="pmid">34237253</pub-id></element-citation></ref><ref id="bib63"><element-citation publication-type="book"><person-group person-group-type="author"><name><surname>Tinbergen</surname><given-names>N</given-names></name></person-group><year iso-8601-date="1951">1951</year><source>The Study of Instinct</source><publisher-name>Oxford, Clarendon Press</publisher-name></element-citation></ref><ref id="bib64"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Tomar</surname><given-names>S</given-names></name></person-group><year iso-8601-date="2006">2006</year><article-title>Converting Video formats with Ffmpeg</article-title><source>Linux Journal</source><volume>146</volume><elocation-id>10</elocation-id></element-citation></ref><ref id="bib65"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Van Buskirk</surname><given-names>C</given-names></name><name><surname>Sternberg</surname><given-names>PW</given-names></name></person-group><year iso-8601-date="2007">2007</year><article-title>Epidermal growth factor signaling induces behavioral quiescence in <italic>Caenorhabditis elegans</italic></article-title><source>Nature Neuroscience</source><volume>10</volume><fpage>1300</fpage><lpage>1307</lpage><pub-id pub-id-type="doi">10.1038/nn1981</pub-id><pub-id pub-id-type="pmid">17891142</pub-id></element-citation></ref><ref id="bib66"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wang</surname><given-names>Y</given-names></name><name><surname>Zhang</surname><given-names>X</given-names></name><name><surname>Xin</surname><given-names>Q</given-names></name><name><surname>Hung</surname><given-names>W</given-names></name><name><surname>Florman</surname><given-names>J</given-names></name><name><surname>Huo</surname><given-names>J</given-names></name><name><surname>Xu</surname><given-names>T</given-names></name><name><surname>Xie</surname><given-names>Y</given-names></name><name><surname>Alkema</surname><given-names>MJ</given-names></name><name><surname>Zhen</surname><given-names>M</given-names></name><name><surname>Wen</surname><given-names>Q</given-names></name></person-group><year iso-8601-date="2020">2020</year><article-title>Flexible motor sequence generation during stereotyped escape responses</article-title><source>eLife</source><volume>9</volume><elocation-id>56942</elocation-id><pub-id pub-id-type="doi">10.7554/eLife.56942</pub-id></element-citation></ref><ref id="bib67"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Weissbourd</surname><given-names>B</given-names></name><name><surname>Ren</surname><given-names>J</given-names></name><name><surname>DeLoach</surname><given-names>KE</given-names></name><name><surname>Guenthner</surname><given-names>CJ</given-names></name><name><surname>Miyamichi</surname><given-names>K</given-names></name><name><surname>Luo</surname><given-names>L</given-names></name></person-group><year iso-8601-date="2014">2014</year><article-title>Presynaptic partners of dorsal raphe serotonergic and GABAergic neurons</article-title><source>Neuron</source><volume>83</volume><fpage>645</fpage><lpage>662</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2014.06.024</pub-id><pub-id pub-id-type="pmid">25102560</pub-id></element-citation></ref><ref id="bib68"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Wiltschko</surname><given-names>AB</given-names></name><name><surname>Johnson</surname><given-names>MJ</given-names></name><name><surname>Iurilli</surname><given-names>G</given-names></name><name><surname>Peterson</surname><given-names>RE</given-names></name><name><surname>Katon</surname><given-names>JM</given-names></name><name><surname>Pashkovski</surname><given-names>SL</given-names></name><name><surname>Abraira</surname><given-names>VE</given-names></name><name><surname>Adams</surname><given-names>RP</given-names></name><name><surname>Datta</surname><given-names>SR</given-names></name></person-group><year iso-8601-date="2015">2015</year><article-title>Mapping sub-second structure in mouse behavior</article-title><source>Neuron</source><volume>88</volume><fpage>1121</fpage><lpage>1135</lpage><pub-id pub-id-type="doi">10.1016/j.neuron.2015.11.031</pub-id><pub-id pub-id-type="pmid">26687221</pub-id></element-citation></ref><ref id="bib69"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Worthy</surname><given-names>SE</given-names></name><name><surname>Rojas</surname><given-names>GL</given-names></name><name><surname>Taylor</surname><given-names>CJ</given-names></name><name><surname>Glater</surname><given-names>EE</given-names></name></person-group><year iso-8601-date="2018">2018</year><article-title>Identification of odor blend used by <italic>Caenorhabditis elegans</italic> for pathogen recognition</article-title><source>Chemical Senses</source><volume>43</volume><fpage>169</fpage><lpage>180</lpage><pub-id pub-id-type="doi">10.1093/chemse/bjy001</pub-id><pub-id pub-id-type="pmid">29373666</pub-id></element-citation></ref><ref id="bib70"><element-citation publication-type="journal"><person-group person-group-type="author"><name><surname>Yoshimura</surname><given-names>J</given-names></name><name><surname>Ichikawa</surname><given-names>K</given-names></name><name><surname>Shoura</surname><given-names>MJ</given-names></name><name><surname>Artiles</surname><given-names>KL</given-names></name><name><surname>Gabdank</surname><given-names>I</given-names></name><name><surname>Wahba</surname><given-names>L</given-names></name><name><surname>Smith</surname><given-names>CL</given-names></name><name><surname>Edgley</surname><given-names>ML</given-names></name><name><surname>Rougvie</surname><given-names>AE</given-names></name><name><surname>Fire</surname><given-names>AZ</given-names></name><name><surname>Morishita</surname><given-names>S</given-names></name><name><surname>Schwarz</surname><given-names>EM</given-names></name></person-group><year iso-8601-date="2019">2019</year><article-title>Recompleting the <italic>Caenorhabditis elegans</italic> genome</article-title><source>Genome Research</source><volume>29</volume><fpage>1009</fpage><lpage>1022</lpage><pub-id pub-id-type="doi">10.1101/gr.244830.118</pub-id></element-citation></ref></ref-list></back><sub-article article-type="editor-report" id="sa0"><front-stub><article-id pub-id-type="doi">10.7554/eLife.88657.3.sa0</article-id><title-group><article-title>eLife assessment</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Kratsios</surname><given-names>Paschalis</given-names></name><role specific-use="editor">Reviewing Editor</role><aff><institution>University of Chicago</institution><country>United States</country></aff></contrib></contrib-group><kwd-group kwd-group-type="evidence-strength"><kwd>Convincing</kwd></kwd-group><kwd-group kwd-group-type="claim-importance"><kwd>Important</kwd></kwd-group></front-stub><body><p>This is an <bold>important</bold> study on how behavioral context affects decision making in the nematode <italic>C. elegans</italic>. Behavioral analyses at multiple time scales combined with genetic and neuronal manipulations revealed how arousal states affect decision making. The results and interpretations are <bold>convincing</bold>. This work will be of interest to both neuroscientists and ecologists.</p></body></sub-article><sub-article article-type="referee-report" id="sa1"><front-stub><article-id pub-id-type="doi">10.7554/eLife.88657.3.sa1</article-id><title-group><article-title>Reviewer #1 (Public Review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Genetic, physiological, and environmental manipulations that increase roaming increase leaving rates. The connection between increased roaming and increased leaving is lost when tax4-expressing sensory neurons are inactivated. This study is conceptually important in its characterization of worm behaviors as time-series of discrete states, a promising framework for understanding behavioral decisions as algorithms that govern state transitions. This framework is well-established in other animals, but relatively new to worms.</p><p>A key discovery is that lawn leaving behavior is probabilistically favored in states of behavioral arousal. I like the use of response-triggered averages (triggered on leaving events) that illustrate a &quot;state-dependent receptive field&quot; of the behavioral response. Response-triggered averages are common in sensory neuroscience, used, for example, to characterize the diverse &quot;stimulus-dependent receptive fields&quot; of different retinal ganglion cell types. It's nice to adapt the idea to illustrate the state-dependence of behavioral state transitions.</p><p>The simplest metric of arousal state is crawling speed. When animals crawl faster, they are more likely to leave lawns. A more sophisticated metric of behavioral context is whether the animal is in a &quot;roaming&quot; or &quot;dwelling&quot; state, two-state HMM modeling from previous work (Flavell et al., 2013). Roaming animals are more likely to leave lawns than dwelling animals. Different autoregressive HMM tools can segment worm behavior into 4-states. Also with ARHMMs, the most aroused state is again the state that promotes lawn-leaving. HMM analysis disentangles effects that were lumped by the simpler metric of overall speed.</p><p>The authors use diverse environmental, genetic, and optogenetic perturbations to regulate the roaming state, thereby regulating the statistics of leaving in the expected manner. One surprise is that feeding inhibition evokes roaming and lawn-leaving in both pdfr-1 and tph-1 mutants, even though the tph-1-expressing NSM neurons have been shown to sense bacterial ingestion and food availability.</p><p>Another surprise is that evoking roaming does not evoke leaving in tax-4 mutants. Without sensory neuron activity, worms are only more likely to roam for a minute before leaving rather than roaming for several minutes before leaving like wild-type (Figure 6C). ASJ seems to be the most important sensory neuron in this coupling between roaming and leaving (which is uncoupled when sensory neurons are inactivated).</p></body></sub-article><sub-article article-type="referee-report" id="sa2"><front-stub><article-id pub-id-type="doi">10.7554/eLife.88657.3.sa2</article-id><title-group><article-title>Reviewer #2 (Public Review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Here, the authors use quantitative behavioral analyses to describe in unprecedented detail the various behavioral choices animals make when encountering the lawn edge. They report that leaving the lawn is a rare outcome compared to other choices such as pausing or reversing back into the lawn. It occurs predominantly out of the roaming state and has a characteristic preceding fast crawling profile. They developed a refined analysis method, the result of which suggests that the arousal state of animals on food can be described by a 4-state behavior (as opposed to the 2-state roaming - dwelling classification); leaving the lawn occurs predominantly from &quot;state 3&quot;, which corresponds to the highest level of arousal during roaming. They further show that various manipulations, such as optogenetic inhibition of feeding, stimulation of RIB neurons, or mutations of neuromodulator pathways, all of which have previously been reported to affect crawling speed and/or roaming/dwelling, maintain the coupling between roaming states and leaving, suggesting a dedicated mechanism for coupling leaving to the roaming state. Finally, they use genetics to implicate chemosensory neurons as neuronal circuit elements mediating this coupling.</p><p>How arousal states affect decision making is an active area of neuroscience research; therefore, the current manuscript will impact the field beyond the small community of <italic>C. elegans</italic> researchers. Also, in the past, roaming/dwelling and leaving have been treated as independent behaviors; the current manuscript is very intriguing, demonstrating both the interconnectedness of different behavioral programs and the importance of the animal's behavioral context for specific decisions.</p><p>In this current revision and, the authors have made a good effort at addressing most of my previous comments, especially to clarify the sample sizes and how independent assays were performed.</p><p>My major concern, however, remains: when leaving animals apparently accelerate their locomotion speed starting about 30s prior to the leaving events (Fig. 2A, D, G). By the authors' analysis, these episodes are assigned to roaming or 'state 3'. Note, that even within these states the behavior seems to be distinctively faster than baseline roaming- or 'state 3'- speed (Fig. 2A, D, G). If leaving is indeed preceded by a stereotypic acceleration phase, this phase should be assigned to the leaving event, not to roaming or 'state 3'. If this is done, the distribution of roaming dwelling states prior to acceleration-leaving could get closer to 50/50 (draw a vertical line at 30s onto Figure 2C, and then count the fraction of prior roaming-dwelling states). I would conclude that the probability of leaving is also high out of the dwelling-state. This interpretation challenges the major conclusion of the study, which is that the roaming behavioral state is a major determinant of the leaving decision. The analysis in Figure 2 S1E shows interesting results hinting that leaving is indeed not fully independent of the roaming history, but does not directly address the issue described above.</p><p>I think that the work is otherwise overall very well done and the results are extremely interesting. But I would interpret the results differently unless the authors provide a more tailored analysis that rules out my concern.</p></body></sub-article><sub-article article-type="referee-report" id="sa3"><front-stub><article-id pub-id-type="doi">10.7554/eLife.88657.3.sa3</article-id><title-group><article-title>Reviewer #3 (Public Review):</article-title></title-group><contrib-group><contrib contrib-type="author"><anonymous/><role specific-use="referee">Reviewer</role></contrib></contrib-group></front-stub><body><p>Scheer and Bargmann use a combination of computational and experimental approaches in <italic>C. elegans</italic> to investigate the neuronal mechanisms underlying the regulation of foraging decisions by the state of arousal. They showed that, in <italic>C. elegans</italic>, the decision to leave food substrates is linked to a high arousal state, roaming, and that an increase in speed at different timescales preceded the food leaving decisions. They found that mutants that exhibit increased roaming also leave food substrates more frequently and that both behaviors can be triggered if food intake is inhibited. They further identify a set of chemosensory neurons that express the transduction channel tax-4 that couple the roaming state and the food-leaving decisions. The authors postulate that these neurons integrate foraging decisions with behavioral states and internal feeding cues.</p><p>The strength of the paper relies on using quantitative and detailed behavioral analysis over multiple time scales in combination with manipulation of genes and neuron to tackle the state-dependent control of behavioral decisions in <italic>C. elegans</italic>. The evidence is convincing, the analysis rigorous, and the writing is clear and to the point.</p></body></sub-article><sub-article article-type="author-comment" id="sa4"><front-stub><article-id pub-id-type="doi">10.7554/eLife.88657.3.sa4</article-id><title-group><article-title>Author Response</article-title></title-group><contrib-group><contrib contrib-type="author"><name><surname>Bargmann</surname><given-names>Cornelia I</given-names></name><role specific-use="author">Author</role><aff><institution>Rockefeller University</institution><addr-line><named-content content-type="city">New York</named-content></addr-line><country>United States</country></aff></contrib><contrib contrib-type="author"><name><surname>Scheer</surname><given-names>Elias</given-names></name><role specific-use="author">Author</role><aff><institution>Whitehead Institute for Biomedical Research</institution><addr-line><named-content content-type="city">Cambridge</named-content></addr-line><country>United States</country></aff></contrib></contrib-group></front-stub><body><p>In this paper, we examine the behavioral context that generates foraging decisions at the boundaries of food patches in the nematode <italic>C. elegans</italic>. By analyzing animal locomotion at high spatial and temporal resolution, we identify discrete behavioral responses to encountering the edge of a food patch that can be understood as a decision: either to remain inside the food patch or to leave it. We find that the decision to leave a food patch is associated with increased behavioral arousal that unfolds on long and short timescales. The coupling of increased arousal to lawn leaving decisions is preserved across genetic, neuronal, and environmental manipulations that alter global arousal levels. However, genetic inactivation of a set of chemosensory neurons disrupts the coupling of arousal and lawn leaving, revealing a potential site of integration between internal signals and external sensation that governs foraging.</p><p>We appreciate the reviewers’ thoughtful engagement with this work. In addition to modifications in the text to address minor concerns and ambiguities, we have conducted new analyses and made text and figure edits to strengthen or explain our conclusions. We have also investigated possible confounding explanations to our interpretation of the data.</p><p>In newly added analysis, we show that increased arousal does not result in increased proximity to the lawn boundary, which would be a trivial reason why roaming animals leave more than dwelling ones (new Figure 2-Supplement 4).</p><p>We also addressed the concern that classifying the brief speed acceleration motif as a roaming state would inflate the apparent coupling of roaming to leaving. By measuring the duration of roaming states prior to leaving, we in fact found the opposite: roaming states that precede leaving are slightly longer than other roaming states, not short acceleration events (new Figure 2-Supplement 1E).</p><p>The reviewers also asked reasonable questions about variability between batches of experiments. In particular, reviewers pointed out high levels of roaming in wild type controls accompanying npr-1 mutants. Indeed, the simultaneously-tested wild type animals roamed more than usual in this experiment (Fig. 4C,K) and less than usual in other panels (Fig. 4A,B,I,J) in these small datasets. There is more to do here, but the results support the general point that roaming and leaving are correlated in several neuromodulatory mutants that regulate roaming. We have included a new sentence in the Figure 4 legend to draw the reader’s attention to the potential limitations of these results, and to explicitly state that results should not be compared across panels. Similarly, there is more to be done to understand tax-4, as we did not test all tax-4-expressing sensory neurons for their effects on roaming and leaving.</p><p>In private comments, reviewers also asked about experimental design and statistics and were concerned that certain assays conducted on just a few days may not represent independent experiments. We have updated the Methods section to improve the description of the behavioral experiments, including more information about the behavioral chambers and imaging conditions. We note that for all experiments we tested all relevant genotypes in the same batches and days, enabling comparisons of experimental animals with matched controls conducted at the same time.</p><p>Reviewers asked us to compare our results to those generated by Rhoades, et al. (2019) and Cermak, et al. (2020). To the best of our knowledge, our results are fully consistent with those studies. The study by Rhoades and co-authors is primarily concerned with behavioral slowing upon first encountering a food patch, and thus does not include data regarding roaming or lawn leaving (Rhoades et al., 2019). As we mention in the text, we were initially surprised that tph-1 did not eliminate regulation of roaming by feeding, but there are straightforward explanations (redundant transmitters, other neurons). tph-1 did have a significant, albeit small, effect. The study by Cermak and co-authors presents an alternative Hidden Markov Model that uses whole animal postures to segment on-food behavior into 9 states including 8 dwelling states and a single roaming state (Cermak et al., 2020); we refer to this analysis in the discussion. Cermak’s paper and ours differ in experimental conditions, the behaviors measured, and the models used to analyze them. The animals in the Cermak paper are exposed to a large bacterial lawn of uniform density, whereas animals in our study are recorded on small bacterial lawns with thick edges. The analysis tools also differ in their use of animal posture (Cermak only) and autoregressive dynamics (our work only). Further studies of the neurons and molecules involved may help to fully harmonize these models.</p><p>References</p><p>Cermak, N., Yu, S.K., Clark, R., Huang, Y.C., Baskoylu, S.N., and Flavell, S.W. (2020). Whole-organism behavioral profiling reveals a role for dopamine in statedependent motor program coupling in <italic>C. elegans</italic>. Elife 9, 1–34.</p><p>Rhoades, J.L., Nelson, J.C., Nwabudike, I., Yu, S.K., McLachlan, I.G., Madan, G.K., Abebe, E., Powers, J.R., Colón-Ramos, D.A., and Flavell, S.W. (2019). ASICs Mediate Food Responses in an Enteric Serotonergic Neuron that Controls Foraging Behaviors. Cell 176, 85-97.e14.</p></body></sub-article></article>