Sign in to follow this  
Theodore Fuhringer

Emergent Gameplay in an RPG Game World - Thoughts?

Recommended Posts

I've been thinking about this for a long time and I've decided to prototype some of these ideas to see how they work in reality. How would you handle this? What do you think of the following? How would you build an RPG gameworld that is truly dynamic? I'm not talking about simple NPC's with scripted schedules, I mean imagine a full-on world simulation running in the background behind your gameplay, developing the world, it's citizens, shifting economies, politics, etc. One approach I'd like to test is this. All NPC's and MOB's in the game are unscripted autonomous entities. During idle time the game loop cycles through checking all the entities states and updating their AI based on the current conditions. Entities have 3 "memories" 3 "directives" and 3 "needs". Each entity is "born" with memories of 1) Home: Where it eats and sleeps; 2) Stash: Where it keeps its belongings; 3) Who its friends (including family) are. Each entity is ascribed these directives; 1) Its Job [carpenter, wandering beast, robber]; 2) Its Primary Motivation [wealth, food, killing] 3) Its Group [Merchants, Necromancers, Canadians]. Each entity has needs; 1) Food; 2) Happiness [based on a formula job fulfillment + wealth + health + family etc.] 3) Stash [stored food, wealth, etc.] When a need is triggered, (eg. the Bear is hungry; Bob is sad because his wife died; Shemvit's stash is nearly empty of gold) the entity uses its stored "memories" and "directives" to try to satisfy it's need. When it can't satisfy it's need, a quest is generated Some quests are invisible. (eg. the Bear is hungry and can't find food near it's home so it goes after Bob's children.) Some quests are visible to the player (Bob is helpless from grief and wants the Bear killed. On completion, Bob will give the player something from his stash.) Some quests are not explicitly stated but evolve dynamically. (Shemvit steals Bob's stash while he's off chasing the Bear with you and if you want your reward you'll have to catch him.) On a larger scale, an entity with the job "Mayor" would have the responsibilty of building new buildings in his town. (Always kills me when a building gets destroyed in an RPG and no one fixes it or even notices it's gone.) The "Tax Collector" could make a circuit of the citizens collecting taxes, making himself a terrific target for bandits, which you could join... or kill. The "Preacher" would have the job of changing people's directives or improving their happiness, though sometimes his meddling will lead to problems that need to be solved (more quests!). Make sense? This is only one possible approach of several I've thought of but this one, I think, shows promise in that the "memories" are easily defined, being locations and labels of other entities. Each entity would need a list of "tasks" or functions it could try to satisfy it's current needs. I think some interesting situations might arise out of these dynamics. Thoughts? [Edited by - Theodore Fuhringer on September 26, 2008 2:09:25 PM]

Share this post


Link to post
Share on other sites
I'm working on something similar, so I'll raise two issues that I've come across:

1) How big is your world? If it's large, you probably won't be able to run every entity in the world in real time. So how will you handle things that are on the other side of the world?

2) Having realistic actions and needs makes it difficult to tweak your game. Balancing the game, or heck, just making a stable, functioning world is no mean feat.

I've been dreaming/designing such games for a very long time. Now that I finally have the time to try to implement one, it's starting to make sense why there are few if any games like this on the market. Oblivion was hyped with "Radiant AI", which was supposed to be something like you describe, but the released version had very little of that functionality remaining.

Share this post


Link to post
Share on other sites
Quote:
Original post by drakostar1) How big is your world? If it's large, you probably won't be able to run every entity in the world in real time. So how will you handle things that are on the other side of the world?

2) Having realistic actions and needs makes it difficult to tweak your game. Balancing the game, or heck, just making a stable, functioning world is no mean feat.


You're right. Two ways to handle the first problem. If your game is real-time, keep your world small. Even with a modest world you'd have to run the AI of offscreen entities on a non real-time basis. If it takes two or three seconds for an entity to figure out what to do next, well, it's not a FPS, it doesn't matter.

In my first prototype I had planned to use a turn based system so it won't really be a problem in the beginning.

As for the second problem, I think the solution would be to give the entities their freedom and then run the simulation repeatedly. When problems emerge, simply restrict the entities, rather than give them new abilities. I believe nerfing works. Or (and this would suck but it would probably work) you could set conditional boundaries on the gameworld. (eg. if 90% of the NPC's in the world are irretrievably unhappy, reset their happiness to it's starting level.) These boundaries could act like brakes on the economy, the entities levels etc.

Share this post


Link to post
Share on other sites
I think this is an interesting attempt to break down such a simulation conceptually.

Some of your ideas I can imagine being quite helpful in designing a system like this.

But maybe the real difficulty still lies in exactly how (on a micro rather than macro level) a character will decide to act in order to fulfill its' needs, based on its' desires and motivations

Share this post


Link to post
Share on other sites
Quote:
Oblivion was hyped with "Radiant AI", which was supposed to be something like you describe, but the released version had very little of that functionality remaining.


One of the reasons they took it out was their druggie code would result in the drug addicts killing off the drug dealer before you could get to them, because they figured out the best way of getting their fix. :)

Drawbacks of a simplistic ethic system. From what I recall, Oblivion had a single value that determined how likely they would kill/attack/steal, but very little (or no) risk analysis. I think that you have to have that "wow, am I going to die doing this?" that prevents people (AI) from really doing the stupid things.

Share this post


Link to post
Share on other sites
Quote:
Original post by dmoonfire
I think that you have to have that "wow, am I going to die doing this?" that prevents people (AI) from really doing the stupid things.

Something that nearly all AI, from RPG to FPS to RTS, suffer from. It's exactly this that makes AI seem so mechanical.

The police in the GTA series are a good random example. RAM, SMASH, SHOOT, AND KILL HIM, our existence is otherwise meaningless. They remind me of Matrix agents.

Share this post


Link to post
Share on other sites
I really like the idea, but I think I like it as programmer or as a designer...more than as a game player. One has to consider how much all of this ai coding really effects the game play.

For example: how different will it seem to the player when Bob gets consistently hungry with about the same regularity, stops working at the blacksmith and then goes to the pub (or whatever) to eat. VS a schedule with a slight +- to the GetDinner time?

For the player there may be no visible differences short of the occasional interesting random coincidence, even though there is all this code chugging away in the background all the time. just a thought.

Share this post


Link to post
Share on other sites
I really like this idea as well. And I think it has a lot of potential to bring your world to life. If you can come up with a good way to generate text based on someone's memories, directives and needs, then suddenly you have dynamic character chat. You can actually ask someone what's going on and they'll tell you, not just give some pre-scripted text. Of course, the tricky part is getting it to write natural language that sounds decent...

This works into an idea I had for a rumor engine. You can keep the world running without tracking every entity in every city. Just abstract away everything with a LOD algorithm. The city you're in is fully driven for all entities. Neighboring cities abstract away most of the fluff, so only general conditions and notable persons are simulated. Any cities farther than that are treated as single entities. Whenever two entities interact (whether people or cities) they share information based on local interest in the event, relative importance of events, distance and time involved. An eye witness can give you much clearer information than some guy in the next town over. Add in a small amount of error in the accuracy of information and now you have conflicting rumors.

Share this post


Link to post
Share on other sites
I have a game idea that's vaguely along these lines that I'd like to work on once I've completed something a bit simpler.

Quote:
1) How big is your world? If it's large, you probably won't be able to run every entity in the world in real time. So how will you handle things that are on the other side of the world?
An alternative to keeping the world deliberately small is to dynamically bind and group entities that will have zero impact in the present gameplay.

You want them to evolve and continue with their lives, so instead of running every individual's AI, you could instead run a simpler "city ai" that redistributes wealth in expected ways once a day, runs realistic events through tables(% chance of a bear attack per year per nearby adult bear, etc), and selects random(with weighting potential) inhabitants for events.

Thus while you're on the other side of the world, things that would have been possible with consistant individual AI remain possible through tabled scripts. The player doesn't need to see the bear eat Bob's children if they're in a different country, but in both cases when the player returns we discover Bob grieving and hating bears. Or even dead from trying to avenge his children twenty-three days later(% chance of a miserable citizen seeking redress).

When the player's proximity requires unbinding the individuals, each individual determines its likely location at the given time, and continues on with their lives...and ideally, the player is none the wiser that they've just been unpacked. (as there's a good chance some dramatic changes have occured since their last visit).

Quote:
I really like the idea, but I think I like it as programmer or as a designer...more than as a game player. One has to consider how much all of this ai coding really effects the game play.

For example: how different will it seem to the player when Bob gets consistently hungry with about the same regularity, stops working at the blacksmith and then goes to the pub (or whatever) to eat. VS a schedule with a slight +- to the GetDinner time?

For the player there may be no visible differences short of the occasional interesting random coincidence, even though there is all this code chugging away in the background all the time. just a thought.


I'd say the biggest bonus to gameplay comes with replayability. Say a player's first game occurs as above. The second time they play, Bob's children are eaten by bears shortly after meeting him, he sinks into depression and stops blacksmithing, prefering instead the life of a hermit. Or he drinks himself to death. Or he rouses five of his friends to help hunt the bear, and the six of them never ever return to the village*.

Point being, if you can change what drives or motivates an NPC, and that change is dependent largely on chance, your dynamic gameworld becomes different with every playthrough. To use the Oblivion example, you aren't doing the same scripted quests with each character. Voice acting would need to be sacrificed, but personally I'd be happy to make that exchange.

(( *Or, with procedurally-generated content, the second time the player starts a new game, there is no Bob, the smithy is on the other side of the village and manned by a young man called Jack, and there aren't any bears for a hundred miles. But that has more to do with generation, although worth mentioning because a dynamic world/AI would flourish more readily here than a scheduled/scripted one ))

Share this post


Link to post
Share on other sites
Quote:
Original post by ChaosFollowing I'd say the biggest bonus to gameplay comes with replayability.

Exactly. Your game world wouldn't have to be that big. The game wouldn't have to be that long. But every time you play it could be different and sometimes completely unexpected. We've all gotten used to certain quest cliches. This approach would create surprises for the player.

Share this post


Link to post
Share on other sites
Ive been toying with the idea of adding AI chatbot syle intelligence to RPG character dialogues in the past.

Even though they are not flawless, they are hard to predict sometimes and quite amusing. It would be an intresting novelty value for players to wander up to some key NPCs and in addition to receiving hard scripted story based info, have some potential for realtime questioning and interrogation, for side quest and amusment value.

I doubt ill ever implement it, but it does tickle my fancie.

Share this post


Link to post
Share on other sites
Writing a needs-based AI is not particularly difficult. Keeping an ecology of creatures following that AI in such a state as to keep the game playable is the interesting problem. At one extreme, you have positive feedback loops and the ecology collapses, much as real world ecologies collapse all the time. At the other extreme, your negative feedback loops are too strong and the world remains in a boring state of equilibrium; not conducive to the most interesting gameplay.

So, how would you build in some checks and balances so that the world's ecology doesn't ruin the game? What happens when the bear kills not only Bob's children but Bob himself? Who cares if he dies? Who cares if the tax collector dies? What does the Mayor do when he has no more buildings to build? What if all the bandits and bears end up in jail or zoos?

Also, you did mention 'unscripted', but have glossed over the idea that characters need jobs in order to have relevant goals and so on. Arguably, that would be scripted in the wider use of the term. You may not agree but it still highlights the idea that to get interesting behaviour, you still want to categorise an NPC into some quite specialised niches.

Finally, there's the general idea that this would create surprises and interest, but is that really the case? Or is it more likely that you end up offered one of the same four or five quests, just with subtly different parameters (eg. "Please {kill|capture} {XYZ} because he {killed ABC|stole PQR from me}. I will give you {DEF} as a reward.") that, while definitely changing the world in some small way, leave no lasting impression on anything?

[Edited by - Kylotan on September 21, 2008 7:25:24 AM]

Share this post


Link to post
Share on other sites
As a couple of people have mentioned already, it might be difficult for the player to actually realise how dynamic their world is, which could risk putting a lot of good work to waste. I think the way to overcome this might be for the player's actions to have far-reaching consequences on the game world (depending on the severity of the actions of course): a ripple effect. Say the player kills the tax man. Rather than just have a new tax man replace him and the standard law enforcement consequences, it should cause other things: the family of the tax man will suffer (and hate you), the town might be left without a tax man if no one else can do the job, the person who does take the job might leave a gap somewhere else- oh crap Fred's the taxman, we don't have a baker anymore...
OK so those are pretty lame consequences but you get what I mean- I think the whole purpose of a truly dynamic system shouldn't be that it just generates side-quests more randomly, but that the entire world can change drastically depending on the way the player plays the game.

cheers,
metal

Share this post


Link to post
Share on other sites
Quote:
Original post by metalmidgetI think the whole purpose of a truly dynamic system shouldn't be that it just generates side-quests more randomly, but that the entire world can change drastically depending on the way the player plays the game.

You are dead on metalmidget. The question is, how do we let the player change things exactly and how much leverage do we give them?

Share this post


Link to post
Share on other sites
Quote:
You are dead on metalmidget.

I agree. Metalmidget hit the nail on the head.

Creating a dynamic world is not about generating unscripted quests, but in allowing the player to change the world in a meaningful way.

Dynamic quests are not too difficult. You track certain entities (items, NPCs, etc), and then put them together in new ways (and introduce new entities too).

Quests are pretty arbitrary and if you use recurring entities, the player will feel that there is some secret connection going on in the background (when in fact it would be a random number generator creating links - I know this works as I have run a PnP RPG using it and the player thought I was a an amazing plot writer).

So dynamic plots are not to difficult (not easy, but not hard either).

Allowing the player to dynamically change the world, that is harder. First of all, to game the world it will have to be done through quests (yes, they could just kill random NPCs but we are looking at meaningful interactions here), but quests are essentially arbitrary.

I think what is needed is a way for the game to step in the arbitrary quest generation system and insert specific plot choices (ie world changing choices) for the player.

As an aside at the moment, I think I might need to explain what I am talking about when I mention "Plot".

In a non dynamic medium, plot is where the writer directs the flow of the medium to their own ends. In interactive medium (and I am coming form a pen and paper RPG angle here as well as a computer game medium), plot is not just directed by the designer. The player(s) must also be a part of the plot creation too.

Plot in this case is actually a dialogue between the player(s) and the designer. However, as designers, we have control over how much control the player(s) have over the plot. Traditionally, this has never been all that much.

In a dialogue, first one person speaks, then the other. In games, we have been doing this for other mechanics since games were invented. this is occurring even in computer games.

Players will make one set of inputs through a joystick or other input device, and the game responds. The player then enters new input based on the responses that the game makes...

...and so forth.

What we need is a way that the game and player can have this dialogue on a plot level, rather than the positioning level. The thought process is not that much different.

In the positioning dialogue, you have to track certain stats and states of the player (position as the most basic). In the Plot level, you need to track a different set of stats and states, but you still track them. But as with positioning, you also need to track the stats and states of None player characters too, and so it is with Plot as well.

Let me give an example:
In a positioning level, you might track the player and the positions of several NPC enemies. When the player moves towards a powerup, the NPCs respond by seeing which is closer and having that enemy move towards the player.

So here we have a dialogue that can occur between the player and the game. The player moves and the NPCs respond to that movement.

Now each NPC might have their own variations that give them different options for moving. One, might move as quickly as possible towards the players current position. Another might move towards the nearest intersection to the player. A Third might move towards the nearest powerup to the player and a fourth might move randomly (I have just roughly described PacMan by the way).

Now lets look at how this can be applied to Plot.

In an RPG where the player is interacting on a political level, they might be trying to move towards a particularly powerful NPC (the power pellet in pacman) by bribing other NPCs, or just getting an audience with them. However, there are NPCs that don't want the player to meet with the powerful NPC, so what they do is move so as to block them.

This may take the form of an assassin (in pacman this would be like the enemy that moves directly towards the player) or another might try to bribe someone that the player needs to be able to meet with the NPC (in pacman this is the one that heads towards the nearest intersection). Another might try to meet with the NPC first and stop the player from reaching them that way (like the ghost in pacman that moves towards the nearest power pellet), and lastly, another might just do something completely random (which might just happen to place them in a position to stop the player, or put them in a position where in future the player has to work around them).

The main difficulty is in describing what actions the enemies can take, but a good way to solve it is to use actions the player themselves are able to take. So if the player can use bribes, then let the enemies have this ability and so forth.

It is not really any different to positioning dialogue, it is just that we don't have an established frame work with which we can describe actions and responses (in positioning we have at least the position of the player as a framework).

games have been using the basic dialogue of positioning for a long time. This means that there exists a "language" with which we can work with (this is the input devices and the stats and states that need tracking).

Unfortunately, with plot, we don't really have this language developed yet, and this is why it is more difficult to create a system for the plot handling than it is for positioning handling.

But hopefully this helps us get started.

Share this post


Link to post
Share on other sites
I haven't read over everything everyone has written so sorry if this has already been said, but..

Someone mentioned what happens if an AI gets stuck in a constant 'sad' cycle (or what have you). Instead of just having the code check to see if the AI is 'stuck' and reset it, how about a "Town AI" or "Government AI" is notified and dispatches a care worker to try and raise Bobs happiness levels? In other words, have a sort of "Balancing AI" that wanders the game world ensuring that everything is running smoothly? This balancing AI would never get overly sad/happy/etc.

On affecting the world around you, instead of trying to make lots of little changes (bear killing family, bob getting sad) affect the overall world, why not have the previously mentioned 'City/Government AI' affect all the people under its control? Eg. The Tenosian Empire refuses to deliver 100 bear carcasses to the Merchants of Enghal, so the Merchants refuse to trade with the Tenosians. This makes ALL Tenosians very sad as they can no longer afford nice clothes/food/etc. The Tenosian Government AI decides to go to war with the Merchants, and thus directs all (depending on fight stats) AI under its control to head to the barracks, then to kill the merchants. The 'Merchant Town AI' on the other hand determines it needs some help ASAP, and requests help from another Empire it has good relationships with.

Now imagine if previously in the game, the player had done something to make everyone hate the Merchants of Enghal, meaning they would get no help. Thus the Merchants of Enghal are raided by Tenosia militia and renamed the Merchants of Tenosia.

In other words, have varying "Levels of Detail" for the AI. Balancing AI -> Empire AI -> City AI -> District AI(Rich/Poor/Etc) -> Individual AI.

Share this post


Link to post
Share on other sites
Quote:
Original post by metalmidget
As a couple of people have mentioned already, it might be difficult for the player to actually realise how dynamic their world is, which could risk putting a lot of good work to waste. I think the way to overcome this might be for the player's actions to have far-reaching consequences on the game world (depending on the severity of the actions of course): a ripple effect. Say the player kills the tax man. Rather than just have a new tax man replace him and the standard law enforcement consequences, it should cause other things: the family of the tax man will suffer (and hate you), the town might be left without a tax man if no one else can do the job, the person who does take the job might leave a gap somewhere else- oh crap Fred's the taxman, we don't have a baker anymore...
OK so those are pretty lame consequences but you get what I mean- I think the whole purpose of a truly dynamic system shouldn't be that it just generates side-quests more randomly, but that the entire world can change drastically depending on the way the player plays the game.

cheers,
metal


I could see something small (like accidentally killing the tax man of a small town) unraveling everything, leading to a complete ecological meltdown (baker takes over tax mans job, everyone goes hungry leading to attacks on other cities with food, leading to full scale civil war, ect...). Every change the hero does to correct the situation leading to even more problems. Something like out of a Groo comic.

That sounds hilarious, I'd love to play a game like that.

Share this post


Link to post
Share on other sites
Quote:
Original post by Ryan_001

I could see something small (like accidentally killing the tax man of a small town) unraveling everything, leading to a complete ecological meltdown (baker takes over tax mans job, everyone goes hungry leading to attacks on other cities with food, leading to full scale civil war, ect...). Every change the hero does to correct the situation leading to even more problems. Something like out of a Groo comic.


That's probably why it hasn't been done yet. It would be a ridiculously monumental task to balance the system so that the player can have a non-trivial influence on the world, without the ecology being as delicate as your example above.

...But you're right, it would probably still be awesome to play a game like that, just to see how much you can achieve from how little. "Look everyone! I brought down the Roman Empire by throwing a rock at a pigeon!"

cheers,
metal

Share this post


Link to post
Share on other sites
Quote:
Original post by metalmidget
That's probably why it hasn't been done yet. It would be a ridiculously monumental task to balance the system so that the player can have a non-trivial influence on the world, without the ecology being as delicate as your example above.


Maybe not. Small actions generally shouldn't have significant consequences: you kill the tax collector, the mayor appoints a trusted clerk, and hires an unemployed person to fill that clerk's position. Tax revenues suffer for a while as the new collector gains experience in the job.

Larger actions might have larger effects. If you burn down the city armory and the smithy, you will cripple the town defense. They must rebuild and in the meantime, purchase weapons elsewhere, which may take money away from other purposes.

This isn't purely theoretical, mind. Patrician III has a living game world and economy that can be influenced in many ways. It's abstracted at the city level, but trade between cities seems to be entirely agent-based, with merchant ships, pirates, and all that good stuff.

Share this post


Link to post
Share on other sites
Quote:
I could see something small (like accidentally killing the tax man of a small town) unraveling everything, leading to a complete ecological meltdown (baker takes over tax mans job, everyone goes hungry leading to attacks on other cities with food, leading to full scale civil war, ect...). Every change the hero does to correct the situation leading to even more problems. Something like out of a Groo comic.

That sounds hilarious, I'd love to play a game like that.

Although it does sound fun, I think the fun will be short lived.

In another thread (on making a trade game), I proposed an idea of an AI that would adapt to these kids of changes.

The way the AI world was that they would look for opportunities for them to make a "profit".

Now it doesn't need to be a profit in terms of money, indeed, the original AI didn't actually keep track of money at all and instead abstracted it to "Value" (which included reputation, money, friendship, etc as part of the value too).

It worked by having several layers.

The first layer only concerned itself with direct value. It didn't concern itself with long term situations or other factors. It would select an action based purely on whether or not that action would give it a net profit (help the NPC). This wasn't a value of money, but a value of how much it wou8ld benefit the NPC (which was a complex factoring of many aspects, but it could be done with a needs based system like something in the Sims, so not just with money).

The next layer factored in the social network. It did this by looking at the other NPCs that it interacted with and put a weighting on the value of the actions it could take. It also factored in whether or not it helped the NPC or hindered them (either * -1 for a hinder or * 1 for a help).

If the NPC was a friend (positive weighting) and it helped them (*1) then this would result in a positive weighting.

If the NPC was a friend (positive weighting) and it hindered them (*-1) then it would result in a negative weighting (a positive number multiplied by a negative number gives a negative).

If the NPC was an enemy (negative weighting) and it helped the NPC (*1), then it would result in a negative weighting (a negative number multiplied by 1 gives a negative).

If the NPC was an enemy (negative weighting) and it hindered them (*-1), then it would result in a positive weighting (a negative multiplied by a negative gives a positive).

So this system would give a weighting that would either increase the chance that the NPC would take a particular action or reduce it.

This level could have several sub levels if you desire, and each sub level would deal with NPC in increasing degrees of separation from the NPC making the decision. So the first sub level would deal with the relationships of the NPC that this NPC directly knew, then the next sub level would deal with the NPCs that that the NPCs that this NPC knows (and so on). I would guess that you would not need more than 6 sub levels at the most (the old saying that you are no more than 6 degrees of separation from anyone else), and that a more likely value would be only 2 sub levels.

The next level of the AI was slightly separated from the previous levels. With the previous levels, this was only dealing with a single AI rather than groups of them.

In this next level, the AI would attempt to assign NPCs actions by giving them a weighting factor on the particular actions that was needed (making them more likely to choose that action).

This actually exists as a Town AI and a layer on each NPC AI to interpret these instructions (factor in the weighting set by the town AI).

Now this Town AI is really just an implementation of the Trader AI set out above. The Town AI would also have these two levels as well both the personal level where it puts a weighting on actions that have a benefit directly to themselves, and a social level where they would put weightings on the actions based on social ties between the Town AIs.

The actions the Town AI takes would not necessarily be direct actions, but would instead be weightings for specific actions that the Trader AI's get passed.

This can then be extended for other organisational groupings (districts, counties, kingdoms, alliances, etc), each grouping would be running a version of the basic Trader AI and passing the weightings down to the next AI type in the hierarchy.

The beauty of this system is that the player can interact on any level (or all levels, or even switch between levels). It is also abstract enough that you can map most action types to the output of the system

It is also an implementation of the principles that I described in my previous post. In this, the actions that can be taken are the "language" that is used for the "dialogue" between the game system and the player (or another AI).

It is also robust as if the player kills an NPC that is needed (say the Tax Man - which would be a trader AI), then the Town AI would see that a Tax Man is needed and then apply a weighting on certain AIs it controls to become a Tax Man.

If an AI is not making much value (ie it is free), then it will likely become the tax man, where as an AI that is essential (making high value actions), would not be as likely to become the tax man, and even if they do, then someone else will be able to take advantage of the opening that this AI leaves and fill it (even if they are not directly under the control of the Town AI).

It is then possible to add in "internal" weightings for each level (and sub levels). These would be for the personality of the NPC. So one NPC might like to fish, so she has an internal weighting for fishing actions which makes them more likely to fish.

Another might have a weighting that makes them consider social actions over personal actions (actions specified in the second level gives bigger weightings) and this then changes the AI's behaviour.

You can make an Altruist AI by giving a higher weighting to actions that help people (this would be applied as a straight positive weighting on the social level after the factoring for friend or foe).

So by manipulating the weightings (and adding in more factors for the weightings), this AI system is extremely flexible and robust, and it has the negative feedback mechanisms to create interesting behaviours.

It can also be used to generate Quests as one of the Actions that could be allowed is that the AI requests the aid of another to complete the task (like the player). So if one AI wants to harm an enemy AI, then it might post a quest for someone to steal something valuable form that AI, or even assassinate them and if the AI want to help them, then the player might be give a standard "FedEX" type quest where they ahve to deliver something to the target NPC.

This brings me to the final aspect of this system.

Different actions not only have a weighting applied to them, they can also have a threshold of weighting that is required before that action can be chosen.

For example, the Assassinate action might require a high level of weighting (ie they really hate the guy) on it before the AI will consider that as an action. This might be as a straight negative value on the action, or it might be a hard threshold (or combination of several methods).

Share this post


Link to post
Share on other sites
I've had something similar in mind for a while, to me the solution was having few deep, complex auto generated characters interacting with one another rather than a world full of shallow individuals.

Quality over quantity.

Share this post


Link to post
Share on other sites
What I think you would need, for something like this to work, is a Director. That is, an AI watching over all things in the world, which calculates probable consequences of actions, and then manipulates the world in ways which will give the player the best experience's.

For instance if the player is near to extincting a species that will have far reaching consequences the Director creates an NPC or something else that will warn the player. If he ignores that then the Director works to hold the world together as best it can or manipulates things depending on what the players goal is.

So basically you have all the individual NPCs which go about their emergent actions. With the Director AI overseeing those actions so that they dont conflict or end up too great an impediment to the player. It also works to craft a narrative around the player.

Share this post


Link to post
Share on other sites
Quote:
Original post by Calabi
What I think you would need, for something like this to work, is a Director. That is, an AI watching over all things in the world, which calculates probable consequences of actions, and then manipulates the world in ways which will give the player the best experience's.

For instance if the player is near to extincting a species that will have far reaching consequences the Director creates an NPC or something else that will warn the player. If he ignores that then the Director works to hold the world together as best it can or manipulates things depending on what the players goal is.

So basically you have all the individual NPCs which go about their emergent actions. With the Director AI overseeing those actions so that they dont conflict or end up too great an impediment to the player. It also works to craft a narrative around the player.

Yes! The Director could keep the balance in critical areas, as if the computer is playing a God Game in the background. Entities still get to have their autonomous actions and if they, or the player, get too far out of line the Director could gently steer the world back towards sanity. And the director could analyze the world situation and procedurally generate quests based on what's happening, to help keep less self-directed players motivated.

To summarize: 1) Autonomous Entities 2) A Director 3) Procedural Quest Generation.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this