Courses/CS 461/Winter 2006/Kwan Shing Yuen/Week 2
From CSWiki
[edit] Rabbits, grass, weeds
Environment:
There are three elements in the model, rabbit as a turtle, grass as green patch, and weed as purple patch. Rabbits have to eat either grass or weeds to keep their life and reproduction. Initially, we can set the number of rabbits, grass’s growth rate, and weeds’ growth rate.
Rules:
Firstly, there is couple of variables in the model such as number of rabbit, birth-threshold, grass growth rate, weeds growth rate, grass energy, and weed energy. For every rabbit, it has own energy value.
1, When we start the model, each rabbit has been initialized the energy value randomly.
2, When the rabbit makes one step, its energy will be deducted 0.5.
3, If a rabbit eat a grass or a weed, its energy will be increased depend on the grass-energy or weed-energy.
4, If the energy of rabbit is greater than birth-threshold, then it can make a new rabbit and the energy will be divided by two.
5, If the energy less than zero, then the rabbit will die.
Description:
We can see the number of rabbit, grass, and weed changed on the dot-plot based on the rules. For example, we set the number of rabbit as 11, grass grow rate is 10, grass energy as 4, and birth-threshold as 10. Firstly grass will grow up pretty fast. The 11 rabbits can easily eat the grass because of large amount grass grew up. After rabbits eat the grass, then they have energy to reproduce a new rabbit. Therefore, the number of rabbit will be increased. After certain amount of rabbit in the model, they eat the grass much faster because of more rabbit. The number of grass will decrease. Then, the rabbit cannot have enough energy to stay alive. After certain amount of rabbit die, number of grass will be increase again. Therefore, the dot-plot show that when the number of rabbit increase, then number of grass decrease. Then, the number of rabbit decrease and number of grass increase. The model will run the pattern over and over again. But the thing is population of rabbit is mainly affected by the grow rate of grass or weed and the energy of grass or weed. The initially number of rabbit does not affect the population of rabbit. Based on this model, we can see how the food chain theory relates to population.
[edit] Virus
Environment:
This model is about counting some sick people infect some healthy people in a period.
Rules:
1, all people can last long age 100
2, all people walk around. When healthy people meet some sick people, they will be randomly infected depend on value of infectiousness.
3, People will get older. If the person is being sick, then the sick value plus one.
4, If the person is sick, he will randomly immune or die depend on chance-recover.
5, Person can reproduce base on the population of people and lifespan of that person if that person is healthy.
Description:
This model show how the virus affects human population. There are 10 sick persons initialized in the model. We can see the population change base on infectiousness, duration, chance-recover and people. If the infectiousness is a high value, then people will be easily infected. When the chance-recover value is higher, then people have bigger chance to immune. If a healthy person meets a sick person, he has a chance being sick person. A sick person has a chance to immune or die.
[edit] Prisoner's Dilemma Basic
Environment:
This model can let you play around jail time between two prisoners.
Rules:
There are two persons in the model you and your partner. 1, If you are silent and your partner is silent, then your jail time is 1 year.
2, If you confess and your partner confess, then your jail time is 3 years.
3, If you confess and your partner is silent, then you are free to go.
4, If you are silent and your partner confess, then your jail time is 5 years.
Description:
In this model, you can either control your partner or let your partner answer randomly. If you are silent, your jail time either 1 or 5 years. If you confess, your jail time either 0 or 3 years. Let say we consider the worst case, we better choose to confess because the jail time is max 3 years. In the best case, we should also choose to confess because you may be free to go. Therefore, you better choose to confess when you are arrested.

