Hunger͞satiation state interacts with appetitive and noxious stimuli to determine feeding and avoidance responses. In the predatory marine snail Pleurobranchaea californica, food chemostimuli induced proboscis extension and biting at concentration thresholds that varied directly with satiation state. However, food stimuli also tended to elicit avoidance behavior (withdrawal and avoidance turns) at concentration thresholds that were relatively low and fixed. When the feeding threshold for active feeding (proboscis extension with biting) was exceeded, ongoing avoidance and locomotion were interrupted and suppressed. Noxious chemostimuli usually stimulated avoidance, but, in animals with lower feeding thresholds for food stimuli, they often elicited feeding behavior. Thus, sensory pathways mediating appetitive and noxious stimuli may have dual access to neural networks of feeding and avoidance behavior, but their final effects are regulated by satiation state. These observations suggest that a simple costbenefit computation regulates behavioral switching in the animal's foraging behavior, where food stimuli above or below the incentive level for feeding tend to induce feeding or avoidance, respectively. This decision mechanism can weigh the animal's need for nutrients against the potential risk from other predators and the cost of relative energy outlay in an attack on prey. Stimulation of orienting and attack by low-level noxious stimuli in the hungriest animals may reflect risk-taking that can enhance prey capture success. A simple, hedonically structured neural network model captures this computation.T o optimize foraging behavior, animals often must make decisions based on the likely costs and benefits of a feeding attempt. One way in which they may do so is by integrating the percepts of a potential food source with their own internal state. That is, the predicted gains and losses of a feeding attempt, in terms of nutrient gain, energy expenditure, and risks from noxious prey defense and predation while foraging, are weighed against the organism's nutrient need as represented in terms of hunger. How animals do this must be basic to their ecosystem interactions and a major organizing factor in strategies of optimal foraging. However, the computational mechanisms animals use to decide between expression of feeding and avoidance behaviors are not well understood.In the carnivorous opisthobranch snail Pleurobranchaea californica, feeding and avoidance behaviors are largely exclusive of each other, as is the case for most animals. For instance, induction of active feeding behavior (rhythmic biting) suppresses avoidance withdrawal to a mechanical stimulus (1). Escape swimming, a stereotypic predator avoidance behavior, takes precedence over most other behaviors, including feeding (2, 3). Some data indicate that the transitions between feeding and avoidance behaviors can be modulated by experience, such that the feeding response to a food stimulus is replaced by withdrawal and avoidance turns after associative condit...