Game Development Reference
In-Depth Information
simplest methods concentrate on the impact of what directly happens to the AI.
Taking damage causes anger or fear. Winning the game causes joy. Restricting
emotions to direct inputs gives rise to a lack of depth in characters. If the AI has
more depth, it needs to respond emotionally to events in the world that hap-
pened to something else.
More sophisticated AIs, particularly AIs that have plans and goals, can evaluate
how events will affect their plans and goals and react with appropriate emotions
[Gratch00]. This makes intuitive sense to people. Consider two roommates
sharing their first apartment. The first roommate has a car, and the second one
occasionally borrows it. What kind of emotional responses do we get when
something goes wrong? ''What do you mean, it's no big deal that you got a flat
and they will come out and fix it tomorrow? Of course you're paying for it, but
you don't understand! I was going to drive to my girlfriend's tonight!'' The AI
had a plan in place to achieve a goal, and that plan has been ruined. This is a
perfect place for a negative emotion on the part of the AI. If the AI had a different
plan to achieve the same goal, it would have a much different emotional
response. ''It's a good thing she's picking me up tonight. They better have it fixed
by noon when I need to drive to work.'' AI that deals in plans and goals is briefly
touched upon in Chapter 10, ''Topics to Pursue from Here.'' As you study them,
keep in the back of your mind how to incorporate emotional modeling into the
AI. Writing an AI that voices its feelings using the spoken lines that illustrate this
paragraph remains a very hard problem, even for experts. The point here is not to
have an AI that speaks its feelings. The spoken text is used here as a vehicle to
convey the emotional response of the AI to events that affect the AI's plans. As we
have seen, modeling emotions is not particularly difficult. Modifying a planning
AI to help drive the emotional model is not a task for beginners, but it should
present far fewer challenges to an AI programmer experienced with planning AIs.
As we have seen, the core data needed to model emotions is the easy part. The
input and output systems carry more complexity. As you might expect, tuning
the system as a whole is critical. There are some general guidelines. The first is
that a handful of modeled emotions is enough. The range of 0 to þ 100 is also
enough. Finer gradations do not improve the system. The hard stop of þ 100 or
100 is also perfectly acceptable; people can only get so angry, and as long as they
do not have a stroke, more bad news will not make them any angrier. Less
obvious is that effects—both input and output—need not be linear. The effect of
the food need in The Sims is not linear. The difference in happiness between a fed
Sim and a very well fed Sim is very small, even if one carries a need of þ 10 and the
Search Nedrilad ::

Custom Search