Design Document


In this simulator, I try to simulate the process for a population to grow. Originally it was just humans, but I think this model doesn't really need to be restricted to that.  The idea is basically biologically opposite units procreating offsprings to grow the population.

The concept for this model is such: there are two types of units, 1 and 2. 1 is yellow and 2 is blue, they have to find one another to  create offsprings. Each unit can only live for a certain amount of time (that is randomized), and during this period of time. there is even a shorter period which they can mate, and every time one mates, it has to wait for a certain random amount of time for it to mate again as well. Each unit has a 6 digit code, the first 3 digit is X, and the last 3 is Y. When two units mate, the new unit takes the X from the type 1 parent, and Y from the type 2 parent, assign each code a randomized mutation value to form a new code for itself. If Y <= X, then it is treated as an X. A unit with XX is type 1, XY is type  2. I have to take incest and birth defects into account, so if the two parents' either X or Y is too similar, the child will be marked as defective, and they will be red. Even if a unit is not defective from this, every time a new unit is created, there is still a 3% chance for it to be defective (mutation), and when one of or both of its parents are defective, this percentage goes to 4%. Defective units may or may not live shorter than if it was not defective, but this value is again randomized.  I only take into account of common deaths, and didn't put causes such as famine, pandemic, and other large scale disasters into consideration, just thought that  would further complicate things and was not really my focus.

I think the main thing is playing with the variables that control the units lifespan, reproduction, etc. To achieve a more realistic model, or wackier. 

I spent some time in engine tweaking these numbers trying to make the model make more sense, but I was not sure how to allow the users to control them through an interface because each unit has its own randomized variables, but I would totally look into this more to find a way to provide some user input.

Get Population Growth

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.