Misc‎ > ‎Student projects‎ > ‎

Patryk Golec 09/10/15

Predator and prey

The first thing I've done during this work experience was fallowing the first tutorial "Predator and prey" which introduced some basic mechanics of net logo. The model involved an environment with 3 types of organisms grass (producer, plant) , sheep (primary consumer, herbivore) and wolfs (secondary consumer, carnivore). In this experiment the sheep would eat grass and die if they don't get enough of it and the wolfs would eat sheep and die if they can't catch any. The grass would grow back after a certain amount of time and both animals reproduced. I've also added a graph that measured the population of wolfs and sheep
The problem with this model is that the animals are moving randomly, whereas
 in real the wolfs would target the sheep and the sheep would run away from the wolfs, also the animals were splitting in half instead of mating which would have been the case in a real life scenario. 
I've then decided to make the program more realistic, the animals still have random headings, but now the sheep age and a wolf is more likely to catch a young or old sheep then an adult sheep. I've also added an environmental obstacle (a river) that animals can't cross, in order to get to the over side they must go through an opening in the middle. I've also made it so that the graph now shows the population change on both sides of the river and the grass.
link: https://m4a-gae.appspot.com/m/?frozen=Hg0OjuyHQTRJO_jVPk8569&MforAllModel=1

Modelling epidemics


Secondly I've followed a more complicated tutorial that shows how a disease spreads through a social network of people. At first I've used a constant social network where everyone is connected with 4 other people on average. When a person is infected at the start they are yellow and a person that catches the disease turns red and their recovery time is determined by the user and when they recover they turn grey, a person can't be infected when they are vaccinated (green) or already had a disease (grey). The blue coloured people haven't been vaccinated or had a disease yet and they are the only people who can catch the disease. The population,the infected population , infection odds, the encounter fraction(how often are the infected sending the disease),the fraction vaccinated(percentage of people vaccinated) are determined by the user in order to observe the changes in the different scenarios.
link: https://m4a-gae.appspot.com/m/?frozen=pWeVZuWMYY8KR90xTK8Y5a&MforAllModel=1
I've then looked at a different social network, I've changed the constant network to a power law social network, where people that have a powerful status make a lot of links and people with a low power status make a no or a few links. I've also made it so that the people with a higher status get vaccinated before the people with lower status. (Notice that since people with less links are the only ones that get infected the disease doesn't last as long).

Sugar-scape model 


The final tutorial I've done was the sugar-scape model in which there's a sugar field and agents that eat the sugar in order to survive. The agents have a population and metabolism set by the user and they need to get to a patch where they can collect the most sugar. If the agent collects less sugar then their sugar consumption then it dies and is revived on a different patch, also the area where the agent can identify the sugar amount can be adjusted by the user. When the agent collects sugar the patch gains pollution proportionately to how much sugar is consumed there and the agents try to go to the patches with the most sugar and the least pollution. In order to make the agents move a bit longer I've also added age to the agents so that if an agent lives for too long it will die of old age so that more movement is seen rather then 75% of them moving between 2 patches. The model is observing the population level the wealth of  the population / a number of individuals, the mean vision and metabolism level and the gini coefficient.



My project

My game

My game



Description


My final project was an edited version of the predator and prey. I've made a game where the user is controlling the shepherd that repels wolfs that try to eat his sheep. The player has a CPU helper and 3 sheep at the start, in the game you are awarded points for every 10 "time" the sheep survive. The program is getting progressively harder as every 100"time" a new wolf is added, however every 200"time" a sheep-dog comes and fights a wolf resulting in both of them dying. When 2 sheep meet there's a 40% chance that a new sheep will be added to the game, but the maximum amount of sheep at a time is 10. The user controls the red shepherd using "wasd", the player can also determine the speed of the wolf (also affects the speed of sheep and sheep-dogs) the speed of shepherds (themselves and CPU) and the repel radius of the shepherds (how close can the wolf get to the shepherd without running away). The speed of the sheep is determined  by the speed of a wolf divided by the distance between itself and the closest wolf, the speed of the sheep-dog is determined by the speed of the wolf + 1. The blue CPU helper can't get within a distance of 10 patches near the player so most of the time it will try to protect a different sheep then the user.

Objects


Most of the object's I've used were made manually so that the rotation mechanic works best:
Shepherd/CPU - person-farmer

Pictures

Links



All the links









Comments