Swift Simulations: Modeling Predator/Prey Relationships
Activity 1: Simulations and Models – Overview
Learning objectives:
- Exploring simulations
- Review classes and structs and object-oriented design
- Statistical relationships – correlation, lagged correlation
- Simulating a (semi-) closed biological ecosystem
- Exploring ecosystem management issues, ethics and debate
Introduction Activity:
Very few people have heard of this wonderful U.S. National Park: Isle Royale. Isle Royale is a large, remote island in the northwest part of Lake Superior. Technically a part of the state of Michigan, this island has no homes, is available only via ferry during summer months or float-plane, and has limited opportunities to visit, mainly during the warm season. It is home to populations of wolf and moose and is known in the scientific community for one of the longest recorded sets of quality observations of predator-prey relationships. The U.S. Military has flown aerial surveys and documented the populations of Isle Royale’s herds of moose and wolf for more than 70 years.
Share this introductory video of Isle Royale with your students. The video is inspiring as it shows a diverse set of students working on research projects in the field and helping document the state and changes of Isle Royale’s ecosystem:
Share the figure below illustrating the predator/prey data gathered from observations of Isle Royale wildlife:
Interesting notes to share:
- Prior to the record on this graph, in the 1920’s wolf populations were decimated when humans brought the first dogs to visit the island. The dogs brought with them a virus that the wolves had not been exposed to and sickness and death spread throughout the population almost totally eliminating the wolves.
- Studies have shown that the wolves on Isle Royale are generally less healthy than those in nearby Canada. Inbreeding and lack of genetic diversity are the main factors.
- Isle Royale is not totally isolated. During the coldest winters, Lake Superior will freeze creating an expansive ice bridge that moose and wolves might possibly traverse and bring in new individuals to the herds. Scientists have determined that only one new wolf entered the Isle Royale population this way in the past 50 years. It is rare. However, when it did happen, that wolf was so healthy, strong and different than the remainder of the population, that it became dominant (alpha) male among the population instantly. (One student in our class made the analogy to Superman coming to earth from the planet Krypton.
Ask students to discuss the figure:
- “What are the axes on the graph showing (x: years; y: wolf populations on left, moose population on right)
- “Are there generally more moose or wolves observed in the park? Why?”
- “Is there a relationship between the wolves and moose? Why do you think relationship exists?”
- “Why do moose populations go up? Why do they go down?”
- “Why do wolf populations go up? Why do they go down?”
- “What are favorable conditions for moose? What are favorable conditions for wolves?”
- “What happened to wolves in the last 4-5 years? (Wolf population declined to only a few wolves, none of which were females. The population is doomed.)”
- During the late 2010s, there was vigorous debate in the scientific community whether to reintroduce Canadian wolves to Isle Royale. “What do you think?” “What are reasons TO reintroduce wolves?” To NOT reintroduce wolves?”
Tell students we will be trying to model or simulate the ecosystem of Isle Royale, at least with reaped to the vegetation, moose and wolves? Our goal will be to construct a model that we can use to test some hypotheses of the relationships between the components of the ecosystem and see if we can determine what factors are most important or influential to the ecosystem. Which are less important. Gather ideas about what ideas we will have to include in our models.
Think about life and death for the three components: vegetation, moose and wolves.
- What makes vegetation grow? (favorable weather)
- What makes vegetation die or be stunted? (moose eating vegetation – see first video above)
- What makes moose reproduce? (enough vegetation, mature moose)
- What make moose die? (wolves eating them, old age)
- What makes wolves reproduce? (sufficient numbers of moose for food)
- What makes wolves die? (insufficient food, old age)
We will try to encode these ideas into our Isle Royale ecosystem model.
Object-oriented approach:
We will make the following classes or structs in Swift.
Moose: Will be a template for creating a moose. A moose will eat a certain amount of vegetation per year and it will reproduce if it is at least 5 years old at a specified rate (try 0.75 babies per mature moose). A moose will die if it doesn’t have enough vegetation to eat for two sequential years or if it reaches old age.
Wolf: Let’s save this for another day and see if we can get a reasonable simulation of moose and vegetation going before adding in wolves.
Environment: An environment will have an array of moose and an array of wolves. It will have a currentVegetationCover that will be a fraction (0.0 … 1.0) of the region covered by vegetation. The currentVegetationCover will grow at some rate per year (0.1 per year not to exceed 1.0). And it will be reduced by feeding moose (try 0.003 per moose per year).
Simulation: A simulation will have an environment and a numberOfYearsInSimulation.
Go through each of the classes or structs above today and settle on some properties of each struct and behaviors of the structs. Just do this as a discussion and take notes on the decisions for next class meeting where the class will encode these properties and behaviors into Swift code.
Summary Activity: Discuss the concept of a computer model and simulation. In general, what are the reasons one would build a model and/or run a simulation. In the case of Isle Royale, what would be the utility of building a model of the island’s ecosystem and why would we run simulations? Can you think of an experiment you would like to simulate with our model when it is complete? Do you have an hypothesis you would like to test?