Jump to content
The Dark Mod Forums

AI Movement Changes Beta


grayman

Recommended Posts

I want to start a beta test of the AI movement changes I've been working on (seemingly forever).

 

I'm open to anyone participating. This isn't like a mission beta, which necessarily needs to be kept to a few testers. These changes will affect everyone, so the more feedback I get, the better it'll be.

 

These changes are mostly in the area of reducing the situations where AI get stuck. It's not going to fix everything; there are too many special cases to anticipate or fix every problem. But they should (hopefully) minimize AI treadmilling into each other, or walls, or objects that should have been monster-clipped but weren't.

 

If there's one thing I learned from this work, it's the importance of monster-clipping your map properly. The more glitchy places you can keep your AI out of, the better they'll behave.

 

I have more situations to investigate, but I can clean them up in parallel with the beta.

 

And better rat behavior is thrown in for good measure. No more rats stuck on stairs or under wheelbarrows.

 

I'd like to start in a few days, so watch this space.

Link to comment
Share on other sites

  • Replies 119
  • Created
  • Last Reply

Top Posters In This Topic

Does this mean we also get a DLL with the fixed "distance check", audio, and other most recent SVN committed repairs?

 

If so, count me in!

 

I will somehow make time to test (I hope)... :D

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 comment
Share on other sites

Does this mean we also get a DLL with the fixed "distance check", audio, and other most recent SVN committed repairs?

 

I can't release an SVN version because I shouldn't be releasing other folks' work (not right + I can't tell it it's complete). And I have no way of knowing what darkmod files are needed to keep things from crashing.

 

So the beta will be 1.03-based.

Link to comment
Share on other sites

You'll be putting this on SVN too, I presume?

 

Yes, once beta's over.

 

There was some angst during the run-up to 1.03 regarding code that had been in SVN for months w/o anyone looking at it or testing it (my stuff included). I want to make sure the movement changes are solid (and acceptable) before foisting them on SVN.

Link to comment
Share on other sites

It just seems like putting it on SVN would mean that everyone on the development team would be testing it automatically, even as they ran their own testmaps.

Link to comment
Share on other sites

It just seems like putting it on SVN would mean that everyone on the development team would be testing it automatically, even as they ran their own testmaps.

 

Then I will commit it to SVN as well as providing a 1.03 version. This is a large change, untested by anyone but me, and I wanted to make sure it was acceptable and stable before committing. Once we have SVN access again, though, I'll send it all in.

Link to comment
Share on other sites

I'll test in 1.03. I particularly want to see how rats behave against a monsterclip wall. I had rats going out a back door then getting stuck running in circles on a hill. I gave up and put a 12 unit high monsterclip 'corral' near the back doorway so they couldn't get out but hopefully humanoid AI could step over. Next test found a rat moonwalking against this monsterclip barrier.

 

Of course, if they can handle the hill then so much the better. I'll let them out to play.

 

Also of course, humanoid door handling. I've set two bottleneck doors to be func_static permantly open. It will be nice if I can restore them to openable doors.

Link to comment
Share on other sites

I particularly want to see how rats behave against a monsterclip wall. I had rats going out a back door then getting stuck running in circles on a hill.

 

 

That's indicative of not reaching their goal. The new code has a 10 second timeout, after which they'll pick a new goal. I had a staircase in my test map that had a low wall on one side. A rat on the steps picked a goal on top of the wall, but when he got near it, he'd fall off the edge to the ground. Then he'd scamper around to the base of the stairs, run back up, and try again, fall down, try again, etc. Funny to watch, but not for more than a few seconds.

 

 

 

 

Link to comment
Share on other sites

For those interested in testing the movement changes, you can pick up a 1.03 Windows DLL here:

 

http://www.mediafire.com/?y045lennd8dngeb

 

I don't have a 1.03 Linux DLL available.

 

If you want to use SVN, the changes are committed at revision 4472.

 

Please test when you have time. Unreleased WIPs, existing missions, everything helps. If all goes well over the next 10 days, these will be included in 1.04.

 

If you find a problem, post it in this thread.

 

Thanks.

 

 

 

Here's what's different:

 

Reduce time needed to resolve a block when two AI collide. This means less confusion in narrow spaces.

 

 

Rank is now taken into consideration when two AI try to resolve a block. If one has to stand still and let the other pass, the one standing will have the lower rank if there's a difference.

 

Previously, two AI approaching each other would alter their paths so that when they met they could pass w/o touching (assuming there’s enough room). Now, if one AI has a higher rank than the other, the higher-ranked AI will continue straight and the lower-ranked AI alters its path to walk around the higher-ranked AI. AI of equal rank will use a secondary temporary ranking system to determine who walks around the other.

 

If two AI are traveling in the same direction, the one behind will do a better job of passing the one in front if the one in front is traveling more slowly.

 

AI no longer collide head-on and turn toward the same wall, only to get stuck treadmilling.

 

In general, AI will get stuck less often. It can still happen, though, given the right conditions. Not all conditions can be anticipated. (This is a strong argument for properly monster-clipping a mission, to keep the AI out of trouble spots.)

 

Because of their complexity and number, func_statics are ignored during pathfinding. Now, if an AI bumps into one, pathfinding won’t ignore it. This provides the AI with a new path around the obstacle instead of through it, which reduces treadmilling against func_statics.

 

In 1.03, AI approaching a closed door queue up and go through the door one at a time, the last one through closing the door. They did not behave as well if the door wasn't originally closed. Now they queue up, go through one at a time, and the last one through closes the door.

 

For rats ...

 

 

Rats will select from more spots to go to. This reduces getting stuck in small spaces like stairs.

 

Added a 10s timeout for rats traveling to a spot. This prevents getting stuck when a spot is valid, but unreachable.

 

If a goal is very far away (>120), a rat will run to it instead of possibly doing a slow hop the entire distance.

 

Added a drowning check for rats to keep them from pausing too long underwater. This reduces drowning, but doesn’t prevent it.

 

Less chance of a rat getting stuck inside a func_static (like a wheelbarrow or under a bed).

 

If you monsterclip a bed or bookshelf, lift the bottom of the clip off the floor and the rats will run under the beds and onto the lowest shelf. They should have no problem getting back out.

Link to comment
Share on other sites

That set of improvements does sound fantastic. I'll plug it in and see how it goes. Been getting a bunch of bunch-ups and other squacked behavior what witht the hyper-high-alert thing going on in 1.03 so this should be easy to test.

 

Also the mission I'm currently currenting has just had some extra raticus raticuses moved in.

 

Thanks for the file AND the nice run-down on the particulars.

 

:)

Link to comment
Share on other sites

First test does not start well. I set this up, dmapped etc while web browsing. When I came back the game had been running a few minutes and already there was a jam.

 

In the screenshot below the woman is just standing idle, presumably waiting to go out the back door to the left. There is no obstruction.

The guy behind her is circling endlessly.

The back door has been left open by AI unknown.

There are no AI nearby outside.

 

Don't know if this console warning is relevant...

 

WARNING: GetPointOutsideObstacles: no valid point found

 

 

post-400-129593570777_thumb.jpg

Link to comment
Share on other sites

Splendig work, grayman!

 

I'll compile a linux .so and check it in tonight. Can't wait to test this!

 

(The only complain't I'd have is that the checkin is huge and it might have been better to sep. it into a few smaller checkins, so that if problem arise, it can be easier tested which of the changes is the culprit. But maybe the changes are all so intermingled that you couldn't do that.)

"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 comment
Share on other sites

This time I dove straight in at the start to see if I could see how that situation developed but some of my AI are on random patrols so it came out differently. AI seemed to moving in and out this back door smoothly. Very soon one left it open. Eventually I noticed one stood outside the back door idling off to one side facing the door. I thought she was stuck but then I heard footsteps and an AI came out the door. She then went through.

 

As I flew about trying to watch events I suddenly realized there was a jam a bit further indoors. In the image below

 

The helmeted guard is stood idling in the doorway. No obstruction ahead.

The blond male guard is circling round and round waiting to go through. He does moonwalk against the other guard now and again but breaks off after a few seconds to circle around a few times again.

The female is stood waiting.

 

post-400-129594495918_thumb.jpg

Link to comment
Share on other sites

In the screenshot below the woman is just standing idle, presumably waiting to go out the back door to the left. There is no obstruction.

The guy behind her is circling endlessly.

The back door has been left open by AI unknown.

There are no AI nearby outside.

 

I assume there's no door where she's standing. She has to go through the opening where she is, then turn back toward the actual door to go through it.

 

Did she walk up to this spot from somewhere else? Could she be the one that came in through the back door?

 

The guy behind her: Is he bumping into her and then circling, or is he circling w/o ever touching her?

 

It would be good if you could copy the relevant brushes, the door, these AI, and their path_corners into an empty map, and post the map. I'll add dummy brushes to seal the area off. If this isn't possible, then I'll try to recreate something that looks like this picture.

Link to comment
Share on other sites

The helmeted guard is stood idling in the doorway. No obstruction ahead.

The blond male guard is circling round and round waiting to go through. He does moonwalk against the other guard now and again but breaks off after a few seconds to circle around a few times again.

The female is stood waiting.

 

As in the other, can you copy the brushes defining the area, the AI, and their path_corners, and post here?

 

This situation seems more straightforward than the other. I assume the door is swung away more then 90 degrees on the far side.

Link to comment
Share on other sites

I'll compile a linux .so and check it in tonight.

 

Great! Thanks.

 

 

(The only complain't I'd have is that the checkin is huge and it might have been better to sep. it into a few smaller checkins, so that if problem arise, it can be easier tested which of the changes is the culprit. But maybe the changes are all so intermingled that you couldn't do that.)

 

I'm not sure that would have been possible. Everything depends on everything. Even the rat stuff depends on changes made for the humanoids.

Link to comment
Share on other sites

I noticed one stood outside the back door idling off to one side facing the door. I thought she was stuck but then I heard footsteps and an AI came out the door. She then went through.

 

That's one aspect of the door queuing that's always been disturbing: an AI will stop and wait for another AI that they can't see. Especially around a closed door. I decided not to make visibility part of the requirements for stopping, though, because the goal is to keep AI away from the door when others are using it. I rationalized it in the end by saying, "Oh, I guess they can hear someone else approaching the door." Sort of lame, but it's better than letting an AI get all the way to the door and block it just as an AI on the other side goes to open it.

Link to comment
Share on other sites

Yes I was going to say the same - she can hear someone coming it seems like. They are very polite these AI.

 

I'll try to extract this section. The two doors are close so it will be one unit. But the AI come from far and wide and upstairs so it will be a challenge to bring them near enough but not too near without it being too large. There are 4 doors in that area that have given problems so I might as well try to extract that whole section.

Link to comment
Share on other sites

This all went horribly wrong. I spent some time extracting the section but something must missing. It's too complicated so it would be easier to make a new test map than keep trying to fix this when it can never be exactly the same setup. If nobody else can make one I'll try to make time ... sometime.

Link to comment
Share on other sites

This all went horribly wrong. I spent some time extracting the section but something must missing. It's too complicated so it would be easier to make a new test map than keep trying to fix this when it can never be exactly the same setup. If nobody else can make one I'll try to make time ... sometime.

 

Can you PM me a screenshot of the area in DR (X/Y view) and I'll try to make something of that? The architecture is more important than where the AI start out.

Link to comment
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.


  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...