Sign in to follow this  
Kest

Sims style behavior

Recommended Posts

This is about a decision to program state-driven AI and events into a human or creature, to make it react more like a real animal, rather than simply simulating such behavior with straight-forward AI. I guess you could say to program all characters like The Sims. The biggest question is, is it a good idea? Or is generic simulation of behavior better for most normal gaming? A decent example would be an aggressive / passive nature for wild animals. To use real-states, the obvious choice would be hunger. Hunger would work just like it does in The Sims - a number counting down internally, over time, that fills back up when food is eaten, although the player wouldn't see a bar for this. A wild creature would react and make decisions differently, depending on its hunger state. It may be very passive when it's stuffed, and overly aggressive when it's starving. The simulation of this behavior with simplistic AI would be wild creatures attacking some of the time, or randomly being passive, to represent the creature's occasional full stomach. Within a short time span, the player probably wouldn't even be able to notice the difference between the two methods. The animals are simply aggressive or passive, some of the time. But I'm considering what could happen outside of that simple span of time. Most importantly, what type of gameplay effects could be introduced as a result of internal states changing the character's decisions? If the player can find a way to modify those internal states, he can change the creature or person's behavior. An obvious one for the example would be feeding the wild animal to avoid a fight. Another example would be sneaking a drug into a guard's drink to make him run to the bathroom. In this case, it would be a precisely-controlled manipulation of internal states, possibly to the point of the player being able to specify which states the drug should influence when it is created. It would be Sims style gameplay, but with an offensive twist: to manipulate other people. Any thoughts?

Share this post


Link to post
Share on other sites
It's not absolutely usable for reasons of scale. Decrimenting individual counters and modifying state for a large number of objects rapidly becomes infeasible. Consequently, entities that are sufficiently "distant" from the current area of concern are abstracted into simpler, bulk simulations.

Share this post


Link to post
Share on other sites
I think you could still simulate very distant entities the old fashion way. You could provide a randomizer for each state, for each species, for each area. An example would be setting hunger from 30% to 50% for giant swamp flies when they are first encountered.

Still, hunger is pretty boring, and has limited manipulation potential. I would like to come up with better internal states, which can make the gameplay more interesting, but I'm having trouble coming up with them.

Share this post


Link to post
Share on other sites
I'm a fan of this kind of idea - i.e. emergent behaviour rather than explicit behaviours.

For most games though, traditional methods can probably achieve the same effect for much less effort, so you would probably need to design the game from the bottom up with these features in mind. The game would have to be centered around this idea of manipulating people/creatures.

I was actually really disappointed with Oblivion when it *didn't* implement something like this. Oblivion went half-way by giving everyone scheduled behaviours, but it doesn't allow for any real changes. For example, if I steal all of someone's food it should force them to go buy/find/steal some more -- but it doesn't :(

Share this post


Link to post
Share on other sites
My biggest attraction to the feature would be allowing players to manipulate the game world beyound my own considerations as the designer. An example would be a tough diplomacy situation, where the player can slide right through it by tweaking a few internal states of the NPCs involved. Some designers probably don't like to allow that sort of thing, but thinking outside of the designer box is one of my favorite tactics in gaming.

But again, I'm not sure the concept can even get off of the ground without some interesting internal states to consider. Most of those employed in The Sims - comfort, social, fun, etc - would be pretty useless in most gaming situations.

Share this post


Link to post
Share on other sites
Kest,

Personally this type of idea has been something I've tossed around in my mind from here and there. I have always been a fan of an NPC that would be able to be manipulated by the player but still do its own thing.

One thing that I did think would be needed was different thresholds for different npcs (no two creatures are really the same in my opinion in the world). Using your hunger example... Some animals, even within the same species, would become more aggressive at a higher hunger level. Heck some might just be considered a wild one within the species and just naturally be aggressive. I thought that was important when you deal with a limited amount of factors to determine the npcs behavior.

Though, like you, I have been trying to think of more variables that are worth while and useful to use for the npcs.

Animals - hunger, night/day, protective of children/friends, disturbing in sleeping state... All of which are good to use but then also may require a lot more behind the scenes development to achieve those features.

Share this post


Link to post
Share on other sites
Quote:
Original post by Oluseyi
It's not absolutely usable for reasons of scale. Decrimenting individual counters and modifying state for a large number of objects rapidly becomes infeasible.
I'm going off on a hypothetical tangent here, but... what if Intel brings out a new CPU that is equivalent to 4 of their current quad-core CPUs plus 2048 small/simple CPUs (e.g. Pentium MMX). That's 16 heavyweight cores and "countless" lightweight cores.

Would such a piece of hardware allow these kind of simulated games to take off? If you've got more cores than you know what to do with, why not just assign each NPC it's own core to run a full AI-sim for them.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
Quote:
Original post by Oluseyi
It's not absolutely usable for reasons of scale. Decrimenting individual counters and modifying state for a large number of objects rapidly becomes infeasible.
I'm going off on a hypothetical tangent here, but... what if Intel brings out a new CPU that is equivalent to 4 of their current quad-core CPUs plus 2048 small/simple CPUs (e.g. Pentium MMX). That's 16 heavyweight cores and "countless" lightweight cores.

Would such a piece of hardware allow these kind of simulated games to take off? If you've got more cores than you know what to do with, why not just assign each NPC it's own core to run a full AI-sim for them.

I don't think there would even be a problem implementing the feature with older CPUs. Even with a gigantic number of creatures being processed in one area, there are easy programming tricks to "background process" creatures that are not visible by the player.

An example would be to update only 20 of them each frame. Creatures 21-40 would update the next frame, then 41-60 the next, and so on. The creatures would operate at a lower frame rate, but that would make little difference to the accuracy of this type of simulation. You could literally have creatures feeding off of other creatures, and living out there lives in the background.

But the real question is, why bother? The biggest impact it might have (that I can consider) would be for a player to view a natural situation, or interact with an animal, then leave, come back later, and see the situation evolved, or the animal still influenced by the player's changes. That sort of thing would be pretty neat, but not very influential to gameplay.

Share this post


Link to post
Share on other sites
How much knowledge of these states would a player have?

I think your guard example would depend on knowing a bit about the NPC's personal states. In Sims its different because you know exactly how much they're comfortable, tired, in need of a bathroom break or socialization, etc.

The sheer number of states you'd need makes me a bit leary of this sort of idea. Unless you're going for a sort of a-life, you have both the problem of weeding out the poor / boring / ridiculously difficult behaviors and giving the player some externalized sense of what's happening to the AI internally.

Another challenge you run into is that while the states may capture the semblance of biological imperatives and gross emotional drives, without a frightful amount of complexity I don't see them capturing nuanced social and emotional states. How many times did your Sims walk through occupied bathrooms, come over and watch your TV and use your fridge like they were old college buddies or your kids, or walk all the way around the house to get to an adjoining room?

I think the idea has enormous potential, but only if you've got a small army to work on it. (And keep in mind the emergent behavior MMOs like Ultima where the system had to be scrapped because of unforseen interactions or behaviors that just weren't robust enough for the gameplay allowed)

Share this post


Link to post
Share on other sites
The concept doesn't really need to be taken to any specific extreme. You could simply look at all of the event->actions your entities currently monitor and evoke, and attempt to apply internal states that can stop, redirect, or otherwise influence the linear mappings.

Unfortunately, I have the opposite problem. I believe I could implement a decent version of it, but I can't brainstorm any ideas to expand it. What types of states could entities rely on for decisions, that a player could visualize enough to make use of, and a player could modify in a practical sense, to influence the gameplay? That's where I hit a big dead end.

A simple example would be an intoxicated guard not caring enough to investigate a simple enough noise. You already have the guard's AI in place to investigate noises based on loudness and suspicion. You simply alter those variables by the intoxication level, and the player gains a new gameplay technique. The example is really bad, because it's not practical to get the guard drunk.

Share this post


Link to post
Share on other sites
Quote:
Original post by Kest
What types of states could entities rely on for decisions that a player could visualise enough to make use of to influence the gameplay? That's where I hit a big dead end.
There's countless human emotions that you could visualise with the facial animation available these days.

E.g. Visualise Frustration with facial animation. When NPCs carry out certain tasks (read: based on their personality) their frustration changes. The perception senses might be hampered by a high frustration score.

Now, if you find out what frustrates a guard, you could exploit that to sneak past him easier.


It really depends on the game-type though.

If it's interactive storytelling then you can visualise/do anything (through the written word) so you could go as far as being able to pay someones co-workers to play practical jokes on them and be able to explain how that made them feel.

If it's an FPS, it's hard to visualise these states, except maybe through dialog and animation.

If it's something more like the Sims, where the player has a 'godlike' view of the game, then you can visualise absolutely anything using little meters attached to each NPC.

Share this post


Link to post
Share on other sites
Quote:
Original post by Hodgman
There's countless human emotions that you could visualise with the facial animation available these days.

E.g. Visualise Frustration with facial animation. When NPCs carry out certain tasks (read: based on their personality) their frustration changes. The perception senses might be hampered by a high frustration score.

Now, if you find out what frustrates a guard, you could exploit that to sneak past him easier.

I agree, and there would be a lot of room for practical emotional manipulation during dialog. But the biggest problem with dialog is that it's usually pre-scripted, making the range of choices limited for any particular situation. Basically, the designer would need to allow access to each state, through dialog choices, for any given character. I mean unless you pull out a Fable emoticon to fart or wink at them.

Share this post


Link to post
Share on other sites
As far as motivators for sim animals, its going to depend on how much you want to abstract it.

Some basic motivators in general order of importance are:

1)Fear

2)Sex

3)Survival

4)Social

This order would change depending on the animal species (a bee would more likely place Social at the top with Fear or Sex at the bottom) as well as time of the year (mateing season).

But for most animals Fear is one of the prime motivators, a scared cornered animal will often attack.

Sex is another huge motivator. By and large animals will ignore thier hunger to engauge in sex if available (Samon makeing thier long dangerous journey just to mate for example). And stumbleing upon animals in heat or during courtship can cause them to attack.

Survival of course is important. Be it hunger, or injury, animals can react in different ways during a threat to thier survival.

Social is also important (to some species moreso than others). This motivator is what causes wolves to gather into packs, mark and defend territory. Its also what can cause mothers to defend thier children.


Animals also just don't eat anything. They each have a hierachy of acceptable foodstuffs. If hungry, wolves would hunt deer long before hunting humans. So if deer are available in the area a wolf pack will just as soon avoid humans, even if starving and the humans trespass into the pack's turf. And even within the wolf pack there is a social hierarchy. Attacking wolves at the bottom of thier pack's social order might not even perk the pack's intrest. And during mateing season wolves with higher social standing but no mates might go rogue and try to join (or even take over) other packs. Not to mention fighting with the pack leader for dominance (and the right to mate with females).


But it will depend on how simplified and abstract you want to make it.






Share this post


Link to post
Share on other sites
Quote:
Original post by Kest
A simple example would be an intoxicated guard not caring enough to investigate a simple enough noise. You already have the guard's AI in place to investigate noises based on loudness and suspicion. You simply alter those variables by the intoxication level, and the player gains a new gameplay technique. The example is really bad, because it's not practical to get the guard drunk.


Actually, I wouldn't say this is a bad example unless you're thinking more of a run & gun type game. This could be part of a mission, something you spike a drink with after creating a diversion (that'd be neat), or something you offer after talking about old times and glorying in past deeds (if you've got impersonation as a skill and its conceivably a part of the culture, as it might have been in the old USSR)

Are you thinking just enemies, or other types of characters?

Here's some off the cuff combat / gaurd related needs:

Collect Fallen Comrade - Amp the need up based on culture
Avenge Fallen Comrade
Protect Comrade
Search For Missing Comrade
Investigate Anomaly - A door left open, a light that won't turn on
Handle Malfunction - If the light's busted or a door won't work, maybe agent isn't suspicious yet and calls a repairman. The more malfunctions, the greater the suspicion
Lower My Suspicion - Turn on the lights, get friends, systematic search
Satisfy Curiosity - Suspicion is low, so go see what that rattle noise was

Is this more what you were thinking? If so, you could get really specific, say matching suspicions to satisfying evidence (that light noise could have been rats, for instance, but rats don't knock over a ladder).

Share this post


Link to post
Share on other sites
Quote:
Original post by Wavinator
Quote:
Original post by Kest
A simple example would be an intoxicated guard not caring enough to investigate a simple enough noise. You already have the guard's AI in place to investigate noises based on loudness and suspicion. You simply alter those variables by the intoxication level, and the player gains a new gameplay technique. The example is really bad, because it's not practical to get the guard drunk.


Actually, I wouldn't say this is a bad example unless you're thinking more of a run & gun type game.

I was thinking along the lines of trying to infiltrate any area where you encounter a guard. You're not likely to put off the whole mission until tomorrow night, just so that you may role play and trick this one gaurd into drinking too much. It would be easier to just put more effort into sneaking past him, sober. Spiking his coffee with drugs while he's away seems viable, though. It would also be pretty fun to pull off major gag feats, like spiking a whole building water system, or maybe even the air filtration system.

I keep coming back to drugs, though. They seem to be the most practical manipulation tools of internal states.

Quote:
Are you thinking just enemies, or other types of characters?

If I employed the feature, it would be for all characters. But character "jobs" or roles would have to be related. For example, your suspicion example below wouldn't be very useful to street goers or team party members, but would be ideal for a watchman or guard.

Quote:
Collect Fallen Comrade - Amp the need up based on culture
Avenge Fallen Comrade
Protect Comrade
Search For Missing Comrade
Investigate Anomaly - A door left open, a light that won't turn on
Handle Malfunction - If the light's busted or a door won't work, maybe agent isn't suspicious yet and calls a repairman. The more malfunctions, the greater the suspicion
Lower My Suspicion - Turn on the lights, get friends, systematic search
Satisfy Curiosity - Suspicion is low, so go see what that rattle noise was

Those are pretty clever. A suspicion state would be a neat dynamic way to control the bahavior of security guards in games, both for player and designer [smile]

So why do you think this sort of thing would be so hard to implement?

Quote:
Is this more what you were thinking? If so, you could get really specific, say matching suspicions to satisfying evidence (that light noise could have been rats, for instance, but rats don't knock over a ladder).

Yeah, but it would also be possible to keep the event/state/decision relationships simple enough that it's both believable and easy enough for us to develop. Even in its most simplified form, the suspicion state could add some interesting gameplay to traditional stealth concepts, such as the over-used "throw a rock" decoy.

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