simulating life midterm

Rushba Tariq
Simulating life
Midterm
Topic: Poliovirus
Please answer each question in a separate section. 1) Describe what the code in your section
is supposed to do. What are the agents? What do the agents do? What do the agents sense?
How do the agents respond? This should describe their behavior - not how the code makes
this happen.
The topic of my simulation is poliovirus. This virus gets spread through fecal-oral contact. One
of few ways of getting polio is drinking or eating food that’s been contaminated with the
poliovirus. In rare cases the virus also spreads if the person comes in contact with respiratory
droplet or saliva of infected person. For this simulation I will focus on the fecal-oral
transmission. While researching about the polio virus I found out that even having few people
infected with the poliovirus puts rest of the world at risk of getting infected and this is what will
be testing with my code.
The agents in my simulation are hospital, restaurant, person and house. Hospital acts as a
healing agent. The idea is that they get vaccinated and can’t get infected after coming in
contact with virus. There is no cure for people who are already infected with polio virus but
there are vaccines available for unvaccinated, uninfected people to prevent the disease.
The second agent in my simulation is the restaurant, as mentioned above this virus spreads via
fecal-oral contact; restaurant could serve as a source of infection. The idea is that an infected
person will come to the restaurant and will bring the hygiene of the restaurant down and will
put the unvaccinated people at risk of getting infection. Since it’s a restaurant and health
inspectors come and visit often to maintain the proper hygiene, the restaurant disinfects itself
or brings up the hygiene to the max value after getting infected.
The third agent in my simulation is person; I have made three sub categories of people. 1, The
infected people, with hygiene 0. These are the people who will infect the restaurant and will
put the rest of community at risk. 2, unvaccinated people, these are the people who haven’t yet
received vaccination and are at risk of getting poliovirus on coming in contact with the
restaurant (if infected at the time of collision). 3, the vaccinated people with hygiene level of 5
(maximum possible hygiene), these are the vaccinated people who aren’t at the risk of getting
infected and will not infect restaurant either.
In real life, once the person gets infected with the poliovirus, they get permanently paralyzed
after some time since the virus directly affects the central nervous system. In order copy this
behavior, I made my fourth agent, house. That’s where my infected agents will go after certain
amount of time and will stay there. They will not be able to infect the restaurant after getting
paralyzed
2) Describe how your code implements the behavior you described in (1). Be sure to include
screenshots of the code with enough context so that I can understand how it works. Describe
all traits and what they represent.
In the world tab, I created my agents and set their colors, size, shape and hygiene. All of my
people are size 1 in simulation and their shape is cube. I made 15 unvaccinated people; their
color is red with hygiene level of 3. I made 10 vaccinated people with color magenta and
hygiene level of 5. The infected people are black in color with hygiene level of 0 and are two in
number. The restaurant, hospital and houses are all cube shaped, with size 5. The built in
shapes didn’t work well with simulation. There are two houses in my simulation, one restaurant
and one hospital and they are all spread evenly across the terrain.
The restaurant gets infected on collision with infected person and that makes the restaurant
turn black from blue color. When the restaurant turns black and the unvaccinated person
collides with it, it also becomes infected and turns black from red. After 5000 ticks on clock, the
infected people with color black go towards the nearest house, which depicts them as being
paralyzed. The hospital turns the red, unvaccinated agents into vaccinated agents with color
magenta.
3) How do you know that your code “works”? Give two examples of how you tested it, what
should have happened if the code was working, and what actually happened. These tests
must involve changes to the simulation. In your case, these could involve changing the
starting numbers of organisms or their life spans, their behavior when infected, the chance of
spreading the disease, etc. and observing the effects of these on the numbers of infected
organisms. You could also remove some key element of the simulation, then predict and
observe the results. Be sure to include graphs if appropriate.
In order to check if my simulation was working I started with the small number of agents. I
started with one infected person alone and worked on my code to infect the restaurants. Once I
was successful in doing this, the second step was to make unvaccinated people and come up
with a code to get them infected after collision with infected restaurant and change their color
to black from red. Next I worked on making a hospital and getting the unvaccinated and
uninfected people vaccinated. One issue I had with this part was that, when the built in shape
for hospital was ‘hospital’, it wouldn’t turn the color of unvaccinated people to magenta
(making them vaccinated). The hardest part in simulation so far was to come up with a code to
make the infected people paralyzed after certain time. I played around with the clock time to
decide when to make the infected people paralyze. I’m still working on this part of the code
because after the time I put for them to head towards the house, all of them go towards the
house. I want to make them paralyze one by one on basis of the time when they get infected.
By looking at the graph and my data boxes number was the proof that my simulation is
working, increase in number of infected people on the graph and also the increase in number of
the people getting vaccinated showed that it’s working.
4) Give one example of a hypothesis you can test with your simulation and how you’d test it.
My hypothesis for this simulation is that few infected people puts rest of the world to be at risk
of getting infected. This can be tested by looking at the graphs or the data boxes that show how
the number of infected people and healthy (vaccinated people).