AI Improvements

Post Reply
Jadiel
Posts: 214
Joined: Tue Jan 24, 2017 9:28 am

AI Improvements

Post by Jadiel »

One of the things I'm finding bugs me the most at the moment is that the AI still does a lot of stupid things. Double-moving when it could OW, not using it's abilities and instead taking bad shots, officers moving and marking when there's no one else left to shoot, wounding my suppressor after the enemies being suppressed have already wasted their actions, etc.

Are there any AI mods for LW2 which fix any of this? Are there any AI updates planned for LW2? If not, I might have to have a look at how much work it would be to make some edits to the AI trees. A lot I'm guessing....
Plockets
Posts: 29
Joined: Sun Jan 03, 2016 4:58 am

Re: AI Improvements

Post by Plockets »

I definitely agree, the AI does some incomprehensibly stupid things, which have more than once turned an "oh I'm fucked" moment into a "OMG WTF is the AI doing?!?" moment. Moving through fires and poison areas are definitely among the worst, although passing up on flanks,double moving back and forth, and self flanking are also pretty common. I know A Better Advent did a pretty good job of solving a lot of derpy AI issues in Vanilla, I wonder if any of that could be ported over to LW2 somehow?
LordYanaek
Posts: 940
Joined: Mon Jan 23, 2017 1:34 pm

Re: AI Improvements

Post by LordYanaek »

I'd bet a lot of those can be explained by priorities. Self Flanking often occurs when an enemy is very aggressive and decides killing you is more important than staying alive, Mutons especially seem reckless and will even stay in the open if they can take a good shot or even simply throw their grenade on you. On the other hand passing on flanks can be explained by enemies not willing to expose themselves or move too far away from the rest of their pod. Some units are aggressive to the point of ignoring self preservation and it's not necessarily a bad thing. Since you mention it : "A better Advent" did a remarkable job of making enemy units booooring with stun lancers taking long range 10% shots with their shotgun rather than risk themselves for a stunlance attack. Note that i totally respect the Hard Work DerBK put on this mod, i just mentioned this to highlight the fact that not every issue can be easily fixed, sometimes fixing an issue introduces another one and you have to decide which one is the most annoying. I prefer diverse behaviors for different enemies giving them some personnality even if some of them sometimes make stupid moves (hey, sometimes we make stupid moves ;) )

Moving through fires and poison probably has two causes. First it's is the only way to prevent the old "throw a gas grenade on enemies in the open and they will sit there" abuse. If the AI doesn't find a good and safe move for their units, they must be able to choose a bad move through hazard rather than just sit in the open with their pants down, as a result you can't just forbid those moves. The second issue is the pathfinding algorithm doing errors. Just test it with your own troops, often it will choose a shorter path that either breaks concealment or goes through some hazard over a longer one that doesn't cost an additional move (blue stays blue). You can correct this, the AI can't. Solving pathfinding issues is often a headache because it's usually one of the biggest processor cycles eater in a game and usually those issues come from simplifications made to reduce it's performance cost, thus fixing those issues introduces lags and very long AI turns, something nobody want to see in a game.

As for double move, apart from the sectoids i mostly see this when the AI moves to an unsafe position but didn't knew it wasn't safe before moving (they just discover someone is flanking them after they move). This can be solved by making AI aware of the position of each of your soldiers, even unseen ones, but i prefer a realistic behavior over omniscience. It's not even a bad move most of the time : it's a smart move to move away from a bad position (when you are not a crazy muton :lol: ). Sectoids are really an issue but probably because their "fire" action has such a low priority that there are situations where they just don't know what to do while their abilities are on cooldown.

Bottom line : improving the AI is a good idea but not at any cost. This isn't a simple issue.
Post Reply