Bottlenose dolphins in Shark Bay, Australia, live in a large, unbounded society with a fission-fusion grouping pattern. Potential cognitive demands include the need to develop social strategies involving the recognition of a large number of individuals and their relationships with others. Patterns of alliance affiliation among males may be more complex than are currently known for any non-human, with individuals participating in 2-3 levels of shifting alliances. Males mediate alliance relationships with gentle contact behaviours such as petting, but synchrony also plays an important role in affiliative interactions. In general, selection for social intelligence in the context of shifting alliances will depend on the extent to which there are strategic options and risk. Extreme brain size evolution may have occurred more than once in the toothed whales, reaching peaks in the dolphin family and the sperm whale. All three 'peaks' of large brain size evolution in mammals (odontocetes, humans and elephants) shared a common selective environment: extreme mutual dependence based on external threats from predators or conspecific groups. In this context, social competition, and consequently selection for greater cognitive abilities and large brain size, was intense.