M28AI Devlog (v163)
-
@v_k said in M28AI Devlog (v17):
units are stacked in front of M28 base and do not attack until someone goes in range, which kinda "unlock" the units. It is obvisouly related to the map, but maybe the underlying pathfinding or whatever bug could be tracked down.
Thanks, I dont think it's a bug - rather M28 didn't think its units would win if it committed them, so it kept them back out of range of the firebase (so working as intended, even if in the specific situation it might have been better to try and launch a last ditch attack).
-
v18 Summary
c.46 changes containing a mix of campaign support and improvements based on a wide range of replays:- Support for Aeon mission 3 (3 changes, mainly relating to some more niche cases on how naval units are used when the enemy navy is dead)
- Support for Aeon mission 4 (3 changes mostly relating to unit cap issues)
- Aeon mission 5 - another painful mission to get working (in part due to how long it takes to get to later parts of the mission, making testing a chore):
- -Special code to (usually) complete the 'build shield' objective
- -Special code to (usually) complete the 'build SMD' objective
- -17 changes mostly relating to issues with campaign map where an area is pathable when the full map is revealed, but not pathable at the current stage (i.e. in theory land units can reach the UEF base on the full map. However at the time you ahve the objective they can't, meaning you ahve to build land factories on the UEF side of the map as it's anti-air defence is virtually unbeatable)
- -T3 Mobile artillery should now try and target enemy buildings in an adjacent plateau (although note on some maps like air wars this leads to the artillery being stuck due to issues with the game engine)
- 4 Changes re Ice-iX Setons replay (transport issues and fixing a major bug that would cause engineers to stay idle)
- 5 Changes re Cadmium Green to improve M28's initial build order
- 2 minor Changes re FenixThorn setons replay
- 4 changes re Radde 1v1 replay (mostly improving M28's early game decisions on building factories and upgrading factories, including some bugfixes relating to this), and 3 changes re a 2v2 replay (tweaks to its shield defence logic)
- 2 changes re Saver 3v3 replay and V_k replay (MMLs should be more likely to attack firebases and fixed a bug that messed up how Seraphim T2 destroyers are used)
Acknowledgements
- Ice-IX – Setons replay highlighting M28 transport difficulties
- Relent0r – flagging M28’s poor build order/upgrade decision on cadmium green
- FenixThorn – Setons replay
- Radde – 1v1 mapgen replay (highlighting various issues causing M28 to go for land factory upgrades with no units) and 2v2
- Saver – 3v3 mapgen replay
- V_k replay – which revealed a bug with M28’s use of Seraphim destroyers
-
v19 summary
35 changes, including support for Aeon M6 and improved special shield defence logic. M28 should now support every FA and SC campaign map (note it's not been tested on custom campaign missions).- 10 changes for Aeon M6, including trying to reduce the likelihood T3 arti target units near the control centre (and kill the centre)
- 20466700 - Improvements to handling of longer range naval units, including reducing the likelihood units think their shots are blocked and move closer to the enemy; Reduced likelihood engineers will be stuck trying to reclaim; Improved engineer expansion speed on maps like setons
- UEF M2 - Added new firebase logic to (sometimes) defend the station from upcoming Aeon attacks on hard difficulty (previously M28 couldn't complete the map on hard due to this)
- 20476753 - 13 changes, including shield defence improvements and redundancies including fixing a bug preventing units from completing a part-constructed shield; Ahwassa targeting improvement; Reduced asf/intie suicidal tendancies for units getting near to a base; expanded logic for clearing engineers whose orders are redundant when a building finishes construction
- 4 other changes - mostly relating to pathing fixes/redundancies (more noticeable on 20km+ sized maps)
Acknowledgements
- Radde – 6 replays (4 2v2s, 2 5v5s)
- Ice-IX – M27vsM28 replay
-
Can you take a look at my game log? The map "Black Sun Battlefront" is causing an issue with M28. The AI just sits there, and the log file shows a null error when it tries to set up the map. game_20501746.log
Other than this the AI is playing great, especially on naval maps.
-
@bsee Thanks for flagging, will be fixed in the next version (although note the AI will be slow to start given the numbers of shielded hostile civilians by its start position)
-
Have you had issues with getting TML launch orders to issue correctly? I've attempted to automate them but they go off poorly/hang, was wondering if there was a trick to it given that I've witnessed (your?) AI attempting to snipe me.
-
@slicknixon Not from an AI perspective that I've noticed, but it wouldn't be that obvious to me as there are various valid reasons why my AI might have a missile loaded and not fire it. I may also be using a different approach (as a SIM mod) to a UI mod attempting to issue TML fire orders - I've no experience with UI mods so wouldn't know, but the modding discord should be able to help.
Also worth checking if what you're planning would be permitted under the FAF rules (I can't remember off the top of my head where the line is drawn re UI mods and automating player orders).
-
In regards to the rules, it likely wouldn't, but this is more academic (UI mod is done, in fact, just in moderation limbo). I couldn't get it (automated tactical launches) working consistently with the stock SimCallbacks, and couldn't get it working consistently with my own custom SimCallback. I got curious enough to try to implement everything on the sim side; possible I missed something in the process, but couldn't get it working there either.
I've bandied it about a couple of times on the discord but no leads--thought you might have been one of the few to have discovered something given that it's a niche topic and you'd have cause to interact with it. If I find anything out I'll pass it back your way.
-
Hello!
I think the AI you created is very excellent, and it may even have a score of 1300+ in a 1.2*1.2 2v2 scenario. However, it's not perfect, and I have found several issues with M28ai. I started a 2v2 game on the IS map, where I produced a large number of ASFs in the late game, and our side hoarded some land T4 for defense. I then started building the game terminator, but the M28ai I was up against did not respond to my actions.
After I hoarded some ASFs, M28AI often attacked my T3AA position with small groups of troops. These failed attacks prevented M28 from hoarding effective ASFs.
After I started building the game terminator, M28, as an opponent, did not respond to my actions. This includes TML/bomber/some teleport.
I noticed that the AI prioritizes maintaining shields, but this is not effective. The AI did not repair enough shield arrays when dealing with T3 heavy artillery and mavor, resulting in heavy artillery easily destroying antinuke/game terminator facilities.
At the end of the game, when the player finished building the game terminator, M28 AI had an absolute advantage in land force (AI 8-10land t4 vs player 6 T4). However, it did not attack the player's base but kept making detours on the map, which resulted in the ACU and base being completely defeated.
-
-
@kagurazakanana Thanks, there's a map specific issue with the pathfinding that was causing the asfs to suicide, I'll see if I can have it fixed in the next version.
Not sure at this stage though re the game-ender solution - M28's current playstyle (to give a bit more of a differentiation to M27) is to typically try and win without using T3 arti, but on a chokepoint map like Isis that means it's possible to defend against any force it can build up. I'll have a think about a tweak to make it slightly more aggressive where it has a chance of pushing but I don't expect it to have a significant impact. -
v20 Update
- 13 misc changes, including improving buid order where the hydro is relatively far away from base, making the ACU slightly more aggressive early-mid game, Ahwassa targeting tweak, and special shielding bugfix
- Improved ACU combat performance on FA Mission 2 (Dawn) so M28 can now handle the opening section on hard (if supported by a competent human)
- 21 changes to try and have M28 complete FA Mission 1 on hard - it managed to save the civlians (2nd main mission) once, but most of the time will still fail. This includes torpedo bomber micro, naval micro where units are outranged, fixing bugs with building naval factories in water zones, reducing the engineers sent to a water zone in one go once it has a factory in place, fixing issues with land scouts trying to move to locations outside the playable area, improved ACU build order in scenarios where it is overflowing mass due to reclaim, and increased gunship aggression
- New cruiser bombardment logic, where UEF and Seraphim cruisers should be more likely to target enemy structures instead of providing AA defence
- 3 changes relating to Fields of isis replay (including fixing a bug with path generation and making units more aggressive if the enemy gets a game ender)
Acknowledgements
- Ice-IX – Highlighting flaws with M28’s hydro build order on crag dunes.
- bsee replay where M28 failed with its map setup logic
- Hdt80bro – discussion about ways of checking if a unit has fired the last shot in a cycle
- Kagurazakana – Replay highlighting bug in M28’s land zone generation logic that could lead to asfs suiciding into the enemy base
-
-
@maudlin27 Did something big change in M28 AI in last days, hard to judge from version updates ? I played a few 10's of games on the dark heart. Usualy 2v2v2 with me and M28 vs 2x M27 vs 2x RNG. And while M28 was quite ok, it was still a lot less dangerous than M27. I thought that was normal behaviour that M27 is stronger than M28.
But now i played 2 games on eye of the storm, me and M28 vs 2x M27. M28 was bottom left, i was bottom right, each of us handled 1 side. He managed to kill the top M27 before i did, from the looks of it he completely dominated him, his score is insane, 3 times higher than mine and M27's. Did M28 somehow get crazy better in last 7 days or M27 got worse ? Or its just a lucky pick with the map ? This was really impressive from M28. If ur interested, replay id is #20557680. -
@goblinsly2 Yes I accidently broke M27 when it's played with M28 in the last M27 update, it'll be fixed in the next version
(it's not an obvious 'break' as M27 still functions and makes a lot of similar decisions to before, but it's competing with M28 for who gives its units orders) -
v21 Update
A failed regicide attempt by M28 - I figured I'd see how it performed on a selection of maps against M27 (I've held off until now due to how demotivating it was during M28's pre-release to see how heavily it got crushed by M27):- Strip Mine - M28 win - 4 changes made, reducing the amount of MAA built generally, and adjusting asf engagement logic
- Astro craters - M28 win - no changes made
- Theta passage - Mostly M27 wins - 4 changes made (making ACU prefer combat over reclaim, reducing the amount of T2 PD to be built, and adjusting the attack logic of T1 arti when retreating)
- Polar depression - M27 win - 24 changes, which still werne't enough to yield a win. Includes improvements to initial build order, making ACU more aggressive, reducing tendency to pre-emptively build shields and SMD, greater focus on ecoing at the T3 stage (this change may make M28 worse!), and tweaks to retreat logic to try and reduce the tendency of units to block retreating sniperbots.
- M27 also won on Setons and Burial Mounds, although M28 managed to equal or better M27's eco so it wasn't a crushing defeat.
-
@maudlin27 Hello! I really like your work. Of all the AI played so far, your AI is the only one that can launch 5 unit mods and play on a 20km map for more than 30 minutes without crashing. When playing other ai, the game will pause at about 25min and then crash.
But I do want to reflect on one issue: UEF's AI will normally build almost all MOD units. But Cybran's AI basically doesn't build experimental units in mods. What I mean by this is that UEF's AI randomly builds a lot of the various experimental units that are added in the mod. Cybran, on the other hand, may only pick one or two of these experimental units to build during an hour of play. And cybran's AI has very little desire to build experimental units, he just keeps churning out various land armies and air forces, not even the Navy, until he runs out of 1000 unit caps.
-
Perhaps the AI can have a simple logic: let him reserve 50-100 unit cap, and then randomly build experimental units or navy.
-
@zhanghm18 The desire to build an experimental unit is almost identical between the factions, so I'm guessing it was different game-states that led to UEF building lots and Cybran not.
The choice of what experimental to build will vary though. The logic is based on unit categories, and if the desired category isn't available then the AI will switch to building a random experimental. What that means in practice is that if for example you have a mod that adds a bunch of land experimentals to the game, and M28 wants to build a land experimental, it will pick from any of the existing FAF and new modded experimentals.
If instead M28 wants to build say a novax and the mod removes novax but adds a new air experimental, then M28 will switch to building any random experimental (which will include the modded experimental as an option).In terms of the unit cap M28 should already adapt to getting near the unit cap, e.g. it should ctrl-K T1-T2 units, not build more T1-T2 units (with a couple of rare exceptions), and stop building a particular type of unit that it has lots of (regardless of tech level). If it is actually hitting the 1k unit cap consistently I'd need a replay to assess, as adding logic to not build any T3 units at a certain point could have significant drawbacks - for example, if it stopped building asfs it could quickly lose air control and then it wouldn't matter how many land experimentals it built if they'd just die to enemy gunships/strats.
-
@maudlin27 I ran a lot of tests, on different maps. But the cybran AI will always build a large number of T3 land armies and a small number of air forces. And only a handful of experimental units will be built. In contrast, his rival UEF ai builds a large number of random land experimental units. As a result, UEF's AI wins every time
-
@zhanghm18 I'd need a replay to assess, as adding logic to not stop building T3 units at a certain point could have significant drawbacks