Skip to content

btbonval/DieStatistician

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DieStatistician is a toolset for analyzing tabletop game dice outcomes.

The name is a pun:
1. Statisician of a Die. A statistician studying dice. Die is the singular form
of dice.
2. (You) Die, statistician. A command requesting that some ungainly statistician
should cease to exist.

How to use:
1. run python
2. from XdY import XdY
3. generate one six-sided die: a = XdY( [1,6] )
4. generate three eight-sided dice added together: b = XdY( [3,8] )
5. compare them:
5.1. a == 3 ... a > 6 ... a > 1 ... a == 0
5.2. b == 9 ... 8 > b ... 3 > b ... a == b
doesn't work: 3 <= a <= 5

See examples of use in each X?Y.py file at the end.
XdY is common nomenclature for rolling X dice with Y faces and summing them.
XeY is a modification of XdY that allows for Shadowrun-style explosions, where
the highest value results in an additional roll to be summed.
XhY rolls X dice with Y faces, but takes the highest value shown.
Since each class builds a distribution from a common class, they may be
intermixed together in arbitrary ways to yield new distributions.

Infinite distributions (such as those created by XeY) are truncated after some
small error. See series.py (series.maxterms) and PMF.py (PMF.error). Finite
distributions of sufficient density might also be truncated.

About

A toolset for analyzing tabletop game dice outcomes.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages