NetLogo banner

NetLogo Publications
Contact Us

Modeling Commons

Beginners Interactive NetLogo Dictionary (BIND)
NetLogo Dictionary

User Manuals:
Farsi / Persian


NetLogo Models Library:
Sample Models/Biology/Evolution

(back to the library)


[screen shot]

If you download the NetLogo application, this model is included. You can also Try running it in NetLogo Web


Almost all of the animal and plant species that inhabit the earth today are anisogamous. There are only two dominant biological sexes (except the intersex individuals) and we define each sex based on the size and the quantity of the gametes they produce. Females produce few large gametes, often called the egg, while males produce numerous comparatively tiny gametes, called the sperm.

It is still not well-understood why anisogamy has evolved in the first place? Why not more than 2 sexes? Why not just one type of gamete? Why the number and size disparity between the sexes? Why anisogamy is so prevalent except only some fungi and unicellular organisms? Many theoretical models exist but none are universally accepted.

This model is a thought experiment that takes us to the world of a hypothetical vegetative ancestor (e.g., a proto-algae) that inhabited the oceans at the early stages of life on earth. The adult individuals of this ancestor are of two pseudo-sexes with the same reproductive strategy. This strategy, called isogamy and observed in some fungal species today, means both mating types produce gametes of similar size and quantities.

This model allows us to explore possible evolutionary pathways that may have led to the emergence of anisogamy as an evolutionary stable strategy (ESS) within this early isogamous ancestor.


Adults produce gametes at a fixed rate. The number of gametes produced by an adult is inversely proportional to the fixed gamete production budget, which is the same for all adults. In addition, each time an adult produces new gametes, the actual gamete size can be slightly different due to random mutation, which may then be passed on to this adult's offspring via its gametes.

The gametes move around randomly. When two gametes touch each other, they initiate a fusion process to form a zygote. The zygote inherits the total body mass (i.e., provisioning) of the gametes. However, it inherits the reproductive strategy (i.e., gamete size and mating type) and the corresponding color from either of the parent randomly.

The zygotes are non-mobile agents. They remain stationary and incubate for a fixed time. When they reach the end of their incubation period, they become adults if their mass is equal to or larger than the zygote critical mass. If a zygote does not have enough body mass to survive, it turns black and slowly dies off.

The two mating-types, MT-1 and MT-2, are represented with the red and blue colors respectively. The gametes are of the same colors, too. MT-1 adults produce red gametes and MT-2 adults produce blue gametes. When two gametes fuse, they form a zygote. If the zygote inherits the MT-1 mating-type trait, which is picked randomly during the fusion, it turns into a light red color. Otherwise, if it inherits the MT-2 mating type trait, it turns into a light blue color. The adults have a circle shape with a smaller black circle at the center. The gametes have an arrow-like shape. The zygotes have an egg-like shape. These shapes and colors allow us to observe the outcomes of the model more easily.


The SETUP button creates the initial adult population randomly dispersed within the 2d world. Each adult in this initial population is assigned one of the mating types (MT-1 or MT-2) randomly. They all start with the same gamete size strategy, which is half of the fixed gamete production budget.

Once the model has been set up, you can press the GO button to run it. The GO button starts the simulation and runs it continuously until it is pushed again.

The ZYGOTE-CRITICAL-MASS slider controls the critical mass a zygote needs to have in order to survive into adulthood.

The MUTATION-STDEV slider controls the random mutation that may happen in gamete size every time an adult produces new gametes. A standard deviation is used because the mutation algorithm is based on a normal distribution with an expected value of the gamete size of the adult.

The SPEED-SIZE-RELATION? switch allows you to decide whether smaller gametes move faster than the larger gametes or all the gametes move at the same speed.

The ADULTS-MOVE? switch allows you to decide whether adults in the system move around or remain stationary.

The SAME-TYPE-MATING-ALLOWED? switch lets you choose whether or not gametes of the same mating type are allowed to fuse with each other.

The ENFORCE-CRITICAL-MASS? switch lets you override the critical mass assumption. When ON, the zygotes with low body mass die before reaching adulthood. When this switch is OFF, all zygotes survive regardless of the body mass.


It takes quite some time to see any meaningful changes in the adults’ gamete size strategies. Even if it may seem like the isogamous population is stable, let the model run at least for 5000 to 10000 ticks.

Notice that even if the gamete size strategies of the red adults and the blue adults may evolve to be dramatically different, this does not disrupt the overall population balance. The number of the MT-1 adults and the number of the MT-2 adults stay relatively stable despite the dramatic shift in the gamete pool.

Notice that the number of zygotes stay relatively constant in the model, regardless of the changes in the gamete size strategies. Wait for the anisogamy to emerge as the new ESS in the model. You will notice that the number of gametes skyrocket but this does not affect the number of zygotes in the model in any substantial way.


Try changing the mutation rate (MUTATION-STDEV) and see if it makes any difference in terms of the eventual outcome of the model. Is there a scenario where anisogamy does not evolve? Is there a scenario where it evolves even faster?

Would anisogamy still evolve even if gametes of the same mating type were allowed to fuse with each other (i.e., assortative mating)? Try turning on the SAME-TYPE-MATING-ALLOWED? switch and see how it affects the eventual outcome of the model.

Does the initial distribution of mating types have an impact on the eventual outcome of the model? Try to run the model multiple times and see if the initial number of red adults versus the initial number of blue adults impact the outcome of the model.

The ZYGOTE-CRITICAL-MASS value is set as 0.45 by default, which is just 0.05 less than the total reproduction budget of adults (0.5 or 50% of the total mass of an adult). Try modifying this value to discover whether smaller or larger critical masses requirements impact the evolutionary process in any significant ways.


There might be scenarios where a population might have more than 2 mating types. Try increasing the number of mating types in this model to explore if it will still evolve to an anisogamous state.

In the model, it is assumed that all gametes have relatively similar lifetimes. However, this is not the case for many organisms: often sperm have brief lives while eggs survive for a much longer period of time. What would happen if the smaller gametes in this model had a shorter lifetime and the larger gametes had longer lifetimes? Try to implement this in the model by creating an algorithm that calculates the lifetime of each gamete based on its size.


The RANDOM-NORMAL primitive is used to simulate the random mutations in gamete size strategy between the generations of adults through a normal distribution. The lifetime of adults and gametes, as well as the incubation time of zygotes, are also randomly selected from a normal distribution.

The DIFFUSE primitive is used to create a background that transitions from darker to lighter tones of cyan fluidly. This background represents a marine environment.

The PRECISION primitive is used to limit the number of floating point numbers in the size of gametes. This is a synthetic measure to prevent the model from evolving to a state where too many gametes are produced and the performance of the simulation is negatively affected.

The INSPECT and the STOP-INSPECTING-DEAD-AGENTS primitives are used to allow users to follow randomly selected gametes so that they can better observe gametes’ behavior at the individual level since the gametes are often hard to see in this model.


  • Genetic drift models
  • BEAGLE Evolution curricular models
  • EACH curricular models


Bulmer, M. G., & Parker, G. A. (2002). The evolution of anisogamy: a game-theoretic approach. Proceedings of the Royal Society B: Biological Sciences, 269(1507), 2381–2388.

Togashi, T., & Cox, P. A. (Eds.). (2011). The evolution of anisogamy: a fundamental phenomenon underlying sexual selection. Cambridge University Press.


If you mention this model or the NetLogo software in a publication, we ask that you include the citations below.

For the model itself:

Please cite the NetLogo software as:


Copyright 2016 Uri Wilensky.


This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Commercial licenses are also available. To inquire about commercial licenses, please contact Uri Wilensky at

(back to the NetLogo Models Library)