One of the most common interactions between species of animals is the predator-prey relationship, which can take many forms. These interactions are critical to the health of animal populations and to the flow of energy through an ecosystem, and altering these populations (by hunting, for example) can have significant consequences to an ecosystem.
The Michigan Department of Natural Resources (DNR) has been examining the population of deer on North Manitou Island (part of Sleeping Bear Dunes National Lakeshore). The main large predators are North Manitou Island are coyotes, and the main large prey animals are white-tailed deer. There are not enough coyotes on the island due to former residents of the island hunting them, and the deer population is getting too large. One consequence of this is that there is not enough readily available food for the deer population, which is destroying the vegetation on the island and also affecting the health of the deer. The DNR has decided that some number of deer should be removed from the population (by hunting or transportation to the mainland) in order for the remaining population to stay at a healthy level.
You have been asked by the Michigan Department of Natural Resources to make a model of the interactions between coyotes and deer to determine how many deer should be removed from North Manitou Island. You're going to do this by developing an agent-based model of the interactions between coyotes and deer, and vary the number and properties of both species to examine how the populations change in relation to each other. In the sections below, we will provide you with some instructions on how to set up the model and some specific questions that the Michigan DNR would like to know the answers to. Happy simulating!
Note: While it's fine to talk with others about this homework - and in fact we strongly encourage you to do so - you need to write your own code and turn in your own homework assignment!
// put your name here!
Here are the rules of this model:
Your task is to create a code that implements the predator-prey interaction model described above. No code has been provided to get you started - however, we strongly encourage you to look back at previous in-class and homework assignments, since there's a lot of code from previous assignments that you will find to be very helpful.
Some specific instructions are as follows.
Note that you will be graded both on the correctness of your solution and the quality of your code. Use functions when possible, and make sure that your code is clearly written and has comments explaining what everything does. Also make sure that all plots are clearly marked with axis labels and a title!
In [ ]:
# Put your code here, and add additional cells as necessary
Note: make sure that all plots have appropriate x- and y-limits, as well as figure titles and axis labels. The questions may require both code and a written answer, so please make sure to do both!
For all models, assume a game board that is $N_G = 40$ cells on a side unless otherwise instructed!
Question 1: First, let's test the limits of our model. How does it behave when there are only Coyotes, and only Deer? Try setting $N_C = 20$ and $N_D = 0$, and then do a second model with $N_C = 0$ and $N_D = 20$. For both models, take $N_S = 100$ steps, set $N_{eat} = 10$, and give both deer and coyotes a probability of $P_D = P_C = 0.25$ of reproducing when they interact with others of their species. Set $P_{rem}=0$ (no deer are removed by humans). Use the code you have written to show how these two situations evolve over time (i.e., show the total population of coyotes and deer as a function of simulation time step), explain what you see, and explain why it makes sense.
In [ ]:
# Put your code and figures here - add additional cells if necessary
// explain what you see in the figures here!
Question 2: Now, let's try models with both species, but where they are far out of equilibrium. Consider a model with $N_C = 20$ and $N_D = 2$, and then do a second model with $N_C = 2$ and $N_D = 20$. For both models, take $N_S = 100$ steps, set $N_{eat} = 10$, give both deer and coyotes a probability of $P_D = P_C = 0.25$ of reproducing when they interact with others of their species, and give coyotes a probability $P_{eat} = 0.5$ of catching and eating a deer upon encountering it. Set $P_{rem}=0$ (no deer are removed by humans). Use the code you have written to show how these two situations evolve over time (i.e., show the total population of coyotes and deer as a function of simulation time step), explain what you see, and explain why it makes sense.
In [ ]:
# Put your code and figures here - add additional cells if necessary
Put your answer here!
Question 3: Now, let's modify the model above to try to create stable populations of coyotes and deer by removing deer from the island. Consider a model with $N_C = 2$ and $N_D = 40$. For both models, take $N_S = 100$ steps, set $N_{eat} = 10$, give both deer and coyotes a probability of $P_D = P_C = 0.25$ of reproducing when they interact with others of their species, and give coyotes a probability $P_{eat} = 0.5$ of catching and eating a deer upon encountering it. Start with $P_{rem}=0$ and do several runs where you increase it by steps of 0.1 to $P_{rem} = 1.0$, showing all of the results on a single plot with lines of different colors and/or types indicating different models. How does the situation change as deer are removed by humans? Over what range of $P_{rem}$ do you get populations that are relatively stable, meaning that they do not continuously increase or decrease?
In [ ]:
# Put your code here!
Put your answer here!
Question 4: Run several models where you change the other parameters, and show two or three of the most interesting ones below. Explain in the text box below your figures what is going on, and why.
In [ ]:
# Put your code here!
Put your answer here!
Question 5: After you've run all of these different models, what general principles can you take away? In other words, what have you learned about the interactions of predator and prey species from this model?
Put your answer here!
Question 6: In what ways could this model be modified to make it more realistic?
Put your answer here!
// Write your answer here
// Write your answer here