Game Development Reference
In-Depth Information
If we were in a situation where the distance to each goal was the same (Figure
7.13), then the time factor would not be important (assuming there are no other
factors to consider). We could make the decision based entirely on the relative
values (V) of the two goals. Likewise, if the values of the goals were the same, such
as in our cover point example, then we could rely solely on the distance compari-
son to make our decision. The situation is slightly more complicated when the
distances and the values of the goals are different.
FIGURE 7.13 If the distances to the goals are the same, the values of the
goals would be the deciding factor. On the other hand, if the values
of the goals are the same, the distances to them may be the deciding factor.
Unequal Times to Unequal Goals
Let's assume that our agent is deliberating between accomplishing goal A and goal
B (Figure 7.14). Each of those goals has a value (V) that we have calculated with
other criteria. In addition to this, let's assume that the agent is currently closer to
goal A. We now have a number of factors to consider. First, how much closer are
we to goal A than to goal B? Second, what is the difference in importance of accom-
plishing goal A vs. goal B? Third, and perhaps most evasively, what is the relative
importance of time compared to the values of the goals themselves?
Let's deal with the distance question first. For purposes of this argument, let's
assume there are no terrain issues, so that distance can be directly related to time.
It is not a difficult proposition to determine which distance is greater. The value we
will need to determine, however, is how much different the distances are. After all,
if the difference is negligible, there isn't much to lose by tackling the further goal.
Just for the sake of putting it out there, however, let's show the formula.
Search WWH ::




Custom Search