Game Development Reference
In-Depth Information
The solution lies in analyzing the approach that we use to generate our utility
scores. To do that, we need to take into account a number of different components.
We need to delve into what makes a score not only relevant, but usable. With that
in mind, we can tailor our system to make it useable and meaningful without open-
ing ourselves to pitfalls similar to the ones above.
A BSOLUTE VS . R ELATIVE W EIGHTS
We can put a lot of these issues into a better perspective by understanding the dif-
ference between types of measurements. There are three ways that we can refer to
values. Each has its advantages and pitfalls. We can see each of the three illustrated
in Figure 13.1. Note that the graph bars remain the same length in each of the three
examples. The values that we assign to those bars change, however, depending on
in what context we place them.
Absolute Weights
First, we can assign a concrete value to each bar. This approach is similar to a score
in a sporting event such as baseball or basketball. The value “is what it is.� This
method is useful when we truly want to know what the count of something is (like
the points in a game). For example, if we were calculating how many units we could
kill with four different strategies, we would want to know the actual number. We
could then use those values to determine absolute weights for each strategy.
We have already seen this idea in action. In Chapter 7, we used the actual val-
ues of the health and damage as absolute weights in our decision. We also used the
actual costs of building a barracks and a tower and the estimates of how much
damage they would take. Those were absolute weights as well. The numbers were
exactly what they represented. If we take 10 points of damage, we represent it as
“10� in our formulas.
In Figure 13.1 (left), we would determine that the rightmost bar (16) is the best
of the four. However, there is nothing precluding us from selecting a different op-
tion if something better comes along. For example, a different strategy could lead
us to destroy 17 units. Another could net 20. In fact, there is no real maximum for
this value. Another strategy at another time may allow us to kill 100. The results of
our utility function are only useful for determining which of the four strategies will
give the best results.
One drawback is that we have absolutely no context in which to judge a given
score. A frame of reference is required to interpret an absolute score. Unless we
have other scores to compare it to, we don't know whether a score is good or bad.
For instance, if I was to tell you that I achieved a score of 8,423,128 on an unnamed
 
Search WWH ::




Custom Search