Basic simulator of population growth from X individuals. (e.g. Planet or island colonisation with only a few people)
Visual Studio (2017+) or Visual Studio Code is requied.
- Clone repository
- Open the solution /Simulator/Simulator.sln
- Restore NuGet packages
- Build the solution
- Run the project
To-Do
To-Do
To-Do
The simulation is running in cycles. Each cycle has 4 phases which must be called in this order:
- Make child
- Set partner
- Get old
- Cycle++
Description Firstly, every female that meets the condition has a chance to have babies (0-5). After children 'creation', single teen entities have a chance to find a partner (0-1). In the next step, every entity gets old by the rules. When all phases are completed, the cycle number is increased.
Every entity which meets the conditions, can "create" new entity.
Parents
- Are alive
- Are different gender (Male + Female)
- Are same generation (Configurable)
- Are NOT related (Configurable)
Mother
- Is female
- Has partner
- Partner is alive
- Partner is male
- Is adult
Father
- Is male
- Has partner
- Partner is alive
- Partner is female
- Is Adult or is OldAge
To-Do
A random number between 0 and 1 is generated. (= Minimal attractiveness)
- Is alive
- Is single (Does NOT have partner)
- Is teen (Adolescence age)
- Is same generation as future partner
- Is same age as partner
- Is different gender of partner
- Has greater or same atractiveness than minimal attractiveness
In Get old phase each entity is changed by basic rules.
- Childhood → Adolescence
- Adolescence → Adulthood
- Adulthood → Old age (Exception)
- Old age → Death
A number between 0 and 0.9 is generated. (= Minimal longevity) If the entity already skipped 'getting older', it gets old now. If the entity's longevity is greater or same as minimal longevity, it skips 'getting older'.
If everything was alright, the current cycle number is increased.
- Visual Studio 2017 - IDE
- NuGet - Package manager
- C# - Programming language
- Jiri Falta - Main programmer - Fjarik
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE file for details.