In this megathread, I will be breaking down how machine learning works, as that is how the AI system alledgedly works, as well as break down what the AI needs in-game, right now, in order to perform better.
Machine learning is a system where there is a bunch of inputs, in this case being things like location and state (owned, neutral, owned by enemy) of capture point, line of sight, distance and location of enemies, etc.
It then uses modifiers to narrow all those inputs into a couple of sub-states. These sub-states can be abstract so can not really be given a comparison or example.
After that, more modifiers will use those sub-ststes to select a single output state: moving to cap, shooting an enemy, or idle. (there will be more states, but I’ll skip those to keep things simple)
Machine learning is the art of assigning random values to all modifiers, then taking the top few with the highest score, then taking those as base values for a new generation. Those will have slight variants in their modifiers, and this is repeated until you got something that can obtain a high score.
Sadly, a few modifiers seem to be missing or very out of whack, which create some issues:
Player line of sight and position modifiers too weak: AI soldiers still often bump into the player or stand in front of them. Putting greater importance at avoiding those values would help.
Range-dependant aggro gain: AI soldiers gain aggro too slowly at short distance, but too fast at long range. Giving diffrent modifiers for diffrent ranges (which could also be modifiers) would help. In addition to this, adding a narrow cone that acts as eyesight of the soldier, which grants high aggro to any soldier in it and in line of sight, could help making the bots be more responsive to what they are looking at.
Partial-opacity sight: AI soldiers commonly ignore bushes when shooting and even buildings, occasionally. Wood log buildings are also known for getting shot through, making this worse. Having an aggro modifier based on any opaque object in between the target and the soldier, like bushes, could help here.
Grenade distance and remaining fuse time, as well as cover rating for current position vs grenade position: AI soldiers are a bit too aggressive when throwing back grenades. They run out in the open and get shot. They also attempt to throw pre-cooked grenades, which is very abusable for experienced players, as they can use a partial cook to lure out AI and have it explode in their hands. Exposing these values to the machine learning algorithm would help.
Engineers are uncapable of finishing buildings on their own: Adding a variable that checks for nearby unfinished buildings set up by the owning player would fix this.
AI prefer secondary slot over primary slot and don’t use automatic weapons in full auto. Giving them diffrent firing patterns depending on weapon type could fix this:
Bolt action / semi: as is. Shotgun: high priority for seeking cover after firing. SMG: fire bursts. LMG: only fire when crouched or prone, in bursts.
AI can’t use stationary weapons when ordered to use them. Giving them the ability to fire them, depending on the aforementioned weapon firing behaviours, alongside targeting angle limits.
AI stops when running under fire while owning player is also running. Instead a strafing state should be implemented, which they enter when the owning player runs and they are under fire / have aggro. When strafing, they will slightly change directions every few meters to make them harder to hit. There is a modifier for walking distance and one for angle change required.
AI soldiers ignore player stance, which they should match, where possible. With stance I mean running, walking, crouching, or going prone. These should have high weight priority towards which stance the AI soldier uses.
AI soldiers are unable to climb ladders, which they desperately need to be able to do.
AI soldiers often ignore destroyed obstacles and treat them as intact, walking around them.
If anyone has any more suggestions, please let me know!
I will try to write it up in a more technical format, for the developers.