Advertisement

Emergent behaviour in NPCs - book/article recommendations

Started by January 29, 2010 03:01 PM
9 comments, last by IADaveMark 14 years, 9 months ago
I'm starting to consider making randomly generated NPCs who will fill out towns and be different each time the player visits to make the town seem busier and larger. I really want to get natural interactions between NPCs and any emergent behaviour would be an added bonus - I was wondering where to start, so any recommendations for relevant books or articles would be greatly appreciated.
A lot of that depends on what you know already. Care to fill us in?

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
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!"

Advertisement
sorry, yes, I sould have been specific. I've done a reasonable amount of work with State machines, some pathfinding, and an implementation of MinMax, as far as programming goes.
At this stage, programming details would be handy, but an overview might be better. I was thinking of giving each NPC a 'class', so that a beggar NPC would move out of the way of a nightwatchman, but move towards a priest in the hope of a hand-out. So an idea of the kind of assignments I'd need to make for each NPC.
Essentially, I want to try and simulate an interesting town environment - with lots of interaction between the NPCs, and would be willing to learn whatever programming techniques were required.
thanks
Quote: Original post by littlered
sorry, yes, I sould have been specific. I've done a reasonable amount of work with State machines, some pathfinding, and an implementation of MinMax, as far as programming goes.
At this stage, programming details would be handy, but an overview might be better. I was thinking of giving each NPC a 'class', so that a beggar NPC would move out of the way of a nightwatchman, but move towards a priest in the hope of a hand-out. So an idea of the kind of assignments I'd need to make for each NPC.
Essentially, I want to try and simulate an interesting town environment - with lots of interaction between the NPCs, and would be willing to learn whatever programming techniques were required.
thanks


That stuff should be data-driven :) I strongly recommend looking at Jeff Orkin's paper/presentation "Three States and a Plan". I believe there's an example of how a well-done planner can induce interesting emergent behavior. And anyhow, planners are something every AI programmer should look into.
Variances in personality of citizens can easily be done by randomly assigning priority weights to certain actions. These weights can be used as coefficients on certain types of behaviors. I gave a lecture on that at the GDC AI Summit last year. Not sure if the slides are up anywhere, though. And they wouldn't be much use without the lecture.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
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!"

@Steadtler - thanks, I'll see if I can track that down.

@InnocuousFox - again - thanks for the reply, what sort of actions would you look to include? Basic needs like hunger and sleep? Or would they be more personality driven (eg. a social person, a greedy person, a collector driven to search out the last remaining item for their collection?)
Or would they be more literal like performing a task assigned from the possible actions available to their job?
Advertisement
You want to record biases for certain types of actions. For example, think about the AI players in a strategy game. You can have aggressive ones, defensive ones, balanced ones, some that prefer many smaller units, others that prefer larger units. All of these preferences can be codified numerically. These scores can then be used to nudge the outcome of "what should I do next" decisions.

Now, apply things like that to individual NPCs. What are the actions that they could take? What are the factors that would be considered in deciding between those actions? What are ways that people could differ in their opinion of what factors are important? Encode those into coefficients that are stored in the NPC's object. Those are things that differentiate him from the guy next to him. A behavioral fingerprint, if you will.

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
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!"

just noticed that a Game Design thread is talking about exactly what I was after - mentioned a regression planner, so I'll look into that - thread here: http://www.gamedev.net/community/forums/topic.asp?topic_id=558422
Quote: Original post by InnocuousFox
What are the actions that they could take?

I think this is the crucial bit I need to think about - I need to define the majority of these first.
thanks again

@Steadtler

-sorry, is Regression planning the same as the Planners you mentioned?
I've only just connected the two for some reason...

This topic is closed to new replies.

Advertisement