Project 1 At home in the Ganges, zebrafish are faced with specific challenges that are idiosyncratic to the environment they evolved in. On a typical day, a larval zebrafish will have to navigate moving water currents and prevent getting swept into unknown territory, it might have to avoid hypoxia and desiccation in overcrowded shallows, it could get physically trapped in cul-de-sacs, and it will need to find and hunt potentially elusive prey. Its behavioral strategies, both exteroceptive and interoceptive, play major roles in determining its evolutionary fitness in this environment. Inspired by the elegance and generality of the solutions a zebrafish finds to these challenges in nature, we have designed a series of behavioral assays that emulate such ethologically relevant conditions under controlled laboratory settings, and which allow us to extract the computational algorithms. For example, we have shown that fish perform temporal integration over noisy stimuli in the context of the coherent-dot optomotor reflex (cdOMR)1, we found that they calculate spatial integrals along their lateral line to estimate velocity gradients in the context of rheotaxis2, and that they silence self-induced and expected incoming somatosensory flow signals during swims and thereby protect their sensitive hair cells from these large perturbations3. Here, we propose to extend these ongoing analyses and to add additional behavioral paradigms where potentially conflicting sensory inputs are delivered simultaneously, and where the animal is forced to make decisions between mutually exclusive motor outputs. To go beyond these fast algorithmic computations, and in order to explicitly engage the autonomic regulation of internal states, we will challenge the animal with a variety of aversive conditions, including exposure to threats such as hypoxia or high salt4, or the frustration that occurs when an animal's motion is futile and they give up5,6. This second set of behavioral challenges and related analyses requires the inclusion of longer time constants into our modeling framework. They also are known to involve modulation of cardiac responses in addition to updating the animal's behavioral output, which makes them well suited to investigate the regulation of autonomic and interoceptive states. Our overall goal is to create comprehensive models of animal behavior by devising probabilistic algorithms that model motor and cardiac responses to a variety of sensory inputs. We are including cardiac (and in some cases respiratory) activity because these serve as indicators of internal states7 that must otherwise be surmised as hidden modifiers of brain function, but also because they offer a readout for how sensory input affects internal homeostasis. In order to adapt our experimental approach to the resolution and control required by each specific behavioral assay, we have designed several open and closed loop configurations in arenas of various spatial scales, as well as full...