Simulating the Evolution of a Zombie Pandemic (Virus simulation)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
one of my favorite natural processes to simulate has always been genetic algorithms it's a very simple way to make a computer program learn to solve problems in an inefficient but impressive way inspired by how life evolved on our planet if you don't already know the concept behind genetic evolution i'm going to attempt to explain it in an oversimplified way every living being on earth has a unique set of genes which define every aspect of the organism ranging from physical appearance to psychological behaviors in the case of a human one gene could for example be responsible for the person's eye or hair color but others will also be responsible for much more important things like the number of limbs and their locations or the way the brain should be laid out when a living being reproduces it will pass part of its genes to its offspring with a slight chance that one or more genes mutate meaning that they change slightly if such a mutation is beneficial for your organism it will have a higher chance of passing these genes onto the next generation and so with every generation living beings adapt to their environment this concept can be applied to neural networks to train machine learning models which is where the neet algorithm comes from but it can also be used for much simpler simulations today i wanted to try something out that i haven't seen much on youtube and that's to simulate the evolution of a virus on a very basic level as always if you like this type of content please don't hesitate to subscribe and help the small channel grow and also feel free to leave a like to show your support that would be very nice so the plan of this video is to build a small world filled with innocent test subjects and then infect one of them with a brand new virus that should eventually turn them into zombified killer machines let's see how it goes i created this simple low poly terrain and blender which would serve as a base for environment i also model some trees and rocks and place them on the terrain i then added some houses for people to live in and also added to hospitals to give them a chance for what's coming now this is tommy like every other inhabitant of this town he has a health and an energy bar and also looks like a me from wii sports but that's not important tommy walks around and enjoys his life until he gets tired indicated by his energy bar shrinking at some point tommy decides he has had enough of wandering around and goes back home if his energy bar reaches zero his health will decrease and if his health reaches zero well to avoid dying so miserably the inhabitants are free to visit the local hospital if they are not feeding so well now let's start the simulation and watch the town come to life everyone seems happy and no one dies so nothing particularly interesting here let's start working on the virus itself before i explain my virus implementation the simulation i thought it would make sense to spend some time talking about what a virus actually does because even if they tend to make things unpleasant i find their behavior very interesting a virus is a sub-microscopic agent that needs the host to survive and to accomplish its only goal which is to create as many copies of itself as possible to do that viruses usually inject their own dna into the cells of their host to trick them into rapidly creating copies of the virus at the expense of the host even if their behavior seems quite simple they are forced to constantly evolve to optimize their spreading and avoid being eliminated by the host immune system this reason viruses tend to have a very high mutation rate meaning that there's a relatively high chance that some of their copies have slightly different genes than the virus where infected that cell now let's implement a much simplified version of such a virus in our simulation i'll start by permanently infecting one entity in the simulation which is indicated by the model turning red at the start the virus will be very basic meaning it won't have any consequences on its host at the moment the virus will have to learn physical contact to spread from one person to another however every time a virus jumps from one body to another it will have a small chance of mutating meaning it will slightly alter one trait in its host body at the moment these traits are cloth rate sweat and virus resistance cloth thread defines how often a person calls which will infect everyone in a small radius around them sweat increases the chance that a virus spreads with physical contact and resistance allows the virus to stay longer in its host body at the cost of that person's energy according to the concept of evolution the beneficial mutations should last longer while disadvantaged mutations should disappear faster to encourage mutations i created very simple immune system which prevents people from being infected by the same virus generation more than once in this simulation a generation is basically one version of the viruses genes so every time a virus mutates this new virus belongs to a new generation let's start the simulation once again [Music] the virus quickly evolved to become much more infectious and more resistant and spreads very rapidly it is important to note that for this experiment the people aren't aware of the disease and don't do anything against it so no lockdown or anything [Music] i stopped the simulation after around 40 minutes to have a look at the simulation data this first graph shows us the amount of healthy and infected people over time and as we can see the epidemic curve is a sigmoid meaning the spreading accelerated in the first half and slowed down in the second one now let's see how the virus evolved during all this this graph shows what influence the virus had on average on its hosts over time it shows that the virus relied on coughing to spread in the first two minutes before switching over to sweating for that purpose i think this is because sweating is more efficient when most of the population is infected also the various resistance dropped after around 14 minutes while i find this very surprising this might be to conserve the host's energy and gain more time outside to infect people faster than they can recover this strategy could be confirmed by the next graph which shows what people were up to during the infection and we can clearly see that after 14 minutes people spend less time home okay so that was pretty interesting in my opinion but still no deaths and more importantly no zombies time to step things up let's first talk about what i mean by a zombie currently the only effect the virus has on entities are typical disease symptoms like coughing and sweating which do make it easier for the virus to spread but i think the virus could be even more parasitic by completely altering a person's behavior this is what you see in most zombie apocalypse stories where virus or another parasite turns its host into a monster that does everything it can to infect more people i want to see if something like that can actually arise from evolution by making it quite a bit easier for the virus to alter its host's behavior to do that i modified the previous entity trade system to include more traits so in addition to the previous three traits i added aggressiveness movement speed exhaustion tolerance and pain tolerance a high aggressiveness makes a person chase an attack nearby once movement speed defines the speed at which a person will move where higher speeds cost a lot more energy exhaustion tolerance defines the low energy threshold at which an entity will go home and pain tolerance defines the low health threshold at which an entity will go to the hospital you might think that in order to optimize its spreading the virus would just have to maximize all these values but it will face the challenge of balancing energy as it can spread any further if its host is dead it will be interesting to see if the virus balances all these traits out equally or if it will boost just one or two of them so let's start the simulation with these new traits and see what happens [Music] at first nothing particularly interesting happens the virus manages to infect a reasonable amount of people by boosting its resistance and lowering other traits to conserve [Music] energy [Music] soon after that the virus starts to increase the movement speed trait to infect more people but nothing too impressive just yet at this point the evolution has created a few very fast zombies allowing them to spread the virus faster the movement speech rate continuously increases so this seems to be the virus strategy [Music] from this point on all zombies have turned into inhumanly fast sprinters that cost a bit more than usual and this goes on for quite some time [Music] yeah movement speed is definitely overpowered [Music] at some point there are so many more infected people than healthy ones that the usain bolt approach doesn't work anymore so something interesting happens the fast zombies start to become much more aggressive which makes them run towards healthy people at high speeds [Music] and hospitals become very crowded as all the running around and getting attacked isn't so healthy but there still aren't as many deaths as i thought [Music] here things start to settle a bit so i stopped the simulation time to look at some interesting data when looking at the infection summary we can clearly see that this time the infection curve isn't shaped like a sigmoid and looks more like a logarithmic growth curve and we can also see a few important spikes which are related to very beneficial mutations like the sudden increase in movement speed at the beginning and the rise of aggressiveness at the end and another difference compared to the last stimulation is the fact that the two curves stop being symmetric at some point and begin to decrease together at the end which is caused by deaths now if we take a look at the average traits over time we can clearly make out the first spike in resistance the certain rise of movement speed followed by a drop in aggressiveness which then led to the resurgence of aggressiveness i was surprised to see that this time a virus resistance seems to have been essential for the survival of the virus as it kept on rising despite the associated cost and energy pain exhaustion torrents don't seem to have played such a big role even if they increase slowly throughout the simulation and especially as aggressiveness starts to develop the fact that virus resistance and movement speed could both get so high without those dying of exhaustion doesn't seem right so increase the energy cost for the next simulation if you want to take a look at the different entity states over time here's the graph even if i can't find anything too interesting in it except for the spike of people going to the hospital at the end which is probably related to the rise of aggressiveness this was already much more interesting but i want to burn things out a bit more by limiting how fast people can move before getting injured and thus not being able to spread the virus much further so i implemented that limit and started another simulation let's see what happens this time [Music] the bible spreads by maximizing the sweating trait and this time movement speed doesn't seem to get abused like last time it does rise over time but just not as [Music] fast [Music] this time aggressiveness rises much earlier and so does pain tolerance with this more balanced out stimulation people seem to die much faster which is probably due to the higher aggressiveness of zombies and the injuries caused by two high movement [Music] speeds [Music] at this point the virus struggles to infect more people and so zombies begin to either recover from the disease or pass away quickly until there's just the first infected guy left who can't infect anyone anymore as all the survivors are immune to viruses first generation by now the reason patient zero survived the pandemic is that we permanently infected him with the first virus generation which was harmless and prevented him from being infected by newer generations if we now look at the infection summary we can see a weirdly shaped epidemic curve that rises very quickly in the beginning but slowly falls back to where it started this time both curves decrease over time as more people died in the simulation let's take a look at the next graph showing us the average per trade influence of the virus over time as we can see sweating was the preferred trait in the first half before evolution decided that aggressiveness was a much better way to infect more people doing all this pain tolerance increased consistently and exhaustion tolerance started rising shortly after the aggressiveness peak which i'm not sure why and most importantly movement speed never reached the same level as last time now that it comes with danger i also think that the reason why most zombies disappeared at the end was because as there were less people to infect the virus couldn't evolve quickly enough to develop a new strategy that would allow it to conserve health and energy if you're wondering why all traits drop back to their default value at the end it's because every generation that came from a mutation disappeared at the end and so only the first generation was left once again here's the last graph showing the various entity states over time and the only real difference i noticed was the sudden increase of chasing due to high aggressiveness which dropped when the virus started to go extinct so what do we learn from all this well i don't really know how scientific my small experiment was as i don't actually know the advanced more complicated stuff about viruses and epidemics but i think that if various managed to gain control over the actions of a human being aggressive zombies could become a reality but they will probably move around faster than they do in most fictional scenarios now this video is already much longer than all my previous ones so i'm gonna end it here i might do a part 2 if you want so definitely let me know in the comments if that interests you and please tell me what you would like to see in the next part i was thinking of making the people aware of the virus and allowing them to react by fleeing from zombies and locking themselves up on purpose but i'm curious to hear about your ideas if you enjoyed this video please leave a like to let me know and if you like this type of content and want to help the channel out please subscribe it's free and you can always change your mind later at the time this video comes out we're getting really close to 100 subscribers which is awesome thank you very much for watching and i'll see you on the next one cheers [Music] you
Info
Channel: NamePointer
Views: 1,041,992
Rating: undefined out of 5
Keywords: namepointer, ai, programming, machine, learning, machine learning, tutorial, technology, mathematics, science, coding, artificial intelligence, artificial inteligence, name pointer
Id: g7xzVqpyiPY
Channel Id: undefined
Length: 18min 38sec (1118 seconds)
Published: Sun Aug 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.