Game Development Reference
In-Depth Information
receive results that are theoretically uniformly distributed between 0 and some
maximum value. Certainly, we have made the point by now.
This sort of random selection is probably the most leaned on by game develop-
ers as well. Very often, programmers simply ask for a random number between two
values. If we have three options in a decision, it is perfectly legitimate for us to gen-
erate a three-possibility random number and select the associated option. Uniform
distributions of this sort are also delightfully extensible. If we add a fourth potential
option to our decision, it is a simple matter to change the random number call to
add a fourth result.
There are those who say that a person's greatest strength is also their greatest
weakness. Whether or not that holds true for people, it is definitely the case with
uniform distributions. Their biggest weakness is that they are… well… uniform.
There are plenty of phenomena that we can't model with them.
IMPORTANT DISTRIBUTION TERMS
A number of terms apply to distributions as a whole. While not directly related to
our endeavor, they are important to recognize nonetheless.
Cumulative distribution function (CDF): The CDF represents the sum of all
the probabilities equal to or less than a given value x. That is, rather than the
probability of x alone, it represents the probability that a random number will
be
x .
Discrete random variable: A probability distribution is considered discrete if
there are one or more places where the distribution function is not continuous.
For example, while there are probabilities of rolling a 3 or a 4 on a die, there
is no corresponding probability of rolling a 3.5.
Continuous random variable: A probability distribution is considered continu-
ous if its cumulative distribution function is continuous. A continuous function
is one that has a solution for all real numbers in the range specified.
Probability mass function (PMF): The probability that a discrete random
variable is equal to some value.
Probability density function (PDF): Because a continuous random variable
can be subdivided into infinitely small segments, the probability of any one
value is likewise infinitely small. The PDF expresses the probability that a
continuous random variable will occur within a specified range. As such, it is
based on integral calculus.
 
Search WWH ::




Custom Search