Game Development Reference
In-Depth Information
Measure Twice, Cut Once
It is generally a good idea, however, to build our process with this eventuality in
mind. If we are planning on using weighted randoms to select from among our
scored behaviors, we need to ensure that our scoring system will enable the process
of weighting. That is not to say that the scores themselves need to be weights, but
we need to design them in such a fashion that they are convertible.
To an extent, we helped ourselves in this fashion when we decided to set the
undesirable “we can't kill him with this weapon� selections to 1,000. This effectively
took those options off the table. If we had elected to use a smaller number such as
100, those options would have been scored much more favorably relative to the
other scores and would, therefore, have been weighted more highly. By changing
that value to 2,000, we would have achieved the opposite effect—minimizing the
probability of those options occurring even more than they already are.
Use the Right Tool for the Job
Additionally, remember that we discussed a number of techniques in Chapter 10 that
helped us convert one set of numbers to another. These tools are very powerful
when they are wielded by the hands of creativity. If we wanted to bias the Dude's
scores more toward the best possible selection, we could have used a coefficient—
or even an exponent —to decrease the weights of the less-preferable selections and
increase the weights of our preferred options.
Using the more advanced functions such as the logistic curve can provide interest-
ing results as well. In a situation where the “right answer� is in the middle of the group,
for example, we can use the logistic curve to weigh the other answers above and below
that midpoint in a more expressive fashion than the data may otherwise exhibit.
In other cases, which we didn't touch on here, we could have applied a random
value generated by a normal distribution to account for errors in observation, mea-
surement, or just plain differences in personality. Think of what the effect would be
if we had applied a small plus-or-minus x% value to any or all of the steps along the
way. This has the effect of “fuzzying up� variables from one iteration to the next so
that we don't arrive at the same outcome every time.
Most importantly, remember the principle of compartmentalized confidence.
If we know that we are eventually going to use the scores as weights, we can apply
these functions along the way to minimize the manipulation in that final step of
converting a score to a weight.
The possibilities are dizzying. And because the depth and breadth of human
behavior is just as immense, there are no final answers. To say it one final time in
this chapter, every solution is problem-specific .
The power is in your hands.
Search WWH ::




Custom Search