Jump to content

  • Log In with Google      Sign In   
  • Create Account


Making smart-seeming NPCs


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
21 replies to this topic

#1 jefferytitan   Members   -  Reputation: 1584

Like
1Likes
Like

Posted 16 September 2012 - 12:57 AM

Hi all,

I was just pondering on what aspects of a humanoid NPC make them seem smart/dumb. Personally I find that the moment an NPC loses believeability I stop treating them like a character and start treating them like an obstacle, a puzzle or a resource to be mined. It also becomes frustrating because I tend to lose my suspension of disbelief. What aspects do you think make the most difference? I have a few examples below:
  • Bad pathfinding
  • Lack obvious abilities, e.g. climbing stairs or fighting
  • "Forget" that they know you
  • Completely predictable
  • Repeatedly fall for the same moves
  • Bad/no gaze tracking, including talking to where you were when you walk away
  • Lack of context, e.g. will talk to you about the weather when in danger
  • Keep to script even when it makes no sense, e.g. talking to a dead comrade
Look forward to hearing your responses.

JT

Sponsor:

#2 jbadams   Senior Staff   -  Reputation: 16978

Like
2Likes
Like

Posted 16 September 2012 - 01:18 AM

A big one for me is repeating the same canned phrases too often, especially if those phrases are shared by multiple characters.

A lot of this comes down to simply adding more content to the game, or designing systems such that the content can be varied slightly and used only when it is appropriate to do so.

I'm not sure if this is really a question for the AI forum -- although it involves both NPCs and path-finding, it seems more of a design topic -- but as I'm not sure at this point I'll leave it here for now and the AI forum mod can move it if appropriate.

#3 jefferytitan   Members   -  Reputation: 1584

Like
0Likes
Like

Posted 16 September 2012 - 01:23 AM

I was unsure too. I could see the Game Design people batting it back here. Posted Image However I judged that it would touch on enough technical topics to fit here.

#4 IADaveMark   Moderators   -  Reputation: 2299

Like
0Likes
Like

Posted 16 September 2012 - 08:42 AM

Designers can come up with all sorts of things on their wish list... that's not the problem. The issue becomes how implementable are these wishes and, of course, how do we do it?

Let's leave it here for now.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#5 3DModelerMan   Members   -  Reputation: 924

Like
1Likes
Like

Posted 16 September 2012 - 12:33 PM

This article had really good information. It's applied to open world NPCs but I don't see why you couldn't learn from it for other genres.
http://gamasutra.com/view/news/174231/5_tips_for_making_more_believable_open_world_cities.php#.UFYbG41lRX8

#6 jefferytitan   Members   -  Reputation: 1584

Like
0Likes
Like

Posted 16 September 2012 - 03:41 PM

Dave, I'm a bit astonished at your reply. What I heard was "there's a bunch of tools in the toolbox, but let's not discuss what any of those tools are or how easy they are to use". You have been in the industry a long time. I have not. I literally don't know what half the tools are. I only read about gaze tracking quite recently. I could ask game designers to dream up something random that they want, but that would be ignoring (what I hope is) a wealth of existing techniques. Bang for buck I'd rather look into existing fields than strike out alone.

#7 IADaveMark   Moderators   -  Reputation: 2299

Like
0Likes
Like

Posted 16 September 2012 - 05:33 PM

Dave, I'm a bit astonished at your reply. What I heard was "there's a bunch of tools in the toolbox, but let's not discuss what any of those tools are or how easy they are to use". You have been in the industry a long time. I have not. I literally don't know what half the tools are. I only read about gaze tracking quite recently. I could ask game designers to dream up something random that they want, but that would be ignoring (what I hope is) a wealth of existing techniques. Bang for buck I'd rather look into existing fields than strike out alone.


You completely misread/misinterpreted my reply. The discussion was whether or not we should kick this thread over to the design forum or leave it here. Reread my reply in that context.

Designers can come up with all sorts of things on their wish list... that's not the problem. The issue becomes how implementable are these wishes and, of course, how do we do it?
Let's leave it here for now.


Makes a little more sense now, eh?
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#8 jbadams   Senior Staff   -  Reputation: 16978

Like
0Likes
Like

Posted 16 September 2012 - 05:34 PM

Dave, I'm a bit astonished at your reply. What I heard was "there's a bunch of tools in the toolbox, but let's not discuss what any of those tools are or how easy they are to use".

I think you might have interpreted Dave saying "let's leave it there" as dismissing the topic, but I believe he was responding to me and electing to keep the topic here in the AI forum rather than moving it to game design.

I think it might currently be a bit open-ended though: it's hard to suggest appropriate techniques when such a wide variety of problems are being discussed all together - it might help to choose and focus on one problem at a time.

#9 jefferytitan   Members   -  Reputation: 1584

Like
0Likes
Like

Posted 16 September 2012 - 05:49 PM

Apologies, I did indeed misinterpret Dave's statement. I thought it was directed at me.

Let me rephrase the question: What techniques are there, and what is the bang for buck? I think there's no need to drill down into the individual details (although any linked papers would be appreciated). If I don't understand the details I can post a more specific question.

Thanks.

#10 IADaveMark   Moderators   -  Reputation: 2299

Like
0Likes
Like

Posted 17 September 2012 - 09:57 AM

Each of the bullets you mentioned in the OP has many different solutions to them. Without writing a treatise on the entire subject, it is a little hard to handle.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#11 Steve_Segreto   Crossbones+   -  Reputation: 1459

Like
1Likes
Like

Posted 17 September 2012 - 10:31 AM

This is a great topic ... pathfinding is the most obvious and mathematical problem to solve, but even with 100% perfect pathfinding, AI doesn't seem to improve considerably, especially in the face of the other problems that the OP posted.

I was just recently tinkering with Skyrim again and one thing that breaks immersion for me is when I'm in someone's house, they are sitting down and talking to me about the main plot line and other residents of the house wander around spouting their pre-canned responses.

Another immersion break is when someone is talking and I'm obviously not listening, because I'm running around jumping on the tops of their tables and counters throwing all their objects on the floor or bumping into them to try to push them down stairs. Its not aggression by Skyrim's definition because I haven't drawn my sword and taken a swing at anyone.

And a final gripe is the simple binary definition of "theft" that Skyrim has. I enter an Inn or a quest NPC's house and simply pick up an item from a counter or table (maybe accidentally or just to move it or get a better look at it) and suddenly I'm labelled a thief and immediately attacked :)

#12 Telcontar   Members   -  Reputation: 856

Like
1Likes
Like

Posted 17 September 2012 - 11:46 AM

It may be helpful to break these up into actual logic problems (pathfinding, learning from experience, etc) and more cosmetic effects, such as gaze tracking. There are many games in which gaze tracking has no meaning. The idle chatter problems mentioned (such as talking about weather when fighting) might fall a bit under both, though.

In fact, as far as the problem goes, I think I would approach it by thinking about it first from action-only perspective. That is, I will not be worrying about immersion-only effects like chatter, gaze tracking, or variable dialogue. Unless we are talking specifically about Skyrim or other Elder Scrolls games!

One of the primary drawbacks of many games for me is when I start seeing discrete "types" in my enemies, and then am able to easily exploit this knowledge. Once I've played enough to be able to tell what AI scheme an enemy has - and thus predict exactly what they'll do under any circumstances - the experience starts to fall apart for me.

I Create Games to Help Tell Stories | Writing Blog


#13 adam4813   Members   -  Reputation: 655

Like
0Likes
Like

Posted 17 September 2012 - 12:08 PM

One way to make pathfinding a tad more "real" IMO is that when paths change, the NPC doesn't automatically know the new best route. Unless they can see ahead that the path has changed, why should they do a path check?

#14 IADaveMark   Moderators   -  Reputation: 2299

Like
2Likes
Like

Posted 17 September 2012 - 01:54 PM

I was just recently tinkering with Skyrim again and one thing that breaks immersion for me is when I'm in someone's house, they are sitting down and talking to me about the main plot line and other residents of the house wander around spouting their pre-canned responses.

Another immersion break is when someone is talking and I'm obviously not listening, because I'm running around jumping on the tops of their tables and counters throwing all their objects on the floor or bumping into them to try to push them down stairs. Its not aggression by Skyrim's definition because I haven't drawn my sword and taken a swing at anyone.


http://intrinsicalgorithm.com/post-playem/2011/12/skyrim-pardon-the-interruption/

And a final gripe is the simple binary definition of "theft" that Skyrim has. I enter an Inn or a quest NPC's house and simply pick up an item from a counter or table (maybe accidentally or just to move it or get a better look at it) and suddenly I'm labelled a thief and immediately attacked Posted Image


http://intrinsicalgorithm.com/IAonAI/2011/11/we-cant-think-of-everything/
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#15 IADaveMark   Moderators   -  Reputation: 2299

Like
0Likes
Like

Posted 17 September 2012 - 01:56 PM

One way to make pathfinding a tad more "real" IMO is that when paths change, the NPC doesn't automatically know the new best route. Unless they can see ahead that the path has changed, why should they do a path check?

While I agree with you in principle, that's actually not quite a clear as one would think. Many players gripe that an agent will continue on a path even when it is "obviously no longer valid." Players have a hard time separating out their own knowledge of the world from that of the agent.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#16 adam4813   Members   -  Reputation: 655

Like
0Likes
Like

Posted 17 September 2012 - 02:59 PM

While I agree with you in principle, that's actually not quite a clear as one would think. Many players gripe that an agent will continue on a path even when it is "obviously no longer valid." Players have a hard time separating out their own knowledge of the world from that of the agent.


Good point. As mentioned though I was hinting at more "real" and not smarter Posted Image.

#17 IADaveMark   Moderators   -  Reputation: 2299

Like
0Likes
Like

Posted 17 September 2012 - 04:29 PM


While I agree with you in principle, that's actually not quite a clear as one would think. Many players gripe that an agent will continue on a path even when it is "obviously no longer valid." Players have a hard time separating out their own knowledge of the world from that of the agent.


Good point. As mentioned though I was hinting at more "real" and not smarter Posted Image.

Which is exactly the point of vast swaths of my book... solving a mathematical equation doesn't simulate what real people tend to do.
Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC

Professional consultant on game AI, mathematical modeling, simulation modeling
Co-advisor of the GDC AI Summit
Co-founder of the AI Game Programmers Guild
Author of the book, Behavioral Mathematics for Game AI

Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

#18 jefferytitan   Members   -  Reputation: 1584

Like
0Likes
Like

Posted 17 September 2012 - 10:15 PM

I have a few thoughts on some of the Skyrim-style bugs. I'm just spit-balling here, so there may be better techniques or massive flaws, but here goes:
  • Trust - trust can be earned or lost various traditional ways. Also if a crime occurs while an NPC isn't present, they will apportion blame proportional to existing distrust of the major suspects (e.g. people seen in the vicinity of the crime shortly before or after). Trust/distrust will slowly decrease over time to x% of the maximum historical value.
  • Aggression - will have a range of values. These can be expressed in ways such as rudeness, refusal to talk, refusal to trade, non-lethal fighting or lethal fighting. Causing aggression in a neutral/good character could be considered a minor crime.
  • Personal space - NPCs try to maintain personal space. A non-trusted party (or one already aggressive towards) invading their personal space will increase aggression.
  • Situational awareness - NPCs try to maintain sufficient information to meet their goals. For example, if expecting combat they will seek a good viewpoint to spot enemies. If a shop owner they would try to keep an eye on their goods, especially when untrustworthy people are around. There would be some measure such as the value of an area vs how long since it was last viewed. If they are unable to fulfil this their aggression would go up (a little, with capped increase). This would need to be balanced against goal seeking.
How would this help? Well, as Dave Mark indicated, unless there's a "remove bucket from head" action, it won't fix everything. But what would it achieve? Well, you approach shopkeeper A with the bucket. They try to maintain their personal space. You forcibly invade their personal space, causing some aggression. The bucket reduces situational awareness. Over time this increases their aggression more. Shopkeeper B isn't aware that putting a bucket over a head is a bad thing, but senses the growing aggression of shopkeeper A and partly blames you (and potentially others) due to proximity. You are probably blamed more than others because invading A's personal space reduced trust in you. Bucketing B would be harder because of the aggression and distrust. But say you achieve it. Then you steal goods. Hoorah. But when you take the buckets off, both shopkeepers are aggressive, the losses will be noted and partially attributed to you, and a fight or refusal to serve may ensue.

Is this bullet-proof? Heck no. If your chosen role in life is to de-bucket bucketed shopkeepers, you're going to get a lot of flak. And I'm sure many other bad behaviours could spring from it. But is it worth investigating? And if not, what is?

#19 MrDaaark   Members   -  Reputation: 3535

Like
1Likes
Like

Posted 17 September 2012 - 11:21 PM

The problem with some of the things in the first post is that a lot of things are queued up, and then they go down the list and act on every action item in their list. The dead NPC was alive and a valid object when the action was queued up, but somewhere along the line they died, or became invalid. You have to draw the line somewhere, and you can't have an infinite loop of validity checks.

A lot of games run on scripts now that fire off when their triggers are toggled, but all these scripts and events are only self aware, and have no idea that it is not an appropriate time for them to be playing. This happens in games like Red Dead Redemption, or Skyrim.

A lot of RPG NPC characters try to do way too much these days anyways, and they end up as an annoyance instead of having a good effect on game mechanics. They just need to stand behind a counter and talk. They don't need to sleep, wander around the town square, go to the tavern, etc... If I walk in at midnight, just have him say a line about how I woke him up or whatever. In Skyrim they are either out on errands, or stumbling around their shops like drunks and knocking everything over due to an over zealous physic system. Everything they do other than standing behind their counter and selling me stuff is counter productive and lessens the experience.

Path finding is a flawed concept. Go stand around in a crowded public place and watch how well actual living creatures are able to path find. We are too distracted with whatever else is on our minds or smart phone screens. Even animals bump into or walk over each other! But when NPCs in a game do this, we call it unrealistic.

Path finding in 3d spaces is very time consuming, and it's often done very crudely just to keep the game running at a good speed. Pathfinding functions will often give up if they are taking too long, and then try again in a second or two. You'll end up with a NPC running in place against a wall until then!

#20 Ashaman73   Crossbones+   -  Reputation: 6538

Like
1Likes
Like

Posted 18 September 2012 - 12:20 AM

Well, this is more of a game design view, or even art view, but I think that AI will suffer from the uncanny valley effect even more than art. Games like Skyrim have made (arguable) great progress in AI compared to games a decade ago, still many people think that it is bad or funny.

A game design approach to this problem is some kind of stylization. Think of zombies, they are dumb and the current state of AI is able to simulate them good enough to be believeable. An other game design approach is a rule based game. Communicate that the NPCs wil react or interact to certain rules and the player will be happy enough.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS