Ludeon Forums

RimWorld => Ideas => Topic started by: Lechai on October 14, 2013, 07:34:50 PM

Title: less suicidal AI
Post by: Lechai on October 14, 2013, 07:34:50 PM
This isn't for the cheap ideas thread because it requires more than a simple change or addition due a rework to the AI

The idea is that raiders will be more cautious of confined or narrow area's with a high concentration of blood/bodies in the area.
This would cause them to circumnavigate death alleys and choke-points unless you are constantly cleaning up the bodies and blood (ie cleaning up the evidence of a trap).
Instead they would use grenades and fire to burn down walls to make alternate entry points.

This would only really effect late-game as there hasn't been enough blood spilled early on to become enough of a factor.

thoughts/suggestions appreciated.
Title: Re: less suicidal AI
Post by: IncredibleNode on October 14, 2013, 07:39:31 PM
That could however become quite deadly to the extent where large waves in Randy Random could become unsurvivable :/ and cause utter destruction at an Unfair or Over powered level
Title: Re: less suicidal AI
Post by: Lechai on October 14, 2013, 08:16:10 PM
waves in randy are already random... so I'm not sure how that applies?
Title: Re: less suicidal AI
Post by: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
Title: Re: less suicidal AI
Post by: Lechai on October 15, 2013, 03:52:56 AM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
so your already on it...
rgr
Title: Re: less suicidal AI
Post by: mumblemumble on October 15, 2013, 03:59:42 AM
Also, would be kind of nice if colonist AI could drop what they were doing to fight to some extent. Yeah, I know commanding them is the way to go, but having someone trying to harvest food while being shot is a little aggravating anyway. Would be nice if they could simply get to cover and shoot when a hostile is in range, perhaps having this behavior as a "job" like everything else, to be turned on and off, independent of drafting.
Title: Re: less suicidal AI
Post by: British on October 15, 2013, 04:32:53 AM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
Yes, that's a problem I've seen and that quite bothered me: if you created a tower-defense-like path to your colony, the raiders will follow that path no matter what.
They should be able to (for instance) decide if they see an easy access, and if not, they take down the closest wall.
Then once they've breached that wall, they assess the situation: if there is a colonist/turret in sight, go for it, else look for a visible access, or go for a wall again.
Now if/when raiders' objectives are implemented (like capture a specific colonist), they'll have to prioritize that as well.

Quote from: mumblemumble on October 15, 2013, 03:59:42 AM
Would be nice if they could simply get to cover and shoot when a hostile is in range, perhaps having this behavior as a "job" like everything else, to be turned on and off, independent of drafting.
I agree they should go get some cover (though... where would that be ? far out of range ? a specific spot we'd have to define ?), but that should be it.
They shouldn't respond to being attacked, as long as we still have the drafting mechanic.
Title: Re: less suicidal AI
Post by: Semmy on October 15, 2013, 05:05:52 AM
Basicly a raider under fire should look around him and think (make calculation) if there is any viable cover nearby wich he could reach before being shot.

Another option is a group or raiders running forward the first few getting popped and the rest scattering around to find cover.


Als i dont know if i want less suicidal ai.
I do remember a warhammer fantasy model called the goblin fanatic. I have never cried and laughed so much because of a single model.
Title: Re: less suicidal AI
Post by: Aerouge on October 15, 2013, 06:12:49 AM
Quote from: British on October 15, 2013, 04:32:53 AM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
Yes, that's a problem I've seen and that quite bothered me: if you created a tower-defense-like path to your colony, the raiders will follow that path no matter what.
They should be able to (for instance) decide if they see an easy access, and if not, they take down the closest wall.
Then once they've breached that wall, they assess the situation: if there is a colonist/turret in sight, go for it, else look for a visible access, or go for a wall again.
Now if/when raiders' objectives are implemented (like capture a specific colonist), they'll have to prioritize that as well.
this sounds like a good reason to dig your camps into mountains. And if raiders take down mountains than it seems like a good way to get the entire (and limited) map leveled. Currently there is already a lack of map / resources, as the only ressources you have unlimited are energy and food. Once you dug up all the iron you have to depend on trade and watch your colony die slowly. NPC´s destroying the limited landscape we have does not sound like a good idea.

Quote from: British on October 15, 2013, 04:32:53 AM
I agree they should go get some cover (though... where would that be ? far out of range ? a specific spot we'd have to define ?), but that should be it.
They shouldn't respond to being attacked, as long as we still have the drafting mechanic.
Well the question here is... do people prefer to micro- or to macro-manage their settlements?
I think after setting up the routine (Raiers land -> Draft colonists -> Move colonists to sand-bagged shootingrange -> undraft surviving colonists) has been clicked the thousanth time people might get a litle pissed
Title: Re: less suicidal AI
Post by: British on October 15, 2013, 08:09:27 AM
Quote from: Aerouge on October 15, 2013, 06:12:49 AM
this sounds like a good reason to dig your camps into mountains. And if raiders take down mountains than it seems like a good way to get the entire (and limited) map leveled. Currently there is already a lack of map / resources, as the only ressources you have unlimited are energy and food. Once you dug up all the iron you have to depend on trade and watch your colony die slowly. NPC´s destroying the limited landscape we have does not sound like a good idea.
I talked about the problem of having too many resources here (http://ludeon.com/forums/index.php?topic=95.msg3596#msg3596), and one solution I propose is to indeed have the raiders go a bit more after structures if there's no direct threat/target in sight.

Now I do agree that hiding inside a moutain would kind of counter this, but I still find that it is a better idea than forcing the raiders through a tunnel of doom just because they'll go after the first entrance the pathfinding can get for them...
And even if you're deep inside a moutain, you still had to build structures to close/defend your base, so raiders would go after that rather than, as you said, destroy the landscape.
Also, Tynan implemented a new behavior to the raiders a few days/weeks ago, where they actually burn up a structure if colonists are walled in it... so why not extend that capability ?
Title: Re: less suicidal AI
Post by: FangoWolf on October 15, 2013, 10:11:14 AM
If I were a raider:
1) if I lost someone I would pull back and regroup and decide if the risk is worth it.
2) I would have some form of combatting turrets:
    EMP gernades, robot mini turrets, robot gophers that targetet power couplings,  armored cart to get past kill zones, something
3) Sneak attack outside the walls to take a prisoner for the slavers
4) salvage outside walls or facilities away from the camp.  Take what you can and run.
Title: Re: less suicidal AI
Post by: GC13 on October 15, 2013, 11:38:24 AM
If I were a raider I straight up wouldn't attack people with defenses. The whole point of raiding is to get something for nothing: you either sneak in and take over without the target being able to mount a resistance, or you overwhelm them with suppressive fire until they back off or you toss a grenade into their face.

It's pretty basic that every colonist is going to be armed, so raiders wouldn't want to fight unless they outnumbered you. Really though, stealth is the big thing: until they can hit us without us seeing it coming, raiders are going to be a joke one way or another. As their strength increases through balancing efforts you'll find the sweet spot between "too weak to be a threat" and "so strong they inflict heavy damage every time" is small, and real raiders would only attack when they can hit "successful attack that wipes the player out" a high percentage of the time.
Title: Re: less suicidal AI
Post by: mumblemumble on October 15, 2013, 12:38:07 PM
Quote from: British on October 15, 2013, 04:32:53 AM
I agree they should go get some cover (though... where would that be ? far out of range ? a specific spot we'd have to define ?), but that should be it.
They shouldn't respond to being attacked, as long as we still have the drafting mechanic.
See, thats why I said it should be a "task" like mining, hauling, stuff like that. Turn it on or off so you don't need to draft every single person just so they will stop hauling metal and getting shot in the face, but can also disable if you wish.

As for cover, that might be an issue, but doing a "view" check of raiders and always putting a piece of cover between them and raiders could work, if possible, or if not nearby, just attacking.
Title: Re: less suicidal AI
Post by: Haplo on October 15, 2013, 12:58:34 PM
Maybe something like a siren:
You can build it and if installed you get an item in the architect to switch the colony wide alarm on/off.
When the alarm is off, your colonists do their normal stuff.
When the alarm is on, your colonists go to marked soldier spots or marked civilian spots.
But in this mode it should still be possible to draft a civilian to repair a turret or something.
Title: Re: less suicidal AI
Post by: mumblemumble on October 15, 2013, 01:14:05 PM
Not sure having an alarm like that would really be a good idea, since it still required manual usage when the idea is to make AI do things at least SLIGHTLY on their own (not walking around getting shot without the slightest care).
Title: Re: less suicidal AI
Post by: Tynan on October 15, 2013, 01:17:31 PM
Having the AI respond to and avoid danger is actually really, really hard, which is why it's not in yet. However, I hope to seriously tackle this problem in a couple of months.

As for combat controls, I agree it's too finicky and gives your colonists too little control over themselves. I want to rework it to be less specific, so players only signal their general intent and the AI does it, the way the rest of the game works. Right now I'm thinking of assigning "soldiers" to "squads" which can be activated. You designate a "flag" for each squad, and they try to hold a position near the flag. But this is just thinking right now.
Title: Re: less suicidal AI
Post by: Haplo on October 15, 2013, 01:52:13 PM
Hmm, I like this idea..
When can we have it?
( Only joking  ;D )
Title: Re: less suicidal AI
Post by: Semmy on October 15, 2013, 02:06:31 PM
Quote from: Tynan on October 15, 2013, 01:17:31 PM
Having the AI respond to and avoid danger is actually really, really hard, which is why it's not in yet. However, I hope to seriously tackle this problem in a couple of months.

As for combat controls, I agree it's too finicky and gives your colonists too little control over themselves. I want to rework it to be less specific, so players only signal their general intent and the AI does it, the way the rest of the game works. Right now I'm thinking of assigning "soldiers" to "squads" which can be activated. You designate a "flag" for each squad, and they try to hold a position near the flag. But this is just thinking right now.

You do know what happens if you start assigning soldiers to squads.
Before you know it your working on
- Alert levels
- Alarm system (horns buzzers lights etc)
- schedule's for your squads to rotate in.
- than you start working on preset equipment lists.
and before you know it you rename the game to dwarf in a spacy fortress
Title: Re: less suicidal AI
Post by: SpaceEatingTrex on October 15, 2013, 02:53:47 PM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!

Glad to hear you're on top of things Tynan! It does seem like a more intelligent AI would add a lot to the game.

However, one thing it might be important to expect is that players figuring out the quirks of the AI, no matter how intelligent it is. Since that may be the case, as more enemy types get developed I think they should have different AIs. Different behaviors for enemies means players won't be able to make one defense to hold them all off. Consider a robotic enemy or one capable of destroying walls/rock that always took the shortest distance from point A to point B regardless of what was in the way. That would take a very different defense than enemies with more advanced pathfinding. Other enemies could provide different challenges - consider flying enemies that moved "over" walls and rock, or enemies with personal teleporters, or etc.

Quote from: Tynan on October 15, 2013, 01:17:31 PMAs for combat controls, I agree it's too finicky and gives your colonists too little control over themselves. I want to rework it to be less specific, so players only signal their general intent and the AI does it, the way the rest of the game works. Right now I'm thinking of assigning "soldiers" to "squads" which can be activated. You designate a "flag" for each squad, and they try to hold a position near the flag. But this is just thinking right now.

I agree with Semmy about avoiding make the combat too Dwarf Fortress-esque though. The direct control over characters in combat reminds me of FTL, and I think it's a good fit for RimWorld.
Title: Re: less suicidal AI
Post by: Semmy on October 15, 2013, 02:55:10 PM
Yup..

I havent played it yet so cant be sure.
But i think id prefer the micromanagement of my soldiers.
I like them doing what i want when i want it (-:
Title: Re: less suicidal AI
Post by: FangoWolf on October 15, 2013, 03:04:51 PM
Quote from: Tynan on October 15, 2013, 01:17:31 PM
Having the AI respond to and avoid danger is actually really, really hard, which is why it's not in yet. However, I hope to seriously tackle this problem in a couple of months.

Well I'm of the "post an idea even if it's stupid" because it might trigger a good idea or alter one already used.

If you broke the home area into sections then ran a point in that section through the Turret's targeting calls, wouldn't that yield a danger number for that section.  Sector seven would be targeted by 4 turrets with 20 shots.

If the least dangerous path was greater than what the raiders wanted to tackle, they would switch to an alternate behavior.  Perhaps a seiging sniping behavior waiting for the colonist to send out a tribute to send them on their way.  The longer the seige lasts the more pressure builds on the colony to send them on their way.

If they had some resources perhaps they would try to find a way to interupt the power or attack the power couplings.  Failing any of that switch to mining some of the metal away from the camp.  If the colonists sit tight and holed up, they will be losing future metal.

Maybe the resources would be Combots, so the raiders don't really care if the robots get chewed up and they would attack to the last man.

Now this is bad, but what if the raiders had a mortar?  They can just sit back and try to take out the turrets or power and then rush the complex.  This would force the colonists away from static defenses and more into mobile fire teams.
Title: Re: less suicidal AI
Post by: nomadseifer on October 15, 2013, 03:08:14 PM
Tynan, if you want to move to a less fiddly combat system, I'd recommend implementing some version of it before the post-kickstarter build comes out.  Judging by a lot of the comments, there could be a semi-revolt if 1500 people get used to micro-managing their battles and then you take it away.  Just a thought. 
Title: Re: less suicidal AI
Post by: British on October 15, 2013, 03:17:48 PM
I'm preparing my own revolt, just in case.
Title: Re: less suicidal AI
Post by: starlight on October 15, 2013, 03:43:28 PM
Quote from: British on October 15, 2013, 04:32:53 AM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
Yes, that's a problem I've seen and that quite bothered me: if you created a tower-defense-like path to your colony, the raiders will follow that path no matter what.
They should be able to (for instance) decide if they see an easy access, and if not, they take down the closest wall.
Then once they've breached that wall, they assess the situation: if there is a colonist/turret in sight, go for it, else look for a visible access, or go for a wall again.
Now if/when raiders' objectives are implemented (like capture a specific colonist), they'll have to prioritize that as well.

Quote from: mumblemumble on October 15, 2013, 03:59:42 AM
Would be nice if they could simply get to cover and shoot when a hostile is in range, perhaps having this behavior as a "job" like everything else, to be turned on and off, independent of drafting.
I agree they should go get some cover (though... where would that be ? far out of range ? a specific spot we'd have to define ?), but that should be it.
They shouldn't respond to being attacked, as long as we still have the drafting mechanic.

Seconded. DF, BTW has just this.
Title: Re: less suicidal AI
Post by: Haplo on October 15, 2013, 03:47:10 PM
Maybe the best would be to have both ways available..
Why not use the automatic variant Tynan suggested and if you're really not ok with how the AI behaves you draft them and move them as you like.
This way everyone can use it as he/she likes..
Just my 2 cents.. :)
Title: Re: less suicidal AI
Post by: nomadseifer on October 17, 2013, 06:43:27 AM
Quote from: GC13 on October 15, 2013, 11:38:24 AM
If I were a raider I straight up wouldn't attack people with defenses. The whole point of raiding is to get something for nothing: you either sneak in and take over without the target being able to mount a resistance, or you overwhelm them with suppressive fire until they back off or you toss a grenade into their face.

It's pretty basic that every colonist is going to be armed, so raiders wouldn't want to fight unless they outnumbered you. Really though, stealth is the big thing: until they can hit us without us seeing it coming, raiders are going to be a joke one way or another. As their strength increases through balancing efforts you'll find the sweet spot between "too weak to be a threat" and "so strong they inflict heavy damage every time" is small, and real raiders would only attack when they can hit "successful attack that wipes the player out" a high percentage of the time.

You made all the good points related to how the raiders seem to fail in the simulation aspect.  The only way it makes 'sense' that raiders would attack when they're likely to be completely wiped out is if they are starving and desperate.  In that case, it doesn't exactly feel good mowing down.  :)

Also, the small gap you talk about between no-threat and uber-threat could be widened by implementing non-lethal objectives as others have said.   Maybe in that case you could actually lose a good percentage of all our battles, without ever losing your colony. 
Title: Re: less suicidal AI
Post by: starlight on October 17, 2013, 07:06:51 AM
Quote from: British on October 15, 2013, 04:32:53 AM
Quote from: Tynan on October 15, 2013, 03:30:50 AM
I have several plans to make some raiders better at handling choking/funneling strategies. The methods that some players have been using did not come up in testing before this month. Which is fine - that's why it's important to get feedback from real players!
Yes, that's a problem I've seen and that quite bothered me: if you created a tower-defense-like path to your colony, the raiders will follow that path no matter what.
They should be able to (for instance) decide if they see an easy access, and if not, they take down the closest wall.
Then once they've breached that wall, they assess the situation: if there is a colonist/turret in sight, go for it, else look for a visible access, or go for a wall again.
Now if/when raiders' objectives are implemented (like capture a specific colonist), they'll have to prioritize that as well.

Quote from: mumblemumble on October 15, 2013, 03:59:42 AM
Would be nice if they could simply get to cover and shoot when a hostile is in range, perhaps having this behavior as a "job" like everything else, to be turned on and off, independent of drafting.
I agree they should go get some cover (though... where would that be ? far out of range ? a specific spot we'd have to define ?), but that should be it.
They shouldn't respond to being attacked, as long as we still have the drafting mechanic.

I think it is a little masochistic to get every colonist to cover every time there is a raid.
Plus you have stuff like pathing, etc.
Pathing creates problems when someone who is in Area A (not under attack) needs to go to Area B (not under attack). But the path lies through Area C( which is under attack).
So if you dont have colonists take care themselves, then they will path through Area C, and you will need to take care of each one painfully.
Ugh.

These are the kinds of these issues / things which give Dwarf Fortress its bad name (to the extent it has a bad name).

While these things may require some coding, I would suggest:
At least:
1. Implement a burrow (or Rimworld equivalent) which is there in DF. It works reasonably well.
2. Implement a negative burrow / Red area list for areas to avoid.

Ideally (though it will take more programming effort):
1. Implement some behaviour on the part of colonists based on alert levels that you declare.
For example: Raid, war,etc.
Based on this they will at least avoid going X distance from an enemy.
Title: Re: less suicidal AI
Post by: British on October 18, 2013, 04:37:30 AM
The idea is/was/can be that non-drafted colonists would avoid the battle area, not that every colonist, everywhere shoud get to cover.

One way do it would be to automatically have each colonist/turret define an area around him/it that would be a no man's land that forbid pathfinding.
It would of course require some tweaking so that colonists won't just go around that zone and go face to face with the enemy.
Or... define such an area around enemies as well (triggered when they attack a colonist)...

Or something completely different ;)
Title: Re: less suicidal AI
Post by: starlight on October 18, 2013, 05:45:34 AM
Quote from: Tynan on October 15, 2013, 01:17:31 PM
Having the AI respond to and avoid danger is actually really, really hard, which is why it's not in yet. However, I hope to seriously tackle this problem in a couple of months.

As for combat controls, I agree it's too finicky and gives your colonists too little control over themselves. I want to rework it to be less specific, so players only signal their general intent and the AI does it, the way the rest of the game works. Right now I'm thinking of assigning "soldiers" to "squads" which can be activated. You designate a "flag" for each squad, and they try to hold a position near the flag. But this is just thinking right now.

No AI system (let alone games) has been able to replace the capacity of humans to think in terms of generalisations, exceptions, and creativity.
Any system that does not give people control over the colonists will lead to much heartburn over the "stupid behaviour" of the colonists.
Any system that requires all actions to be micromanaged will lead to "this is too much effort" complaints.

My two bits is a version of what is already implemented in Rimworld in general - have a default behaviour:
A. Avoid trouble - if a raider comes, run for cover, etc.
But allow micromanagement.
After people do want to / need to win the game.

PS: I think DF does allow micromanagement for squads, etc.
Title: Re: less suicidal AI
Post by: nomadseifer on October 18, 2013, 12:28:58 PM
QuoteNo AI system (let alone games) has been able to replace the capacity of humans to think in terms of generalisations, exceptions, and creativity.
Any system that does not give people control over the colonists will lead to much heartburn over the "stupid behaviour" of the colonists. .... My two bits is a version of what is already implemented in Rimworld in general - have a default behaviour:
A. Avoid trouble - if a raider comes, run for cover, etc.
But allow micromanagement.
After people do want to / need to win the game.

1. I agree that no AI can compete with the competency of a human.  But instead of seeing that as a reason to give more control to the players, I see it as a reason not to. 
2. I also disagree that both a macro and micro combat system should be available. 

1. Part of the simulation aspect is letting the colonists make their own decisions, have their own priorities and abilities.  That also relates to combat ability.  It just doesn't make sense that for the colonists to have much greater combat ability on a per-colonist level than the raiders.  You can run them around in perfect tactical unity while the enemy Ai is chugging along making the best of the situation.  You'd easily be able to defeat raids with twice as many numbers as yourself, without losing a man.  That just seems fake.I think the game should have a tight meaningful system that involves combat modes for the colonists and areas of operation, but that at the end of the day, the colonists individual movements are not directed.  You are much more likely to lose colonists in this scenario, but that is OK.  You are surviving on the edge of space.  The threat of death is not meaningful if it never comes calling. 

2. There should not be both a macro and micro combat system.  I think this is a given.  The reason is that there is no way to balance the game for both systems simultaneously.  As stated above, in a micro system the player has a huge advantage.  The only way to counter that is by sending in larger raids.  In a macro system, the raids need to be much smaller.  So either the game is balanced towards the micro player, and the macro player struggles through the entire game always seeming overwhelmed.  OR the micro player handily destroys everything that comes at him.  There needs to be one system in place and I think that system should, and will, be one that streamlines the combat experience.