AI Development Guide and M27AI v74 Devlog
-
Hey guy, just to give a little feedback about how the AI performs.
- Commanders seem just a little bit too careless and go out pretty far from their bases in the early game and get creamed. Now, I know some human players also do this, usually noobs, but M27 is not a noob right
- I feel like the AI plays a little too standoffish for its own good. Im beginning to realize that I can exploit this. For example, Hit and run. While this is effective when attacking, its weak when defending and Im figuring out how to manipulate the AI's behavior when I am making offensive moves. Basically its becoming predictable. Would be interesting if squads of AI units were more randomized in their movements. Sometimes being standoffish or hit and run, then suddenly implementing shock manuever/blitz when you least expect it. Or trying to sneak a platoon of ground units around your flank/rear and hitting your weak spot, which is a tactic that ive found works really well on them, since they tend to focus on the front lines.
- They never build mass fabricators. Not sure if thats a hard thing to get them to do or not. They seem to very rarely make SCU's. Like in my last game, I only saw 1 gateway, on the enemy side, but didnt see any scu from it at all.
- Ive watched enemy experimentals like chickens or cyclops doing lot of circles, presumably attempting to avoid things like t2 artillerly, but sometimes when they have a clear advantage, such destroying half an enemy base, they for whatever reason suddenly turn around and retreat before finishing the job and they might not even have much damage.
- M27 seems to produce a massive overabundance of t3 engineers.
- Also massive numbers of air units and anti air units. I never see just regiments of ground units marching and attacking. The AI always seems to be very air/anti air heavy and quite sparse on other types of units.
-
@teralitha Thanks for the feedback! Some of that's intentional, some I'd probably need a replay to decide if it's intentional or not:
1 - (Replay needed but unlikely to change much) - ACU is meant to be aggressive early game and also if it thinks it's behind in the game. If it's easy to consistently kill them then a replay is the best way for me to see if there're any tweaks I can do to make it slightly harder (although it's the area that's probably got the most code and things to take into account as it's very hard to get the balance right between being aggressive and being too aggressive, so there's a good chance a defeat would just fall under the category of the AI being outplayed).
2 - (Unlikely to change) Unit dependent - if it has units like gattling bots/hoplites then it should always hit and run with them. There was one scenario originally where they'd charge in (if trying to get an ACU kill) but I found it really damaged their chances of killing the ACU. Some attacks will be semi-randomised in terms of the target, but trying to sneak around enemy positions is hard to do and not something I'd be able to implement for the forseeable future (requires much better pathing logic than I use at present).
3 - (Might change in the future) Mass fabs I find to generally be a weak unit as a player and even riskier as an AI (since it'd be easy for a human opponent to suicide a bomber in to start a chain reaction) so while it's down as a possible long term change for my AI to build T2 mass fabs in some niche scenarios it's not a priority. While it should sometimes build SACUs it should do this sparingly as on most maps/scenarios I'm unconvinced that they will help it win so it's currently something it might build if it has lots of mass income and some spare mass, so I expect in the game where it built a gateway it had spare mass when it started buillding the gateway but by the time it finished it was using up all its mass so never had enough to want to start on an SACU.
4 - (Replay needed, planned to change) - I expect this is where it is thinking the enemy might have an experimental and wants to get a second experimental to continue the attack but I'd need a replay to confirm. The logic for this is down as something to be improved at some point due to scenarios like this.
5 - (Replay potentially needed, might change in the future) - I expect this will be where the delay between existing engineers completing 1 building and starting on the next leads to the AI storing up lots of mass, and this triggers building engineers to make use of the mass, but I've not noticed it being a significant issue on games I've seen so would need a replay to check if it's this or something else.
6 - (Air - unlikely to change; AA - replay possibly needed) - Generally my impression has been that it underbuilds AA (particularly when supporting an attack such as an experimental). Until recently it would overbuild AA for its ACU but this was fixed so it should be a more modest amount. However, I expect if you're playing M27 vs M27 then it will be building more AA as it varies the amount of AA based on how much air the enemy has, and since M27 likes to focus on air it results in opposing M27 building more air and AA (essentially all of the M27 AI will end up building much more air units and AA units than if they were fighting against an opponent who didnt focus on air). However if you've got a replay where M27 is fighting against a team with no M27 in it and it's massively overbuilding AA the nI could use a replay to check. -
Sure, here is a game I just had earlier where you can see some of these things taking place https://replay.faforever.com/18000390
Id also like to report, in my current game which is a bit of a water map, there seems to be something going on with my ships. They appear to be being controlled by the AI. I keep telling my ships to do what I want, but then they are getting mysteriously redirected to all kinda of different things and not by me. Also, I disabled unit sharing in the options, but the AI can still do it somehow.
-
@teralitha Thanks, I'll have that bug fixed for the next version - looks like it is mistakenly treating all allied naval units as being M27 naval units
-
Seems to be a problem overcharging. Not sure if its because of your mod or not. But its the only mod Im using so a good chance.
Problem is I cant do overcharges. The button is never highlighted no matter how much energy I have stored.
-
If you disable M27 and e.g. just play against normal AI can you overcharge? I dont have any issue myself (playing with M27) and I don't recall putting in any code to disable overcharge, so it may be an issue with the base game (especially as you mentioned in the other thread you aren't able to target individual units with T3 arti so sounds like a few strange UI related behaviours).
-
Yeah could be an issue with FAF. In vanilla I can overcharge. On a different note, with M27, something that is a bit annoying is when I build an T3 arty, AI will send over engineers to help me build it sometimes, and thats ok, but the problem is when they also start building their own T3 Pgens next to it. Im not sure if that matters whether or not an allied PGEN will give the connection boost to the arty or not, but I dont think its intended.
Another little issue Im seeing on occasion, the AI will send out a cluster of T3 engineers toward the enemy bases that behave as though they are combat units on the offensive, and they just die.
https://i.imgur.com/qBuXOVK.jpg -
@teralitha Re the T3 arti PGens this sounds like an indirect effect of it's backup logic for finding somewhere valid to build (where it takes the last location that something was successfully built as a start point when searching for build locations, coupled with its logic for building power normally where it tries to build power adjacent to units that benefit from the adjacency). I'll see if I can adjust the adjacency logic to only factor in units owned by the AI since adjacency doesnt benefit allies.
Re the engineers I'd need a replay to see why they're doing that/if it's intentional, e.g. they may all be on reclaim duty, or trying to build something (that's ended up with a really far away location due to not finding somewhere nearer the base) etc.
-
https://replay.faforever.com/18009052
Keep an eye on Gray, they are one of the biggest cuprits that send out all the engineers groups Also, I looked at every AI, and they at any given time will have anywhere from 50-90 T3 engineers each. That seems very excessive to me. They never ever have enough mass to warrant having so many engineers.
Check this out - https://i.imgur.com/JwDscQD.jpg
-
Is there an arbitrary limit placed on the m27 AI on how many nuke launchers if can build? Just wondering because in my current game I built 4 nuke lanchers, but for some reason only 1 will allow me to build nukes, the rest I have built cant. Not sure if its because of the mod but Im thinking it is.
-
@teralitha No limit. I've also seen the same M27 AI build (and use) multiple nuke launchers. Sounds like another UI issue, but I've not had anyone else say it happens with M27. See if you can reproduce without M27 (e.g. just enable cheats and spawn in 4 nukes both with and without m27), and if it's the same without M27 ask for help in the technical support section on discord and/or on the forums.
-
@maudlin27 , great job with this AI. I like to make 1v1 style maps and when I play test I throw in an AI opponent. I've only used it a few times so far but it acts the more like a human opponent than any other AI I've tried. It even chased my com down with T1 arty after a battle had left it <1000hp and got the kill as I was trying to get under water
I used to use Sorian AIx adaptive with 1.7 or 1.8x but M27x absolutely destroyed me with those settings. It bombed all of my engineers within a few minutes.
Anyway, great job. I won't be going back to Sorian AI.
-
@maudlin27 Okay so I tested it and its fine. I think what happened is I reached unit cap.
-
Just a suggestion, what if instead of a one size fits all AI, you make a couple different AI for different roles. Like one that focuses on navy, one that focuses on air etc. Trying to make one AI do it all could be difficult to balance perfectly. Depending on map positions, I would want certain AI to perform focused roles, and that is what is missing from alot of modded AI's i see out there, with the exception of sorian which does make several role focused AI. (That arent as good as they could be)
-
@teralitha If you try playing against 4 M27 on a map like setons you should notice each AI perform a different role. I did contemplate different player selectable roles for the AI at one point but decided I'd rather focus on having the AI decide what role to try and do based on the map/scenario (it also makes it easier to maintain if I'm just dealing with one AI rather than different variants, and helps make the AI a bit more varied/less predictable when playing in different map/game setups).
FYI re your previous replay with grey sending engineers out it was due to a bug with M27's pathfinding for that map, it'll be fixed in the next version (although I expect the AI will still built lots of engineers)
@stlng Thanks for the feedback, glad you're enjoying it! If you see it do anything stupid feel free to send me a replay
-
Latest changes (v53 summary)
- New unit unlocked - shield boats! Related logic for Aeon and Seraphim added to use mobile shields like shield boats.
- 10 Bugfixes, including pathing bug on Battle Swamp map and stopping M27 from controlling non-M27 teammate's naval units
- 10 Adjustments to navy, mostly relating to decisions on whether to attack and with what units
- 6 other changes, including adjusting threat calculations so shielded undefended bases emit less threat, and making it less likely for T1 PGens to be gifted to a non-M27 teammate
Acknowledgements:
- Teralitha – Replay highlighting bug with teammate’s navy, along with other more general feedback
- Fearghal – Highlighting M27 breaking on maps with underwater start positions.
-
Im still seeing the AI take control of my naval units, but its not all the time now. They are occasionally grabbing a few of my ships to move in their naval groups.
-
@teralitha Thanks, spotted the issue in the code so hopefully will be fixed properly in the next version
-
I am still unable to use overcharge while using this AI in my game.
EDIT, correction, it is working, however, Im not getting any audible notification that its available like you normally do. At least, not at first. It starts giving audio and visual que's after you fire it a few times. However, Im not sure if this is caused by M27..
-
Sounds like it's probably an unrelated sound issue. One thing I found helped when I had separate sound issues (where a range of different sound effects including ACU being under attack stopped working consistently) was doing a restart of my computer (restart rather than shutdown), but if that doesnt help I'd see if anyone can help you in the technical support area