News:

Forum changes: Editing of posts has been turned off until further notice.

Main Menu

Fun with math

Started by Valamir, May 02, 2005, 03:28:27 PM

Previous topic - Next topic

Valamir

So I was noodling around with some mechanics (I'll spare you the boring details) and hit upon an interesting relationship I thought some might find useful.

We're all familiar with the common progression of determining a value by taking a number and adding to it all previous numbers:  0, 0+1=1, 1+2=3, 3+3=6, 6+4=10, 10+5=15 etc.  This is frequently used in point buy systems to represent the increasing cost of higher attribute or skill levels and such, or spelll point costs for higher level spells, that sort of thing.

We're also all familiar with d10 dice pools where we roll against a target number and count each die that succeeds.  Using d10s makes it easy to estimate the expected number of successes from the roll (where "expected" means "average results over a sufficiently large number of trials).  Rolling 4d10 vs a target number of 4 or less would have an expected result of 1.6 success (4* 4/10).

Here's the neat part, one can establish a series of die pool vs target numbers whose expected value mirrors the progression outlined above.

Start with the rating that you want to apply the progression to (we'll call it "Levels" since that's what they often are).  Then determine the value of the progression at each level (we'll call that "Cost" since that's typically what the progression is used for).   The Cost at Level 1 will be 1, the Cost at Level 2 will be 3 (1+2) and so on until at Level 10 the cost is 55 (1+2+3+4+5+6+7+8+9+10).

Then create your dice pool series.  Set the number of d10s to roll equal to the Level and the Target Number (equal or less) equal to the Level+1.  So that the dice pool for Level 1 is 1d10@2, the dice pool for Level 2 is 2d10@3, and the dice pool for Level 10 is 10d10@11.  Target Numbers greater than 10 simply wrap around, so a Target Number of 11 is the same as a Target Number of 10 except a roll of 1 counts as 2 successes.

Determine your expected result from each die pool.  The expected result of 1d10@2 is .2  The expected result of 2d10@3 is .6  The expected result of 10d10@11 is 11.  

Now multiply the expected result by 5.  0.2x5 = 1, .6x5 = 3, and 11 x 5 equals 55.  Exactly the same as the "Cost" progression.  

The key relationship here is that the number of successes you're likely to get at Level 10 rolling 10d10@11 is exactly 55 times more than the number of successes you're likely to get at Level 1 rolling 1d10@2.  Just as the Cost at Level 10 is 55 times higher than the cost at Level 1.

You can then determine the equivelent "Cost" of other dice pool combinations.  For instance 4d10@4 has an expected value of 1.6 which is directly between Level 3 and 4.  x5 that dice Combination would have an equivelent Cost of 8.  14d10@6 has an expected value of 8.4.  x5 it would be an equivelent Cost of 42.

Note that you can reverse the target number and number of dice for the die pool series as well.  1d10@2 has the same expected value as 2d10@1, and 10d10@11 has the same expected value as 11d10@10.




Level      Cost        Dice Pool #1  EV         EVx5        Dice Pool #2       EV
1          1          1d10@2          0.2          1          2d10@1          0.2
2          3          2d10@3          0.6          3          3d10@2          0.6
3          6          3d10@4          1.2          6          4d10@3          1.2
4          10        4d10@5          2             10        5d10@4          2
5          15        5d10@6          3             15        6d10@5          3
6          21        6d10@7          4.2          21        7d10@6          4.2
7          28        7d10@8          5.6          28        8d10@7          5.6
8          36        8d10@9          7.2          36        9d10@8          7.2
9          45        9d10@10           9           45        10d10@9        9
10           55        10d10@11       11         55        11d10@10      11

Eric Provost

I had to read it twice to absorb it all, but it's really quite interesting.  Thanks for posting it.  

-Eric

Victor Gijsbers

Interesting. But this method does strange things with your standard deviation. If you roll 8d10@9, chances of getting 6, 7 or 8 successes are very high. If you roll 9d10@10, the probability of getting 9 successes is exactly 1.  As the pools move towards multiples of ten, the standard deviation of the rolls decreases; as they get farther away from it, it increases. 4d10@5 will have wildly varying results, whereas 9d10@10 has the same outcome every time.

This obviously doesn't invalidate your result, but it does show that it's a rather peculiar method of dice rolling. :)

Valamir

Quite.  

My solution is to start the wrap around effect at lower TN.

Say you set 8 as a threshold Target Number.  Any TN above 8 wraps around.

So 9d10@10 would wind up being thus:  Roll of 1-2 counts as 2 successes, roll of 3-8 counts as 1 success, roll of 9-10 counts as 0.  You still wind up with the exact same expected value, but now there is a positive Standard Deviation.

I'd have to crunch the numbers but I suspect that the lower you set that threshold TN, the greater Deviation you can get.  If you set the threshold to 5, than 10d10@11 would wind up being:  Roll of 1 counts as 3 successes, roll of 2-5 counts as 2 successes, roll of 6-10 counts as 0.

Victor Gijsbers

Very good, I suspect that would work well.

TonyLB

Cool... then you could give players mechanical control over the threshold number.  That would lead to some interesting tactics.
Just published: Capes
New Project:  Misery Bubblegum

Valamir

For interested parties, the numerical progression I describe above is a Triangular Function and what I labeled as "Cost" is in Mathematic terms a Triangular Number (also sometimes called an Additive Factorial.  A true factorial multiplies each number instead of adds).

There are lots of fun factoids about Triangular Numbers such as the sum of each adjacent pair of Triangular Numbers is a perfect square.

Mike Holmes

If you just count victories as equal to a roll when it's less than or equal to an increasing target number using one die, you get the same triangular progression.

Here's the results for percentile dice:

TN = Target Number
TP = Triangular Progression
EV = Expected Value

     TN      TP      EV
      1       1    0.01
      2       3    0.03
      3       6    0.06
      4      10     0.1
      5      15    0.15
      6      21    0.21
      7      28    0.28
      8      36    0.36
      9      45    0.45
     10      55    0.55
     11      66    0.66
     12      78    0.78
     13      91    0.91
     14     105    1.05
     15     120     1.2
     16     136    1.36
     17     153    1.53
     18     171    1.71
     19     190     1.9
     20     210     2.1
     21     231    2.31
     22     253    2.53
     23     276    2.76
     24     300       3
     25     325    3.25
     26     351    3.51
     27     378    3.78
     28     406    4.06
     29     435    4.35
     30     465    4.65
     31     496    4.96
     32     528    5.28
     33     561    5.61
     34     595    5.95
     35     630     6.3
     36     666    6.66
     37     703    7.03
     38     741    7.41
     39     780     7.8
     40     820     8.2
     41     861    8.61
     42     903    9.03
     43     946    9.46
     44     990     9.9
     45    1035   10.35
     46    1081   10.81
     47    1128   11.28
     48    1176   11.76
     49    1225   12.25
     50    1275   12.75
     51    1326   13.26
     52    1378   13.78
     53    1431   14.31
     54    1485   14.85
     55    1540    15.4
     56    1596   15.96
     57    1653   16.53
     58    1711   17.11
     59    1770    17.7
     60    1830    18.3
     61    1891   18.91
     62    1953   19.53
     63    2016   20.16
     64    2080    20.8
     65    2145   21.45
     66    2211   22.11
     67    2278   22.78
     68    2346   23.46
     69    2415   24.15
     70    2485   24.85
     71    2556   25.56
     72    2628   26.28
     73    2701   27.01
     74    2775   27.75
     75    2850    28.5
     76    2926   29.26
     77    3003   30.03
     78    3081   30.81
     79    3160    31.6
     80    3240    32.4
     81    3321   33.21
     82    3403   34.03
     83    3486   34.86
     84    3570    35.7
     85    3655   36.55
     86    3741   37.41
     87    3828   38.28
     88    3916   39.16
     89    4005   40.05
     90    4095   40.95
     91    4186   41.86
     92    4278   42.78
     93    4371   43.71
     94    4465   44.65
     95    4560    45.6
     96    4656   46.56
     97    4753   47.53
     98    4851   48.51
     99    4950    49.5
    100    5050    50.5


Mike
Member of Indie Netgaming
-Get your indie game fix online.

Bill Cook

(Runs screaming.) Don't step on me down here. I'm the moron in the shadow of your massive brains.

Ben Lehman

I know that this is a tangent but --

You do know that cost = value attribute buying results in characters with only one attribute, right?  The whole "all you need is a bigger hammer" thing and all.

yrs--
--Ben

Mike Holmes

Not sure what you're getting at, Ben. Assuming each attribute has limited breadth, then this sort of system gives a balanced incentive to have many lower abilities rather than one large one. While, yes, there's a tendency for players to spike fewer abilities, I find that this rarely results in just one single ability.

Let's take a hypothetical: using the D100 chart above, let's say that 50 is average, and that the player has 5500 points to spend on 4 abilities - more than enough to give the character 50 in everything and still have some points left over. Yes, the character can take Strong 100, but that leaves only 450 points to spread out over the other three abilities. Meaning he's going to have 16 or 17 if he balances them out.

So in this case the player is only allowed to spike one attribute at the strong expense of the others. Which balances the incentives. Basically the devil is in the details. Without seeing more of how the points can be spent, it's hard to make any generalization about what the system can do.

Mike
Member of Indie Netgaming
-Get your indie game fix online.

Eve

Sorry to crush on the result, but it does not sound that interesting to me - let me explain where it comes from.

Any sum 1+2+ ... + n = n * (n+1)/2 (n * the average)
You use for your roll n d10 @ n+1, which has expected value : n * (n+1)/10
(for numbers > 10 this is due to the wrapping around)
As you see, this is always 1/5 th of the sum or "Cost".

Much more interesting are the chances of getting a certain number of successes. This is partly covered in the standard deviation as Victor mentioned, however, the distribution is usually not symmetric. I think crushing some numbers would provide some nice insights.
Your strength is but an accident, arising from the weakness of others - Joseph Conrad, Heart of darkness

Valamir

I'm not sure what you mean by "interesting".

It is precisely the existance of that relationship that I was highlighting.  Thanks for the math proof for it.  

I'm sure game designers can think of numerous ways to use that relationship in a design that is interesting.

You could use the relationship to help balance cost vs. effectiveness in a die pool system so you know that if level 10 is 55 times the cost of level 1 that the die roll you get for it is also 55 times more effective than the die roll you get at level 1.

You can use it to do faux logrithmic math so that you can combine Level 2 at 2d10@3 with level 3 at 3d10@4 and know that you get level 5 at 5d10@6.

Eve

QuoteI'd have to crunch the numbers but I suspect that the lower you set that threshold TN, the greater Deviation you can get. If you set the threshold to 5, than 10d10@11 would wind up being: Roll of 1 counts as 3 successes, roll of 2-5 counts as 2 successes, roll of 6-10 counts as 0.

I think intermediate TN works best. For level 10: If you use TN=1, you can only roll, 0, 11, 22, 33, ..., 110 successes, with TN = 2 this will be 0, 5, 6, 10, 11, 12, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, (and all other numbers till 60)
Calculating chance distributions will be real number crushing, as even rather simple case such as TN = 2 gives several possibilities to get to a certain score (eg 30 = 5*6 and 6*5) intermediate TN is the worst to calculate - perhaps the nicest distribution? :)

The problem with wrapping around is that you can get really high scores with a lucky roll. In this same example, you have a more than 5 percent chance of rolling 8 or more numbers 5 or less, with a score of at least 16 (best case is 30, with a very small chance)
Your strength is but an accident, arising from the weakness of others - Joseph Conrad, Heart of darkness

Valamir

Yeah, that's probably right.  If you set the threshold TN for wrap around below 5 it probably does start decreasing the deviation again....although TN of 1 would should have the widest tails on the distribution curve.

Its also good to note that once you wrap you no longer are certain of having a normally distributed bell curve any more.  Since there is no negative success result the lowest roll you could get is 0.

In the 10d10@11 example with a threshold of 5 the expected value would be 11 but the maximum result would be a 30 (19 higher than 11).  The lowest result would be a 0 (only 11 lower than 11) so the curve is no longer symmetrical.