Abstract
Twenty years ago, the case for optimality theory in evolutionary biology was set out in a review by Geoff Parker and John Maynard Smith. Thinking of what idealised animals should do if they are behaving optimally has informed behavioural ecology since its inception. With some exceptions, the study and theory of collective behaviour seems to be much more more mechanistic. This is probably because the mechanisms of collective behaviour are much more easily observed than those underlying individual decision-making, and because simple mathematical models and computational simulation often give good descriptions of collective systems. I shall argue that optimality theory is important for collective behaviour, review existing and potential applications of it, and highlight the crucial importance of selecting the right optimality criteria for a particular system.