Thursday, June 29, 2017

How long does a risk die last (on average)?

How long does a risk die last (on average)?
I wanted to know for my ongoing blog post series (http://dieheart.net/lr-mmz-01/).
TBH steps down the die type on a roll of 1-2. MM on a 1-3.
https://codepen.io/sophiabrandt/full/OgzqzL/

Credit goes to Stefan Matthias Aust for the original TBH version: https://codepen.io/eibaan/full/zZxQzY/
Mine is just a simple fork where I changed one line of code and the text.
https://codepen.io/sophiabrandt/full/OgzqzL/

9 comments:

  1. Ooh handy!
    Whidou​ made the calculations once and I have the table somewhere, but it's nice to have a place to try out non platonic dice.

    ReplyDelete
  2. Eric Nieudan Be wary when using this calculator with dice other than {4, 6, 8, 10, 12, 20} because the set of dice used impacts the result. For example, the number of uses of a dR20 is different with the sets {4, 6, 8, 10, 12, 20} and {4, 6, 8, 10, 12, 14, 16, 18, 20}, for obvious reasons.

    This calculator uses the set of all dice with less side than the first dR counted down two by two to a minimum of 4, except for dR20 which will skip 18, 16 and 14. Thus, dR11 will use the set {5, 7, 9, 11}, dR16 the set {4, 6, 8, 10, 12, 14, 16} and dR20 the set {4, 6, 8, 10, 12, 20}.

    This calculator is simulating a large number of rolls in order to get an a result. This is in my opinion a worse practise than getting to the solution through analytical reasoning. But well, it's good enough for this kind of usage is suppose.

    For anyone wondering, any dRX lasts on average X/3 times before being stepped down. Thus a dR4 will last on average 1.33 times. A dR6 will last 2 times before being stepped down to dR4, therefore you can get 3.33 uses out of it (Udr6 + Udr4). A dR8 will step down to dR6 after 2.67 uses, therefore it's equivalent to a total of 6 uses (UdR8 + Udr6 + UdR4) and so on.

    ReplyDelete
  3. Yep yep. It's not really the best method to get a reliable result but for eyeballing it should be enough.

    ReplyDelete
  4. Good to know! Thanks Whidou​. The things are like magic to me.
    So we'll have to wait for dR5s and dR16s in MM :)

    ReplyDelete
  5. Just to be clear this is the average number of times the dice exists, regardless of it's level.

    If you want to calculate the average number of times a die remains at that level before it drops it is a simple power series. [ 50% = (sides-3/sides)^(N-1); solve for N ]

    So each die will on average last the following rolls before it drops.

    d4: 1.5 uses
    d6: 2 uses
    d8: 2.475 uses
    d10: 2.943 uses
    d12: 3.409 uses
    d20: 5.265 uses

    Summing these values produces the number of times a dice can be rolled before it disappears entirely:

    d4: 1.5 uses (ie effectively 1 use because rolls are discrete)
    d6: 3.5 uses (ie 3 uses)
    d8: 5.97 uses (ie almost 6 uses)
    d10: 8.91 uses (ie almost 9 uses)
    d12: 12.31 uses (ie effectively 12 uses)
    d20: 17.58 uses (ie effectively 18 uses) [assuming a d20 drops to d12]

    [Note that the higher the number of sides the less precipitous the variation before and after the 50% mark. For example, for the d12 N=3 has a value 56% and N=4 has a value of 42%, which explains the variation with the Monte Carlo method used in the original post, especially as only 1000 die rolls were used.]

    For Eric's d5 and d16 the average number of uses it gets before it drops is:

    d5: 1.756 uses
    d16: 4.338 uses

    No idea where these would fit in a chain though. =8)

    ReplyDelete
  6. Ian Borchardt​ is a magician too! Thanks for pitching in, this is all very useful.

    ReplyDelete
  7. Eric Nieudan Break out the DCC dice!

    ReplyDelete