Predator-prey interactions involving aposematic signaling, where predators learn the warning cues of well-defended prey, are clear examples of cost-benefit decisions in foraging animals. However, knowledge of the selectivity of predator learning and the natural conditions where it occurs is lacking for those foragers simpler in brain and body plan. We pursued the question in the sea slug Pleurobranchaea californica, a generalist forager of marked simplicity of body form, nervous system and behavior. This predator exploits many different types of prey, some of which are costly to attack. When offered Flabellina iodinea, an aeolid nudibranch with a stinging defense, biting attack was followed by rapid rejection and aversive turns. The predatory sea slug rapidly learned avoidance. Notable exceptions were animals with extremely high or low feeding thresholds that either ignored F. iodinea or completely consumed it, respectively. Experienced slugs showed strong avoidance of F. iodinea for days after exposure. Aposematic odor learning was selective: avoidance was not linked to change in feeding thresholds, and trained animals readily attacked and consumed a related aeolid, Hermissenda crassicornis. For P. californica, aposematic learning is a cognitive adaptation in which sensation, motivation and memory are integrated to direct cost-benefit choice, and thereby lend flexibility to the generalist's foraging strategy.