Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What is _wrong_ with Python? a.k.a. PoR probabilities
#6
Okay. To corrected the non-binomial file change i**(MAX+1) to i**MAX.

Also, now that I've gotten some actual sleep, let me apologize for that word salad, above.

The method for determining the probability of any number of successes in a mixed pool (some dice larger, some dice smaller than the TN) is simple dot-product multiplication. If the probabilities for the two sub-pools are arranged thusly:
Code:
      # ->     0    1    2    3
    % ->    0.5063    0.3938    0.0938    0.0062
#    %    ------------------------------------------------
0     0.5547 |    0.2808    0.2184    0.0520    0.0034
1     0.4453 |    0.2255    0.1754    0.0418    0.0028
(blecch. A preview shows that things do not align properly.)

The i,jth element of the 2x8 matrix is the product ith element of the column and the jth element of the row. To get the probability of a certain number successes (T) just add the positive diagonal where i+j=T.
no successes: 28.08%
one success: 44.39%
two successes: 22.74%
three: 4.52%
four: 0.28%
sum: 100.01% (<- It's called rounding error and it's why you use the calculated values not the recorded values for further calculations.)


Now, in telling you that processing {3d6,d8,4d12} > 12 (>=13 in output terms) took ~4:30.0, you're probably thinking, "Why don't you just use recursion? Starting with a base of {2d4} to {2d12}, keeping track of which combinations are exact pairings (d1+d2=TN) and the number of successes for each, when you add a die, all you need to do is see how adding a die affect the remainder, then keep track of that." To which I reply, "That might actually work. It would definitely use a lot of memory."
Getting me free admission into gaming conventions for a decade
Reply


Messages In This Thread
RE: What is _wrong_ with Python? - by Kersus - 10-31-2016, 01:00 PM
RE: What is _wrong_ with Python? - by Kersus - 11-03-2016, 03:56 PM
RE: What is _wrong_ with Python? - by Oedipussy Rex - 11-06-2016, 07:17 PM

Forum Jump:


Users browsing this thread: 2 Guest(s)