Adaptive Virtual Game Worlds: Where to Begin?

Started by
89 comments, last by irbrian 20 years ago
I have several questions for the experts in this forum, which I''ll get to in a minute. First some background... For years I''ve been fascinated with the idea of developing a game involving a persistent virtual world whose makeup and events evolve through the actions of NPCs. Individual and Group relationships, motivations, and beliefs, all facilitate the process. Utlimately the player is placed within the virtual world, the state of which is dynamically defined (at least in part) by the behavior of the NPCs. A story develops -- it is not "generated" but simply occurs based on the behavior of all the agents working together. I''d like to summarize a scenario I wrote that kind of explains what I mean. It''s based in a virtual world with a traditional fantasy setting, and focuses on a small geographical area containing one village and a system of nearby caves. Consider that the world contains a male, human NPC (let''s call him John). John is one of roughly fifty NPCs that live active, believable lives in the village. Some are farmers, others are merchants, authority figures, etc. John, however, is none of these things. The pre-generation of John''s character defined him as greedy, lazy, opportunistic, sneaky, and cowardly, yet charismatic. With these tendencies, John has a habit of sneaking into other villagers'' houses to relieve them of their more precious belongings -- whatever John believes will be most valuable. Suspicion mounts among the other NPCs that John is the culprit. As the belief that John is guilty is shared among them, a group belief evolves that John must be confronted and, if he''s guilty, punished. John, fearing what may be done to him, packs up his relocated goods and moves off in the middle of the night to one of the nearby caves. It turns out that John has amassed a small but loyal group of pretty tough friends among the NPC villagers. These friends join him at the cave and vow to protect him. Enter the player. The NPC villagers are quite miffed about the whole event and would like to get even, but John has disappeared. The common belief is that John is hiding in the caves (i.e., since there''s no where else to go), but those who have sought him there have not returned, and rumors abound that John has hired superhuman thugs or even evil outerworldly beings to protect him. They want their stuff back, and they are especially interested in getting even, so they''re willing to offer a hefty reward to anyone who will confront John and return with their belongings. The player of course has a quest laid before him, with a decent challenge and reward. But the quest was 100% dynamic -- its existence is owed entirely to the behaviors of an NPC with a certain random grouping of characteristics and a specific set of environmental factors. So that''s the scenario.. it''s extreme and complex, and hardly perfect, but it illustrates the general concept. There are several things I''d like to know from all you experts. First, I''d like to be able to be able to use the proper terminologies to define the idea. Second, I''d like to understand what aspects of AI are most applicable -- does fuzzy logic come into play? Where, when, and why? Is the concept of neural networks applicable here? At what level -- the individual level? The group level? Third, has any research been done in this specific[/ia] area? Where can I go to find people who are interested in exploring similar ideas? Has anything remotely like this (even on a far simpler level) been attempted? As a final note, I want to make sure everyone understands that I''m not naive about this -- I realize it''s pretty far out there in terms of what is possible, let alone feasible, with today''s AI technologies. Even if it were practical for the right team, I expect it would take years to develop. I just need to start establishing some solid basic understanding of the concepts of AI as they relate to my particular application of interest. All input is appreciated. Thanks. **************************************** Brian Lacy ForeverDream Studios Comments? Questions? Curious? brian@foreverdreamstudios.com "I create. Therefore I am."
---------------------------Brian Lacy"I create. Therefore I am."
Advertisement
Well first of all I am no expert. I am an 18 year old high school senior with a crappy part time job and what are considered by my math and computer teachers to be "over developed programming and logic skills"; however, I hope you will still listen. To answer one of the questions in your post I have been considering an idea like this for quite some time. Obviously a game like this would be an MMORPG, but my implementation of it was not exactly all NPC based. I have plans on allowing NPC''s to have the same jobs and ranks in society as PC''s do (due to having the NPC and PC classes being nearly identical except the fact that a random event or two has to be added to the NPC''s and they more closely follow time rules like day and night.) I have begun working on an engine for this game, but being new to game and directx programming has made it a slow process. Currently I have a flashy particle engine, basic mesh and object loading and rendering, and a very simple terrain rendering model. If you need someone to brainstorm with about ideas for your NPC''s I would love to chat with you. Sorry bout the lengthy post
--------------------------------------------------------------------------Michael Schuld
I''ve got very little practical knowledge of AI, so take what I say with a grain of salt. Hope I can suppy some help at least, I''ll try answer what I can.

First of all, I think that what you want is very hard to accomplish. If it is even possible, I imagine it would be at a very basic level.

Is the concept of neural networks applicable here? At what level -- the individual level? The group level?
I don''t think neural networks are useful here, I''ve read some about them and played a bit with implementing them. You can get pretty impressive results, but; A) They don''t scale well. and B) Neural networks strength lie in pattern recognition, and I don''t see much pattern here.

Third, has any research been done in this specific area?
I would be surprised if not

Has anything remotely like this (even on a far simpler level) been attempted?
Can''t think of anything, but I doubt you''re the first on to think of the idea.


-Luctus
Statisticly seen, most things happens to other people.
[Mail]
-LuctusIn the beginning the Universe was created. This has made a lot of people very angry and been widely regarded as a bad move - Douglas Adams
First, don''t think about the tools needed yet... just think about the problem. Defining the problem specifically is at least 50% of the work! Solutions to these problems will dictate the algorithms used (somewhat) in your game.

Let''s look a little closer at what you have described and I''ll try and highlight a few instances where AI will play a part and those instances where some other form of programming or design will be needed...

quote:All subsequent quotes are of irbrian
Consider that the world contains a male, human NPC (let''s call him John). John is one of roughly fifty NPCs that live active, believable lives in the village. Some are farmers, others are merchants, authority figures, etc.


How will you determine what mix of roles a village will have? How will it depend on the size of the village? Will the presence of one archtype corelate with the presence or absence of other archtypes? (Design issues)


quote:John, however, is none of these things. The pre-generation of John''s character defined him as greedy, lazy, opportunistic, sneaky, and cowardly, yet charismatic.


How will these attributes affect the decisions made by John (AI issue)? How will the decisions of others, with respect to John, be affected by John''s attributes (design/AI issue)?

quote: With these tendencies, John has a habit of sneaking into other villagers'' houses to relieve them of their more precious belongings -- whatever John believes will be most valuable.


How does John select a house? How does John avoid detection? How does John know if the house is safe/empty? How does John evaluate the value of items? (AI issues)

quote:Suspicion mounts among the other NPCs that John is the culprit.


How? How did the other NPCs acquire information that lead them to this belief? How did they make the inference that John was the culprit? (AI issue)

quote: As the belief that John is guilty is shared among them


What is the mechanism for discourse and information sharing among NPCs? (design/AI issues)

quote:a group belief evolves that John must be confronted


Does each person hold this belief, or does each person belief everyone else believes this? (design/AI issue)

quote:if he''s guilty, punished.


How is guilt inferred? (AI issue)

quote:John, fearing what may be done to him


How will fear be implemented as an emotion that affects action? What other motivations will be open to NPCs? What other emotions will they have that might perturb these motivations? (design/AI issue)

quote:packs up his relocated goods and moves off in the middle of the night to one of the nearby caves.


How does John choose a cave? Why does he choose a cave over say buying a tent and pitching it in the open fields? (AI issue)

quote:It turns out that John has amassed a small but loyal group of pretty tough friends among the NPC villagers. These friends join him at the cave and vow to protect him.


How did John amass friends? What motivates them to follow John and protect him? What effect will this have on the friends and family of these friends who are left behind in town? (design/AI issue)

Sit down and think about a few of these issues and give them some more detailed thought. Take one of them - for instance emotions - and think about every aspect of emotion in this world. Who has them, what affects them, how do they affect agents, how might they be modelled? This will give you a better sense of the size of the problem and how you might go about breaking it into parts and tackling them.

Cheers,

Timkin
quote:Original post by irbrian
For years I''ve been fascinated with the idea of developing a game involving a persistent virtual world whose makeup and events evolve through the actions of NPCs. Individual and Group relationships, motivations, and beliefs, all facilitate the process. Utlimately the player is placed within the virtual world, the state of which is dynamically defined (at least in part) by the behavior of the NPCs. A story develops -- it is not "generated" but simply occurs based on the behavior of all the agents working together.


Yes, this is a fascinating idea that takes the simulation idea to its logical conclusion. What I wonder, though, is how much fun it would really be. It''s really your last sentence that I''m stuck on, "A story develops...".

Think about "The Hobbit". The story doesn''t open on an arbitrary day in the Shire- the author deliberately chose the day that Gandalf came to Bilbo''s door. If one were to drop in on the Shire on a day chosen at random, I think things would have been a lot less interesting: "Bilbo woke and had breakfast. After checking his supply of seed cakes, he had a second breakfast. Then he napped. Then he read his favorite book for the hundredth time." ...and so on.

Likewise, movies are interesting precisely because they are set up. An average day happening in real time would be pretty boring, even aboard the starship Enterprise.

-Predictor
http://will.dwinnell.com


Predictor; I once thought that it would be interesting to have a 2-tier approach to the problem you speak of. Basically it revolves around the fact that it might be easier to recognise the potential for a good story than to deliberately create a good one. So the first tier generates situations and events, much like the one in the first post. And the second tier sifts through these events to find the interesting ones, fit to become a story. It might even be possible to use some sort of search algorithm such as GAs to power this 2nd tier. Just an idea.

[ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost
Asking Questions | Organising code files | My stuff | Tiny XML | STLPort]
quote:Original post by mikeschuld
Obviously a game like this would be an MMORPG
Not necessarily, but yes, that''s the most likely use of this kind of scenario. The idea is to create a world, and a society, that behaves in a believable manner.
quote:My implementation of it was not exactly all NPC based. I have plans on allowing NPC''s to have the same jobs and ranks in society as PC''s do...
Again, the idea is that the world is populated by agents that act in a beliable manner. This applies in particular to NPCs, but the technology would have vast potential in all aspects of a virtual world if done properly.
quote:I have begun working on an engine for this game, but being new to game and directx programming has made it a slow process. Currently I have a flashy particle engine, basic mesh and object loading and rendering, and a very simple terrain rendering model. If you need someone to brainstorm with about ideas for your NPC''s I would love to chat with you.
The graphics engine sounds great. I''m not too interested in graphics at this stage though -- I figure that graphics are a pretty standard science these days, whereas AI and adaptive world technologies are primitive and mostly theoretical. I''m interested in developing games, but the stuff I''m talking about is more theory. And I''m always interested in discussing these ideas with anyone else who''s interested.
quote:Sorry bout the lengthy post
This is the most humorous element of your post, considering the novelette that opened this thread.

[More coming momentarily...]
---------------------------Brian Lacy"I create. Therefore I am."
quote:Original post by Luctus
First of all, I think that what you want is very hard to accomplish. If it is even possible, I imagine it would be at a very basic level.
Absolutely. Which is why I assert that I'm mostly interested in theory for now... implementation is hardly 'just around the corner.'
quote:I don't think neural networks are useful here, I've read some about them and played a bit with implementing them. You can get pretty impressive results, but; A) They don't scale well. and B) Neural networks strength lie in pattern recognition, and I don't see much pattern here.
I think pattern recognition would be very important on an individual level, especially when you consider the questions posed by Timkin. But on a larger scale, what you're saying makes sense. Thanks for your input here.
quote:I doubt you're the first on to think of the idea.
I'm sure you're right about that, but I'd be especially interested to know of any funded academic or commercial projects are focusing on this kind of technology.

[edited by - irbrian on March 18, 2004 6:51:57 PM]
---------------------------Brian Lacy"I create. Therefore I am."
quote:Original post by Timkin
First, don''t think about the tools needed yet... just think about the problem. Defining the problem specifically is at least 50% of the work! Solutions to these problems will dictate the algorithms used (somewhat) in your game.
Good advice.
quote:How will you determine what mix of roles a village will have?
How will it depend on the size of the village?
Will the presence of one archtype corelate with the presence or absence of other archtypes? (Design issues)
How will these attributes affect the decisions made by John (AI issue)?
How will the decisions of others, with respect to John, be affected by John''s attributes (design/AI issue)?
How does John select a house? How does John avoid detection?
How does John know if the house is safe/empty?
How does John evaluate the value of items? (AI issues)
How did the other NPCs acquire information that lead them to this belief?
How did they make the inference that John was the culprit? (AI issue)
What is the mechanism for discourse and information sharing among NPCs? (design/AI issues)
Does each person hold this belief, or does each person belief everyone else believes this? (design/AI issue)
How is guilt inferred? (AI issue)
How will fear be implemented as an emotion that affects action?
What other motivations will be open to NPCs?
What other emotions will they have that might perturb these motivations? (design/AI issue)
How does John choose a cave?
Why does he choose a cave over say buying a tent and pitching it in the open fields? (AI issue)
How did John amass friends?
What motivates them to follow John and protect him?
What effect will this have on the friends and family of these friends who are left behind in town? (design/AI issue)

Sit down and think about a few of these issues and give them some more detailed thought. Take one of them - for instance emotions - and think about every aspect of emotion in this world. Who has them, what affects them, how do they affect agents, how might they be modelled? This will give you a better sense of the size of the problem and how you might go about breaking it into parts and tackling them.
These are all excellent, thought-provoking questions, and frankly exactly the kind of thing I''m interested in. I''ve put a great deal of thought into most if not all of these issues, but it helps to have them stated bluntly like that; I''m better able to pinpoint specific issues and flesh out possible solutions. So if you''ve got any more, feel free to unleash ''em.
---------------------------Brian Lacy"I create. Therefore I am."
quote:Original post by Predictor Yes, this is a fascinating idea that takes the simulation idea to its logical conclusion. What I wonder, though, is how much fun it would really be. It''s really your last sentence that I''m stuck on, "A story develops...".
I understand what you''re saying. But what you''ve got to remember is that this is an interactive, persistent world we''re talking about. The player isn''t inserted at one particular point, the story doesn''t "begin" or "end" -- things just happen. The world is alive, doing its own thing, and that''s the whole point. In a MMOG, thirty players may walk through the village and discover that the scene is quite like what you described in your Hobbit scenario. They''d stop to buy weapons, food, or whatever, and move on to greater adventure -- dungeons that need conquering, wars that need fighting, guilds that need whipping into shape, whatever. The thirty-first player might walk into the very scenario I''ve described. But the scenario could be reversed -- the player could be the root cause of it all, and John (rather, a different John who''s much more noble and courageous) could be the hero! Otherwise life in the Shire goes on much as it always has, and no one''s the worse for it. There is always adventure to be had elsewhere.

Also, there are plenty of ways to "stir things up" as a designer. A truly dastardly incarnation of our NPC friend John could be conjured up by the designer, and thrown into the mix for this very purpose. A horde of Undead could be manually unleashed at the same time as the dynamic scenario -- just to make things more interesting. Whatever. The point is that the game and its agents respond semi-humanistically to the events and environment surrounding them. Whenever such a technology matures -- be it 10 years, 20 years, or 80 years, it should make for some truly fascinating scenarios... maybe even some the game designer would never have imagined.

****************************************

Brian Lacy
ForeverDream Studios

Comments? Questions? Curious?
brian@foreverdreamstudios.com

"I create. Therefore I am."
---------------------------Brian Lacy"I create. Therefore I am."

This topic is closed to new replies.

Advertisement