Smart NPC's

0 views
Skip to first unread message

Bozzie

unread,
Jan 17, 1996, 3:00:00 AM1/17/96
to
In article <kjfair-0901...@ngrh-34.rh.uchicago.edu>
kjf...@midway.uchicago.edu (Kenneth Jason Fair) writes:

> In article <4criqv$h...@news.lth.se>, m...@oberon.df.lth.se (Magnus Olsson) wrote:

> Hmmm. Maybe NPCs should get bored and wander off after a couple of
> questions. Or refuse to talk to you for a little while. You could have
> an attribute, say an "annoyance index", that would increase every time
> you asked that person a question but which would decay at a certain
> rate as time passes. Then if you bumped up over that index, the character
> would refuse to answer until you dropped back down. This could apply
> for programmed responses and "I don't know"s.

I believe that MoonMist had something simmilar. You had to appologize
in order to talk to the charachter again (although sometimes this didnt
work. People would be angry for things I didnt do. Or if i'd
appologize they'de say they weren't angry at me. (dunno if this is a
bug or I missed something).

> For example, from Witness (I'm making up the dialog):

Ohhh, Monica, my favorite NPC (Note, I'll be giving some spoilers for
Witness.

> Monica seems distressed.
> She remains silent, shaking her head slowly.
> A tear rolls down Monica's cheek.
> More tears appear in Monica's eyes.
> She glances left, then right. "I don't know anything about that,"
> she replies
> A sob escapes from Monica's lips.
> "Why do you keep asking me all these questions?" she shouts. "Just
> leave me alone!"
> Monica breaks down, sobbing. You'll have to wait until she calms
> down to ask her more questions.

And not only that, but she'd do a lot more too. She bluff, lie, have
goals that would change occasionally, looked out for you in order to be
able to return her gun. Buetiful. Almost makes up for the easness of
the game and the fact that there are only 3 charachters.

JMurphy42

unread,
Jan 19, 1996, 3:00:00 AM1/19/96
to
In article <4djgv6$f...@igor.rutgers.edu>, edh...@eden-backend.rutgers.edu
(Bozzie) writes:

>
>And not only that, but she'd do a lot more too. She bluff, lie, have
>goals that would change occasionally, looked out for you in order to be
>able to return her gun. Buetiful. Almost makes up for the easness of
>the game and the fact that there are only 3 charachters.
>
>

Easy? I had a rough time with Witness. (Ducks thrown objects)

Anyhow, a friend and I had a long phone discussion on simulated AI in
NPCs. We basically identified that for an NPC to look real:
- It has to interact with its surroundings as well as the player (though
not necessarily realistically)
- It has to respond to changes in its environment
- It has to have some sort of congruity in its actions.
We've touched on these in discussion. So, is there the possibility of
perhaps having
"goals" as attributes, with a library dedicated to it? I'll explain.
Let's take Joe from an earlier example. Say he'd have a very simple
goal-attribute called search. This search would be defined in the library
as giving the NPC a certain type of response to outside stimuli. In Joe's
case, perhaps, ignoring it. He would have a few given responses to outside
stimuli (Ask what he's looking for, say) as well as
actually _having_ something to look for, whether or not Joe can move from
room to
room, and what he does when he finds/is given the object.
That would be fairly simplistic, and I think it does the job quite well.
Further, multiple NPCs can have this same attribute (More than one,
actually) and, so long as what
they're looking for is different and they are allowed to move, will be
more or less indistinguishable from Joe. Although, like Eliza, he would
fall apart under close examination, adding a different attribute would
make him more believable.
Say, we create a frantic attribute, which would be little more than a
tendency toward going back into rooms already visited, not staying in a
room for more than two turns, and one or two responses to player actions.
Give an NPC search and frantic, and set the object looked-for to, say, car
keys (Cleverly hidden in the refrigerator) and this character would be
reasonably convincing. (At least, he would look like me in the morning)
The author would have to fine-tune the responses to each case (It
wouldn't do to have a famous Knight search for the Holy Grail, then have
the player find him looking under rocks outside the castle), but I think
that a few of these could provide a number of realistic stock characters
for a game. Comments?

Bysshe.

Bozzie

unread,
Jan 20, 1996, 3:00:00 AM1/20/96
to
In article <4do95a$h...@newsbf02.news.aol.com>
jmur...@aol.com (JMurphy42) writes:


>
> Easy? I had a rough time with Witness. (Ducks thrown objects)

Well so did I, but It was the first real game I played, I didn't know
what I could do and never figured I could hide. until I found out I
could do that I had only done 90% of the stuff in about 6 months,
(well, when all bunked together, about 30 hours of playing time) not
bad considering it took me a year to finish Hero's Quet (but then
again, recently it's only taken me 10 or 15 hours to finish most grphic
adventure games, like Dagger of Amon Ra, lost files of Sherlock Holmes,
Sam & Max, DoTT 2, etc.)



> Anyhow, a friend and I had a long phone discussion on simulated AI in
> NPCs. We basically identified that for an NPC to look real:

> - It has to interact with its surroundings as well as the player (though
> not necessarily realistically)

Actually, I'm not as sure of this. I think it doesn't have to interact
as *much* as the player or in as many different ways as the player, but
what it does do should be done as realistically as the charachter. (or
as realistically as can be done under the limitations of having no real
AI)

> - It has to respond to changes in its environment

Well, yeah, to those you'de expect it to. It should get an umbrella
when it rains. If a butler sees something a charachter dropped, it
should place it on a table or something or maybe they should be sent to
a lost and found.

> - It has to have some sort of congruity in its actions.

I'm not sure what this means exactly. (I first read it as continuity,
which a charachter should also have. Joe shouldn't stop looking unless
he's given up, found the photo, or is *say* murdered.

> We've touched on these in discussion. So, is there the possibility of
> perhaps having
> "goals" as attributes, with a library dedicated to it? I'll explain.

I understand perfectly. (I think ;-)) In order to simulate a human, we
have to give it emmotions and other variables (forgive me, I never
studied C (will next year) so this may seem inappropriate)

For example say we have an annoyed variable, or an at awe variable (for
when the hero does really well), or one for being happy or sad, etc.
This is especially useful in mystery games, where NPC's are generally a
lot more important then other genre's (for the most parts). I think
Moonmist had a few of these. As well as other attributes, for when an
NPC would go searching (albeit very badly and randomly)


> Let's take Joe from an earlier example. Say he'd have a very simple
> goal-attribute called search. This search would be defined in the library
> as giving the NPC a certain type of response to outside stimuli. In Joe's
> case, perhaps, ignoring it. He would have a few given responses to outside
> stimuli (Ask what he's looking for, say) as well as
> actually _having_ something to look for, whether or not Joe can move from
> room to
> room, and what he does when he finds/is given the object.

One thing I would like to know is HOw would he move around? Would it
be random? would he have a strategy? etc. Also, should he find what
he's looking for, or would that possibly ruin the game (slthough that
vcould be a set time limit). And you could also possibily *use* the
NPC. For example, say its a treasure hunt, and you need a key from the
top of a high bookcase, and James was 6 and a half feet and was looking
for the treasure too. You could show him the key, let him get thew key
and open it for you (although he may lock the door behind him) or may
alow you to go on hs sholders to split the treasure. And what if there
was a safe in the attic where Joe is looking for his picture. Is he
smart enough to go look for the key (or combination and smart enough to
know which it is) or would he continue to look for the photo, and if he
did continue and found a key would he try it and then continue looking
if it wasn't in the safe?
And of course, you have to make sure that all the charachters have an
equal cabability of intelligance (albeit exception like betty boop
empty head of suspect) in that they should all have goals and wants.
Dont read ahead if you havent read moonmist:

In moonmist, you cold always identify the villian as the one who
randommly looked for the prize, and the one who wouldn't follow you. a
big problem.
Also another problem is not having too many charachters. That's one
ofg the reason's I disliked suspect. In a mystery, for example, a good
round number is 4 or 5 suspects, and however many murdered people you
need (about 4 should be the limit). Now there are exceptions (how many
murders WERE there in the Laura Bow series?) but you should never have
10 charachters like that because there are too many charachters for the
game to be enjoyable, and instead you get a whole list of people in
each room. If you need to have many people, put them in different
rooms. also, have the suspects move different ways, in case someone
tries to follow them to find the killer (ie, follow everyone to see
everything the do and leave behind). Corruption did this well.

> Say, we create a frantic attribute, which would be little more than a
> tendency toward going back into rooms already visited, not staying in a
> room for more than two turns, and one or two responses to player actions.
> Give an NPC search and frantic, and set the object looked-for to, say, car
> keys (Cleverly hidden in the refrigerator) and this character would be
> reasonably convincing. (At least, he would look like me in the morning)
> The author would have to fine-tune the responses to each case (It
> wouldn't do to have a famous Knight search for the Holy Grail, then have
> the player find him looking under rocks outside the castle), but I think
> that a few of these could provide a number of realistic stock characters
> for a game. Comments?

Or how about An inquisitive npc curious when *you* do searching. And
just wondering, but does searching a room in an infocom game work
simmilar to this? (open everything, look, close everything)? not that
you ever *find* anything.
>
> Bysshe.

John Wood

unread,
Jan 21, 1996, 3:00:00 AM1/21/96
to
In article: <4do95a$h...@newsbf02.news.aol.com> jmur...@aol.com (JMurphy42) writes:
>
> Easy? I had a rough time with Witness. (Ducks thrown objects)

Us too. *Clunk!*

[Discussion of goals as attributes mostly snipped]


> Let's take Joe from an earlier example. Say he'd have a very simple
> goal-attribute called search. This search would be defined in the library
> as giving the NPC a certain type of response to outside stimuli. In Joe's
> case, perhaps, ignoring it. He would have a few given responses to outside
> stimuli (Ask what he's looking for, say) as well as
> actually _having_ something to look for, whether or not Joe can move from
> room to room, and what he does when he finds/is given the object.

Sounds promising, but it would be difficult to do well. The characters in
Moonmist who wandered from place to place looking for something were fun for
a while, but they didn't really do enough apart from that to maintain the
illusion.

You could have an array of target-objects (to keep the number of attributes
down): target-of search, target-of affection, target-of purchase, etc.
You would want to tailor text to an individual character, so it might be an
idea to create some fake actions to print the text.

> ASK DOCTOR ABOUT LAWNMOWER
The Doctor is far too busy looking for the frammistat to pay you any
attention.

> ASK BIFF ABOUT FRAMMISTAT
"Just get out of my face, wimpo - I gotta go get me bike keys".

> ASK MRS BUNCE ABOUT KEYS
"Oh, lawks - look, could you be a dear and help me find where I left
the rolling pin?"

Anyway, why not give it a go? I'll happily try it out for you when you've
written it 8-)*
--
John

JMurphy42

unread,
Jan 23, 1996, 3:00:00 AM1/23/96
to
In article <4drn4m$a...@igor.rutgers.edu>, edh...@eden-backend.rutgers.edu
(Bozzie) writes:

>
>For example say we have an annoyed variable, or an at awe variable (for
>when the hero does really well), or one for being happy or sad, etc.
>This is especially useful in mystery games, where NPC's are generally a
>lot more important then other genre's (for the most parts). I think
>Moonmist had a few of these. As well as other attributes, for when an
>NPC would go searching (albeit very badly and randomly)

Mystery games are, how shall I put it, a problem. (I agree, Moonmist did
very well with this; It's one of my favourite games) In most games, the
NPCs
can afford to be rather superficial, say the priest in Graham's example
game, Ruins. It serves a limited function, as a catalyst, and when the
player
gets frustrated (or amorous) it conveniently dies.
But in a mystery game the NPCs are important. Say, you wanted to do a
game
around Agatha Christie's "And Then There Were None". (Admittedly damn
near impossible) Each NPC would have pages and pages of code, at least.
My, ahem, "system" would probably ease the head-pounding agony of this,
but
would serve to make the characters less believable, since, at some point
in the
story, each character gets angry, and frightened, and several of them get
rather
homicidal.
With an attribute-based system, it's a matter of gaining and removing
attributes
to create composites, but the composites have to be simplistic. The
programming,
I have discovered, is not. Not by a longshot. As it is, it looks like I'll
have to
reprogram a number of verbs to get this idea to work properly.
In fact, at the moment, I'm considering a step down - a class-based
system, using
object classes and hierarchies of them. Which crops up a new problem.
Namely, is
it possible to change an object's class, by adding or subtracting
properties, at
run-time? I think that it's impossible, but I'm not sure.

>
>Or how about An inquisitive npc curious when *you* do searching. And
>just wondering, but does searching a room in an infocom game work
>simmilar to this? (open everything, look, close everything)? not that
>you ever *find* anything.
>

I don't think so, but it should be easy to implement. I'm thinking about
redefining the Search verb and then finding some way to let it determine
what objects it can open (In case something is secret).

Bysshe.

Reply all
Reply to author
Forward
0 new messages