[MUD-Dev] Expected value and standard deviation.

Kwon J. Ekstrom justice at softhome.net
Thu Sep 25 16:30:27 CEST 2003


Eamonn O'Brien wrote:
> Kwon J. Ekstrom wrote:

>> Most muds I know of (including my own) optimize this by
>> generating a range.

>> Give the format: xDy+z

>>     min = x+z
>>     max = (x*y)+z

>> At the very least:

>>     min = x
>>     max = (x*y)

>> This guaruntees a single random number.  Additionally it allows
>> the ever so popular dice format.

>  I sincerely doubt many muds do that. An optimization is a faster
>  means of achieving the same results, your method will change
>  completely the type of results you get. 2d6 is not the same as

Personally, I've worked on several of the branches of the Diku
codebase, and most of them used a similar system.  Quite possibly
because of the close affiliation.

Sure, using the same equation the outcome may be different, but
there's always the (much better imho) option of using different
equations and tweaking the input values.

>  1d11+1 (assuming you could find an 11 sided dice that is). The
>  odds of getting a 12 on 2d6 is 1 in 36, the odds of getting a 12
>  on 1d11+1 is 1 in 11. The whole point of having a dice range is
>  that the more dice you roll, the more your results will tend
>  towards an average roll.

>  It is possible to achieve the same results with 1 random number,
>  but I doubt it would be worthwhile unless you were rolling very
>  large numbers of dice at once. If you are happy to work that way
>  that is fine, but be aware that your optimization has totally
>  changed the odds of getting every single result, making all dice
>  rolls give a linear distribution and not the bell curve
>  distribution that you get with normal dice.

While I agree with these sentiments, I think that this can be
handled with the random number equation.  I've seen equations that
use the number of dice to control the distribution.  It may not be
100% correct, but it's close enough.

Granted it's a minor optimization, and unlikely to affect game
performance, but you also have to consider that a slightly more
complex algorithm is often cheaper than repeatedly applying a
simpler one.

Honestly, the linear distribution is fine with me because frankly,
it simplifies system design.

If each value has the same chance of appearing, it's a simple matter
to calculate the chance of a range being chosen.  I can state that I
want .01% of dice rolls to be critical hits with 1.5% to be critical
misses.

I think few players care about the random number distribution
(assuming it's not hindering their gameplay).  I've personally never
heard of a mud player mapping out the dice distribution.

Considering that game developers need to take it into account in
order to make good decisions, I'd rather KISS.

-- Kwon J. Ekstrom
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev



More information about the mud-dev-archive mailing list