# Code and data for: Emergence of spatially structured populations by area-concentrated search

## Citation

Chaianunporn, Thotsapol; Hovestadt, Thomas (2022), Code and data for: Emergence of spatially structured populations by area-concentrated search, Dryad, Dataset, https://doi.org/10.5061/dryad.n8pk0p2xr

## Abstract

The idea that populations are spatially structured has become a very powerful concept in ecology, raising interest in many research areas. However, despite dispersal being a core component of the concept, it typically does not consider the movement behavior underlying any dispersal. Using individual-based simulations in continuous space, we investigate the emergence of a spatially structured population in landscapes with spatially heterogeneous resource distribution and with organisms following simple area-concentrated search (ACS); individuals do not, however, perceive or respond to any habitat attributes per se but only to their foraging success. We investigated effects of different resource clustering patterns in landscapes (single large cluster vs. many small clusters) and different resource densities on spatial structure of populations and movement between resource clusters of individuals. As the results, we found that foraging success increased with increasing resource density and decreasing number of resource clusters. In a wide parameter space, the system exhibited attributes of a spatially structured population with individuals concentrated in areas of high resource density, searching within areas of resources, and 'dispersing' in a straight line between resource patches. 'Emigration' was more likely from patches that were small or of low quality (low resource density), but we observed an interaction effect between these two parameters. With the ACS implemented, individuals tended to move deeper into a resource cluster in scenarios with moderate resource density than in scenarios with high resource density. 'Looping' from patches was more likely if patches were large and of high quality. Our simulations demonstrate that spatial structure in populations may emerge if critical resources are heterogeneously distributed and if individuals follow simple movement rules (such as ACS). Neither the perception of habitat nor an explicit decision to emigrate from a patch on the side of acting individuals is necessary for the emergence of spatial structure.

## Methods

We implement a simple model simulating the movement of resource-searching individuals (ACS) in a continuous landscape with heterogeneous resource distribution; both, the position of individuals and resources are thus continuous point coordinates. We investigate how resource distribution affects the spatial distribution (density) of individuals and the movement (dispersal) of individuals between resource clusters. Our simulation ignores birth and death events, but the model implicitly accounts for the diffuse effect of competition over resources on foraging behavior.

Spatial distribution of resources and scenarios
We simulated foraging movement in a square landscape of area $4\times10\textsuperscript{6}$ ($2000 \times 2000$) squared spatial units with resources distributed within it. In the simulations we created $k$ resource clusters within the landscape as continuous spatial point pattern with points generated by the Mat\'{e}rn Cluster Point Process, using R version 3.5.2, library spatstat version 1.58-2 (Baddeley and Turner, 2005). Clusters were generated with daughter points (resources) distributed according to a random uniform distribution on a disk around parent points with $g$ as radius of the clusters and $u$ as resource density per area unit so that  $\bar R=g_i^2 \pi \times u$  was the expected number of resource items per cluster, and the expected number of resources items in the landscape was thus $k \times \bar R$. Parent points were distanced at least $3g$ units apart from each other to avoid cluster overlapping. The landscapes were wrapped into a torus in both dimensions to avoid edge effects and mimic a landscape of infinite dimension. Across scenarios, the number of resource clusters was increased from $k=1$ to $k=16$ clusters whereas the radius of clusters ($g$) was reduced from 320 (at $k=1$) to 80 (at $k=16$) so that the total area covered by resource clusters was identical in all scenarios (\textit{c.} 8\% of total area). The average resource density in resource clusters was varied from $u=0.01$ to $u=1.27$ resources per unit area. A summary of all model and simulation parameters and their values can be found in Table 1.

Movement rule
The movement of each individual was modeled as an ACS. Here we implemented the simplest of such possible rules, assuming that individual $i$ moved straighter, the longer the time interval in which it did not find a food item was, i.e. the longer the searching time $\Delta_{S,i}$ was (see Benhamou 1992, reviewed in Barto\'{n} and Hovestadt 2013); generally, such models have been shown to be efficient foraging strategies (e.g. Benhamou, 1992; Pyke 2015). Comparable movement was, for example, observed in starved amoeboid cells that move rather straight whereas well-fed cells moved changed direction much more frequently (van Haastert and Bosgraaf 2009) but just as well in mammal species (Auger-Méthé et al. 2016). At any moment $t$, and for any moving individual $i$, the turning angle between two consecutive steps was determined by drawing a random value from a wrapped normal distribution (Jammalamadaka and SenGupta 2001) with mean 0 and standard deviation $d_{i,t} (\Delta_{S,i})$ calculated as

d_{i,t} (\Delta_{S,i})=d_{min}+(d_{max}-d_{min})⋅(1-\frac{\Delta_{S,i}^\alpha}{(\Delta_{S,i}^\alpha+h^\alpha)})

Consequently, $d_{i,t}$ ranges between $d_{min}=0.01$ (nearly straight-line movement) when $\Delta_{S,i} >> h$ and $d_{max}=1$ when $\Delta_{S,i}=0$, i.e. when the individual just found a food item. In the latter case, the movement became highly uncorrelated, and the individual performed area-concentrated search. The parameter $\alpha$ is a shape parameter (in our simulations always $\alpha = 3$), and $h$ is the half-saturation constant (always $h = 200$). The effects of parameter $\alpha$ and $h$ on $d_{i,t}$ and on foraging success were described in Barto\'{n} and Hovestadt (2013). We also tested different values of $$h$$ and $\alpha$ in this study but found that these two parameters did not strongly affect results. We thus kept these two parameter values constant in all simulations.

Foraging
At each time step, each individual moved one step according to the movement rule described above. Individuals were moved in a random sequence to avoid priority benefits. The step length of movement ($p$) was constant and equal to 1 spatial unit. After movement, an individual immediately found all resource items within its perception radius ($c=1$ spatial unit, identical to the step length). All resource items within this radius were 'foraged' and removed (the individual maintained its position, however). Following a movement step, the value of $\Delta_{S,i}$ for each individual was increased to $\Delta_{S,i}+1$ in case an individual did not find a resource item, but was reset to $\Delta_{S,i}=0$ whenever the individual found a food item, thus initiating the ACS as described above.

After movement of all individuals, removed resource items were replaced by the same number of new items placed randomly as daughter points of randomly selected parent points according to the rules explained above (global replacement). With this global replacement, we implemented a global equilibrium assumption between resource production (regrowth) and consumption yet nonetheless allowing for the more short-term depletion (competition) effects due to intense local harvesting.

Simulations and analysis
For each parameter combination (resource density and cluster size, see above), we carried out ten replicates on ten independently created landscapes. In each simulation, eighty individuals were released at random coordinates within resource clusters. Their $\Delta_{S,i}$ value was set to $\Delta_{S,i}=500$ at the beginning of a simulation so that individuals started with nearly straight line movement. The initial direction of each individual was randomly selected from a uniform distribution between 0 and $2\pi$. At each time step, individuals moved and foraged resource items as described above. All individuals were allowed to move for 10,000 steps, but all analyses described below are based on data collected over the last 2000 movement steps only.

At the beginning of each simulation, the expected number of resource items per cluster was equal to $\bar R$ (see above). Due to the global replacement of foraged resource items, the total number of resource items in the landscape was kept constant and consequently, the average number of resource items per cluster remained at $\bar R$. However, the number of items in a single cluster could vary over time and degrade if the cluster was harvested intensively, i.e. by many individuals at the same time.

## Funding

Bayerisches Staatsministerium für Wissenschaft, Forschung und Kunst, Award: bayklif

Khon Kaen University, Award: 6200012003