Game Development Reference
In-Depth Information
Most distribution formulas are polite enough to give us either the number or
the percentage of occurrences for a given value of x. However, unlike using the
“dice-rolling� method, we can't turn the function back around and give us a
randomly selected x out of the distribution. This is a problem we will encounter
throughout the remainder of this chapter. We will discover how to turn a
distribution function into a random selection method in the next chapter.
U NEVEN D ISTRIBUTIONS
Another simple probability curve to create is an uneven distribution . While not
technically a recognized form of probability distribution, we can still find it useful.
In a way, it is a variant of the triangular distribution above, but with the c point
co-located at either a or b. Rather than use the triangular distribution method,
however, we can lean on the linear function we examined in the previous chapter:
the formula, y = m ( x ) + b where m is the slope of the line and b is the y-intercept.
The probability distribution that results from a linear distribution has very
simple but identifiable characteristics. First, we can easily determine the “more
likely� options compared to the “less likely� ones. In fact, due to the linear nature
of the formula, we can assert that as x moves in one direction, the probability y will
always move in one direction as well. In the distribution shown in Figure 11.16, for
example, as x increases, y always decreases. Not only does it always decrease, but it
does so at a constant rate. The decrease in y over the range x a to x a+1 is the same as
the decrease in y from x b to x b+1 .
FIGURE 11.16 A linear distribution is constructed from a simple
equation-based line such as those of the form y = m ( x ) + b
with which we all became so familiar with in school.
 
Search WWH ::




Custom Search