Behavioral ecology is the study of the ecological and evolutionary basis for animal behavior, and the roles of behavior in enabling an animal to adapt to its environment (both intrinsic and extrinsic). Behavioral ecology emerged from ethology after Niko Tinbergen (a seminal figure in the study of animal behavior), outlined the four causes of behavior. If an organism has a trait which provides them with a selective advantage (i.e.