Analyze real ecosystems via their digital twins. Explore the consequences of human interventions.


Ecotwin is an open-source agent-based ecosystem simulator that runs on the game engine Unity. It operates on ecosystems with dead objects like mountains and lakes, and living objects like animals and plants. Animals are controlled by a combination of hardwired reflexes and reinforcement learning. Features of Ecotwin include:

  • Three-dimensional terrain models

  • Terrestrial and marine ecosystems

  • Generic models of animals and plants

  • Genotypes and phenotypes

  • Sexual and asexual reproduction

  • Sexual reproduction based on physical encounters

  • Nervous systems modeled by multiple neural networks

  • Individual and lifelong reinforcement learning

  • Generic model of reward based on happiness

  • Positive and negative reflexes


Real ecosystems are of course too complex to be captured in full detail by any mathematical or computational model within reach. Nevertheless, relatively realistic ecosystem simulators are badly needed for sustainable  decision-making. Potential uses of agent-based ecosystem simulators include:

  • Consequence analysis of human interventions in real ecosystems via fishing, forestry, agriculture, and urbanization

  • Theoretical biology, including evolution and ethology

  • Game theory and behavioral economics

  • Video games

  • Robotics

The goal of the Ecotwin project is to build a relatively realistic ecosystem simulator by including several features of ecosystem development that are typically not fully implemented in other ecosystem simulators.  Ecotwin supports all the features mentioned above. The present version  is not very user-friendly, however, and does not scale well beyond about 500 animals.


Lotka-Volterra dynamics

An ecosystem with grass, deer, and wolves. The population curves follow the cyclic pattern known from the three-species Lotka-Volterra equations.

Diel vertical migration

An ecosystem with phytoplankton, copepods, and krill. The copepods follow a pattern of diel vertical migration. At night they forage near the surface and in the daytime they move to greater depths where there are fewer predators.

Evolution of reflexes

An ecosystem with sexually reproducing goats and grass of different colors. Reflexes that prevent the goats from eating grass of certain colors can arise via mutation. Goats with reflexes for avoiding lethal grass eventually dominate the population.


You may want to download Ecotwin and try some ready-made examples, design your own ecosystem, or model a real ecosystem.
The Ecotwin project relies on crowdsourcing. Please contact us if you want to join our team and help develop the next generation of Ecotwin.
We are open to academic cooperation projects at the MSc, PhD, and post-doc levels, but have no means of financing cooperation partners.