Game Development Reference
In-Depth Information
Marginal utility represents the change in importance of something. Accordingly,
the factors that go into our agents' decision making may change in importance.
By taking into account not only the importance of something but the change in
importance, we can craft our agents with more realistic, dynamic decision-making
ability.
Plenty of examples can be invoked of times when a linear approach would look
inefficient or even silly compared to one that respects marginal utility. An example of
utility gone awry would be building units in a strategy game (Figure 8.4). When you
build your first military unit, that unit has a utility that may even be greater than its
value. (Remember the “deterrent effect� of the tower in Chapter 7?) After all, it is im-
portant to us to have something there to defend our city. However, as we build more
and more units, the marginal utility of each one diminishes. We could lose one and
not even really care. At some point, our build manager might want to say “enough is
enough� lest we end up with a ridiculously sized army that is an essay in overkill. If
we were to not take decreasing marginal utility into account, the build manager may
continue to crank out units assuming that each one is just as important as the first.
This becomes even more important if there are multiple uses for the same re-
sources. There is probably never a point where we could say that building another
soldier is not valuable. However, once our army is “big enough,� that is, the marginal
utility of an extra unit is negligible, the value of the resources that would have been
spent on that unit could be spent on something else that had a higher utility. That is,
as the importance of building a soldier decreases, it may look less important than
FIGURE 8.4 The first soldiers built are very important.
As we build more units, the marginal utility of each additional unit
decreases until we arrive at a point where we have “enough.�
Search WWH ::




Custom Search