0.7.65: Enemy AI has new and old issues [RESOLVED/CLOSED]

BansheeXYZ
Posts: 321
Joined: Fri Oct 23, 2015 8:19 pm

0.7.65: Enemy AI has new and old issues [RESOLVED/CLOSED]

Post by BansheeXYZ » Sun Mar 03, 2019 10:35 am

Saves attached. I'll try to explain the odd things I've witnessed.

1. New to build 65: enemies tend to act stupid or run off when an obstacle comes between you and them.

SAVE11 best shows this behavior. Bash the door open and let the nightblade out. Now brush past them, go into the room they were in and turn around, putting the wall between you and them. Instead of following you or waiting for you to come out, the nightblade will suddenly run off down the hallways. Sometimes you can watch them do it. I think this might arise from putting too much emphasis on line-of-sight. I don't know for sure, but it seems like classic AI employed a trick where if you went around a corner, it would press against the wall while moving side-to-side about 5 feet both ways to overcome it. This seemed to let it pass through most corners and doorways while giving chase, and it never ran off when it failed.

2. Sometimes enemies stop swinging even though you're right next to them.

SAVE12 shows the behavior. The guard is aggro, but he's not swinging.

3. Sometimes guards that spawn in town don't come after you when aggroed, but are just standing there like a statue gazing in another direction. In classic, they just come steaming towards you regardless of obstacles (proximity). They don't need to establish a LOS to come running.

SAVE13 shows this behavior. The guard is aggro from a crime I just committed, but spawned outside my radius and is just stuck looking away from me. If I get close enough to him, he does finally come at me.

4. Similar to #3, enemies act real dumb behind minor obstacles like tables that don't even affect LOS like walls.

SAVE10 shows this behavior. The warrior behind the table doesn't keep facing you as you move alongside it. In classic, he faces you and when you get close enough, he makes an attempt to overcome the obstacle (that trick I mentioned before). But there is a range to these attempts, so he never actually gets around the table opening until you get close to it. In a hallway setting, this range on the attempt would help him not wander all the way down the hallway.
aistuff.zip
(578.36 KiB) Downloaded 5 times

theJF
Posts: 11
Joined: Wed Dec 26, 2018 10:34 am

Re: 0.7.65: Enemy AI has new and old issues

Post by theJF » Mon Mar 04, 2019 1:35 pm

I'm continuing an existing game with the new 0.7.65 version I discovered that I can take down skeletons very easily by just getting behind them. You can back-stab away and they don't think to turn around. I don't think I used to be able to do this but not 100% sure. Here's a very brief example on youtube: https://youtu.be/BEJLcFI_M-w.

BansheeXYZ
Posts: 321
Joined: Fri Oct 23, 2015 8:19 pm

Re: 0.7.65: Enemy AI has new and old issues

Post by BansheeXYZ » Tue Mar 05, 2019 8:03 am

This video shows some of the problems. And at 2:25 you can see the skeleton run off once he puts the wall between him and it.


User avatar
Interkarma
Posts: 4229
Joined: Sun Mar 22, 2015 1:51 am

Re: 0.7.65: Enemy AI has new and old issues

Post by Interkarma » Tue Mar 05, 2019 8:25 am

Thanks for info and video. I'm sure Allofich/R.D. is watching and will fix up AI issues when he can. :)

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: 0.7.65: Enemy AI has new and old issues

Post by R.D. » Tue Mar 05, 2019 1:47 pm

I'll try and take a look at these when I can.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: 0.7.65: Enemy AI has new and old issues

Post by R.D. » Tue Mar 05, 2019 2:16 pm

1. Confirmed. (Also noticed that the nightblade can attack and hit me through the door, which shouldn't happen)

2. Confirmed when "enhanced combat" isn't used.

3. I know about this one, but I didn't consider it a bug. I thought classic behaved the same way. Will look into it some more.

4. Confirmed.

For the getting behind enemies one, I can confirm that one, but only when the "enhanced combat AI" is off. From watching the enemy behavior in that Youtube video I think maybe you had that setting off, too, is that right? Knowing that will help to narrow down the problem.

Also in your video they don't seem to be responding when you hit them in the back in that video, but when I test they immediately become aware of the player when hit, as they are supposed to.

theJF
Posts: 11
Joined: Wed Dec 26, 2018 10:34 am

Re: 0.7.65: Enemy AI has new and old issues

Post by theJF » Tue Mar 05, 2019 5:29 pm

In the case of monsters ignoring being struck from behind these are my settings:
Enemy infighting is active
Enhanced combat Ai is not active
Click to attack is active

If there is any more info I can give please let me know.
Thanks for your time!

User avatar
Interkarma
Posts: 4229
Joined: Sun Mar 22, 2015 1:51 am

Re: 0.7.65: Enemy AI has new and old issues

Post by Interkarma » Wed Mar 13, 2019 11:29 am

Two of these issues have been resolved in this PR. I'll close this one now.

Please don't hesitate to make another bug report for remaining AI issues, but please remember the "one bug per report" rule. It's difficult to track and manage reports that don't focus on just one specific bug.

R.D.
Posts: 379
Joined: Fri Oct 07, 2016 10:41 am

Re: 0.7.65: Enemy AI has new and old issues [RESOLVED/CLOSED]

Post by R.D. » Thu Mar 14, 2019 11:11 am

Two of these issues have been resolved in this PR. I'll close this one now.
All of the issues (6 total, counting the one I mentioned and the one in the video) should be fixed by that PR.
1. Enemies running off when can't reach combat target
2. Enemies not swinging in classic AI mode if target was beyond swing range but within "stop moving" range (happened because inconsistent distance measurements were used for judging these two thresholds, even though the thresholds are the same value)
3. Spawned guards stand, not aware of player
4. Enemies don't turn to face player when blocked by object, even though they have LOS (actually same root issue as 1, they were trying to do the same "walk straight because we don't have clear path to player" behavior, which was a temporary fallback behavior (based on assumption that the mobile was chasing the player) that is replaced now.)
5. Enemies attacking through doors (was a regression when I fixed problem with enemies swinging at invisible players. For that fix I switched from using LOS check to "isDetected" check, but isDetected can work through obstacles because of stealth roll and hearing. Now both LOS and isDetected are required)
6. Enemies standing still in classic AI mode when player circled behind them. This was caused by the recent strafe AI, because there was a case where the strafe decision, although not doing anything in classic AI mode, could cause the AI movement decision to just stop and end there, resulting in no movement. This is corrected now)

The only issue talked about here I didn't specifically fix was enemies seemingly not becoming aware of the player when backstabbed in that linked YouTube video, because I was never able to reproduce it. Maybe it was just issue 6 was immediately occurring again and so they continued to stand still. Anyway I think that one was probably not actually an issue.

User avatar
mikeprichard
Posts: 332
Joined: Sun Feb 19, 2017 6:49 pm

Re: 0.7.65: Enemy AI has new and old issues [RESOLVED/CLOSED]

Post by mikeprichard » Thu Mar 14, 2019 6:22 pm

I just wanted to say a big "thank you" for the incredible work R.D. has put into improving combat AI, as well as countless other aspects of DFU, over the years. Great stuff.

Post Reply