DOI: 10.5061/dryad.w0vt4b95c
title: Optimal foraging can drive emergent initiator-follower dynamics in social groups

description: Deciding when and where to move is a challenge for group-living animals as
 differences in preferences must be resolved for the group to maintain
 cohesion. In many species, consensus is reached through shared
 decisions-making, whereby group members initiate group movements by
 stopping foraging and making directed movements away from a feeding
 source. Yet, despite being widespread, it is unclear how this initiation
 process has emerged in animal groups, and theory has yet to resolve the
 paradox of why some individuals forego foraging to instigate collective
 movements. By applying theoretical predictions from the marginal value
 theorem to heterogeneous foraging groups, we show that (i) movement
 initiations can reduce subsequent within-group conflict over when to
 depart, (ii) habitat heterogeneity and within-group differences in
 foraging rate shape who initiates, and (iii) different forms of collective
 decision-making can emerge under different environmental conditions. These
 results demonstrate that optimal foraging theory can resolve outstanding
 questions about leadership in collective movements of animal groups.
description: # Optimal foraging can drive emergent initiator-follower dynamics in
 social groups Dataset DOI:
 [10.5061/dryad.w0vt4b95c](10.5061/dryad.w0vt4b95c) ## Description of the
 data and file structure Each file corresponds to one figure. Figure 3 is
 split into the simulation code (which has the option of saving the data to
 an RData file) and plotting code (which has the option of loading the
 simulation outputs from an RData file). All of the code is written in base
 R with no dependencies, so should run on any R version (tested on R
 4.3.0). ### Files and variables #### File: Figure1.R **Description:** R
 code for Figure 1. This is an illustrative figure that shows the effects
 of adding waiting time to the predictions of the Marginal Value Theorem.
 #### File: Figure2A.R **Description:** R code for Figure 2A. This is an
 illustrative figure that shows the effects of waiting time on the optimal
 departure time as predicted by the marginal value theorem. #### File:
 Figure2B.R **Description:** R code for Figure 2B. This is an illustrative
 figure that shows the effects of waiting time and changes in patch quality
 on the optimal departure time as predicted by the marginal value theorem. 
 #### File: Figure3_plots.R **Description:** R code for Figure 3
 (plotting). This is the code that runs simulations of groups of animals
 within which individuals vary in size (N), in the variation of foraging
 rates among group members (between lambda.low and lambda.high), and that
 experience different environments (proportion.egalitarian.patches and
 travel.time variables). Groups use threshold for departure
 (depature.point) that defines how many individuals should have passed
 their optimal departure time at the point the group departs. #### File:
 Figure3_Simulation_overall_code.R **Description:** R code for Figure 3
 (simulations). Code for plotting the results from the simulations for
 Figure 3.  This can either take the data currently loaded in R after
 running the simulations or load these up from a file saved at the end of
 the previous code. ## Code/software Base R. Tested on 4.3.0. No
 dependencies or packages are loaded.