• Advertisement
Sign in to follow this  

Difficulty Self-Correcting Enemies?

This topic is 4780 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've been thinking lately (i seem to be doing it a lot, actually). Why don't they have games today which adapt to your gaming style. For eg. If you keep sneaking out at guards, won't they be a bit more alert? How about you take the players recent history, for eg. How accurity it is, how often the enemy dies unaware, ect. and you use that to change the enemies awareness. For eg. if every guard has died from behind, without knowing it, every new guard would be constantly be searching around it. This would force the player to adapt it habbits. Perhaps some sort of learning system, could learn what the player would do, and how to counteract it? From, Nice coder

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I believe there was an article about something like this in Game Programming Gems 4. The concept was to have a self-altering AI to present a constant challenge to the player, but also dumb down when necessary.

Basically, you could simply have the AI have personality genes that all come from the same pool. If a guard dies, then his genes are removed from the pool. If a guard "survives" a certain amount of time, his genes are re-added too the pool.

Eventually, over time, the "weaker" guards would be weeded out. However, to do this at the speed at which you are talking about would be very difficult with genetics.

But I would probably still try it.

Share this post


Link to post
Share on other sites
that'd be neat as long as you didn't end up with uber-guards halfway through the game. i would prefer them to remember things and take the situation into account personally. it always annoyed me when i'd accidentally miss when i was killing someone from behind, and i could just run around the corner and wait a moment before trying again. sometimes you can just slaughter the lot of them and turn off the alarm, and any guards not already there just stand around dumb as ever.

Share this post


Link to post
Share on other sites
What i was htinking of is that the guards have a set of variables.

Things like alertness index. (which changes randomly, and spikes when there is an alarm, or when it sees or hears the player). It goes down, very slowly. (so, youd have to wait 1/2 an hour to get that guard nearly asleap again. assuming you didn't have knock-out gass on you).

You also have things like, probability of jumping sideways when approached, accurisy index, ect.

Now, whenever a guard dies, the preceding events changes these variables. But theyh eventually level out. it just takes some time. (quite some time, for some things).

Maybe make the variables dip slower, each time they were spiked.... the slowing down being preportinoal to how heigh they were...

From,
Nice coder

Share this post


Link to post
Share on other sites
Quote:

I believe there was an article about something like this in Game Programming Gems 4. The concept was to have a self-altering AI to present a constant challenge to the player, but also dumb down when necessary.

Basically, you could simply have the AI have personality genes that all come from the same pool. If a guard dies, then his genes are removed from the pool. If a guard "survives" a certain amount of time, his genes are re-added too the pool.

Eventually, over time, the "weaker" guards would be weeded out. However, to do this at the speed at which you are talking about would be very difficult with genetics.

But I would probably still try it.


Evolution, maybe that would work. But some sort of learning system would be able to work faster, to change the variables (previously mentioned). With the learning system, you could get it to "forget" things once in a while. to stop things getting too uber, that you end up dying.

From,
Nice coder

Share this post


Link to post
Share on other sites
Sorry, but I don't think that would be a good idea "gameplay-wise". If you want to produce a good game, in my opinion, enemies reactions must be predictable (to some level). Gamers need some consistency if they want to say, plan the way they'll attack a camp. They must know that they'll be able to get from behind guards A and B before trying to reach building Z...

I'd definitely prefer to have game designers tweak different enemies, and have them placed with a progression in the maps than having self modifying enemies.

Also, how would you explain that the remaining guards learn from the dead ones? Were they there to witness how the guards were killed?

I wouldn't mind self-corrections in games you fight someone over and over, without killing each other... like sports games or RTS (no learning at the unit level, but at the "commanding" level) would be a good place to start with "learning" of tactics the player uses, but I'd hardly see place for learning in FPS/action games...

My 2 cents...

Eric

Share this post


Link to post
Share on other sites
I would like to see more games that learn your tactics. The thing about most games is as soon as you learn the tactic that always works, the game becomes boring. AI that learns would force you to try different tactics.

In my opinion, if done right, this would not prevent the player from learning tactics that make them effectively invincible, the tactics would just be more complicated. Say when the AI starts to respond to one tactic, you would switch to another and catch them blindsided. I think this would be fun.

[Edited by - Drethon on January 7, 2005 11:26:35 AM]

Share this post


Link to post
Share on other sites
Definitely a nifty idea, and one that I've thought about before but never seen done. If done properly, I can see how it would add fun to certain types of games. Of course, doing it properly may be the hard part.

One potential problem I can foresee is if you're not careful the guards (or whatever) could end up repeating the same two or three AI patterns. For example, Petra (the player) likes to sneak up on guards and backstab them. So the new guards are more aware of their immediate vicinity (and consequentially less aware of what's going on further away [you can't make these guys invincible]). So Petra learns how to use throwing knives better. So the guards start paying more attention to things farther away. Petra still knows how to sneak around and backstab, so she goes back to doing that. New guards pay more attention to their immediate area, and the cycle repeats.

Another pitfall I can see is if Jim likes to sneak up on guards and then shoot them in the head, the game may register that as a headshot, and so guards will be looking out for snipers and be less aware of someone sneaking. So Jim can more easily sneak up to guards and shoot them in the head.

Share this post


Link to post
Share on other sites
I do not think that they should permenatly learn to adapt to the player but only for a cirtin amount of time. Like if three gaurds are standing around and one gets waxed in the head, the others arent just going to stand there or run over to the body to find out whats wrong. They are going to get the heck out of there and take cover while searching for an enemy and try to get backup. They shouldnt be like that for the rest of the game, hiding and searching but over time they start going back to normal.

Share this post


Link to post
Share on other sites
I woudld say that too.

Now, the thing is, is that the adaptation decays, so it can be moderatly watchfull in both its immediate vicinity, and the surrounding area. Then when it gets hit, when the player learns how to use the sniper rifle, it gets more watchfull in the surrounding area, but the immediate vicinity starts to decay. Eventually an equilibrium point is found.

Mxpx7228 - Nice idea Maybe we could use the players position, to map a set of "Nice hiding spots"? We figure out the route the players meant to take (based on its history), and we get our guy's to take up positions of maximum attack.

We also get them to call backup, in the form of a swat team, which happens to be coming out of a ventalation duct, outside the players FOV. Which are now standing right next to the door the player has to come across, ready to shoot on sight.

We also up security all along the coridor, as the player changes his plan, we change where the guards go. (later of cource). We also up the security on all the targets, making sure that the player has to have a sneaky way through in order not to get killed in seconds.

From,
Nice coder

Share this post


Link to post
Share on other sites
You could add an 'intelligence' variable which varies the amount of understanding a bot obtains from previous game events. This would help stop the 'uber guards' scenario as the bots would vary between themselves - some learning from others mistakes whilst others do not. Meaning the game doesnt become too hard or too easy it stays at an acceptable level of difficulty but the player just has to pick their bots by observing the individual bot behaviour. This could also be compounded by adding some form of communication of what intelligence the bots have gained to the player. For example, a warning is sent out to the bots via say a speaker system informing the bots that some guards have been found dead after having their throats cut. If the player over hears this warning then they know that bots are going to be better prepared for that form of attack, thus encouraging the player to alter their playing habits. The player can then kill the bots in their favourite way but this might be slightly harder, or change for the easy option. This would aid the game play by allowing the player to make informed decisions and the intelligence variance would stop these decisions being formulaic.

[Edited by - gazsux on January 12, 2005 6:15:41 AM]

Share this post


Link to post
Share on other sites
Nice idea....

How about, in the game world, the guards and various other personell have little pda moniters.

So,as soon as one ides or is knocked unconsious, it basically shoves a warning on the loudspeaker, and it goes and locks down the compound (alarm, locked doors that DON'T OPEN and that you need to get through.)

This could lead to some interesting stratagies, like leading the guard into a metal closet, and blowing him up with a grenade.... (after locking the door..)

From,
Nice coder

Share this post


Link to post
Share on other sites
I think there is a better and more logical ways how the guards should act (the one that modern games are missing).

Let's imagine a room with 5 guards in it.

Now the player enters a room. Guards see that and attack the player. He runs away from pov of guards, so they follow him one by one to the small pass. As soon as first comes by, he gets a shot, and dies. The other guards see that (they understand that if the do the same they will end like that also), so they came up with something else, try to come from the back or throw grenade to the pass.

I think the best way would be to have random experience per guard or experience ammount as level of hardness.

Share this post


Link to post
Share on other sites
One thing to note with adapting AIs is the tendency for human players to pick up on the fact that the AI is adapting, and maliciously change their behavior to get the AI to "adapt".

Say you're making a football game. In it, the defense has set formations that it uses to react to the offense. But in this game, the defense will also adapt, so that if you always run the ball down on the right side, the defensive formations will drift slightly towards the right, to pinch off your ability to do that.

What usually happens is that the human picks up on this, and will run a few plays as far to one side as possible (to get the largest amount of "adaption" from the AI) and then run a play to the farthest other side, using the adapted defensive formation against itself. The human then repeats this strategy: get the AI to lean in one direction, and then attack in the opposite.

It is very difficult to distinguish between repetitive human behavior that the AI needs to adapt to, and malicious behavior designed to throw off the AI. This can be dealt with somewhat by making the AI not adapt "too much" (by limiting the amount the AI can adjust its behavior), but this can water down the effect to the point of non existance. The amount of human repetition required to get adaption is also a tunable factor, but overall, adaptive AI is very hard to tune. Plus, as had been said before, a lot of people don't want adaptive AI, but rather prefer reliable AI behavior that they can learn and master.

Just my two cents.
Lederhosen

Share this post


Link to post
Share on other sites
Perhaps, it could change, but only up to the point where it can be defeated easily using another tactic.

Also, every time a new tactic is tried, its potential for change ramps up. It slowly goes down (like over hours, not minutes).

This means that as you return to an origional pattern, the bots would adapt faster then you could change patterns.

Also, some sort of learning system, might be used to predict what the user would do, based on apst events. That would then change the agent, based on the agents attributes, to form a better defence.

From,
Nice coder

Share this post


Link to post
Share on other sites
How dumb the guards were in Deus-Ex 2? I read a huge article in a magazine about their brand new AI system, which was supposed to take into account the contexts of the action. I haven't played it, so that's why I'm asking.

Share this post


Link to post
Share on other sites
I haven't played Deux Ex 2. or deux ex for that matter.

Do you happen to have a link to the article?

From,
Nice coder

Share this post


Link to post
Share on other sites
I read the article in a Spanish (paper) magazine, and I don't know if it is online. This is not the document I'm talking about, but it touchs the subject a few times. See "Sound/Light and Unit Awareness" and "Unit Needs and Behaviors".

What I don't know is how much they actually implemented these ideas into the game.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by Nice Coder
I've been thinking lately (i seem to be doing it a lot, actually).

Why don't they have games today which adapt to your gaming style.

For eg. If you keep sneaking out at guards, won't they be a bit more alert?

How about you take the players recent history, for eg. How accurity it is, how often the enemy dies unaware, ect. and you use that to change the enemies awareness.

For eg. if every guard has died from behind, without knowing it, every new guard would be constantly be searching around it.

This would force the player to adapt it habbits.

Perhaps some sort of learning system, could learn what the player would do, and how to counteract it?

From,
Nice coder





One of the problems is that you have to map out all the actions that your
BOT is capable of and all the situation factors that it will respond to.

It has to be able to decode the situation in order to then pick (from its preference memory) what actions to respond with.

It gets more difficult what the BOT has to handle higher complexity situations
where combinations of things and sequences of events are significant (and its actions likewise may be sequences of actions). It has to be able to filter out factors of the situation which are not relevant to the decision.


After you do that, you then have to build a database of generalized links between situations and response preferences. The mechanism to build and continually modify this database is what your original problem is.
THe more complex your world, the geometricly larger the database will need to be
even with any simplification/generaization done.


Somehow the object has to be able to measure what result is better than another seen in the same (or similar circumstances).


What this comes down to is that alot of manual work building specific logic and tuning it to get a mechanism that self adjusts even a little.
One that does a more complete job in real time in a complex game world turns into an AI monster that can suck up more CPU than possessed by some supercomputers.






Share this post


Link to post
Share on other sites
That depends.

If you give it a set of statistics, then get it to output attribute corrections, it wouldn't have to do much at all.

So you have a set of statistics, and corrilations between some landmarks (like an arivent that is not in the los of the character), and an event (dying without seeing anything).

What i would try and do, is to try and mine the data, and use that information to teach the system, as well as the systems own trial and error observation.

From,
Nice coder

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement