Abstract: Ants are regarded by many non-scientists as reflex automata, with hardwired and inflexible behaviour. Even in themodern field of complexity science, they are sometimes portrayed as an example of simple units that can nevertheless,construct collective processes and infrastructures of bewildering sophistication, through feedback-controlled mass action. However, classical studies and recent investigations both have shown repeatedly that individual ants and otherarthropods can display great flexibility in their behaviour, often associated with learning. This involves not only simpleconditioning to the locations of stimuli associated with food, but also more complex learning, attention, planning, andpossibly the use of cognitive maps (shown in honey bees). Ants in particular have been shown to employ sophisticatedbehaviours not only collectively, but also individually: one example is the use of tools, which was once thought to be auniquely human characteristic. The evolution of such skills is not well understood. Recent research has demonstratedcosts of learning, and therefore only some ecological conditions may favour the evolution of advanced cognitive abilities. The diversity of ants provides a rich resource for studying the link between ecology and learning ability, as well asrevealing how much can be achieved with a brain that is many orders of magnitude smaller than ours.