Bottom-up ecology: an agent-based model on the interactions between competition and predation

We developed an agent-based computer model of an ecosystem to predict interactions of competition and predation. In our simulations of the model, the effects of the ‘Gause law’ emerged as the results of population fluctuations and a large number of stochastic events. Small biases in life history parameters produced strong effects through the interactions of positive feedback with the population fluctuations. In a low-production environment, the smaller and faster consumer outcompetes the larger and slower one, but in a high production environment the larger and slower consumer survives. Predation hastens the extinction of one of the consumers, but niche partitioning of the consumers increases both the coexistence of consumers and the number of predators. Predators with medium efficiency are able to coexist in the system longer and in larger numbers. Besides the ecological insights this model provides, we conclude that agent-based simulations are very effective tools to explore the interactions between predation and competition interactions.


Introduction
Interspecific competition defined as reciprocal negative effects of one species on another has long been thought to be one of the more important processes in ecology and evolution (Cody & Diamond, 1975;Schoener, 1982). Unrestricted Malthusian growth is tempered by intraspecific competition, which leads to 'sigmoid' growth described by the logistic function introduced by Verhulst (1845). Lotka (1925) and Volterra (1926) combined intra and interspecific competition into a pair of coupled equations: (1) dN 1 dt = r 1 N 1 1 − N 1 + 21 N 2 K 1 (2) dN 2 dt = r 2 N 2 1 − N 2 + 12 N 1 where N is the population size, t is time, K is the carrying capacity, r is the intrinsic rate of increase and α is the competition coefficient of population 1 and 2 respectively. This classical model can predict the future change in population sizes of organisms and the coexistence or extinction of one or both populations. While these equations are listed among the most important equations in biology (Jungck, 1997;Kingsland, 2015), due to the assumptions of these models (complete access (homogeneity) to all participants and resources, constancy of the carrying capacities and competition coefficients of both species), their use is somewhat limited (Wangersky, 1978). In addition, these models neglect density-independent (e.g. age-related) death, which can lead to very different predictions in such systems, see for example (Schmickl & Karsai, 2010). There is still a need to illuminate the mechanisms and conditions affecting the intensity of competition between species, such as life history parameters of species, their population densities and overall community structure (Chesson & Huntly, 1997;Gurevitch, Morrison, & Hedges, 2000;Yodzis, 1986). Intraspecific and interspecific competition affects not only the competing species but trophic levels below and above the competitors (Chesson, 2000;Chesson & Huntly, 1997;Connell, 1971;Holt, 1985). One of the first early hypotheses provided by Hairston, Smith, and Slobodkin (1960) and supported by many field experiments claimed that predators and plants are negatively affected by interspecific competition more extensively than herbivores.
To better understand these competitive interactions, it is often necessary to also consider the trophic level below the competitors (producer of shared resource) and above the competitors (such as their predators) (Chase et al., 2002). Gurevitch et al. (2000) concluded that in general, predation may act to reduce the intensity of competitive interactions, but there are studies showing a wide variety of effects of predation on interspecific competition including a decrease, an increase or no significant effect at all (Chase et al., 2002). This diversity of outcomes contrasts with the simple theoretical and many empirical results regarding short-term impacts on fitness components (Chase et al., 2002). This is partly due to some confusion about both the meaning of these terms (such as intensity) and conditions required for each of these outcomes. For example, if the presence of a predator can decrease both population sizes considerably, then the resources will not be limiting the growth of both species, thus effective competition between both prey species will decrease, increasing the likelihood of coexistence (Connell, 1971) under such a trophic network structure. However, this view is somewhat oversimplified: the diversity of potential effects of predators arises because coexistence depends on other factors such as the ratio of interspecific effects to intraspecific effects and how this ratio depends on other factors like resource availability or mechanisms of predation (Chase et al., 2002). The analysis of Chase et al. (2002) is based upon top-down (stepwise design) models. The authors stress that major simplifications of the top-down models (such as homogenous populations, lack of time lags and constant life history parameters) could be violated in most natural systems. They also emphasize that new theories should not concentrate solely on adding more details into older models to remedy these issues, but rather ways of implementing new models.
The Lotka-Volterra competition equations have been extensively studied and extended for more biological realism to include, for example, stage structure (Xu, Chaplain, & Davidson, 2005), effect of predators (Chase et al., 2002), sex ratio, density-independent mortality (Schmickl & Karsai, 2010) and more (see for review Ahmad & Stamova, 2013;Thieme, 2003). However, top-down phenomenological models usually do not provide a clear mechanistic basis of the processes at the individual level. Population dynamics, in principle, result from the behaviours of the individuals comprising a population and local interactions among the individuals. Therefore, it is important to understand how the behaviours of individuals and these local interactions lead to different population dynamics. Alternative ways to describe competitive interactions includes interaction network (Rabajante & Talaue, 2015), cellular automata (Silvertown, Holtier, Johnson, & Dale, 1992) and individual-based modelling (DeAngelis & Grimm, 2014;DeAngelis, Gross, & Boston, 1992). Bottom-up (disaggregated design) models, such as individual-or agent-based models, are following a model-building design that incorporates a set of microscopic, often called, proximate mechanisms. These models are able to provide a deeper understanding of the competitive effects of different behaviours within a predator-prey ecosystem. In contrast, macroscopic top-down models like the original Lotka-Voltera model (Equations (1) and (2)) are built around the observed macroscopic system behaviour, which abstracts away microscopic processes by subsuming them into macroscopic system parameters such as carrying capacities and competitive coefficients. These parameters are emergent properties (and hence not constants) that implicitly arise at runtime in microscopic bottom-up models (Bousquet & Le Page, 2004;DeAngelis & Mooij, 2005;Grimm & Railsback, 2005;Karsai & Kampis, 2011;Schmickl & Crailsheim, 2006). In addition to the differences in the way these parameters are represented in bottom-up models, spatial distributions and spatiotemporal behaviors (e.g. locomotion) of the organism are explicitly modelled, whereas top-down models usually assume completely homogeneous distributions (ideally mixed populations) in their meanfield approach they are built upon.
Our goal is to construct a minimalistic and abstract agent-based simulation to study the emergence of coexistence and competitive interactions in a simple ecosystem. We call attention to the inherent and important properties of natural (and bottom-up) systems, namely the role of population fluctuations, which will emerge automatically in this system and add a new dimension to these interactions. Instead of imposing constant carrying capacities and competition coefficients, the interactions between the individuals and the environment are dynamic. The key parameter of our model is an energy influx used by the producers to increase their energy level. This energy level determines reproduction on an individual level and is converted into food for consumers of the next level in the food chain. Testing the Gause hypothesis (1934) and the role of predators in this simple model will happen through the following specific hypotheses: (1) Extinction of one of the two consumers with identical life history will happen and it is independent from the energy influx of the habitat.
(2) Extinction of one of the two consumers with non-identical life history will happen faster than observed in 1 and is dependent on the energy influx of the habitat. (3) Adding predators to the system will accelerate the extinction of one of the consumers. (4) Implementing behavioural differences that result in niche partitioning (different patterns of resource use) will ensure that the competitive species will be able to coexist longer in the presence of predators. (5) Niche partitioning will increase the numbers of the predators.

The model
The model was developed using Starlogo TNG 1.2 environment (http://education.mit.edu/ portfolio_page/starlogo-tng/). The Starlogo TNG is an agent-based modelling environment with drag-and-drop logical boxes, hence very accessible for first-time programmers and for educational purposes. We provide free access to the model at http://zool33.uni-graz.at/ artlife/pond. We used Grimm et al. (2010) ODD protocol to describe the model.

Purpose of the model
The purpose of the model is to understand details of a simple competitive system where carrying capacity, competition, extinction and survivability are emergent properties of the system and not driven by top-down parameters. The model is minimalistic in assumptions and the number of agent types. We want to understand the dynamics of a system containing a single producer, two different consumers and a predator to see how the interplay of these three levels affects coexistence. While the model is close to the 'toy models' in simplicity, it adheres to energy conservation and, in fact, an energy flow drives this system. Our goal is to present a bottom-up model of one of the simplest ecological systems to explore the connection between competitive and predatory interactions.

State variables and scales
The model comprises the following hierarchical levels: individuals, trophic types, populations and environment. The model can have four different types of agents: N a(t) number of algae, N c1(t) number of type 1 consumer, N c2(t) number of type 2 consumer and N p(t) number of predator, each with their own rule set (Table 1). All agents belonging to the same type (species) are identical except their identity, heading, position and individual energy level. These variables are randomized at the start of each simulation and then updated in each step. The same types of agents are added up to form a population, which is continuously monitored. The two types of consumers also form a collective, given they both consume the producer in the same manner. turning angle is a uniform integer random number between 0 and 90 using the random number generator of the simulation platform. The environment is a closed homogenous system modelled as an X * Y * Z volume with boundaries. Several agents can occupy a single spatial position. Time evolves in ticks (steps) until the simulation end (t max ), there is no periodicity such as seasons or other variables that are dependent on time. Headings, positions and energy level of each individual are updated in each time step. Choosing these scales allowed us to follow many generations in time in a large enough space (it was practically impossible for an agent to cross the space even in one direction during their lifetime). Parameters, notations and units used for standard runs are listed in Table 1.

Process overview and scheduling
For all types of agents at each discrete time steps, a given list of actions is performed in sequential order ( Figure 1). First, the agents move in the horizontal plane according to V (speed) and U (turning angle) (Table 1), then they can stay or move up or down 1 level on the vertical direction. After the movement the energy state of the agents are updated (E). Energy is modelled in 'EU' (energy units) as our model does not operate with Joules or calories. It is positive when algae gain energy from the environment as producers, or as the result of feeding (consumers and predator). Energy is lost or redistributed via activities such as movement and reproduction. The next step after movement is the energy check for reproduction. Reproduction is asexual and depends upon the energy level of the individual. If the energy level is above R threshold, then the individual splits into 2 offspring agents and the energy is split between the two equally. One agent holds the original position and heading and the other new agent appears 1 space forward with a random heading. After movement and reproduction, the agent can stay alive or die. The agents can die of starvation, if their energy level reaches zero. In this case, the ID of this agent is deleted and it will count as a dead agent. The agent can collide with another agent which can consume that agent if they have a predatory relationship. In this case, the consumed agent is also considered dead (ID of the agent is deleted) and its energy level is transferred to the consumer. Several of these collisions (consumptions) can happen in a single step, if several food items are in the radius of the consumer. Surviving agents will start the process with a movement in the next step.

Design concepts
The basic principle we follow in this study is to construct a minimalistic 3D system comprising three tropic levels and predicting the energy flow between the agents on those levels. Our goal is to show that even a simplified model predicts interesting and biologically plausible dynamics. We show that competitive exclusion, coexistence and population fluctuations are emergent properties of the system. In our model, adaptation, learning and fitness are not explicitly sought or included. Sensing and interactions are strictly local. The agents 'know' their own status, but physical collisions are needed to detect and interact with another agent. Stochasticity is used to obtain probabilities for movement, heading and initial positions to ensure an unbiased spreading of agents through the environment. As a result, the entire simulation is essentially stochastic and hence the testing of the system is carried out by repeated simulation runs (at least 20 repetitions of each setting with different random seeds). The observation of simulations is monitored through the 3D graphical GUI of the simulation platform, which is augmented by counters and time plots.

Initialization
At the start-up time t (0) , agents (N a(t = 0) , N c1(t = 0) , N c2(t = 0) , N p(t = 0) ) are generated and placed randomly into the environment with random headings. A standard parameter set is used (Table 1) for every run except if stated otherwise. In order to produce different predictions using the same set of parameters and to replicate simulations, the sequence of random numbers is itself randomized at the start of each simulation run.

Survivorship of competing identical consumers at different productivity levels
When two organisms with identical life history parameters compete for the same resources, and when adaptation through natural selection is not possible, one of the two competing species should die out (Gause, 1934). We predicted that both have the same chance to become extinct, because these organisms are not different. For these runs we also implemented an extra collision cost, namely if a consumer collides with another consumer (same or different species) both will lose 1 EU extra energy. This mimics the detrimental effect of increased competition with crowding (the individuals lose more energy in a crowded environment).
In the case of the competition of two consumers with identical life history parameters, the populations showed strong fluctuations in time, characteristics for prey-predator systems, but these fluctuations did not result in the extinction of algae or both consumers. However, the Gause Law was observed on the long run, because one of the consumers eventually died off ( Figure 2). There was no bias (χ 2 = .33, p < .05, N = 192) whether consumer 1 or consumer 2 died out and this did not depend on the influx of energy (amount of energy a single alga can absorb per step) into the system (Figure 2). On the other hand, the average number of time steps until the extinction event was dependent upon this energy influx, especially at the lower ranges (Figure 3). The distribution of extinction times across energy levels were significantly different (Kruskal-Wallis H: 48.6, p < .05, N = 197) and these differences stemmed from extinction at an .25 EU energy level that was significantly shorter than other energy levels (based on pairwise comparisons). The dynamics of the system were dependent on the energy production of algae (Figure 4). In the lower ranges of energy production, the algae reproduction and general energy level was low, therefore the system oscillated with large amplitudes, showing similar results to the classical prey predator dynamics. Commonly, one of the consumers died out quickly. In case of high energy levels, the oscillations were longer and with lower amplitudes superpositioned by smaller fluctuations which allowed the consumers to coexist much longer (Figure 4). Figure 2. the number of extinctions of consumer 1 (grey) and consumer 2 (black) as a function of the energy produced by a single alga per step. the probability of extinction is not significantly different from 50% (χ 2 = 2.67, p < .05, N = 24 for the most different case x = 1.50 eU). twenty-four parallel simulations were run until one of the consumers died out. all parameters were set according to table 1 plus a collision cost as energy loss (−1 eU) was implemented when two consumers collided. Figure 3. average times and standard deviation of the extinction of one of the consumers as a function of energy produced by a single alga (eU) per step. twenty-four parallel simulations were run until one of the consumers died out. all parameters were set according to table 1 plus a collision cost as energy loss (−1 eU) was implemented when two consumers collided.

The effect of body size and speed on survivorship
Non-identical life history parameters can change the competitiveness of species. To investigate this with our model, we set the size and speed of consumer 2 species according to our standard parameters (Table 1), but we experimentally altered these parameters for the consumer 1 species.
In case of non-identical competitors, the time required for the extinction of one of the consumers was always shorter and the dependency from the energy flux was different (Figures 3 and 5). The extinction time of identical competitors showed a saturation type of curve ( Figure 3), but non-identical competitors exhibited a peak at 1.25-1.5 EU ( Figure 5).
The distribution of extinction times across the energy levels were significantly different (Kruskal-Wallis H: 121.54, p < .05, N = 192). These differences stemmed from the increasing trend followed by a decreasing trend: pairwise comparisons showed that in general, extinction times belonging to adjacent columns (represent extinction time at a given energy flux on Figure 5) were not significantly different, but they showed significant differences with non-adjacent columns ( Figure 5). Further analyses showed that this pattern stemmed from the fact that the environment with different productivity levels determined which of the two consumer species were more successful in the competition. When a single alga captured less than 1.5 EU per step, the competition favoured the smaller and speedier consumer 2, while higher energy capture favoured the slower and larger consumer 1 (Figure 6). The two species only coexisted between an influx of 1.25 and 1.75 EU, but even in these cases one of the two species became highly dominant. A detailed analysis of the sensitivity of this system to small changes in life history parameters is explored in Appendix 1.

The effect of predators on competition
To test whether predators were able to ensure coexistence between two identical competitors, a non-biased predator of the consumers were implemented (Table 1). We studied predators with five different effectiveness levels. The effectiveness of the predator was implemented into the energy loss per step. Very effective predators lost only 1 EU per step and the most ineffective ones lost 8 EU per step (Figure 7). Predators between 2 EU and 6 EU of loss per step were able to survive in over 90% of the cases in these systems. Very effective predators were overexploiting their prey, therefore both consumer species and the predator survival dropped below 50%. Very ineffective predators were unable to survive in this environment     of coexistence, because the extinction of the first consumer was faster in the presence of predator (262.3 ± 172.4 steps for predator with E P = −6 EU efficiency see Figure 9) than it was in the absence of predators (854.67 ± 503.0 steps see Figure 3) (Mann-Whitney U = 65, p < .05, N = 44).

Niche partition
In the long term, organisms can also evolve in ways that decrease their niche overlap which could lead to coexistence. To simulate this niche partitioning, we built a bias into the vertical movement of the consumers. In the previous experiments, the consumers were floaters, they could go up or down 1 vertical level or stay at the same level as before (Table 1). In these runs, we extended the potential range an individual can move vertically in one step (up to 10 positions along the Z-axis) and also gave a preference for these movements (otherwise the consumers were identical as described by Table 1). Consumer 1 prefers to move upwards and consumer 2 downwards. This was implemented by 2 random rolls, an upward movement and a downward movement roll. Preference upward means that the dice had more sides for the upward roll, therefore the sum of the 2 rolls commonly resulted in an upward movement. We used the same sided dice for both consumers, consumer 1 had a potentially larger number of sides rolled in the upward direction, while consumer 2 had more in the downward direction. We implemented 4 degrees of intensity to the directionality of vertical movement. The most 'extreme' used 10-sided dice in the favourable direction and 7-sided dice for the opposite direction. The 'moderate' intensity used dices with 10 and 8 sides, the 'slight' used dices with 10 and 9 sides and the 'neutral' only used dice with 10 sides. Consumers which reached the top or bottom zone of the water column and still Figure 9. time it took for one of the consumer species became extinct (average and standard deviation from 20 runs) as a function of predator effectiveness. the extinction times of one of the consumers were significantly different (Kruskal-Wallis h: 43.3, p < .05, N = 100; pairwise comparisons showed that this difference stemmed from the fact that −1 and −2 were significantly smaller than other columns and −1 and −2 did not show significant difference). Predator effectiveness was simulated as the amount of energy loss per step. smaller values mean more effective predators. twenty parallel simulations per parameter set were run for 1000 steps. except the predator energy loss E p the standard parameters (table 1) were used. rolled upward or downward movement stayed at these extreme positions for that step. In these runs, we also used a floating non selective standard predator (Table 1).
Differences in preferred movement significantly increased the coexistence of the two consumers (Kruskal-Wallis H: 42.34, p < .05, N = 78; pairwise comparisons showed that 'moderate' was significantly higher than all others and 'slight' was also higher than 'neutral') ( Figure 10). For example, the average time it took one consumer to become extinct increased from 'neutral' to 10-fold in the case of 'moderate' vertical movement preferences. The 'extreme' movement preference quickly resulted in a highly stratified pattern, when most consumers 1 gathered on the top and most consumers 2 on the bottom of the water column and the algae were most abundant between these 2 layers ( Figure 11). In this situation, while the interspecific competition decreased considerably, the intraspecific competition is increased, because the individuals belonging to the same species were compressed in a narrow region of the water column. The niche partition also affected the predators positively. The number of predators were significantly higher in both cases 'moderate' (Mann-Whitney U = 0, p < .05, N = 40) and 'slight' (Mann-Whitney U = 64.5, p < .05, N = 40) vertical preferences compared to 'neutral' (Figure 12).

Discussions
The simple agent-based model presented here showed interesting new predictions and also confirmed general predictions studied in detail before. Our system is fundamentally different from a classical Lotka-Volterra model because it is a bottom-up model and several parameters are emergent instead of imposed on the system by the model itself. For example, in the Lotka-Volterra models, the two most important parameters that influence the coexistence are the carrying capacities and the competition coefficients. The most important predictions of the Lotka-Volterra basic system are that if the competition coefficients are larger than one then coexistence will not happen. Species with larger competition coefficients and/or larger carrying capacities are predicted to outcompete other species. While Figure 10. time it took one of the consumer species to become extinct (average and standard deviation from 20 runs) at different degrees of preference in vertical movements. in 'moderate' and 'slight' cases a single outlier was removed (these coexisted beyond 10,000 steps).
these predictions coincide very well with what we think about competition intuitively, these two parameters are not factual and direct representations of competitive mechanisms. They rather serve a simple way to represent and sum the limiting effects from the environment and from the other species, and their constant values make the mathematics easily tractable.
The agent-based model we developed is also an abstract and general model, but we designed a system where the carrying capacities and competition coefficients were not explicitly implemented into the system. These competition coefficients represent envelope Figure 11. stratification of the consumers appears as the consequence of different movement preferences in case of the 'extreme' preference parameters (see text). the consumers 1 (white balls) mostly occupied the upper part, and consumers 2 (grey balls) occupied the lower part of the water column. algae (small grey lozenge) were most abundant between these 2 layers. Predators (large black balls) preyed on the consumers indiscriminately. terms of differences in many life history parameters within the populations in the Lotka-Volterra model. The benefit of agent-based models is that these differences can be implemented explicitly into the system and their effects can be studied separately. Instead of using an explicit competition coefficient, our agent-based model relied on several interaction mechanisms at an individual level (e.g. starving if there is no enough food), where competition emerges as a result of these mechanisms (see Appendix 1 for the effect of several of these life history parameters). Similarly, carrying capacity represents the maximum number of individuals that can be sustained in the habitat. Instead of implementing a global K value, we model the energy flow where producers collect energy from their environment to build up biomass, to reproduce and to move. The generated biomass can also be transferred to the next trophic level as consumed food, yielding energy for reproduction, growth and motion to those predatory species. With this set-up, food and space are limited shared dynamic resources. Sensing and consuming food was strictly local therefore there is no global information available to the agents concerning the absolute amount of food in the system. Both competition coefficients were also not explicit in our model, but instead we directly changed some of the life history parameters of the species, such as size and speed, and these changes may or may not have benefited survivability or reproduction of the individuals and therefore globally their effects emerge as population increase or decline.
Our agent-based model validated the main claim of the Gause (1934) hypothesis, namely that one of the competitors should die out, when interspecific competition is equal or larger than intraspecific competition. When the competitors had the same life history parameters, the species that died out was random. The Lotka-Volterra model would predict coexistence in this case, if the competition coefficients are smaller than one. In our model, large population fluctuations were the consequence of population declines via starvation commonly followed by sudden population growth due to an abundance of food. These fluctuations common in predator prey systems were caused by the fact that both competitors 'preyed upon' the algae. These fluctuations sooner or later pushed one of the species into the low number region, where recovery of population size was more difficult and hence one species could become extinct.
Upon changing the life history parameter of one species, we were able to map how small changes affected the chance of survival (Appendix 1). We implemented that some of the life history parameters of the organisms are dependent on energy use. For example, smaller creatures need less energy to move to a same distance. These results have importance in both biology and in the model system and software we used. The model was sensitive to small changes in speed and size of the organisms. Small increases in size create large changes in surface area, which in turn increased the number of algae that collided with a consumer. Any advantages that resulted in more energy collection affected the system as a positive feedback and promoted winning the competition, except for when the food was overexploited. However, these life history parameters were also interacting with the productivity of the environment. In low productivity environments, the smaller and faster consumers had benefit to 'discover' of new food patches to exploit, while high productivity environment promoted the growth of larger and slower consumers which were able to collect more food per step due to their larger surface. We also showed that if the decrease in movement ability spares at least as much energy as the decrease in speed, then the slower competitor can be successful even in less productive environments. Competitive advantages between species are, in reality, due to a series of small differences in a large number of life history parameters. Learning and evolutionary processes may also play important role in reinforcing special parameters that increase fitness. An agent-based system is well suited to implement these differences both at a species or individual levels.
Implementing a predator that preyed upon the competitive consumers equally did not support the general Gurevitch et al. (2000) conclusion that predation promotes the coexistence as reducer of the intensity of competitive interactions. We found that predation, in fact, hastened the extinction of one of the two competitors. While in the Lotka-Volterra systems, the predation can keep population low enough to decrease competition, in our system the predation contributed as an interference to the population fluctuations that came from the alga-consumer interactions. This resulted in an additional population decrease in both populations and one of the populations went quickly below 'the point of no return' resulting in one of the populations becoming extinct sooner. The survival of the predator itself was dependent upon how energy efficient the predation was. Very efficient and very inefficient predators were more inclined to dying out because inefficient ones are unable to secure enough energy to reproduce and efficient ones commonly decimated the prey into extinction.
Behavioural differences that caused niche partitioning increased the period of coexistence even when predators were present. We implemented a simple preference in an upward or downward movement direction for the two competitive species resulting in a more or less stratified distribution where the physical overlap between the two species was minimized. The space between the two layers of consumers was commonly a refuge for food (algae) and this in turn was able to damp the population fluctuations. This subtle behavioural difference already stabilized the system and increased the predicted number of predators, as well.
As Wangersky (1978) pointed out 'The more general models of theoretical biology are used to deduce the form of possible solutions, rather than to predict future states of the system being modelled' . We strongly believe that agent-based models can provide as powerful an understanding of these general concepts as the Lotka-Volterra systems provide. However, the agent-based systems can easily implement new rules and variables while also giving us a tool to escape the implementations of unnecessary variables, because the nonlinear interactions in these systems will produce emergent properties. We would like to emphasize that the agent-based models also have limitations. One of them is exactly the same as we listed as the benefit before: it is easy to implement new parameters and this could lead an overtly complicated model of a simple phenomenon. This in turn can lead to the problem that these models offer no opportunity for mathematical theoretical analyses. Simulations coupled with statistics are needed for evaluation, which can be computationally demanding. On the other hand, agent-based models can be developed by biologist with less mathematical background. The Starlogo TNG programming language requires no previous background in coding, therefore it is very accessible for students to start a modelling project for developing quantitative skills (Karsai & Kampis, 2010;Karsai, Knisley, Knisley, Yampolsky, & Godbole, 2011;Karsai, Thompson, & Nelson, 2015;Knisley, Karsai, & Schmickl, 2011).

Appendix 1
To investigate in detail how the size and the speed of an organism will play a role in their survivorship, a new set of experiments were carried out where all parameters were set to the standard value, but the size and the speed of the of consumers 1 was changed in small jumps. Not surprisingly smaller and slower consumers 1 became extinct but when their size and speed surpassed of the consumers 2 they outcompeted consumers 2 ( Figure 13). Between size and speed, the size was more important in the competition, because when they were changed in a compensatory fashion with the same degree, larger species were able to outcompete the smaller one, even if they became slower ( Figure 14). Size affected the surface area and with larger surface areas a consumer had the potential to collide with more algae. Assuming that the consumers had ideal spherical shape, we changed the surface area of consumers 1 and we found that even small (2% increase) gave large boost (20% increase) in winning the competition and larger than 10% surface area increase seemed to ensure winning the competition (Figure 15). Time to reach extinction also dropped very quickly when surface area differences were larger than 10% (Figure 16). Using the assumption that smaller individuals needed less energy to move, we manipulated the surface area and the energy loss per time for consumers 1 and let that species compete with a standard consumer 2 species. If the movement cost decreased by an equal or greater amount than the surface area, then the consumers 1 was able to outcompete the standard consumer 2 species (Figure 17).