Jump to content
The Dark Mod Forums

AI committing suicide


grayman

Recommended Posts

  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

I imagine that makes you a mod hero if not a mod god.

 

I notice that you have an FM/campaign that is waiting on persistent data exchange is there any hope you could tackle this next?

 

I would have to talk with Greebo about it. I think he was planning to deal with it at some point. I don't think it was planned for 1.03, since it's a lot of work, and I need to focus on 1.03 things.

Link to comment
Share on other sites

LOL!

 

I'm testing interleaved thinking with elevators.

 

 

I got my test elevator working, and the AI guard set at 28 walked to the fetch button, fetched the elevator, waited for it to show up, got on, and pressed the down button. No problemo.

 

The elevator began to drop, but he didn't, because he's skipping 27 frames. When he got to think, he dropped to the elevator and died, being dealt 462 in damage.

 

So I guess I have to fix that falling damage problem after all.

Link to comment
Share on other sites

LOL!

I'm testing interleaved thinking with elevators.

 

I got my test elevator working, and the AI guard set at 28 walked to the fetch button, fetched the elevator, waited for it to show up, got on, and pressed the down button. No problemo.

 

The elevator began to drop, but he didn't, because he's skipping 27 frames. When he got to think, he dropped to the elevator and died, being dealt 462 in damage.

 

So I guess I have to fix that falling damage problem after all.

 

I'd say if it is detected that the AI is in free-fall (or also "in elevator mode" but that also poses the problem, what if the mapper wants the AI to die with a "elevator floor breaks away" event), turn of interleaved thinking (make it like 2 frames or maybe 4 max). Otherwise, (if you just disable the damage), an AI could never take falling damage even if it is supposed to take it (AI falls down trapdoor placed by player, but player left the area 30 seconds before and the AI switched to interleaved thinking before reaching the trapdoor).

 

But I am confident you will find the right solution :)

"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 is solved by lowering the interleaved frame interval. Otherwise the AI gets out of sync with the elevator movement and stops patrolling.

 

Summary:

 

The interleaved frame interval is reduced to 4 or less in these situations:

 

* door handling

* elevator handling

* less than 8*max_interleave_think_frames units from a specific goal (path_corners, for example)

 

The code won't check for these if the interleaved frame interval is 1.

 

I haven't touched the vertical damage code.

 

Unless anyone can think of any other situations patrolling might encounter, this work is finished.

 

 

Link to comment
Share on other sites

This is solved by lowering the interleaved frame interval. Otherwise the AI gets out of sync with the elevator movement and stops patrolling.

 

Summary:

 

The interleaved frame interval is reduced to 4 or less in these situations:

 

* door handling

* elevator handling

* less than 8*max_interleave_think_frames units from a specific goal (path_corners, for example)

 

The code won't check for these if the interleaved frame interval is 1.

 

I haven't touched the vertical damage code.

 

Unless anyone can think of any other situations patrolling might encounter, this work is finished.

 

There are situations like "fire a weapon", which might not yet be covered. For instance think of a "two groups of guards fighting eachother" scene and the player leaves/comes later. Would a guard firing a weapon also have long think "gaps"?

 

Also, because we talked about water, what happens if a guard is near a water body, and 28 frames later is suddenly submerged?

 

I guess mappers might lower the intervals for these guard, but I hope at least some situations can be automatically covered.

"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

Biker's post made me think of sitting and sleeping AI. Is that covered by the path_corners modification?

Link to comment
Share on other sites

Good comments.

 

I'm going to run Alchemist overnight to make sure I haven't messed up earlier improvements with late changes.

 

Then I'll begin testing these other situations tomorrow.

 

Early night tonight. I just spent an hour shooting broadheads into AI, their attachments, and their weapons for a different issue. My arms are tired.

Link to comment
Share on other sites

I don't know guys but this approach is starting to sound like a bad hack messing with thinking and trying to anticipate all scenarios. Does this spontaneous dying happen in Doom 3? If not if it is associated with the mod maybe scope-out to find out where the root of the problem really lies? Or leave it alone and set it aside until inspiration strikes.

 

This is honestly my opinion on the hack even though it also at the end coincides with my desire to see 1.03 some day soon. ;)

Link to comment
Share on other sites

I don't know guys but this approach is starting to sound like a bad hack messing with thinking and trying to anticipate all scenarios

 

Well, adjusting the thinking of out of range AI has been used in all the Thief games...and we have to do it too unless we want the levels to be unplayable. Until D3 becomes open sourced, there are certain things that can only be accomplished by hacking. Sometimes we just don't have access to all the required parts of the engine to do anything else. In the end, it will all work.

Link to comment
Share on other sites

Understood. I just thought I'd weigh in a little on the table it until inspiration hits side. Because sometimes as you say you don't have access to to do anything properly and it may just not be doable under current thinking.

 

If you don't mind my asking why is it that Thief needs this adjusting of the thinking and Doom 3 doesn't or is Doom 3 having the same problems? You would think there would have been alot of complaints about that.

Link to comment
Share on other sites

... maybe scope-out to find out where the root of the problem really lies?

 

There really is no mystery to this; altering the thinking rate requires some adjustment in how an AI understands and deals with the world around him. It's a complex world, which gives the game its richness. TDM AI have more to think about than Doom 3 AI ever did.

 

I don't consider interleaved thinking a "hack". It was well thought out and virtually required to improve performance. Those of us with older systems appreciate the effort.

 

My work in this area comes from a desire to help out where I can. I need input from the team and the community to help me learn, so I tend to talk a lot about what I'm doing, to give people a chance to keep me out of trouble and generally headed in the right direction. This particular discussion has lasted longer than others because it's a complex topic. I know that can be frustrating for people who want stuff yesterday.

 

So while you might think that I and others are hacking away at the code with large south-of-the-border machetes, rest assured that when you sit down to enjoy another FM, there are people behind the scenes who are applying due diligence to make that experience as interesting and realistic as possible.

Link to comment
Share on other sites

If you don't mind my asking why is it that Thief needs this adjusting of the thinking and Doom 3 doesn't or is Doom 3 having the same problems? You would think there would have been alot of complaints about that.

 

 

Doom 3 AI don't have to 'think' the way Thief style AI have to. It doesn't make sense to have the AI working at full power when they're off screen. Doom 3 AI are spawned at specific times are usually quickly killed. They don't compute as much.

Link to comment
Share on other sites

My work in this area comes from a desire to help out where I can. I need input from the team and the community to help me learn, so I tend to talk a lot about what I'm doing, to give people a chance to keep me out of trouble and generally headed in the right direction. This particular discussion has lasted longer than others because it's a complex topic. I know that can be frustrating for people who want stuff yesterday.

 

Well I don't consider "hack" to be an insult and it wasn't intended to be an insult. I did say it was starting to approach "bad hack" territory because that is what might be happening. This is meant to do just what you say keep this from going in to an area where trouble occurs. Trying to anticipate myriad situations and make exceptions for each one.

 

I know you have good intentions and I that you are the one working at this. I have good intentions too but am not working at this beyond my comments so you may want to smack me for that but I do have good intentions. I am only trying to comment after the fashion you say you want. I am happy to have you keep everyone updated and talk about what you are doing and I do not mean to derail that at all. :)

Link to comment
Share on other sites

I know you have good intentions and I that you are the one working at this. I have good intentions too but am not working at this beyond my comments so you may want to smack me for that but I do have good intentions. I am only trying to comment after the fashion you say you want. I am happy to have you keep everyone updated and talk about what you are doing and I do not mean to derail that at all. :)

 

Should you really call something a 'bad hack' when you don't have a firm understanding of why it's being done in the first place though? :) Just saying.

 

All coding is hacking, in one way or another. Sometimes an indirect way has to be found when the direct way is not accessible.

Link to comment
Share on other sites

Thanks NEw Horizon. So the interleaved thinking is entirely a TDM hack or just the adjustabilty? What I'm trying to understand is that while Doom 3 AI do get killed quicly more likely because of the nature of the game it can't be that it would not ever have been noticed and been an issue with all the millions of D3 sessions that thousands of D3 players have played. Sure it is a very different game and a very different set of players for the most part and for that it is conceivable that none of the D3 crowd ever took notice but its seems more unlikely than likely. Unless this interleaved system is TDM only.

Link to comment
Share on other sites

All coding is hacking, in one way or another.

 

That is exactly the spirit I was intending.

 

Should you really call something a 'bad hack' when you don't have a firm understanding of why it's being done in the first place though? :) Just saying.

 

I didn't call it a bad hack I said it was starting to sound like a bad hack. Only because it was now becoming a situation where a growing list of scenarios was having to be complied and anticipated so that each one could have its exception. I believe this is often a point at which what I have said needs to be at least considered.

 

Really not trying to raise any blood pressures just trying to get that frim understanding :)

 

Well at this point I feel a little like I'm doing exactly what I don't want to to do which is distracting you guys. I'll "table" all further questions for now and hope to get a better understanding if you have the time and inclination to get back to me.

Edited by Aprilsister
Link to comment
Share on other sites

Thanks NEw Horizon. So the interleaved thinking is entirely a TDM hack or just the adjustabilty? What I'm trying to understand is that while Doom 3 AI do get killed quicly more likely because of the nature of the game it can't be that it would not ever have been noticed and been an issue with all the millions of D3 sessions that thousands of D3 players have played. Sure it is a very different game and a very different set of players for the most part and for that it is conceivable that none of the D3 crowd ever took notice but its seems more unlikely than likely. Unless this interleaved system is TDM only.

 

Perhaps I wasn't being clear. Doom 3 doesn't have interleaved thinking....because the AI are dumb and don't really think. lol

 

TDM AI have been completely rewritten to behave similarly to how the Thief AI behaved. this requires a LOT of extra CPU overhead. When the AI are off screen, there is no reason to have them 'thinking' every frame, so their thinking is cut down. All that is being done here is to prevent the AI from dying by allowing the interleaved thinking to manage the AI better in situations where they are bound to require higher thinking processes to navigate the world.

Link to comment
Share on other sites

Well I don't consider "hack" to be an insult and it wasn't intended to be an insult.

 

Just to weight in into this: I also often use "hack" as "not the real situation, but a much cheaper one". Sometimes hacks are just that: a 90% solution achived with 10% of the effort. And sometimes hacks are brilliant, clever and make the impossible happen.

 

So in my book, describing the interleaved thinking as hack is perfectly ok. Technically, the AI would only do the nec. work in one frame, e.g. each work they do would be done oly when the time is due. This however is the 100% solution: sep. all the little tasks into things that can be done from time to time. The 80% solution (do nothing or everything every X frames) is a hack, but it works so far.

 

And thanx to grayman, it will work even better in the future.

 

Please don't let the discussion about little corner-cases distract you from the fact that interleaved thinking already works and already pushes performance. :)

 

I did say it was starting to approach "bad hack" territory because that is what might be happening. This is meant to do just what you say keep this from going in to an area where trouble occurs. Trying to anticipate myriad situations and make exceptions for each one.

 

I know you have good intentions and I that you are the one working at this. I have good intentions too but am not working at this beyond my comments so you may want to smack me for that but I do have good intentions. I am only trying to comment after the fashion you say you want. I am happy to have you keep everyone updated and talk about what you are doing and I do not mean to derail that at all. :)

 

Just to be clear, I am also concerned about approaching "bad hack" territory, but I think the only other solution (make the AI only think parts when nec.) is way more complicated and might not even work better, and it also has to cover all the corner cases, too.

 

Btw, thanx for your comments, they are appreciated (sometimes it is good when someone with an outside view comments :) Please don't let us discourage comments!

"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

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

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...