This code underwent some revision due to some coding errors! See edit log for more information.
JBH has a very nice answer, and I have to admit, I mainly wrote this answer because it seemed like a nice programming puzzle.
My method: I modeled the likelihood of a woman getting pregnant after a chart I found online here. I did my best to then translate those numbers into a function of months of age since 18 years old. I ended up subtracting the $age_{in\ months}/8100$ from a starting chance of $20\%$ each month. That got me close enough to be happy. I then created a system where each person is put into a group, one of free_men
, free_women
or free_children
. If there were enough people available, I create pods out of the free men and women groups, with priority going to the youngest people available. Each month, the women in a pod have a chance of becoming pregnant determined by their age, beginning 20 months after their last conception.
If a women dies, she is removed from the pod, if a man dies, the pod is dissolved and the women revert to the old_women
group. When a child is born, they are added to the free_children
group. Children born have a $51\%$ chance of being male and $49\%$ chance of being female.
The time is ticked each month and statistics about the group are displayed.
These are the statistics for the years you request:
Year 49
Free Men: 603
Free Women: 2
Free Children: 3529
Old Women: 75
Pods: 295
Number of conceptions this period: 373
Pregnancy rate: 0.33459875566803754
Number of births this period: 325
Number of deaths this period: 0
Average number of children per man: 0
Average number of children per woman: 0
Year 99
Free Men: 12617
Free Women: 1
Free Children: 73572
Old Women: 2475
Pods: 5871
Number of conceptions this period: 6801
Pregnancy rate: 0.3289336345010024
Number of births this period: 6412
Number of deaths this period: 14
Average number of children per man: 37.96969696969697
Average number of children per woman: 12.756410256410257
This makes some pretty huge assumptions, the biggest of which is that having a child has no impact on your fertility. That's clearly false. Altering the pregnancy_fertility_drop
variable from 0 to 1.5 gives us these numbers:
Year 49
Free Men: 408
Free Women: 1
Free Children: 1766
Old Women: 272
Pods: 224
Number of conceptions this period: 165
Pregnancy rate: 0.312874251497006
Number of births this period: 150
Number of deaths this period: 0
Average number of children per man: 0
Average number of children per woman: 6.785714285714286
Year 99
Free Men: 5007
Free Women: 2
Free Children: 20736
Old Women: 3041
Pods: 2417
Number of conceptions this period: 1859
Pregnancy rate: 0.30061614757485816
Number of births this period: 1703
Number of deaths this period: 4
Average number of children per man: 20.451327433628318
Average number of children per woman: 6.909722222222222
Which is obviously a stunning drop (especially in the generation that is still under 18).
Here are some charts that show some statistics :)
These aren't as interesting as the ones with the fertility drop, here they are:
I find the Rates graph interesting, as you can see a significant fluctuation in fertility in 18 year increments, giving some significant generational effects!
I have the code here on Try it online!