Game Development Reference
In-Depth Information
Proximity to a leader
Proximity to an important location
Agent's “anger� level
If we were so inclined, we could measure each of the above criteria and build a
formula that takes it all in and spits out one single number. Needless to say, a for-
mula that took all of that into account in the appropriate manner would get fairly
unwieldy.
Alternatively, we could combine some of the above factors into intermediate
values that would then be utilized in constructing the final decision (Figure 3.8).
For instance, we could combine the agent's health and the enemy's weapon into a
value representing the risk that is presented to the agent. On the flip side of that, the
agent's weapon combined with the enemy's remaining health could be combined
into a measure of the threat to the enemy. These two values could then be combined
into an indication of the total threat balance between what the agent could receive
and dole out.
FIGURE 3.8 A hierarchy of factors can be combined in layers to eventually
arrive at a single decision. In this case, nine factors are combined and
recombined until the final “engagement decision� is calculated.
By analyzing the number of friends and foes, where the agent's leader is, and
the proximity to an important location (like a base), we could determine the morale
that the agent may have at the time. However, if we were to combine these factors
with the agent's anger level, we could arrive at a “perceived morale� that might rep-
resent how flying into a rage might color the agent's decision making. In the end,
we can funnel all of the above into one final “engagement decision.�
Search WWH ::




Custom Search