Skip to content

Ascendant is a superpowered role-playing game of infinite possibilities.

License

Notifications You must be signed in to change notification settings

AlexMooney/ascendant_tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ascendant Tools

Ascendant is a superpowered role-playing game of infinite possibilities.

demographics.py

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.

Usage

$ ./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

Requirements

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.

Copyright information

Ascendant is Copyright Autarch LLC.

About

Ascendant is a superpowered role-playing game of infinite possibilities.

Topics

Resources

License

Stars

Watchers

Forks