Jump to content
The Dark Mod Forums

What's next for AI?


Recommended Posts

1.07 is locked down now for final testing, and will be released when all is well. Included in all the new content are a number of AI bug fixes and additions.

 

For 1.08, apart from getting a few more existing bugs fixed, is there any particular AI-related area that you think needs attention?

 

Thanks.

Link to post
Share on other sites

I can name the two (related) areas I think are the worst right now... Lightning fast reflexes when the player is full light. This leads to the inability to lean around corners in bright light without being instantly spotted, among other things.

 

Discussed here: http://forums.thedar...post__p__228657

 

Another related issue to AI spotting the player too easily: http://bugs.angua.at/view.php?id=2775

 

 

The only other really significant issue I can think of is AI not drawing a weapon while attacking:

http://bugs.angua.at/view.php?id=2533

Link to post
Share on other sites

One are that we could use is "ambient AI behaviour". E.g. currently we either have AI that follows strict patrol routes (which are hard to change in game, unless you preplan everything), or wanders around aimlessly (rats).

 

We really could use more of a "find new goal => follow goal, choose a different goal" behaviour, with different weights influencing the result. A couple of examples:

 

* rats that search for food, and avoid light, run away when scared, and that occasional run to each other and fight

* swarm behaviour (fish/birds/butterflies)

* flying creatures - we do not have any 3D path planning so far

* Monsters searching around

* Ai that randomly walks around and "does stuff". e.g. you set up certain points (or it is even entirely automatic) and the AI interacts with it. Stares at painting, warms hands on fire, snacks on food, looks out of window etc.

 

Not sure how feasible all this is. Especially without the source.

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

I'm still interested in developing a "vocation" system so NPCs can do sensible actions by vocation in their idle phase -- cooks cook, maids go room to room cleaning (as marked), or even better a structure for a mapper to set rules & make their own vocations with some premade ones, like a variant on a conversation system but more like general rules with conditions to animations, movements, barks & object manipulations while they're in idle & it's turned on. But that's a feature, a longterm wish for a feature at that, and hardly impending.

 

Edit: For the record, I didn't see Tels' post yet when I posted that.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

Is this a good place to post a "wish list" for future AI development? If so, someday I hope to see some/any/all of these...

  • dogs
  • cats - small & large / domestic & mountain lion
  • ass/burro/donkey or onager
  • pony or Fjord Horse or Icelandic Horse
  • people of smaller stature (children and/or little people)
  • fish
  • snakes (wild or pagans pets)
  • frogs (swamp/bog areas)
  • bats (even if just to hang and crawl on cave ceiling)
  • birds - raven/crow, seagull, hawk, blackbird (even if not flying, just perched and moving head, maybe moving wings, maybe walking)
  • mice (can such a small creature be done?)

Edited by PranQster

System: Mageia Linux Cauldron, aka Mageia 8

Link to post
Share on other sites

Is this a good place to post a "wish list" for future AI development?

 

Not what I had in mind, but it's as good a place as any.

 

That's quite a list. It should keep a modeler busy for a year or two. ^_^

  • Like 1
Link to post
Share on other sites

Combat behavior. I think most pressing is the issue of AI tailgating your every movement with alarming response time, being right up in your face.

I think some nice new behavior would be things like AI backing up when player weapon is poised to strike, charging forward when player misses an attack, strafing between attacks, etc. Also some general forward/backward movement to represent the flow of the fight. AI pressing the attack after successful blows, or getting beat backward after being hit (or even parrying) 1 or more times consecutively.

 

Strafing would probably require some new AI animations as well, so probably not just a coding thing.

Also, while on the topic of AI animation, would be really nice if some upper body / lower body animations could be linked together to be a bit more realistic, like sticking one foot forward and leaning in while making a thrusting attack.

Link to post
Share on other sites

Speaking of AI changes, I've had major plans in the back of my head for the past year with regard to AI behaviour. Basically, I'd like to put the current (more or less rigid) set of States and Tasks classes into a controlling Behaviour class framework (plugged into the AI's Mind class). The behavious class should do all the decision making and basically control the overall acting (is the AI defensive, is the AI a combattant, is the AI an ambient AI or a rat, is the AI a NPC, a player guide, whatever). It should be configurable by simply means and via spawnargs. Some of the things handled by the State class (like visual stim handling) should be delegated to the currently active behaviour instance.

 

Some of the changes mentioned above could be solved by such a framework, but not all, needless to say.

 

At least that's what I would like to do sometime when I finally get a considerable chunk of freetime back on my hands, as it's a lot of work of course.

Link to post
Share on other sites

I'd say the AI is pretty solid after grayman's important contributions in the area. Thank you! Your improvements truly bring the mod to the next level.

 

I only can think one thing that could be improved.

 

Alert AI reaction speed with doors.

 

I welcome people to try it:

1) Go and let an AI see you.

2) Run away

3) Escape through a door and slam the door shut in front of the AI

 

It takes very long amount of time for the AI to get the door open and continue the pursuit. It makes things too easy.

 

Could this behavior be optimized somehow? Maybe when the AI is in combat state the door using anim would be faster? Maybe the AI would skip the slow door opening anim altogether? Maybe the AI would otherwise be more faster in his moves when he is actively pursuing someone?

Clipper

-The mapper's best friend.

Link to post
Share on other sites

It would feel more lively if guards/residents would occasionally take a break on their route when passing other AI to have a little chat with each other.

 

We could probably set up some mini-conversations with canned lines. Define different topics (eating, drinking, this job sucks, etc.). Hopefully it could be done with the current set of voice sounds, unless we can bring back the voice actors to add what we need. Define who can chat with whom, rank-wise. Allow immunity from chats via spawnargs.

Link to post
Share on other sites

I'd say the AI is pretty solid after grayman's important contributions in the area. Thank you! Your improvements truly bring the mod to the next level.

 

My pleasure. B)

 

Alert AI reaction speed with doors.

 

Yes, this one's always bothered me, too, though I never bothered to improve it.

 

There are two parts that need changing:

 

1 - The AI's outstretched hand anim needs to be faster.

2 - The door needs to fling itself open.

 

One part that might still look odd--and I don't know if it can be changed--is the arrival at the door, when the AI might shuffle around a bit to find the "stand here to open door" spot. That happens more often when the AI is running, if they overshoot the spot and have to come back to it. This might be solved by loosening up the check for how far away the AI is from the spot.

 

Definitely worth looking into.

Link to post
Share on other sites

Speaking of AI changes ...

 

Sweet! There are things we know we want to do in the near future (ironing out a few kinks in the alert/warning system), but those will be done in the current framework. I'm not planning anything on the scale you mentioned. It would be nice to have a single framework.

Link to post
Share on other sites

One are that we could use is "ambient AI behaviour". ...

 

I wonder if a general goal system would offer the same behavior. For example, "make sure the front gate is closed". Wherever the AI is when he's given this goal, he plots a course to the gate and if he finds it open, closes it.

 

That type of thing.

 

@greebo, could this be handled by the framework you're proposing?

 

(I worked on this type of thing in college, with simulated robots picking goals off a stack. "Find the red book and put it on the green bookcase." It became hilarious when they had simultaneous goals involving the same objects.)

Link to post
Share on other sites

* swarm behaviour (fish/birds/butterflies)

 

I was thinking about this for the rats. It could also be useful during humanoid searches, to keep them from bumping into each other and trying to occupy the same space.

 

* flying creatures - we do not have any 3D path planning so far

 

@Springheel - where do we stand with the elemental? I had proposed a way to handle the flying, but I don't remember how the conversation ended.

Link to post
Share on other sites
Are you combat animation folks getting this?

 

And who would they be? :P

Link to post
Share on other sites
@Springheel - where do we stand with the elemental? I had proposed a way to handle the flying, but I don't remember how the conversation ended.

 

I haven't looked at them in years, but when I last left them they were bascially functional, except they "hovered" above the ground instead of flying, and water arrows didn't kill them. I don't remember the conversation you're referring to.

Link to post
Share on other sites

Looks like you should copy Oblivion/Skyrim's goal based AI and call it DarkRadiantAI.

 

I feel like door opening needs a big rework. It's advanced from where AI would get stuck or start opening and closing the doors multiple times, but the animation looks clunky (no contact between hand and door) and the speed does seem to be a problem. I'm thinking that the AI that wants to open the door fast should kind of fling it open with a swift jerking motion. Maybe the door needs its own physics in this regard so that it can roll itself open (or look like that anyway)?

 

I remember AI doing pretty bad against stacked crates and other obstacles that I put to block their path. They would kinda walk against it until they had forced through.

Link to post
Share on other sites

I've been fretting the new rope recognition behavior because of possible balance issues but I'll add another concept to the discussion:

 

Crawling

 

I played one of Fidcal's WIP missions where a table was large enough to hide under. If the AI discover you they do all sorts of crazy antics because they can't deal with that kind of obstacle. Crawling would clear up that situation and would allow AI to tail you into vents and small caves.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to post
Share on other sites

I've been fretting the new rope recognition behavior because of possible balance issues but I'll add another concept to the discussion:

 

Crawling

 

I played one of Fidcal's WIP missions where a table was large enough to hide under. If the AI discover you they do all sorts of crazy antics because they can't deal with that kind of obstacle. Crawling would clear up that situation and would allow AI to tail you into vents and small caves.

 

And a variation of crawling might be ladder-climbing. That would probably break some missions, though.

Link to post
Share on other sites

Yeah I wouldn't like it for design reasons. The received idea of the gameplay is there are certain safe-harbors players can go where AI can't, so getting away is a matter of getting to the safe-harbor. If you tweak that, you start messing with that model and how mappers design their maps and players expect the world to work.

 

On the other hand, it might be a good idea to have them able to squat down and swipe their sword under a table or into a cubbyhole to give the player a good scare and prevent this kind of exploit. Just not literally crawl in after you through a duct.

  • Like 1

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to post
Share on other sites

Ok, here are some more suggestions:

 

+ Collision =

  • AI should be able to feel/notice whenever a ) the player touches them with a held object; b ) they are hit by objects thrown by the player.
  • AI should be vulnerable to damage from certain types of thrown objects: heavy, solid ones like rocks or bottles - this takes me to another request: a new attack dimension, thrown objects as weapons; if you hit a guard with a rock on the arms or chest, a pain anim could play and he will become alerted, but if you hit him right in the head, chances are you might KO him; thrown daggers could actually kill (new small weapons could be incorporated, like throwing axes, or a spear?), etc. But this is a different scope, for now, I would only suggest AI can, not only be alerted by the impact, but play pain animations when hit by certain kinds of objects.

+ Combat =

  • Like suggested, AI could be more active in combat, strafing, assuming temporary offensive stance (2-3 attacks in fast sequence when very hurt for example), or defensive stance (blocks with little counters), etc. This would keep the duels more varied, not so much A attacks, B blocks, B attacks, A blocks. A lot depends on animation, like leap attacks, trips or taunts, so I wont mention them here.
  • AI sometimes tend to run right against the player (they will keep running against your chest), sometimes when charging an attack (seems to be a case of wrong timing of the blow).
  • As mentioned, there seems to be a bug where AI will swing at you without drawing their weapon.

+ Awereness =

  • AI should be able to notice moving visible objects and basicly treat them as they would a visible player - get suspicious. So if the AI is in a room, and the door suddenly swings open, even if the player is hidden, the door itself might be in plain view and thus be "spotted" by the AI as he would the player himself (with different suspicious levels and sounds though). This would be true for held objects moving about in full light (again, even if the player is hidden). Noticing moving objects would be also useful in neutral situations, as the AI would notice the player moving objects that don't belong to him and that could increase agressiveness levels.
  • If moving objects awereness is not possible, AI should be able to identify changes in state for tagged objects, and react - a locked door that is "open" (when it shouldn't) would be noticed by the AI when he sees it (or interacts with it, if it was left shut by the player). Food that was eaten would be noticed, etc. The point is, not only the state of lights but of various other objects should be sensible for the AI.
  • Most important for me, AI should be able to notice when "tagged" companions are not where they are supposed to be (they are missing = were stealthly taken out by the player). This was talked about here: http://forums.thedar...ce/page__st__50 . As it is now, it is easy to exploit their lack of awereness of each other, and just take out one by one while they are alone in their routes. It should be possible to define "teams" of linked AI that would notice each other's absence, and that would make them alert or even go about looking for the missing one(s) (going in the direction of their path corners perhaps?). A possible way of doing it, as discussed in the mentioned thread, could be to set a timer on the AI's path nodes that would start an alert signal after X time the AI's state changes (from alive to dead or KOed), which seems to be similar to the way the valauable items awereness works. The timer would simulate the time the other AI is willing to wait for the victim to come back from his route. After it runs out, the path node would alert any other AI that its "owner" is missing, when seen. Sorry if this description is complete crap, I'm not a coder at all. The point is "If guards were to be alerted when certain companions are not where they should be, it would effectively make it much harder to kill them with abandon, as long as you do it quietly".

Edited by RPGista
Link to post
Share on other sites
AI sometimes tend to run right against the player (they will keep running against your chest), sometimes when charging an attack (seems to be a case of wrong timing of the blow).

 

This will already be fixed in 1.07.

 

AI should be able to identify changes in state for tagged objects, and react - a locked door that is "open" (when it shouldn't) would be noticed by the AI when he sees it (or interacts with it, if it was left shut by the player). Food that was eaten would be noticed, etc. The point is, not only the state of lights but of various other objects should be sensible for the AI.

 

This should be noticeably improved in 1.07. Grayman has fixed AI so they can respond to flagged doors, as well as correctly noticing arrows and ropes. They'll be more efficient at noticing flagged objects that are missing or broken, and will be far more effective in passing warnings to friends about those things.

Link to post
Share on other sites

Btw, I'd like to thank grayman for his many contributions to the AI. very much appreciated! :wub:

And lets not forget that greebo build the foundations of our AI - many thanx to you, too! :wub:

"The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore, all progress depends on the unreasonable man." -- George Bernard Shaw (1856 - 1950)

 

"Remember: If the game lets you do it, it's not cheating." -- Xarax

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...