Environmental change poses challenges to many organisms. The resilience of a species to such change depends on its ability to respond adaptively. Social flexibility is such an adaptive response, whereby individuals of both sexes change their reproductive tactics facultatively in response to fluctuating environmental conditions, leading to changes in the social system. Social flexibility focuses on individual flexibility, and provides a unique opportunity to study both the ultimate and proximate causes of sociality by comparing between solitary and group-living individuals of the same population: why do animals form groups and how is group-living regulated by the environment and the neuro-endocrine system? These key questions have been studied for the past ten years in the striped mouse Rhabdomys pumilio. High population density favours philopatry and group-living, while reproductive competition favours dispersal and solitary-living. Studies of genetic parentage reveal that relative fitness of alternative reproductive tactics depends on the prevailing environment. Tactics have different fitness under constrained ecological conditions, when competitive ability is important. Under conditions with relaxed ecological constraints, alternative tactics can yield equal fitness. Both male and female striped mice display alternative reproductive tactics based on a single strategy, i.e. all individuals follow the same decision rules. These changes are regulated by endocrine mechanisms. Social flexibility is regarded as an adaptation to unpredictably changing environments, selecting for high phenotypic flexibility based on a broad reaction norm, not on genetic polymorphism for specific tactics.