AI sees through walls

Started by NemesisN, July 29, 2015, 01:52:33 AM

Previous topic - Next topic

Adamiks

Guys... Creating new AI for sappers wouldn't be worthless and only for people that don't like "knowing everything sappers", but also for these who really like sappers.

Why? Because for now sappers AI is really simple and i don't see a big problem in creating kind of killbox in the walls for sappers. The point is that Tynan made sappers to "kill" killboxes mechanic so why he created a new type of killbox to build? If he really want to kill kilboxes for sure, he should put these 250h (like someone said) in the sappers to make game really like he wish to (without killboxes).

With sappers or not this game is still killbox game. I can just build killbox like in Alpha 10 and build traps in the walls/send a squad to kill sappers. Sappers are annoying, because they add literally nothing to game and they have bad AI. "But to create AI you will need 9999999h!" - if you want to create something that will (should) change how most players will play in it (outside base are pretty useles now, this is the worst part for me) you should make it good, really good. And instead sappers Tynan could make advanced EMP weapons (how often enemies have EMPs?), for me this would be a really cool, when sappers are really bad, because their AI is annoying and in general they don't add to game to much, mostly only this that mountains are even more OP than before.

NemesisN

that is a good point

even though I don't understand what do you mean by mountains are even more OP then before ?
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Mikhail Reign

#92
Quote from: NemesisN on August 05, 2015, 11:43:22 AMyou said you play Alpha 35 but AI gets stuck ? Are you being serious right now ? That problem is fixed then never get stuck...delete your old version saves and start a new prison maybe you bugged the game somehow.....
I'm an IT administrator, can we just assume that I know how computers work?

Quote from: NemesisN on August 05, 2015, 11:43:22 AMthe guard will go on a break the guard can't work 24/7 without a brake that makes them human like...that is how real prisons are...if you don't make schedule the game will try to replace another guard in a position that needs to be guarded if first guard goes on brake or somewhere else....that is how reality is

No in reality, a guard is replaced by another guard, not guard A abandons his post sometimes later guard B arrives to replace him

Quote from: NemesisN on August 05, 2015, 11:43:22 AM.....prisoners AI try to brake locked doors or steal keys to pass it....Police carry keys for locked prison doors....workers carry keys for staff door....control panel opens doors if you allow them to open either on staff or prisoners depending what Zone did you put in....which makes it like in reality

Well actually not really. A: prisoners wont 'try and steal keys'. The AI isn't that advanced. What happens is if a prisoner incapacitates a guard for any reason, they have a chance to take the keys. It isn't planned. The prisoners don't think 'if I take this guard out I can get his keys'. They take the guard out because they haven't been fed (or whatever reason they kicked off is), and then a potential consequence of that is that they could steal the keys.

Quote from: NemesisN on August 05, 2015, 11:43:22 AMprisoners start riots sometimes because they planed it
Nope. They aren't 'planned' in any sense. Riots are purely consequences of unfulfilled needs.

Quote from: NemesisN on August 05, 2015, 11:43:22 AMsometimes because most of them don't like your rules or if they don't get the food...if canteen prevents them from getting food then that is the problem on your part you are doing something wrong...its how in reality is

I can sort of see what you were addressing here. The point I was making about the riots/canteen isnt about them having access, it was about 'future vision', the ability of the AI to make a decision based on future events. Prisoners have no future vision. They will never make a decision based on future actions. If they are hungry, in the canteen, with food in their hand, ON THE WAY TO EAT IT, they can still riot because of an unmet food need. They don't see ahead and not riot to so they can eat. This inability to make any kind of choice based on a future event spills over into basically every aspect of the prison. Prisoners wont use a toilet unless they really too. If you locked them in a room with a toilet 23 hours of the day, they will still piss on the floor just out side their cells sometimes when they get up.


Quote from: NemesisN on August 05, 2015, 11:43:22 AMprisoners can only leave if you allow them to leave early because they need to obey your rules and your schedule that you made for them....watch what zones you allow them to go or not that is also part of your problem

Sadly they don't. The only times that they 'obey your rules' is Lockdown, Eat, Shower and Yard. During both work and freetime they are free to walk anywhere in the prison that your deployment allows. That means prisoners are completely free to walk into a infirmary for the sole purpose of stealing from. I'm pretty sure in a real prison you would only be able to enter certain rooms at certain times ALL THE TIME. But thats hardly a bug, it was more a design decision (which is why I'm not on a forum complaining about it).

Quote from: NemesisN on August 05, 2015, 11:43:22 AMyou said you build a 1000+ capacity prison....what do you think there will not be riots or mess ? its reality that is how real prisons work and you have 1000+ thinking it would be peaceful....you created a hell hole

Actually I didn't. My primary prison has been designed over 3 years. It pretty much runs flawlessly, making the bugs all the more obvious.


Quote from: NemesisN on August 05, 2015, 11:43:22 AMI am surprised that you think this way in Alpha 35....its like you are still playing a old version and not the new one

Thats what happens when you have high expectations for something and then watch most of it get pissed away over 3 years.

Quote from: NemesisN on August 05, 2015, 11:43:22 AMgive me more reasons why you think AI is not human like I will give you more explanations

*prisoners cannot trade something for something - only something for money.
*contraband is predictably easy to prevent (did a shake down of my 1000+ only found 10 pieces. kinda killed the game for me)
*CI have the ability to see everything in your prison. Everything. They can see contraband, in real time, arriving from the solitary cell they have been locked in for 15 years. They also know they 'that guy' is marked for death the second he arrives.
*AI wont acknowledge a locked door. They treat it like a regular door. If using that locked door is the shortest route, they will stand in front of it until it opens.
*Cooks. They have no idea. They will cook half a meal, run to the other side of the prison to start another one and then run back.
*Shops. Only one shop front per shop works. This means employing more then 2 prisoners per shops is pointless (I would employ just one, but he will never stock the shelves even though there is a mountain of stuff on the table, he will continue to man the shop front and sell nothing)
*Abandoning positions before a replacement arrives. This. This is one of THE single most annoying things.
*Guards getting stuck. Corners and cell doors use to be the biggest problem. The one that I am struggling with the most currently is 'being on the other side of a wall to a fight, and the door is X many squares over there'. Guards will 'respond' to a fight on the other side of a wall, get stuck trying to walk through a wall and then do nothing until the fight is over unless manually moved. This has a knock on effect in that only 5 guards will respond to any event. If 3 of those guards get stuck, there will only ever be 2 guards responding to that event. When those 2 die, 2 new guards will be tapped to add to the 3 stuck ones. This can quickly snowball when you are taking on legendary prisoners with a few perks (I hate extremely deadly combined with stout).
*Dogs. Dogs will commonly continue to attack a prisoner until dead, even after the prisoner has surrendered, is unconscious on the floor with the other guards walking away. Even with 15 guards watching. This is unrelated to the 'cop killer' trait and I will flip if you say it is. Have screen shots to prove it.
*Dogs again. They sometimes become unconnected to their handler. I've had dogs who had their handlers die, find the prisoner that did it in solitary (after patently waiting for guards to open the doors on the way to get there - dogs dont have keys), maul the prisoner to death in his cell, and then walk back through my prison and leave the map.
*I dont think it a bug - but you brought up realism so - prisoners can punch their way through doors.
*Buying stuff from the canteen makes them not want to do the carpentry course. Thought this one was weird. took me hours to nail it down.
*Side by side doors. Watch the AI have a field day.
*Path finding. both guards and prisoners alike suck at path finding. They pick their routes based on how many doors they pass though. A path that goes 40 squares around a door is preferred to walking 2 squares through the door.
*The laundry system. Its so broken. I've found that simply deleting heaps of the clothes in my prison can help jump start it back into action.

Now this is obviously a tl;dr for most people aside from the guy this is directed at. I know its a long winded discussion about a completely unrelated game. The reason that I stuck with this for a while is because a couple of nice points that are valid for both.

The reason that you 'think' the AI in PA is good, is because its isn't. What happens is that AI does things that 'looks' like they are thinking about something, when really they aren't. The AI doesn't think 'hmm this guard is alone. if i jump him now, I can get his keys and make a break for it'. The AI 'thinks' I'm hungry>hungry enough to riot? yes>attack near guard>did I win? yes>take keys/or baton>took keys>I have keys - can I open a door that leads outside?yes>opens that door>can I open another door that leads outside?yes> an so on and so forth. The AI isn't 'thinking' the AI is just completing goals and then re-evaluating the situation after the goal is met (and very importantly, not before that, which is what leads to weird actions).

Good AI is when all of this is hidden under a nice blanket of 'it seems like its thinking'.

Basically it seems the problem here is that you have noticed that you can see under this blanket. A nice and simple way to recover this for you would be to just get some imagination, and then some suspension of disbelief, but since that doesn't seem like it would work for your, how about you just mod the game so that 50% of the time the sappers just mine in the wrong directions. This would mean that only sometimes they mine straight into your base. That cover what you want?

Quote from: NemesisN on August 05, 2015, 12:21:03 PM
that is a good point

even though I don't understand what do you mean by mountains are even more OP then before ?

Because, now with the changes to make it so that 'sappers dont know where you are', they aren't anywhere near the threat to mountain bases they they were before (not that they are one now, also moutain bases is largely what they were made to nerf), making mountains even more attractive to build in.

Adamiks

Quote from: Mikhail Reign on August 05, 2015, 12:32:25 PM
Quote from: NemesisN on August 05, 2015, 12:21:03 PM
that is a good point

even though I don't understand what do you mean by mountains are even more OP then before ?

Because, now with the changes to make it so that 'sappers dont know where you are', they aren't anywhere near the threat to mountain bases they they were before (not that they are one now, also moutain bases is largely what they were made to nerf), making mountains even more attractive to build in.

Nope. I mean that NOW building bases in mountains is OP, because it's easier to dig really deep in the mountain and then kill whole sappers squad when they're digging 50 blocks. But i agree that with new sappers system mountains would be even more OP, but that's not a good point - don't make something better, because something will be worse. For me Tynan should make mountains way less OP long time ago, especially now, with sappers. It's almost like Tynan want to destroy outside bases and make them for hardcore players only, which is pretty bad and i'm not playing in Rimworld because of that.

NemesisN

#94
omg Mikhail Reign you wrote so much when I start reading and writing you the answer to couple of first ones I lose track of wtf I was talking about or wtf is discussion all about

I don't feel like writing a 500 line long page of answers to this one reading it all over again to see if I missed something or did I answered correctly...so I am just gonna skip replying to your last comment even though I did read all of it once but don't find interest into replying with a long ass answer and reading it all over again to remember what the conversation was all about
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Mikhail Reign

tl;dr

PA AI is bad, it's just done on such a large scale that you don't notice. Individuals have no AI, just large scale AI. When this works properly it seems like individuals are making choices, when they really aren't. This is when the AI is hidden under a blanket, obscuring the workings and everything seems logical.

When this 'blanket' doesn't cover everything is makes AI decisions seems weird, OP or just wrong. What seems to be the problem here is you perceive the sappers knowing where the base is a a chink in the blanket. Realistically making an AI which DOESNT know where your base is, but is able to find it enough of the time to make sappers not pointless is a much larger undertaking then I think you grasp.

I think a simple way to meet in the middle would be have them know where the base is, and then dice roll to see if they use that information, or just dig in a random spot. That said that would mean sappers are only a threat AT ALL X amount of the time, which I think would be further breaking the sappers.

If you have an idea on how sappers, which can evaluate a base based only on external features (most times simply a door) and then use that sparce information, to mount an attack which is both a legitimate 'attack' and also fun to repel, I'm all ears.

Like I said, if they have no knowedge of the base layout, I would like to see how you would come up with a way for them to launch actual threatening attacks, which aren't able to be simply dealt with a kill box behind the door.

And finally like I said in a previous post, as a person thereis no way I would tunnel in right next to the main door - that's where the defences are. I would do so thing similar to the AI - pick a random spot away from the door and tunnel straight in - high chance of breaching a auxillry room.

NemesisN

well like I showed in the picture on 1st page with orange arrows Sappers should dig around the defense avoiding turrets....that means in a specific radius around that defense....and not go far away from the known existing defense....that means in enough long radius to avoid range of the defense but not that far away from it

lets say you have a big circle...and in that big circle there is a another smaller circle inside by 50% half size of the big one...that smaller circle represents the defense range and the big circle represents the Sappers range of digging trough with safety avoiding defense range

here is a picture example of what I mean:




that would in my opinion be a more logical and fair Sapper
Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

NemesisN

here is another example

this is how it should be



and this is how it is


Join the RimWorld fan community group on Facebook: https://www.facebook.com/groups/1404635226524821/

Adamiks

#98
It looks simple but this would eat so much resources.
Example 1:
You build a box from walls and then put turrets in this box (next to wall, inside the box). Sappers will dig in the turrets radius that can't hit them or they will dig a mile away to optionally die from hunger?

Example 2:
You built a box with turrets like in example 1, but this box have doors, and if you open them turrets will can kill sappers. What sappers will do? Turrets can't hit them, right? But there is a door. So what they should do? Don't go near a turrets in general? So they will always dig mile away even if turrets can't hit them.

Example 3:
Sappers get to your base, but they have problem. Player put turrets in the base, so every cell in the base is protected by turrets. What sapper should do? They shoud avoid turrets, right? They will dig around the base over and over?

Results:
Rimworld will be unplayable for low end pc users (like me), because sappers will need to think "These turrets are OUTSIDE the base and they protect the entrance or they're in the base when we should dig to?" - if they will avoid turrets then they will can't go to the base, if they will can go to the base, they will not avoid the turrets.

Solution:
Sappers should avoid places when their people died (and someone escaped or not optionaly) not turrets, but they should dig in places around danger zone (random square to X squares around danger zone). After they dig out X blocks (or they're X blocks too close to the edge of mountain or wall) and they didn't find the player they should start to dig in direction where the danger zone is, but not INTO the danger zone (there are only 4 directions in rimworld, 1 of them will be coridor made by sappers, so they would only need to choose 1 from 3). This would need much less resources and would work well + sappers would be a real threat now because they would be more random, for now they just avoid danger zone and go to the closest room

RemingtonRyder

Something to bear in mind is that AI is not trivial stuff to code. It's even worse to test because basically, it can go wrong but not cause an error, so pinning down a problem can take hours of painstaking testing and observation.

So in the short term don't expect to see a vast improvement in AI but rather, small incremental improvements.

Here are some things that would really help though:

Instead of drawing a diagram on a blank white page, please set up pawns and structures in-game using the debug menu, take a screenshot, and annotate that. It's a lot easier to then re-create that or something similar in-game so that everyone's on the same page.

If you don't agree with someone's post, don't complain about it on the topic. Stay on topic, don't overquote, and keep it focused on coming up with insights, not shooting down someone else's.

Particularly with pawn behaviour, please break down the problem and describe what you expected to happen, what actually happened, and what steps might work better.

For example:

What I expected: I expected the sapper to try and get deeper inside the base after initially breaking through.
What actually happened: The sapper only used their grenades near the breach, and then decided to path all the way around the outside of the base to make a new breach and repeat the same behaviour.
What might work better: The sapper looks for ways to tunnel deeper into the base - preferring to breach rooms which are currently 'Indoors' and which are in a 180 degree arc of the last successful breach.

Doing this makes it much easier for the developer to actually address the problem.

TLHeart

Quote from: NemesisN on August 05, 2015, 10:54:42 AM

you can't see hidden rooms unless you discover it.....AI can...your hidden rooms should be hidden from AI....AI should see what you see that means the outside....your dugout space hidden in mountains should be only visible to you

the visitors that I capture never leave my prison alive....how can they possibly send something back if they are locked up in their prison with noting to contact their faction ? Their either end up joining me or executed...that is made up that makes no sense...same as that trading thing for them to give up information that is also made up

the prison is outside from my main base where hidden rooms are....your explanation of things does not make sense on how it works in RimWorld

yes I know I need to go offense on them...but it takes time for them to go there while they dig little by little every block...also there is a group of them awaiting for your ambush so its highly risky

Your rooms are NOT hidden, what part of that do you not understand? just because you dug them out of a mountain, does not make them hidden. You can see them, and so can the AI. You WANT them to be hidden, but that is NOT how the game is programmed, and probably never will be. If one pawn can see the room, then all pawns can see the room, which is the way the AI is programmed in RIMWORLD.  And your colonist are pawns.

All pawns use the same algorithms for pathing. Therefor all pawns know about all walls, and all rooms, and all doors.

It is not risky to engage the sapper escorts, as they will not defend in groups, while the sapper is digging. Attack them at range. 

Or as they walk towards the area they are going to dig, attack, they will continue to walk, except for the one you injure.

Target the actual sapper, before he begins digging, kill him, and the escorts will head for the main entrance.

TLHeart

here is an image of me attacking and killing the escorts at range, with no damage to me.

The escorts wander around in a set range, while the sapper digs... set up to kill the escorts at the edge of their range, one at a time, they NEVER fight back... move in close, and you will agro the entire group.


Adamiks

1:
What i expected: I expected the sapper to not know where is undiscovered room.
What actually happened: The sapper decided to dig where the room is, because it's less digging to the player base.
What might work better: The sapper at least shouldn't know about rooms that are in fog.

2:
What i expected: I expected the sapper to not know where he need to dig to get to my base at the smallest cost.
What actually happened: Sapper decided to dig into the hidden room that is 2 squares deep in the mountain but is way away from the entrance.
What might work better: If we can't change "sapper know everything" mechanic they at least should dig to X squares from point where the entrance is, not mile away, because he know there is a room there.

Results using this type of mechanic in this topic:
None.

Note:
We will reapeting everything over and over using a schematic, because a lot of us want one thing - sappers shouldn't know everything, where to dig etc without any "spies" mechanic.

QuoteYour rooms are NOT hidden, what part of that do you not understand? just because you dug them out of a mountain, does not make them hidden. You can see them, and so can the AI. You WANT them to be hidden, but that is NOT how the game is programmed, and probably never will be. If one pawn can see the room, then all pawns can see the room, which is the way the AI is programmed in RIMWORLD.  And your colonist are pawns.

Note 1: It's a suggestion.
Note 2: Yes, he wants that.
Note 3: Yes, he know, this is the point of this suggestion.
Note 4: AI didn't build our base to see it. We did. AI isn't building bases this is why we see everything, AI shouldn't.
Note 5: Your statement - "game is working like that, YOU want change how game is working writing suggestions which makes you arrogant".
Note 6: It looks that sappers are more useles and stupid than i though. They know everything and don't react to firing at them.
Note 7: I really enjoy writing like this. You can say something without saying too much.

Mikhail Reign

I'd like to point out Re: Note 6 - all the AI have that trouble. No one fixes flanks and fucks. Everyone just reenacts civil war gun lines.

TLHeart

Quote from: Adamiks on August 05, 2015, 06:24:58 PM
1:
What i expected: I expected the sapper to not know where is undiscovered room.
What actually happened: The sapper decided to dig where the room is, because it's less digging to the player base.
What might work better: The sapper at least shouldn't know about rooms that are in fog.

2:
What i expected: I expected the sapper to not know where he need to dig to get to my base at the smallest cost.
What actually happened: Sapper decided to dig into the hidden room that is 2 squares deep in the mountain but is way away from the entrance.
What might work better: If we can't change "sapper know everything" mechanic they at least should dig to X squares from point where the entrance is, not mile away, because he know there is a room there.

Results using this type of mechanic in this topic:
None.

Note:
We will reapeting everything over and over using a schematic, because a lot of us want one thing - sappers shouldn't know everything, where to dig etc without any "spies" mechanic.

QuoteYour rooms are NOT hidden, what part of that do you not understand? just because you dug them out of a mountain, does not make them hidden. You can see them, and so can the AI. You WANT them to be hidden, but that is NOT how the game is programmed, and probably never will be. If one pawn can see the room, then all pawns can see the room, which is the way the AI is programmed in RIMWORLD.  And your colonist are pawns.

Note 1: It's a suggestion.
Note 2: Yes, he wants that.
Note 3: Yes, he know, this is the point of this suggestion.
Note 4: AI didn't build our base to see it. We did. AI isn't building bases this is why we see everything, AI shouldn't.
Note 5: Your statement - "game is working like that, YOU want change how game is working writing suggestions which makes you arrogant".
Note 6: It looks that sappers are more useles and stupid than i though. They know everything and don't react to firing at them.
Note 7: I really enjoy writing like this. You can say something without saying too much.

First this is NOT the suggestions forum.
Yes he want his rooms to be unkown to the AI... sorry that is not how the AI works. And knowing what it takes to program an AI, it never will.
AI should see everything you can, and that is the way the AI is programmed.
Yes AI on sappers escorts is very stupid, and flanking will always kill them.

You are confusing the issue with rooms you build, with the ruins that are hidden. Two totally different actions and events. Yes the AI will know about the ruins, they were here before you, and have been scouting the area for decades.