Abstract We describe the modelling of sheep spatial memory at pasture using an individual-based approach. As our modelling goal requires specification of stochastic and state-dependent random movements and some social aspects, we used a multi-agent system that can be regarded as a special case of an individual-based model (IBM). We used a three-phase approach to implement the synchronization kernel since this is particularly well adapted to spatial resource competition. One of the main differences between this model and most earlier IBMs is that we were able to use real field data from animal experiments for model validation. We thus compared real system behaviour with model predictions. As the simulation results were consistent with field data, we used the model as an extrapolation tool to investigate conditions that had not been tested, or that are not easily amenable to experimentation. This enabled us to show that conspecific attraction can have disruptive effects on the searching efficiency of foragers in habitats, where patches deplete rapidly. We also show that the advantages of a good spatial memory vary according to the size of the environment to be explored.