[Home] [Groups] - Message: [Prev in Group] [Next in Group]
28088: Re: [MUD-Dev] Expected value and standard deviation.
[Full Header] [Plain Text]
From: "Kwon J. Ekstrom" <justice@softhome.net>
Newsgroups: nu.kanga.list.mud-dev
Date: Fri, 05 Sep 2003 18:01:50 -0600
References: [1]
Organization: Kanga.Nu
Ben Chambers wrote:
> From: Zach Collins (Siege)
> -infinite to infinite. Furthermore, if you investigate the amount
> of random number generation necessary, using the normal
> distribution only requires 1 random number for every generation
> (actually 2 for the first, and then none for the second, and then
> 2 for the third... but average is 1). The dice require a number
> of random numbers equal to the number of dice. While not a
> significant bottleneck, it is still a potential optimization.
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.
-- Kwon J. Ekstrom
_______________________________________________
MUD-Dev mailing list
MUD-Dev@kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev