Advertisement

Practical solutions to the 'Dumb NPC' problem

Started by February 22, 2004 06:53 PM
46 comments, last by Kylotan 20 years, 11 months ago
When you talk about NPC''s saying the same thing, I''m not sure if you mean ''repeting the same phrase over and over'' or ''giving you the same information over and over''

In the case of giving the same information many times. I don''t really see it as a problem, unless the info is now obsolete in which case the database would mark it as obsolete and everyone would stop talking about it. You could even mark a piece of information as obsolete after the player has heard it too many times (although, I really don''t think that''s necessary)

The other issue, hearing exactly the same phrase over and over again can really grate, in a fingernail/blackboard kind of way. But the solution is rather simple as well. Simply have a wide variety of ways to say the same thing (Halo did this absolutely beautifully). Using the popular sick mother example (May she get well soon)-

the mother node could be represented by - Mother,Mom,One of [her/his] parents, Ma
The sick node by - not feeling well, not well, sick, ill, under the weather, bedridden

This will actully make a HUGE amount of difference as the player will be hearing things from
Lynda''s mother is not feeling well
to
One of Lynda''s parent''s is bedridden

Rumour has it that Halo took thousands of voice samples (although may of them are more or less the same thing in different forms) and the result is an extremely realistic-feeling depiction of both your allies and the bad guys.

Another game you might want to look at is deus Ex (Part one at least, haven''t played two yet) Even though it hasn''t got tons of NPC''s every one of them is doing his own thing, you can over hear conversations unrelated to you, Talk to stranger''s and they would either bore you with useless gist or brush you of (politely or brusquely). You had a notepad which was automaticaly updated with quests and potentially useful info (which you could add things to manually as well). You also had a complete log of all conversations and another for system messages like ''You picked up a crowbar'' or ''No room for shotgun in your inventory'' (Although I think the complete logs were limited to each stage). Shooting people often led to the whole crowd fleeing madly for a while (which meant you can''t talk to anyone for that period) and I was accidentally shot a civilian, and I couldn''t get him to talk to me no matter how long I waited.

The problem l;eft of course is the crowding. I think apart from the system limitations there''s also the possibility of overwhelming the player. E.g. the player is suposed to meet someone who would be waiting in front of the mall. When they get there, over twenty people are walking around doing stuff, it becomes a lot more stressful finding the one that''s waiting for you. Also in many RPG''s you''re encouraged to talk to as many people as possible becuase you never know where you might find useful info but if 80% of the people you try to talk to are useless to you will soon tire of talking to strangers and only talk to people central to your mission.

ie. if you are going to populate a game with many people who are unimportant to the player give him a clear way to decipher which ones might be useful to him.
Irl if you''re looking for a job, or something to eat, or want to find some history you know where to go for each of these and don''t start stoping people on the street in the hope one of them will start talking about what you want (Well, it might work like that in really small town without internet access though :-/)

---------------------------------------------------
There are two things he who seeks wisdom must understand...
Love... and Wudan!
---------------------------------------------------There are two things he who seeks wisdom must understand...Love... and Wudan!
This is a good point, thelurch. Gamers are trained to talk to about anyone they meet and ask all the questions they can. If we have many people wandering around they will surely get overwhelmed and feel bored by the "trash information". Educating people away from this behavior will be difficult - I know I always get the feeling I might miss something if I don''t talk even to the most useless NPC around.

Maybe gamers would not react that well to such cleverly designed artificial worlds as we think...?

------------------------------
There are only 10 kinds of people: those that understand binary and those that don''t.

------------------------------

There are only 10 kinds of people: those that understand binary and those that don't.

Advertisement
grbrg, the NPC-needs and emitter objects system was also how The Sims worked, I believe. On a simple level, it makes sense. But I don''t want to start moving into trying to simulate a world unless the simulation is the game. For instance, there''s almost no point me making NPCs have a hunger need and then creating food-supply emitter objects in a local inn or market or whatever. Why not just make sure the NPC eats once a day in the schedule, which is far simpler and will be just as effective in conveying the atmosphere in 99% of cases. You might also say it would make sense for predators to seek out food as well, but this would be easy to simulate with simple proximity checks. Ultima Online had most of this and then abandoned it because nobody noticed.

thelurch, you''re totally right; it''s a game and players want pertinent information to stand out. This is perhaps another reason for the majority of NPCs to have nothing of importance to say, except perhaps to be questioned on basic things (eg. directions). I''d like to be able to present the same info in many subtly different ways (based on generating various sentences as suggested) but not so much that you the true message differs. Also, a distilled version of any important info would go into your journal anyway. As for the crowding issue, this is where I think the scheduling system shows its worth again; you could ask about an NPC and be told, "Ah yes; I hear he''s usually in the tavern from 9pm". That gives you somewhere to start without losing the feeling of a crowded city.


Keep the ideas coming, guys! Any more stupid behaviours that you see in NPCs?

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
I haven''t read the whole thread, so pardon me if someone has mentioned this already, but one thing that bugs me about a lot of games is that if I go on a burglary spree there is really no reaction from NPCs. Shopkeepers don''t hire more guards, or get better locks. They don''t become more suspicious/unfriendly towards strangers (e.g. my PC).

I suppose this is another problem that the whole knowledge/rumor system could help address.
Since this is a very interesting topic, and I really like AI techniques in games, I have a suggestion: would anyone be interested in developing a small (very simple) program to test our suggestions? I''m thinking about a small application (or an applet) to try a few of our suggestions. If anyone is interested we could even make a world where people could log in and explore the NPC''s behavior...

It''s probably a bit too much for me alone, and it''s open ended in what we try out). So, is anyone interested in this?


------------------------------
There are only 10 kinds of people: those that understand binary and those that don''t.

------------------------------

There are only 10 kinds of people: those that understand binary and those that don't.

I''d like to see NPCs have meta-knowledge. That is, the player could pump an NPC for information regarding what a third party knows about a subject. "Does the sheriff know it was I who killed his brother?" Of course, this implies above-average AI - there''s no point in bothering with this unless NPC behavior is driven by such knowledge.

Along similar lines, if the player has his sights set on obtaining something and constantly asks around about it, word should have a chance of reaching the owner of the object, and assuming it''s the type of thing not normally gained through legal means, the owner might want to take preventive action.
Advertisement
quote:
Original post by grbrg
Since this is a very interesting topic, and I really like AI techniques in games, I have a suggestion: would anyone be interested in developing a small (very simple) program to test our suggestions? I''m thinking about a small application (or an applet) to try a few of our suggestions. If anyone is interested we could even make a world where people could log in and explore the NPC''s behavior...

It''s probably a bit too much for me alone, and it''s open ended in what we try out). So, is anyone interested in this?
I do have the interest of making a simple test program that demonstrates this. But, I am not interested in making the emitter system unless, like Kylotan said, we are making a simulation game. What I''d like to do is only up to the shared knowledge base (semantic net and different responses). We don''t have to include the online feature either, a simple console/text-based program is easier to debug and maintain.

But not right now, I already have a project.
Those of you with the time (and inclination) need to check out the following two games:

Gothic II
Arx Fatalis

The first addresses 90 percent of the problems Kylotan is talking about by constructing a living, breathing world for the player to explore. The second demonstrates how NPC scripting should be done. Neither is without its fair share of problems (most having to do with interface), but they are undeniably among the best RPG's ever made, at least from a mechanical standpoint.

alnite:
The best RPG in history is undoubtedly going to be a simulation at its core, with a "game" aspect built on top of that as an interface for players. I find more and more often that RPG'ers are looking for substance, which is something commercial developers sipmly cannot deliver (on time and under budget, anyway). I have a dream that the "ultimate RPG" will be open to the public, built and operated by thousands of fans, with little or no regulation --- not unlike the Internet. It's a beautiful dream.

Anyway, this principle of emitter objects (which was used extensively in The Sims) is not a bad idea, but I wouldn't bother unless you have destructable facilities (which itself is a great idea). Scripting has worked effectively in the past; I think it will work effectively in the future, although it does diminish replayability. But that's really a matter of how much work you're willing to put into it.

We have the technology. We just don't have the initiative.

[edited by - Tom on February 25, 2004 1:19:57 PM]

GDNet+. It's only $5 a month. You know you want it.

It would be fun to develop a rudimentry system like this, sadly I'm currently far to busy with mounting univeristy projects, to do any technical work on the idea.

Iron Chef Carnage:
Revelence is a tricky subject to simulate and solving it all comes down to the design. It could be possible to use relations and a weighting system to mimic revelence. You could assign a cause effect relation to certain predicate tuples. so that stranger -> sickness could be a cause effect relation, that the rumor predicate would use when determining a rumor. Or destruction -> sickness could also be relation. The wieghting system would then be used to assign values to the causes and effects when creating the rumor. NPC bias could be include to alter weights.
So if:
Destuction(temple) has a wieght of 50
Arrival(stranger) has a weight of 30
LocalProblem(Sickness(Villagers))) has weight of 90

Arrival->LocalProblem
Destuction->LocalProblem

Villager Billy Bob - Bias religion 1, Bias Strangers 2.5
Priest Father Joe - Bias religion 3, Bias Strangers .9

so when the player talks to the npc about whats happening around town, they get:

From Billy Bob:
Arrival(stranger)->LocalProblem(Sickness(Villagers))) = 75
Destruction(temple)->LocalProblem(Sickness(Villagers))) = 50

So Billy Bob would say "Ever since the stranger arrived people have been getting sick"

From Father Joe:
Arrival(stranger)->LocalProblem(Sickness(Villagers))) = 27
Destruction(temple)->LocalProblem(Sickness(Villagers))) = 150

So Father Joe would say "The sickness in the village is punishment for destroying the temple"

Thats how is could work in theory, but it still requires extensive and detailed design work

Tom:
providing links to other people sites isn't really useful unless the reader has played those games. So instead of those games solved these problems so well why not explain how to everyone?

-----------------------------------------------------
Writer, Programer, Cook, I'm a Jack of all Trades
Current Design project
Chaos Factor Design Document



[edited by - TechnoGoth on February 25, 2004 5:08:17 PM]
google for fluid analogy, check also the end of the pareidolia thread in the ai forum

key word: slipnet , hofstander

well i was force to drop off a little my system
however, for a dramatic oriated simulation i would use a subsomption system which hold the npc in order to synchronize/ build choregraphy around player''s act and making strong storyline around it despict the fact it is truly dinamic (also ggogle for the dramatica theory of story which is great and computer friendly )

for the npc mind, my design hold :
a semantics: the world representation (object and attribute within the world)
a topology : link between the semantics and hold the real knowledge of the npc
an axiomatic (belief: standard (satisfaction)/preference (pleasure) which cast emotion, emotion is use to trigger mood state and change weight of the topology)

this allow the npc to learn, because actually the system work like a cross of ann (dinamic weighted link) and frame base (neuron are frame)
the npc perceive through channel the world around them, and the memory is hold within the topology (the system could be expand in order that the system really learn and build is own dialect/world representation (google for "talking head" robot ai)

this is only for the appraisal system, the goal/need sys is already well known and use data from the appraisal
you could make very complex npc, by making feedback beetween the goal system and the appraisal (letting the goal be appraise and let the topology affect the cost of decision node)

i use a model of memory through topology which is not that expensive
actually it''s only a simple amelioration of raising/dating sim like princess maker and tokimeki memorial
in these game for ex the common model is to have a lovemeter and the character base on a fsm with hysteris gate
this mean that the value of lovemeter switch mood according to the state each state holding some switch case towards other state
most of these game have a linear set of mood towards the PC from disguting to love
the topology of the network combined with the lovemeter is the memory, we don''t hold each fact, but a state, a "context"
for ex a low level lovemeter mean that you have acting bad, we don''t have to know how but we know that you have done nasty things, the same goes with hi value, a single variable help keep track of the player''s action without effectively remembering it, could help to have a better management of memory (cross within the three system (agenda, semantic topology, profile topology build with emotion through "thermometers" variable)

here was a previous proposition for such a work

quote:

in order to npc react in a beleivable way, we need them appraise the player and build a model of him,
we don''t want super intelligent agent, but agent which are capable of emotional looking response.
in order to do so, we need the npc build belief about the player, according to his value and what he can see/know (but here we won''t discuss communication or any advence memory sys)
this suppose of course that we have a set of preference within the script of the npc to build this
the main objective is to build autonomous dramatique oriented agents

the objective of the topic is to find efficient way to build an appraisal system of the player

here is my proposition
(two question, do we need more/less, and how to appraise them practically (base on what)? any idea????)

friendliness:
how much the agent like/dislike the player

friendly:
how much the player respond to npc''s need

attraction:
how much the player please/displease the player

trustworthiness:
how much the agent trust/distrust the player

honorability:
how much the agent praise/blame the player

intemency:
how much the npc is affect by player''s behaviour

predictability:
how much the player is predictable by the npc

certainty:
how much the npc beleive in his belief about the player

trustworthiness in designing term mean what??
i have put it because it seems relevent but...

certainty affect the surprise emotion, and according to personnality some relation strategy could emerge according to this value
this is different from predictability because a low predictability is define as chaotic and the agent could firmly beleive that the player is chaotic then would not expect to much a desired response

the whole look like a diplomacy engine, and i think we can steal a lot from work about diplomatic ai, but here it''s apply to emotion cost rather than mere capitalism
the funny things is about that in a diplomacy you would try to find the more efficient way and try to cut down through dilemna and conflict within the decision, where in ''dramatic'' social simulation it''s precisly what we want

contextual value:
benefice:
how much beneficial/threathening is the player in the context
dependency:
how much the player is needed/useful/obstacle to a goal


however depending of the importance of the npc or the game, the system could be symplified, all npc doesnot have to have full fctnality and the subsumption system help manage many (dramatic)group of npc in one shoot

the matter of building compelling story is now only a matter a of writting and structure (google for the dramatica theory)

>>>>>>>>>>>>>>>
be good
be evil
but do it WELL
>>>>>>>>>>>>>>>


>>>>>>>>>>>>>>>be goodbe evilbut do it WELL>>>>>>>>>>>>>>>

This topic is closed to new replies.

Advertisement