Ascendant is a superpowered role-playing game of infinite possibilities.
In the book, there is a distribution of Power Levels that Ascendants follow, where progressively more powerful heroes are exponentially less likely to appear. This script uses Inverse transform sampling to randomly determine how many Ascendants at each Power Level appear in a given population.
$ ./demographics.py --help
Usage: demographics.py [OPTIONS]
Options:
-p, --population INTEGER Population to draw from (default 1,000,000)
--expected_pop Don't randomize the total number of Ascendants.
-a, --ascendants INTEGER Generate a fixed number of Ascendants.
--seed TEXT Override the RNG seed.
--help Show this message and exit.
$ ./demographics.py
There are 88 expected Ascendants in a population of 1,000,000.
Using the approximate binomial distribution to get number of Ascendants.
PL Count
15 53
16 18
17 13
18 8
19 1
20 3
Total 96
Seed 133322
$ ./demographics.py -a10
Generating exactly 10 Ascendants.
PL Count
15 6
16 3
18 1
Total 10
Seed 115237
Python 3 and click. I tested click versions '7.1.2' and '8.0.1', but it's likely to work with many other versions.
Ascendant is Copyright Autarch LLC.