Python代写|Assignment 1: Simulating Ecological Homeostasis



If the math equations are not rendering nicely below, you may need to install nbconvert .

On some systems this can be done by executing pip3 –user –upgrade nbconvert

Background: The Gaia Hypothesis & Daisy World

In the 1970s, James Lovelock and Lynn Margulis developed the Gaia Hypothesis. This is a highly controversial theory which proposes that the global ‘biosphere’ is self-regulating— that ecosystems work to maintain the conditions necessary life to persist on Earth. As a case in point to support his theory, Lovelock observed that the amount of heat arriving from our Sun has increased significantly since the origin of life, but that the tempera- ture of the planet has remained within the limits of hability throughout. How does this homeostasis (loosely translatable as ‘keeping things the same’) occur?

Lovelock argues that the homeostasis is a natural biproduct of complex ecosystems, but this is a very controversial claim, because it seems to contradict classic ideas of evolution being driven by selfish competition and ‘survival of the fittest.’ Lovelock’s theory suggests that instead of competing and ‘being selfish,’ diverse species come to some sort of agreement, whereby they’ll cooperate to make conditions beneficial for all life (and not just themselves). If you are interested to know more, the wikipedia page on the ‘Gaia Hypothesis’ provides some more information including links to further reading.

Debate concerning the Gaia Hypothesis continues today. A computational model known as ‘Daisy World’ has been developed to show how regulation of environmental conditions (such as the temperature of the planet) can happen. The model considers a planet populated by two different types of daisies, black ones and white ones. The black daisies increase the temperature (by a small amount) by absorbing sunlight, and the white ones reflect light back into space, decreasing the local temperature. In this assignment, we will develop a simplified version of Daisy World that only includes the white daisies.

As is common in developing computational models, we will make many simplifying assumptions. We will assume:

1. the daisies grow better at certain temperatures than others;

2. the temperature of the planet is the same everywhere;

3. daisies are the only relevant species that lives on the planet;

4. the carrying capacity (i. e. the number of daisies that are alive at equilibrium) is well approximated as a function of temperature;

5. when there are no daisies around, it is still possible for a population to grow (we can imagine there are always seeds in the ground).


Our model will be a continuous-time dynamical system that is described by three differ- ential equations. Each equation describes the dynamics of one of the following variables.

— the normalized population density of daises. 1 means the planet is covered in the maximum possible density of daises and 0 means there are no daisies at all, etc.

– the temperature of the planet (this corresponds in our simplified model to the temperature everywhere)

– an external ‘perturbing’ force to the temperature. This can be conceived of as an increase in the radiation from the star that the planet is orbiting, or any other (combination) of factors that are modifying the planet’s temperature other than the presence of the daisies.

In this assignment, as you follow the instructions, you will build a computational model of this system. By the end of it hopefully you will have gained some insight into one way that biological-feedback can (at least in theory) stabilise environments as claimed by Lovelock and Margulis.

You may also like: