Behavioural ecology often makes the assumption that animals can respond flexibly by adopting the optimal behaviour for each circumstance. However, as ethologists have long known, behaviour is determined by mechanisms that are not optimal in every circumstance. As we discuss here, we believe that it is necessary to integrate these separate traditions by considering the evolution of mechanisms, an approach referred to as 'Evo-mecho'. This integration is timely because there is a growing awareness of the importance of environmental complexity in shaping behaviour; there are established and effective computational procedures for simulating evolution and there is rapidly increasing knowledge of the neuronal basis of decision-making. Although behavioural ecologists have built complex models of optimal behaviour in simple environments, we argue that they need to focus on simple mechanisms that perform well in complex environments.