PDA

View Full Version : Math check on random musing



stoutstien
2022-10-15, 01:16 PM
I've been working on making some player options that get stronger as the adventure day progresses and just wanted to check my math. Say we have a feature that has stacking defensive buffs every time the target get hit by an attack or fails a ST.(Limited 1/round) They roll a D6 and for each new number they roll on that die it adds a level. By my math it would take ~15 rolls to get all 6 levels active. Does that check out?

Chances per roll to get a new value
100%>83%>66%>50%>33%>16%

rolls needed on average
1+ 6/5+ 6/4 + 6/3 + 6/2 + 6/1= 14.7 rolls.

OldTrees1
2022-10-15, 02:21 PM
stacking defensive buffs every time the target get hit by an attack or fails a ST.(Limited 1/round)
Let's call this chance to be hit or fail a ST at least once in a round: Pto proc

This state change only happens with a Pto proc chance per round so we can account for that by multiplying expected rounds by (1/Pto proc). I expect that to be nearly every round. If we assume 80% then it would be 5/4 * 14.7 = 18.375 rounds



Otherwise the math is correct. 6/6 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1 = 14.7
Greater detail: 1 + r + r^2 ... = 1/(1-r). The sum of 1/(1-(n/6)) from 0 to 5 = 14.7


Although if the stacking defensive buffs are decreasing Pto proc, then you would apply the multiplier with the corresponding value to each individual state change. You can probably get a good estimate by using P3 and P4 as lower and upper bounds for an estimate.
P06/6 + P16/5 + P26/4 + P36/3 + P46/2 + P56/1

stoutstien
2022-10-15, 07:33 PM
Let's call this chance to be hit or fail a ST at least once in a round: Pto proc

This state change only happens with a Pto proc chance per round so we can account for that by multiplying expected rounds by (1/Pto proc). I expect that to be nearly every round. If we assume 80% then it would be 5/4 * 14.7 = 18.375 rounds



Otherwise the math is correct. 6/6 + 6/5 + 6/4 + 6/3 + 6/2 + 6/1 = 14.7
Greater detail: 1 + r + r^2 ... = 1/(1-r). The sum of 1/(1-(n/6)) from 0 to 5 = 14.7


Although if the stacking defensive buffs are decreasing Pto proc, then you would apply the multiplier with the corresponding value to each individual state change. You can probably get a good estimate by using P3 and P4 as lower and upper bounds for an estimate.
P06/6 + P16/5 + P26/4 + P36/3 + P46/2 + P56/1

Ah. Yep I see that now. I was racking head today trying to remember how I got the math in the first place but I couldn't find my notes.
Might be a dead end but I'm going to toy with this.

OldTrees1
2022-10-15, 10:38 PM
Ah. Yep I see that now. I was racking head today trying to remember how I got the math in the first place but I couldn't find my notes.
Might be a dead end but I'm going to toy with this.

I don't think it is a dead end. You have lots of levers to pull and the base idea of it taking longer and longer makes sense.

stoutstien
2022-10-16, 06:33 AM
I don't think it is a dead end. You have lots of levers to pull and the base idea of it taking longer and longer makes sense.

Aye currently comparing it to the growing die. Instead of needing to get each value every layer just need to get at least +1 over the current level.
P(1)=1
P(2..6)=5/6 83%
P(3...6) =2/3 66%
P(4..6)=1/2 50%
P(5,6)=1/3 33%
P(6)= 1/6. 16%

Starts out the same for the first half of values but then it dips behind the previous option. Probably easier to track for some though. Might try 2D4.

OldTrees1
2022-10-16, 03:19 PM
Aye currently comparing it to the growing die. Instead of needing to get each value every layer just need to get at least +1 over the current level.
P(1)=1
P(2..6)=5/6 83%
P(3...6) =2/3 66%
P(4..6)=1/2 50%
P(5,6)=1/3 33%
P(6)= 1/6. 16%

Starts out the same for the first half of values but then it dips behind the previous option. Probably easier to track for some though. Might try 2D4.

Needing to roll higher than the current level is the same as asking to roll a value that has not already been counted.

Imagine the original setup and my first roll was a 5. I am now at level 1 and a 5 does not count. My die now reads {{5}, {1, 2, 3, 4, 6}}. In the new setup my first roll was a 5 and now I need to roll at least a 2. My die now reads {{1}, {2, 3, 4, 5, 6}}. At level 4 I have rolled 5,3,6,2. Now in the original setup my die reads {{2,3,5,6},{1,4}} and in the new setup my die reads {{1,2,3,4},{5,6}}. The probabilities (6/6, 5/6, 4/6, 3/6, 2/6, 1/6) are identical.

Although you are right it is easier to track "roll higher than current level" than it is to track "roll a number you have not rolled yet".


Now if you use 2d4 instead, then the bell curve changes the probabilities to (16/16, 15/16, 13/16, 10/16, 6/16, 3/16, 2/16, 1/16). This means the expected number of turns (before taking Pto proc into account) are 16/16 + 16/15 + 16/13 ... 16/1. The partial sums for levels 1-6 are 1, 2.07, 3.30, 4.90, 7.56, 12.90 in contrast to the previous 1, 2.2, 3.7, 5.7, 8.7, 14.7.

stoutstien
2022-10-16, 03:48 PM
Needing to roll higher than the current level is the same as asking to roll a value that has not already been counted.

Imagine the original setup and my first roll was a 5. I am now at level 1 and a 5 does not count. My die now reads {{5}, {1, 2, 3, 4, 6}}. In the new setup my first roll was a 5 and now I need to roll at least a 2. My die now reads {{1}, {2, 3, 4, 5, 6}}. At level 4 I have rolled 5,3,6,2. Now in the original setup my die reads {{2,3,5,6},{1,4}} and in the new setup my die reads {{1,2,3,4},{5,6}}. The probabilities (6/6, 5/6, 4/6, 3/6, 2/6, 1/6) are identical.

Although you are right it is easier to track "roll higher than current level" than it is to track "roll a number you have not rolled yet".


Now if you use 2d4 instead, then the bell curve changes the probabilities to (16/16, 15/16, 13/16, 10/16, 6/16, 3/16, 2/16, 1/16). This means the expected number of turns (before taking Pto proc into account) are 16/16 + 16/15 + 16/13 ... 16/1. The partial sums for levels 1-6 are 1, 2.07, 3.30, 4.90, 7.56, 12.90 in contrast to the previous 1, 2.2, 3.7, 5.7, 8.7, 14.7.

Oph. Brain farting in my old age.

One advantage with the first is i could 'map' different options rather than have a fixed order as they come online. With the 2d4 scheme i could have different levels based on the distribution. It would be more complex but i think it could be a fun twist on the at-will chassis.