Skyrim AI - how to take it to the next level. LONG post.

Post » Tue Jun 12, 2012 12:41 pm

What do you guys think of the AI? What do you think can be done to improve it?

Anyone else think the AI needs A LOT of work? I'm probably too obsessed with AI, but I think it's really the next step in improving game immersion.

Fighting AI needs the most work.

For instance, when I act as a sniper, an NPC should NOT be saying "is anyone there"? after he gets shot with an arrow. The NPC should NOT return to calm and peaceful but stay in some kind of intermittent battle ready state of emotion and perhaps be more jumpy than normal. An NPC should probably have some idea from where they were shot from and start heading in that direction instead of moving randomly - assuming they aren't scared and trying to run away. Open fields, of course, would be much harder to spot the shooter. Certain NPCs would turn over furniture, stabbing through hiding places, trying to find the shooter. The leader of the group might send certain NPCs in one direction, and others in a separate one.

An NPC should not try to keep using the same path if it is blocked when he/she is trying to get into a melee position. Can't the programmers add a simple (NPC character size = 500 pixels. If space between objects < 500 pixels, do not try to pass between)?

An NPC should adapt to successful fighting tactics against him/her. If the NPC is hit 3 times with an arrow without landing a blow, can't the smarter npcs make a successful die roll to change fighting tactics??? Try and dodge your arrows? Wait til after you've fired to sprint at you? Try and sneak up behind you? Pin you down? Try to get you to chase him into the next room, where he can ambush you. Work in tandem to try and flank you? Get to the high ground? Jump you from above? Run the heck away, especially if they're getting destroyed?

What about pack tactics? Attack the closest character, or maybe the weakest character...or the strongest...or ignore everyone in your party and focus on you. Help out the guy who is about to die (ie:heal him, act as a human shield). There should be field generals who should direct the others. The weaker and more cowardly might try and run away, while the stronger NPCs might threaten to kill them if they leave.

And NPCs shouldn't always try to fight to the death (ie: against a kid), or even pursue you. Certain personality types, in battle, wouldn't always pursue. Maybe some want to teach you a lesson. Maybe certain animals will attack to defend their territory/kids, but not attack if you move back to safer distances. Maybe certain animals wouldn't attack you if you have one of their kind in your party. Maybe they might aid you if you did.

And regular, every day behavior, while certainly getting quite nice, can be improved as well.

I appreciate the work Bethesda has done here, but there is too much, imo, generic NPC-ification in Skyrim.

Bethesda, what about this? NPCs have different personality types (ie: Myers), and should have different scripting behaviors associated with their personality types. Of course different personality types behave differently under duress, anger, sadness, etc. so there can be cross over behavior, during these times, to other personality types. For instance, even the most cowardly will attack if bullied enough. Maybe at certain times of the month, an npc gets paid, eats his favorite meal, and isn't super aggressive towards others during these times.

NPCs don't seem to have the full gamut of emotion. Most are so serious. Or angry. What about the weirdos? What about the goof balls? The Thrill seekers, flirtatious, morose, hippies and nerds aren't represented either. If you were an attractive female character, wouldn't more males stare at you? Wouldn't some become more tongue tied? Maybe a child would go from depressed to happy if you got him a new pet to replace his deceased. But his mother would be upset, because she didn't want to clean up after it. All sorts of "regular" behavior would be brilliant.


Lastly, I feel there is a large pool of generic comments, rather than personalized comments. Hopefully, in the future, NPCs would comment and react to your specific actions in relation to their worldview. For instance, an ex boyfriend of Lydia might say, "I heard you're gonna marry Lydia. She's trouble. Really. Stay away". If the player remained married to Lydia for a year, the NPC might say, "Well, looks like you proved me wrong. Happy for you". Or, if it didn't work out, "Hey, I DID try to warn you". If the player divorced and remarried Lydia, the NPC might simply say, "And I thought *I* was crazy". Lydia, would just tell him to shut up.

And specific action directed comments would be nice, too.

An NPC would tell the player to stop jumping up and down on his bed. Or perhaps the NPC would get super frightened if the player dropped down from an upstairs balcony. NPC shop keepers would tell the player to put their weapon away. And if it continues, the NPC would refuse to do business with for the day. NPCs would yell at you for making a mess and comment on how they'll have to clean up after you. And then they would remember it next time (but not remind you of it every single time, unless it's their personality type). Maybe characters could deliver the same line in different tones of voice, depending on how they feel about you. For instance, " Ahhh, my favorite customer" (if the player pays fair prices), instead of "Ahhh, my favorite customer" (deeply sarcastic if the player keeps trying to rip the shopkeeper off.

This may seem like some unjustified, picky complaining on my behalf. I do really enjoy Bethesda games, and simply see this as the next step in improving them.
User avatar
Lori Joe
 
Posts: 3539
Joined: Tue Jun 20, 2006 6:10 am

Post » Tue Jun 12, 2012 8:28 pm

This would be cool to have smarter and more realistic npc's and if they had emotion. But it probably won't happen in this game. Maybe the next with the next - gen consoles. I would be cool if they had things like this in a dlc though.
User avatar
Steph
 
Posts: 3469
Joined: Sun Nov 19, 2006 7:44 am

Post » Wed Jun 13, 2012 4:02 am

Love this idea.


Unfortunately Bethesda doesn't care. They hardly visit their own forums.

On top of this, they hardly ever use suggestions made by players.


As much as I want this, I can already predict that it won't happen... :(
User avatar
John N
 
Posts: 3458
Joined: Sun Aug 26, 2007 5:11 pm

Post » Wed Jun 13, 2012 3:54 am

I'd be orgismic if they'd just give followers the ability (and brains) to 'jump', when they get stuck on a 0.05" high change in the ground level. This is the single biggest annoying npc (lack of) behavior, to me. Anything you can jump over, onto, or from, so should they be able to do, and so should they be programmed to do. NOT rocket science.

They are supposed to be followers, not 'run a mile around the other side of the mountain because they couldn't hop over a 1" rise in ground level' losers.
User avatar
Tanika O'Connell
 
Posts: 3412
Joined: Fri Jan 26, 2007 1:34 am

Post » Tue Jun 12, 2012 9:12 pm

What they should say when shot by an arrow is ahhhrrrrrrr Iv been shot.
User avatar
SaVino GοΜ
 
Posts: 3360
Joined: Mon Sep 17, 2007 8:00 pm

Post » Tue Jun 12, 2012 3:59 pm

Love this idea.


Unfortunately Bethesda doesn't care. They hardly visit their own forums.

On top of this, they hardly ever use suggestions made by players.


As much as I want this, I can already predict that it won't happen... :(

They hardly ever use suggestions made by players? Is that a joke?

The majority of the new features in Skyrim are what was widely requested from the Oblivion forums. :dry:
User avatar
Nikki Lawrence
 
Posts: 3317
Joined: Sat Jul 01, 2006 2:27 am

Post » Tue Jun 12, 2012 1:45 pm

This is exactly what Skyrim needs. Lets face it, the game isnt difficult. A change in strategy isn't needed unless your reloading to fight that enemy for the seventh time. Most game change A.I to reflect difficulty, but in Skyrim difficulty is reflected by giving enemies more health and you doing less damage. Your doing the same exact thing you are on novice as you are on master except enemies do more damage and can take more damage. No one gets smarter, so when your reach that certain level you can steamroll things just like you were one novice difficulty.
User avatar
Penny Wills
 
Posts: 3474
Joined: Wed Sep 27, 2006 6:16 pm

Post » Tue Jun 12, 2012 6:31 pm

They hardly ever use suggestions made by players? Is that a joke?

The majority of the new features in Skyrim are what was widely requested from the Oblivion forums. :dry:
Ya ignore him ive seen him in other threads and he seems to think really low of this game

But ya Bethesda really pushed its limits on this one and to do what your suggesting is definetly Ps4 and Xbox720 material no way they can do that now, to much scripting
User avatar
Nuno Castro
 
Posts: 3414
Joined: Sat Oct 13, 2007 1:40 am

Post » Tue Jun 12, 2012 4:39 pm

Hi all,

I seem to recall a respected modder claiming that there actually is markedly better combat AI for mages(which he uses in his mod, an overhaul I believe) at least already present in the code but deactivated. He thinks it`s because consoles wouldn`t cope with it.

Rgds, Haldir
User avatar
Matthew Barrows
 
Posts: 3388
Joined: Thu Jun 28, 2007 11:24 pm

Post » Tue Jun 12, 2012 8:27 pm

An NPC should not try to keep using the same path if it is blocked when he/she is trying to get into a melee position. Can't the programmers add a simple (NPC character size = 500 pixels. If space between objects < 500 pixels, do not try to pass between)?

You don't know much about game and AI programming, do you? If it were that simple, it would be in the game ...

While the nav-mesh used by Bethesda greatly improves NPC moveability if compared to the more traditional AI path approach, dynamic environment detection is a rather complicated subject and by no means easy to implement.

:cool:
User avatar
Ron
 
Posts: 3408
Joined: Tue Jan 16, 2007 4:34 am

Post » Wed Jun 13, 2012 4:31 am

While the nav-mesh used by Bethesda greatly improves NPC moveability if compared to the more traditional AI path approach, dynamic environment detection is a rather complicated subject and by no means easy to implement.

So, enlighten me about what goes on behind the scenes in the game engine, when your follower suddenly comes up against an extremely minor change in the ground, only fractions of an inch high, that magically prevents them from continuing to follow you, and either get virtually perma-stuck or otherwise decide to take the scenic route for a mile or two to go around?

The game engine has to realize the follower is stuck, if not, the programmers should be shot. So, since obviously the game engine realizes they're stuck, what does it do next?

Does the engine look at the terrain polygon that your follower has gotten stuck trying to cross, and make logical calculations of whether the follower *should* be able to traverse it? Is it too high? NO. Is it some form of object that isn't meant to be crossed? NO. Is there any logical reason why the follower shouldn't be able to get onto this polygon and cross it? NO.

So, all of those things being identifiable to the game engine, how does it then deal with the predicament?

1) leave the poor fool standing there running in place with their thumb up their butt until some completely incomprehensible and unpredictable event frees them up ten minutes later (or you teleport thru a door or fasttravel somewhere)

2) send the poor fool running miles around in another direction, to try to find a way to catch up to you.

So, why on earth isn't there a...

3) have follower back up a foot, then easily jump over the 00.0005" obstruction, and continue following you as per normal

That is what I'd like to know. Is that some kind of unattainable holy grail of game programming, that they just haven't figured out how to accomplish yet?

Seriously.....
User avatar
Ludivine Poussineau
 
Posts: 3353
Joined: Fri Mar 30, 2007 2:49 pm

Post » Tue Jun 12, 2012 5:46 pm

Does the engine look at the terrain polygon that your follower has gotten stuck trying to cross, and make logical calculations of whether the follower *should* be able to traverse it? Is it too high? NO. Is it some form of object that isn't meant to be crossed? NO. Is there any logical reason why the follower shouldn't be able to get onto this polygon and cross it? NO.
There's the problem. It's not the terrain polygons that are causing the problem. The basic terrain is a continuous mesh with no holes or ledges from polygon to polygon. If that was all there was, followers would never get stuck.

The problem is that they get stuck on objects added to the game world. Those rocks, bolders, mountains and ledges are not part of the terrain mesh. The problem with the world objects is that most of them are only partially visible. If you use tcl in the console and go below the terrain mesh, you can see that most of the game objects like rocks and boulders and chunks of ruins etc. extend way below the terrain mesh.

So, using the size of the object to judge if a NPC can walk over it or jump on it won't work since there is no easy way to tell where the object clips the terrain mesh.
Most of those objects have simplified physics collision meshes (invisible in the game, also the reason arrows sometimes get stuck in mid air or hit a invisible wall) but in order to correctly use those for follower AI you have to either find their polygon to terrain mesh intersection in real time (CPU intensive calculations) or pre-calculate some of that information (only works for static objects and will drastically increase memory consumption).

None of this is impossible, but it is much more complicated than the OP realizes. It would also mean decreased game performance since the calculations needed are CPU intensive.
:cool:
User avatar
El Goose
 
Posts: 3368
Joined: Sun Dec 02, 2007 12:02 am

Post » Tue Jun 12, 2012 2:41 pm

I agree with what you said and I would love a much smarter AI but I guess there are always complications/limitations or excuses. ;)
User avatar
Daddy Cool!
 
Posts: 3381
Joined: Tue Aug 21, 2007 5:34 pm

Post » Tue Jun 12, 2012 10:24 pm

There's the problem. It's not the terrain polygons that are causing the problem. The basic terrain is a continuous mesh with no holes or ledges from polygon to polygon. If that was all there was, followers would never get stuck.

The problem is that they get stuck on objects added to the game world. Those rocks, bolders, mountains and ledges are not part of the terrain mesh. The problem with the world objects is that most of them are only partially visible. If you use tcl in the console and go below the terrain mesh, you can see that most of the game objects like rocks and boulders and chunks of ruins etc. extend way below the terrain mesh.

So, using the size of the object to judge if a NPC can walk over it or jump on it won't work since there is no easy way to tell where the object clips the terrain mesh.
Most of those objects have simplified physics collision meshes (invisible in the game, also the reason arrows sometimes get stuck in mid air or hit a invisible wall) but in order to correctly use those for follower AI you have to either find their polygon to terrain mesh intersection in real time (CPU intensive calculations) or pre-calculate some of that information (only works for static objects and will drastically increase memory consumption).

None of this is impossible, but it is much more complicated than the OP realizes. It would also mean decreased game performance since the calculations needed are CPU intensive.
:cool:

So, I'll ask the obvious question... why, when the followers get stuck like that trying to follow you, couldn't they have just told them to freakin' *jump*? You can't tell me that would have been so awfully hard to do, and it wouldn't have mattered a wit what kind of meshes or objects or whathaveyou were where or whatfor... just a simple "Ok, follower stuck. Follower back up two feet from stuck point. Follower take running jump over stuck point". Problem solved. You're welcome. No applause, just send cash. There has to be a simple, 6th-grade fix like that, if they'd just try it.
User avatar
le GraiN
 
Posts: 3436
Joined: Thu Mar 22, 2007 6:48 pm

Post » Tue Jun 12, 2012 7:44 pm

I agree with OP entirely, especially NPC during combat. It's ridiculous when I was playing a thief, shot an arrow at an NPC right in the face/leg or something, but when the eye icon says "hidden", that NPC just became calm again instead of being extra alert, stagger, attempt to heal themselves and then will still be searching for the shooter, etc. It is not "Hmm, must be my imagination" obviously because someone just shot an arrow in your face! :dry:

Anyways, the "hidden" icon during stealth should only appear the very first time you enter an area and no one notices you at all. It should be partially open for the rest of the period in that location when an NPC heard something and was sure someone / enemy is here.

If Bethesda could fix this bit, it would be awesome.
User avatar
jaideep singh
 
Posts: 3357
Joined: Sun Jul 08, 2007 8:45 pm

Post » Tue Jun 12, 2012 9:15 pm

There has to be a simple, 6th-grade fix like that, if they'd just try it.
Welcome to my world. :biggrin:

I am a programmer (since 1978) and i manage a small team of programmers for a company that shall remain unnamed.
What you need to understand is that computers are dumb. And by that i mean *really* dumb. There are no easy answers to the path-finding problem or else they would be used everywhere.

Can you make a NPC jump if they get stuck? Sure. But i don't think you have really thought through the consequences.
They (the NPCs) are not aware of their surroundings. They are not human (like most of the players, i hope). They have no concept of the world around them.
What if there's an easy way to go around the object? Should they still try to jump?
What if there's a 100 feet drop on the other side of the object? Should they still just jump?
Those are just two questions, there are many more to ask ...

There are endless choices and just as many possible outcomes.
Programatically accounting for all of them and taking them into consideration is not feasible with today's PCs.

Now, i'm not saying that Skyrims AI can't be improved, but when it comes down to actually coding and implementing things that seem trivial to the casual observer, things get really complicated really quick.

There are volumes of books on just the subject of pathfinding and computer AI in general.
Again, if all of this was so simple as you make it sound, it would already be used everywhere.
:cool:
User avatar
Project
 
Posts: 3490
Joined: Fri May 04, 2007 7:58 am

Post » Wed Jun 13, 2012 1:45 am

I was thinking about the AI the other day actually. At times it seems okay, but generally it's lacking.

First off, I wish that NPCs wouldn't repeat themselves so much...that gets annoying. They don't need to have a huge vocabulary, but once they've said something they shouldn't say it again for a while.

Second off, I wish there'd be a bit more interaction between NPCs. The other day I was involved in quite a Dragon Battle in Morthal. Several guards were killed, (it was at night), and the next morning I noticed children running by a dead body and stopping to look and comment. Also, another guard had bent down to look and was reaching out to one of the dead. It was a nice moment of realism. But when I approached the guard just stood up, made the usual comment about me brewing him a potion or something and walked off. Ruined the moment.

Spoiler
A bit later I followed Alva back to her house, and inside was her dead Thrall whom I'd killed earlier...she just stepped over him. Would've been a perfect opportunity for one NPC to react to another.
User avatar
Kevin S
 
Posts: 3457
Joined: Sat Aug 11, 2007 12:50 pm

Post » Tue Jun 12, 2012 11:37 pm

The Ai is pretty dumb...and barely better than what we have seen in past games, there are some pretty basic things I would have wanted to see...such as:

1. Flanking/baiting type behavior
2. Medium wind up, unblockable, extremely high damage attacks to punish turtling
3. Some form of leashing behavior, to prevent enemy groups from being cut down one by one
4. Basic, high damage counter attacks to prevent mindless melee spam
5. Some basic enemy party dynamics, like mage enemies buffing and healing their allies
6. Some basic hate prioritization beyond attacking whoever has the highest health
7. npc usage of racial powers
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm

Post » Tue Jun 12, 2012 6:50 pm

They hardly ever use suggestions made by players? Is that a joke?

The majority of the new features in Skyrim are what was widely requested from the Oblivion forums. :dry:


So.. they USE suggestions, but not the good ones?

Thank you for contradicting yourself, but let me re-iterate.

THIS IS THE SKYRIM FORUM. Not the Oblivion forum. They should be giving us feedback here, instead of on a different forum, which is irrelevant to the fact that it has already been released.



As for the guy that quoted you from the first page... He thinks i'm negative, but i'm not. I'm assertive.
User avatar
-__^
 
Posts: 3420
Joined: Mon Nov 20, 2006 4:48 pm

Post » Wed Jun 13, 2012 2:15 am

Love this idea.


Unfortunately Bethesda doesn't care. They hardly visit their own forums.

On top of this, they hardly ever use suggestions made by players.


As much as I want this, I can already predict that it won't happen... :(

This.

Bethesda seem more comfortable catering to the knuckle-draggers of the gaming world, rather than their actual existing fanbase. As a result they seem to ignore every good idea, desire and suggestion the community makes. Though after looking at half the community, I'm not surprised they blew up Morrowind. To be honest, if Beth ever did listen, they don't now, and I'm hardly surprised.

As much as I'd love an Elder Scrolls game on modern technology that had these features, it just isn't going to happen. Modders might be able to pull it off, but something like this would take a huge amount of time and skill to implement.
User avatar
Spencey!
 
Posts: 3221
Joined: Thu Aug 17, 2006 12:18 am

Post » Tue Jun 12, 2012 7:01 pm

Wow it seems like you have a lot of good ideas. It's too bad the developers at BGS didn't think of them. I look forward to your implementation.
User avatar
Mandi Norton
 
Posts: 3451
Joined: Tue Jan 30, 2007 2:43 pm

Post » Tue Jun 12, 2012 5:55 pm

Lotta herp, and even more derp in this thread. Programming AI is never easy. Mods can be extremely selective in who they cater to, because of the optional nature of them. To implement major AI refinements on a Global scale within the game, many things need to be taken into account. Most notably, resource level of the "Lowest Common Denominator", which isn't just the Xbox360, but the Lowest target PCs a well.

For what they had to work with, I think the AI is pretty admirable. I'm not expecting a troll to really do anything but fight or flee, they're animals. But NPC's are pretty intelligent in their ability use, they attempt to surround the player and in some cases, even flee to get help. My only real complaint is Stealth Detection is terribly low. NPC's shouldn't really forget they just got shot in the head with an arrow.
User avatar
Jesus Duran
 
Posts: 3444
Joined: Wed Aug 15, 2007 12:16 am

Post » Tue Jun 12, 2012 2:44 pm

Welcome to my world. :biggrin:

I am a programmer (since 1978) and i manage a small team of programmers for a company that shall remain unnamed.
What you need to understand is that computers are dumb. And by that i mean *really* dumb. There are no easy answers to the path-finding problem or else they would be used everywhere.

Can you make a NPC jump if they get stuck? Sure. But i don't think you have really thought through the consequences.
They (the NPCs) are not aware of their surroundings. They are not human (like most of the players, i hope). They have no concept of the world around them.
They have a perfect concept of where you have walked, and they follow in your footsteps until they get hung up on something. That is all the 'world around them' knownledge they need for this exercise- where you walked, where they should follow. If they can't get past point X in your trail without jumping, then JUMP.
What if there's an easy way to go around the object? Should they still try to jump?
Jumping should always be the first option. If the player could do it, so can they. If they can't make the jump for any reason after a couple of tries, then fall back to the 'go around' option.
What if there's a 100 feet drop on the other side of the object? Should they still just jump?
As already noted, they are following in your footsteps. Damn right they should jump. I want them to follow me, everywhere i go, unless I tell them to stay put. If that means over a 100' drop, tough for me, and tough for them. :shrug: Not like that's any big deal. Ya die, you reload. You're alive again, so are they. No biggie whatsoever.
Those are just two questions, there are many more to ask ...
All with logical answers, just like those easy ones. I'm not seeing insurmountable problems, anywhere. Just a failure to attempt to do it right.

There are endless choices and just as many possible outcomes.
Programatically accounting for all of them and taking them into consideration is not feasible with today's PCs.

Now, i'm not saying that Skyrims AI can't be improved, but when it comes down to actually coding and implementing things that seem trivial to the casual observer, things get really complicated really quick.

There are volumes of books on just the subject of pathfinding and computer AI in general.
Again, if all of this was so simple as you make it sound, it would already be used everywhere.

I'm not seeing 'endless choices' or 'endless possible outcomes'. I'm seeing simple decision points, when it's broken down to the basics- your follower knows your path. They know exactly where on the map they lost you due to a hangup, because they were following you, and um... because they are standing right on it- and they know what direction you were moving in when they got hung up on whatever it is they got hung up on. Which is usually nothing a-freakin'-tall. So, being in possession of those key facts, all they have to program them to do at that point, is jump over the hangup point, in the same direction they were following you in before they got hungup. If they could manage to accomplish that simple act, your follower would successfully get over the (non) obstruction 99.99999% of the time. And I don't generally jump over 100' cliffs, so that is a moot point and one the programmers have no business even worrying about anyway. They are your followers, and follow is exactly what they should always do, no matter what. So, just make the @#$% follower jump in those situations, ok? Problem solved :-)
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Tue Jun 12, 2012 11:56 pm

What I really want to see is friendly spriggans. Of course not from start of game. I remember I rescued one spriggan from hagravens cave and yet other spriggans are still hostile :(
User avatar
Stephani Silva
 
Posts: 3372
Joined: Wed Jan 17, 2007 10:11 pm

Post » Tue Jun 12, 2012 7:26 pm

I'm seeing simple decision points
No offense, but the fact that you don't see the complexity of the subject does *not* mean it is "simple".

It just means that you don't see complexity of the subject ...
:biggrin:
User avatar
Oyuki Manson Lavey
 
Posts: 3438
Joined: Mon Aug 28, 2006 2:47 am

Next

Return to V - Skyrim