The ability to keep track of one’s location in space is a critical behavior for animals navigating to and from a salient location, but its computational basis remains unknown. Here, we tracked flies in a ring-shaped channel as they executed bouts of search, triggered by optogenetic activation of sugar receptors. Flies centered their back-and-forth local search excursions near fictive food locations by closely matching the length of consecutive runs. We tested a set of agent-based models that incorporate iterative odometry to store and retrieve the distance walked between consecutive events, such as reversals in walking direction. In contrast to memoryless models such as Levy flight, simulations employing reversal-to-reversal integration recapitulated flies’ centered search behavior, even during epochs when the food stimulus was withheld or in experiments with multiple food sites. However, experiments in which flies reinitiated local search after circumnavigating the arena suggest that flies can also integrate azimuthal heading to perform path integration. Together, this work provides a concrete theoretical framework and experimental system to advance investigations of the neural basis of path integration.
bioRxiv Subject Collection: Neuroscience