Knowledge of the social environment, the relationships among ourselves and other individuals, is crucial for humans and other animals that live in complex, structured groups. Social cognition includes capabilities, such as tracking relationships among individuals and transitive reasoning, that are integral components of human intelligence and that are strongly affected by abnormal development or neural disease. Given their importance, the fundamental mechanisms of social cognition are surprisingly poorly understood. The research proposed here takes advantage of a robust model system, using operant procedures and carefully structured paired interactions to explore detailed cognitive mechanisms in a highly social animal. Emphasis will be placed on understanding how stimulus hierarchies are organized in the mind, how dyadic relationships are tracked, and how such mechanisms operate when applied to the task of determining relationships among members of a social group. By addressing such issues in a naturalistic context and making explicit comparisons to the cognitive capabilities of less social species, the proposed approach has the potential to yield a novel, unifying perspective on the processes underlying social cognition. These studies are apt to provide critical evidence to help us differentiate between the social complexity hypothesis and the forging hypothesis concerning the evolution of complex cognition.