Jump to content
The Dark Mod Forums
Sign in to follow this  
Fausst

Object and Light Movement Awareness of AI

Recommended Posts

One of the things that breaks the immersion for me is, the player can stop the door AI is closing while all AI can do is to look.

 

Currently, if an AI is closing a door and the player stops it, the AI recognizes that the door's closing has been blocked, and he's done dealing with it, so he turns away and goes about his business.

 

If the AI is supposed to react to this blockage, then that's different than the "door is moving when it shouldn't be" situation. That's a "door is not moving when it should be" situation, and doesn't require a stim. The AI is running the door-handling code at that point, so it's easy for him to recognize and react to this situation.

Share this post


Link to post
Share on other sites

Well, I see my misjudgement there. That is a different situation. And what do you think I should do about the object awareness thing? (the question I asked at the bottom of the post before this)

Share this post


Link to post
Share on other sites
I think after making the AI turn their heads, we should have a system to make AI aware of the moving door and increase the alert level according to it.

 

If it's a suspicious door, AI will already react to it when it opens. But if it's not, AI shouldn't be suspicious just because the door moves...how does the AI know it isn't a fellow guard? I agree it would be nice that players can't frob a door back and forth under a guard's nose without him getting suspicious, but I don't have a good idea for a generic way to deal with it. One possibility is having the AI treat it as suspicious if they see a door open and don't see a friendly AI near it within X seconds. Though I could easily imagine a guard seeing a door open while walking past it, and is then out of range by the time the friendly AI comes through.

 

no matter how alerted he is because of the moving object, he shouldn't identify the player. This is like the hearing alert. The AI definately knows something is out there but just can't spot it. Last state of search with weapons drawn.

 

I think this makes the most sense. Seeing a moving object is worth investigating, but they shouldn't immediately know it's an intruder carrying the basket.

Share this post


Link to post
Share on other sites

I think this makes the most sense. Seeing a moving object is worth investigating, but they shouldn't immediately know it's an intruder carrying the basket.

 

I too found that one more reasonable and started making experiments with it. It seems like this method is very prone to silly behaviour. The AI can't identify the player until it actually detects the player and this causes situations like;

The ai definately saw the moving object. He reached the maximum alert state so he investigates the object place. But the player holds the object between himself and the ai. AI tries to investigate the location of the object. It arrives to the location and stands next to the object looking at it and barking. It is just stuck there if the player doesn't move the object.

You can be in shadows and the object is in light. If you put the object between yourself and the AI, it will not have the chance to detect you. Any suggesstions?

Edited by Fausst

Share this post


Link to post
Share on other sites

maybe the ai should be more verbal when something happens as well, if torch goes out 'must have be the wind' if a door opens/crate moves 'eek ghosts/did you feel that must be an earthquake'

Share this post


Link to post
Share on other sites
You can be in shadows and the object is in light. If you put the object between yourself and the AI, it will not have the chance to detect you. Any suggesstions?

 

Yes, that's certainly a problem.

 

The ai definately saw the moving object. He reached the maximum alert state so he investigates the object place. But the player holds the object between himself and the ai. AI tries to investigate the location of the object. It arrives to the location and stands next to the object looking at it and barking. It is just stuck there if the player doesn't move the object.

 

What if there was some distance factor, so that the first reaction of the AI is to head over to the object to investigate, but once they get close enough, they identify the player if _either_ the player or the held object is visible. That would keep AI from going into combat mode if they see a spoon move across the hall, but the player can't hide behind a floating crate when the AI is two feet away.

Share this post


Link to post
Share on other sites

Consider:

 

These things you discuss...

 

They are quite obviously...

 

Going to be more than tweaks. Game-changers, very muchly so. And... further, heavy, heavy weights on a system already much weighed down.

Share this post


Link to post
Share on other sites

What if there was some distance factor, so that the first reaction of the AI is to head over to the object to investigate, but once they get close enough, they identify the player if _either_ the player or the held object is visible. That would keep AI from going into combat mode if they see a spoon move across the hall, but the player can't hide behind a floating crate when the AI is two feet away.

 

So you are actually suggesting the second option. What exactly is "close enough" ? Are you suggesting it to be depending on the distance or visibility or both?

I was thinking something like,

if the ai can't get closer to the entity and still sees the object, then it should identify the player no matter the players visibility.

Edited by Fausst

Share this post


Link to post
Share on other sites

Now that my company has unblocked the darkmod site as beign forbidden, I am free again!

 

 

For this, I think you have to imagine yourself in the position: and remember, being a hired guard, and allowing a thief to get through, well.... if you were VERY lucky, you would lose your job without any pay, more likely, as in the old days, your wife and kids would likely not ever see you again, not in one piece anyway.

 

If I was a guard in a hallway, standing or walking, very likely I would absolutely know where near guards should be and when, patrolling or not. If I was standing guard, guarding a hall, and I saw a door open, partly or not, or even close without me seeing anyone go into it, I would be walking over with hand on sword at the least checking it out - why? if a thief got by me, parts of me would compliment the rest of the food served to the masters' dog .

 

If I was guarding a room, and I could see a crate or light or spoon moving, of course I would have my hand on my sword ( likely sword would be out, - what's the harm in that 'xcept being ready?!) and go over to check what this abnormal, unexpected activity out, and as no one identified himself would be in high alert ( be neat if the guard could yell something like "Benard (Benny's oldest brother) is that you?!" and with no response THEN would draw his sword). My life would depend on it.

 

So for my 2cents, if a door opens and no one comes out in 2 - 3 seconds, have the guard check it out as Tels said.

if a door closes and no one was entering, have the guard check it out.

Freaky, floating moving objects: guards go on alert because objects shouldn't do that - so would be visual.

Hearing a door close around a corner, out of sight, check it out, as 1) I know where all my buddy guards should be and no one should be at at that door - 2) if it was the master, he would be happy seeing me check out the sound.....

 

 

Being a theif, and ear against the door checking for any sounds, hearing walking I wait. If I don't hear anything I open it a crack and I see a guard - he looks and comes over to check the door/room out, I hide in the room, wait until he enters, distract him with an object and slip by him - I've done this before, I'am a good theif. If I open the door and the view angle does not let me see a guard standing on the hinge side of the door, I think it is clear and creep out - i find I am immediately spied ( that's the risk of being a thief), I have a run on my hands and I go to escape plans that I always have in my head - just in case if this happens.

 

I like the AI to be act as they would be in real life ( as long as the game can handle it), with their life resting in how well they do their duty, cause a good thief will still outwit them.

 

Again I think the AI should be acting as you would with your responsiblity to your postion, and with a little fear of your life.

Share this post


Link to post
Share on other sites

Indeed, a lot of the hesitation to improve AI's senses in any way seems to come from a fear of increasing their capability unfairly, making the game more difficult. Though I understand that, all I see most of the times is a genuine set of suggestions not to make them harder, but to make them act more naturally, and have less blind spots, such as the ones being adressed here. As long as there are "buffers" (an interval where the player can act before being busted, like the steps already mentioned, first the guard will notice and investigate, only if the player is there will he get busted), a lot of features would be most welcomed, indeed, extremely important for the long term enjoyment of the game. The less predictable and the less gaps in perception they have, the longer it will take for us to get bored of them.

 

As for doors getting blocked by the player, if there could be a way of distinguishing who is frobbing the door besides the AI himself, shouldnt it be considered exactly as an agression? At least the AI should go into full "suspicious door" behaviour - AI can make it hard for other AI to go through doors (sometime they try to go through at the same time), so this should be ignored; but if the player hits an AI with a door, Im sure he expects it to have a negative reaction on him (even if you could argue that it could be a friendly AI) - anything else would be confusing ("so I just hit the guy with a door and he didnt even got pissed and tried to see who was doing that on the other side?"). The "suspicious door" behaviour would ensure that the AI would try to search both sides of the door.

Share this post


Link to post
Share on other sites
a lot of features would be most welcomed

 

Not necessarily. There are already a large contingent of players who think that TDM is too hard and unforgiving.

 

I was thinking something like,

if the ai can't get closer to the entity and still sees the object, then it should identify the player no matter the players visibility.

 

Hard to say how that would feel without seeing it in practice.

Share this post


Link to post
Share on other sites

I like the AI to be act as they would be in real life ( as long as the game can handle it), with their life resting in how well they do their duty, cause a good thief will still outwit them.

 

Again I think the AI should be acting as you would with your responsiblity to your postion, and with a little fear of your life.

 

This is a hardcore, old school thinking style. I too share your views all by heart but that doesn't mean it is the way to go as we are the minority even among the people playing this mod as also Springheel said.

But still this doesn't mean we shouldn't implement all the real behaviour of a guard. The actual challenge is to find a sweet spot in the gameplay between reality and game which makes everyone happy.

 

...not to make them harder, but to make them act more naturally, and have less blind spots..

 

As for doors getting blocked by the player, if there could be a way of distinguishing who is frobbing the door besides the AI himself, shouldnt it be considered exactly as an agression? At least the AI should go into full "suspicious door" behaviour - AI can make it hard for other AI to go through doors (sometime they try to go through at the same time), so this should be ignored; but if the player hits an AI with a door, Im sure he expects it to have a negative reaction on him (even if you could argue that it could be a friendly AI) - anything else would be confusing ("so I just hit the guy with a door and he didnt even got pissed and tried to see who was doing that on the other side?"). The "suspicious door" behaviour would ensure that the AI would try to search both sides of the door.

This problem has a lot of difficult cases to overcome. It is not impossible but all situations should be well covered before any attemps. Long discussions should be made.

 

 

Hard to say how that would feel without seeing it in practice.

I will make experiments about it this night.

Edited by Fausst

Share this post


Link to post
Share on other sites

AI can make it hard for other AI to go through doors (sometime they try to go through at the same time)

 

This should only be happening when AI are searching and one stops in the door opening.

 

At all other times, the AI "share" the door and take turns going through it.

 

If you have an example of AI trying to go through a door simultaneously, other than when they're searching, please post a bugtracker issue on it, and make it as detailed as possible.

Share this post


Link to post
Share on other sites

Haven't followed all of the thread, but I see a lot of good suggestions here.

 

Two things I'd like to comment on:

 

* game hardness. I am a fan of making it more realistic, but of course it shouldn't get so bad that the player is busted by pure chance every other second, etc. However, I am still leaning in the "make the AI more realistic" direction, because that way we can still tone it down (f.i. by making the AI on "Easy" behave different, more slow, or by tweaking the acuity etc). IF we don't implement the logic at all, both "hardcore" players and casual players are stuck forever with the "easy" AI

* Some of my points where aimed at things like "if there is a sound or movement, make the AI look towards it" (turn head, not nec. shoulders). This is just a very small thing, the AI doesn't even have to do anything spocial, but it makes them much more life-like. A while a go we had a "running video", where different AI where running together. Just that some of them where looking at the others made that video totally fun and interesting. If they all had looked forward, it would have been boring. (There is also the effect that humans no only look towards "interesting" things, like sources of sounds and movement, but also look "where others look". Try it in a conversion, just suddenly look behind the person you are talking to, and they will almost surely turn their head and try to see what you "spotted". So implementing this "turn head" behavior is a cheap way to make the AI "come to live".

 

(Awful lot of "quotes" today :D

 

Anyway, the "let AI ijnvestigate the "magically floating crate", or the "door flapping" also sound like fine ideas. I would not worry too much about making every situation too realistic or too perfect, tho, because the player will also pass a lot of "oopsies" from the AI as "oh that was a fluke". Afterall, a lot of "real human" behaviuor is quite erratic, too.


"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

Share this post


Link to post
Share on other sites

the problem is if the door is not suspicious, you can play with the door in front of an ai as long as you want and he wouldn't care.

 

Personally I fucking LOVE this idea, I've thought of this many times before, but wrote it off because I figured the team would never get around to writing code that was so "unimportant". This would really reinforce a mechanic of leaning into a door to hear whats on the other side before opening it without thinking. Without that mechanic though, the feature would be more frustrating than useful, and regardless, should STILL be flaggable by mappers for very obvious reasons, but perhaps turned on by default(?) on door entities.

 

The real problem with this feature is player expectation of what happens when they open a door, and mappers using the feature in a way that is consistent with that expectation, for instance, in a high traffic volume area where the door is expected to open on a periodic basis.

That being said, with respect to developing this feature, I would ask the team this question: if this feature magically appeared in front of you in perfect working condition, would you implement it? (paired possibly with the leaning into a door to listen to whats on the other side feature)

 

More issues: carpeting, and extreme distances (like a secure door that opens onto a street). There's just too many variables to make this feature affect stealth score and AI searches without pissing people off. I think this feature can exist, but I think it should be an alert level 1 feature. This way, a cautious player can still ignore the feature without affecting the stealth score or gameplay, but if the player screws up any worse than just letting an AI see the door open, it would result in at least alert level 2 instead of at least alert level 1. This compromise would appease all parties on all sides of the issue, I believe. Once again, most importantly, for ghosters, and stealth enthusiasts, just letting AI see the door open will not affect stealth score on the debrief unless further alerts are instigated.

Edited by ungoliant

Share this post


Link to post
Share on other sites
That being said, with respect to developing this feature, I would ask the team this question: if this feature magically appeared in front of you in perfect working condition, would you implement it? (paired possibly with the leaning into a door to listen to whats on the other side feature)

 

Having AI turn to look at doors that open in their vicinity was always an intention of ours, just never a priority. Everything beyond that will require some discussion on 1) gameplay implications and 2) coding effort. If 2 becomes irrelevant (because someone just magically conjurs it) then only 1 would be an issue.

Share this post


Link to post
Share on other sites

I like the idea of the variability of "guard difficulty" based on playing on easy vs difficult, tho I am sure it would not happen. For me, over the years I've played thief, - I don't think I am that good, but I find the missions here - which are greatly, greatly appreciated - are pretty easy for the most part. Only few are challenging with respect to getting past guards. I like the challenge of creating clever ways or maneuvers to get past them - so that is why I opt for more realistic AI's.

 

As was said a few people think things are hard enough, ok, I understand everyone is different. But you do get better the more you play as with anything else. Everyone will get better who plays these missions and I think would be able to handle more real life responses. I always don't expect to live through the games I play, being surprised by a guard on the blind side of a door you opened (he comes to investigate) is just part of a thief's life. It may be old school, but that line should not be dismissive of my thoughts, though I did not feel it was - completely. I am just trying to provide input to a game ( mod) which I love, and part of my thanks to all of the creator's efforts' is to make these written contributions.

Again if it is felt by most the game would get too hard, ok, and people would stop playing I understand. Diff levels of AI difficulty would be great :smile: but am sure it would be a long way off - understandably

Share this post


Link to post
Share on other sites

For the time being I'm almost out of ideas about the object awareness. I have a reliable detection and reaction system but I can not finalize the system. The guard naturally spots the moving object depending on the distance visiblity etc., if some threshold is reached visual alerts are triggered therefore it investigates the object by moving towards it. It reaches the maximum alert level and stands there looking at the object because I am in the shadows and he only can see the object.

Should I make the ai move around the object to somehow contact with the player because if the player is hidden enough he can't be identified unless a contact. But this does not make sense. You see an object which is on air and also moving and you take a walk around it. I don't know...

I was trying to make it identify the player when it is really close to the object (radius based) and the AI is also reached the maximum alert. It's not going well so far.

The only solution is to make it identify the enemy after reaching some threshold() which can result AI spotting the player from 20 m by just seeing a moving apple.

 

Any other suggestions to tie the player identification to the object awareness?

Edited by Fausst

Share this post


Link to post
Share on other sites

If object is being moved by player

If object is noticed by guard

Raise suspicion level (kind of how they look over their shoulder when you are moving loudly near them, or how they might walk towards where they heard or saw you, but in a casual manner).

 

The raising of suspicion could organically lead to conditions in which the player is more likely to be detected. Like the guard is looking more "intently" in your direction, or is bridging the distance between the NPC and the player. The problem in which an object is casting a shadow on the player and lowering visibility of the player... perhaps the player and the moveable (crate) could be treated as a single entity.

 

As for the first condition, that in general just eliminates the potential problems of NPCs alerting NPCs, although from what I've read I think what NPCs are carrying right now aren't as big of a deal (like lanterns?).

 

Deep time: what makes (hostile) guards so suspicious of PC? Is it because they recognize him (in streets) or because no intruders are allowed (banks, manors, etc.)? I think most guards in missions are just killing you because they see you, even from a mile away (addressed by a 1.08 bugfix), but maybe a little more attention needs to be placed on defining where suspicious behavior happens on maps and how it leads to alerts. (I recognize there are city-street type maps where guards will chase you because the mapper says a) you are a known criminal, B) you look suspicious, or c) curfew due to quarantine, lateness or something else.)

Share this post


Link to post
Share on other sites

For the time being I'm almost out of ideas about the object awareness. I have a reliable detection and reaction system but I can not finalize the system. The guard naturally spots the moving object depending on the distance visiblity etc., if some threshold is reached visual alerts are triggered therefore it investigates the object by moving towards it. It reaches the maximum alert level and stands there looking at the object because I am in the shadows and he only can see the object.

Should I make the ai move around the object to somehow contact with the player because if the player is hidden enough he can't be identified unless a contact. But this does not make sense. You see an object which is on air and also moving and you take a walk around it. I don't know...

I was trying to make it identify the player when it is really close to the object (radius based) and the AI is also reached the maximum alert. It's not going well so far.

The only solution is to make it identify the enemy after reaching some threshold() which can result AI spotting the player from 20 m by just seeing a moving apple.

 

Any other suggestions to tie the player identification to the object awareness?

 

Can't the guard walk over? Spotting the player in total darkness is more believable if the AI is standing next to you, instead of 20m away.

 

So maybe in this order:

 

* stare at object

* move towards it

* detect player (regardless on wether player is lit or not, a floating object in light would make the AI suspicious)

 

Edit: Basically like this:

 

* if moving object in player grabber is seen:

 

* and alert-level is low, stare at it (and get more alerted as time passes)

* if alert-level is a bit higher, try to move closer to object (get more alerted as time passes)

* if alert-level is high enough, "spot player" (regardless if player is visible, or not)

 

Btw, the "how fast the alert level rises" can be tied to the object size. A large crate raises it faster than say a moving apple.


"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

Share this post


Link to post
Share on other sites

Jaxa, so you are saying that

The only solution is to make it identify the enemy after reaching some threshold() which can result AI spotting the player while he is completely hidden, from 20 m by just seeing a moving apple.

this is okay for you.

Edited by Fausst

Share this post


Link to post
Share on other sites

Can't the guard walk over? Spotting the player in total darkness is more believable if the AI is standing next to you, instead of 20m away.

 

So maybe in this order:

 

* stare at object

* move towards it

* detect player (regardless on wether player is lit or not, a floating object in light would make the AI suspicious)

 

No it can't walk over. The goal is to reach the position of the object not the player.

 

Yes this is the exactly same algorithm I am trying to implement

I was trying to make it identify the player when it is really close to the object (radius based) and the AI is also reached the maximum alert. It's not going well so far.

The problem is moving towards it will not identify the player. Are you suggesting to make it like I am trying to do? A distance based system. Maybe 2m in radius of the object detect the player no matter the visibility.

Edited by Fausst

Share this post


Link to post
Share on other sites

No it can't walk over. The goal is to reach the position of the object not the player.

 

But the object is near the player - if the AI is 20m away, and then walks near the object, they get nearer to the player.

 

At this point the player will get audio and visual cues that the AI is getting alerted, so they can either drop the object, or put it into shadow, or stop moving it around. Which will stop the AI getting more alerted.

 

If the player continues, then the AI comes closer, says "hah I got you" and the player is busted.

 

Yes this is the exactly same algorithm I am trying to implement

I was trying to make it identify the player when it is really close to the object (radius based) and the AI is also reached the maximum alert. It's not going well so far.

The problem is moving towards it will not identify the player. Are you suggesting to make it like I am trying to do? A distance based system. Maybe 2m in radius of the object detect the player no matter the visibility.

 

That was what I was getting at. At this point the AI could simply cheat and "detect" the player (he must be near the object if he holds it in his arms, so if the AI can see the object, but not the player, he must be near).

 

I remember we had the same issue with the player holding a crate up and "hiding" behind it. That is only believable if the crate is on the floor, but not if floating. Back then I think we made (or tried, I don't know if it was successful) the crate simple see-through to the AI. However, I think it would be much better if the crate was opaque to the AI, but they detect that it is "floated by the player".


"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

Share this post


Link to post
Share on other sites
It reaches the maximum alert level and stands there looking at the object because I am in the shadows and he only can see the object.

 

Looking at the other side of the issue:

 

The player has a lightgem that tells him how hidden he is, but he has no way of knowing whether an AI can see the object he's holding. If I'm trying to hide, and my lightgem tells me I'm in the dark, how am I supposed to know that the edge of the object I'm holding is lit up and that AI can see it?

 

That's the problem. In real life, I could tuck an object under my cloak or hold it right next to me so it couldn't be seen. The game doesn't allow that. Should players be penalized for something they only have marginal control over?

Share this post


Link to post
Share on other sites

If the player continues, then the AI comes closer, says "hah I got you" and the player is busted.

 

That was what I was getting at. At this point the AI could simply cheat and "detect" the player (he must be near the object if he holds it in his arms, so if the AI can see the object, but not the player, he must be near).

 

 

The problem exists only if the player continues to hold it. AI definately needs to cheat here.

So how much of a distance there should be in your opinion?

2m, 5m, 10m?

Maybe I can take the object visibility into account as well for identifying the player. It seems more reasonable to be dependent on both the visibility and the distance I think.

 

 

Looking at the other side of the issue:

That's the problem. In real life, I could tuck an object under my cloak or hold it right next to me so it couldn't be seen. The game doesn't allow that. Should players be penalized for something they only have marginal control over?

 

They can see how visible is the object they are holding, not precise as a lightgem but still they can see it. A little bit of mystery can't be a bad thing here. If we shouldn't penalise the player for this, there should be no object awareness or did I understand it wrong?

Edited by Fausst

Share this post


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.

Sign in to follow this  

×
×
  • Create New...