-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
29 lines (25 loc) · 1.24 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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.