When you watching a zombie movie, have you ever doubt about whether zombie will really die due to starve, espcially considering survival human population decline with time. This curious derive this project, I consider as many factors as I can in a zombie apocalypse. So you have great freedom to control this simulation, and can change parameters like: zombie-init-num, health-human-init-population, zombie-virus-infection-rate, zombie-virus-gen-mutation-rate etc for different scence.
Of course, I have to set some basic sets in my simulation,
1 there no any zombie-virus-cure be developed ever.
2 zombie will died if they dont eat human for a long time(this number can be set for youself).
3 human survival probability is decided by their physical condition and learning-ability and some lucky. For example, Higher learning-ability will have higher survival probability in the next time after survival from one time zombie-attack. Other example, even you are smart and strong, but you still will be kill and transfer since your bad lucky.
4 huamn and zombie will be seperated by several groups in every day. You can consider this set as different population density in differnet area.
python virus-pro.py -ih <human-init-population> -iz <zombie-init-nums> -K <simulate-time> -ii <init_infection_rate>
hyper-parameters:
ih: init_health
iz: init_zombie
K: simulate_iterate , default=1
ii: init_infection_rate, default=0.99.
If you want to change math function of virus gen-mutation, you can change mutation function of zombie class in your opinion.
This simulation program will simulate zombie vs human until satisfy one of three conditions below.
- survival human population or zombie num has arrival dynamic balance more than 10 days.
- human or zombie has been eliminated.
- simulation running more than 1000 days in program epoch.
Processing will return final human population, zombie nums and stopping days. Meanwhile program will product two csv file for recording data:
- experiment_data.csv: record final data (include days, human population, zombie nums)