M28AI Devlog (v147)
-
v114 Update
22 changes, including:- Hopefully fixed the intended 113 feature for prioritising production
- Various changes to reduce M28's likelihood to stall energy early on (not building factories or air staging when stalling E, prioritising part-complete additional hydros more)
- Fixed a bug where Thaams would act like LABs and try and micro-dodge enemy tank fire (leading them to not firing any shots)
- Fixed a bug where part-complete friendly units were treated as full health fully constructed units when determining anti-air threat (which e.g. could mean you could bomb M28's naval factory and it wouldn't respond if that factory was building a cruiser)
- ACU should be less likely to return to it's base to attack a land experimental that is destroying the base
- LOUD specific - support for upgradable T3 pgens added; Fixed bug that meant teleport didn't work; Greater focus on ecoing in mass stalls
Acknowledgements
- SolUmbrae – posting replay beating M28 on TwinRivers which provided the source of the majority of changes.
- DeHeerser – mentioning teleport not working in a LOUD game
- Tematus – noting M28 wasn’t making use of upgradable T3 pgens in LOUD.
-
v115 Update
Smaller update, with 14 mostly minor changes:- Reduced the build power assigned to naval factories to both take into account how many naval factories the team has in total, and to reduce the engineers assisting if M28 is stalling
- One of the factories on any plateau or island with significant mexes should never be paused when M28 is stalling mass
- If M28 has paused a mex upgrade (due to stalling mass) and completes a mex upgrade, it should immediately unpause one of the paused mexes (albeit it may then pause it again if it is still significantly stalling mass)
- LOUD - M28 should no longer build strats (since they're semi-broken in LOUD); General reduction in the number of engineers to be built (roughly 20% where M28 doesnt have much mass); Fixed a bug where Seraphim destroyers wouldn't be given any orders.
-
v116 Update
30 changes, the majority of which were based on testing M28 Seraphim vs LOUD on a '4-island' type map.- SACUs should get build power upgrades when overflowing mass, and pro-actively build experimentals to use up the mass
- Fixed an issue that could arise on larger maps if the area surrounding a mex appeared impathable (resulting in the mex being ignored by M28 for the game)
- M28 should now (similarly to a player) infer that if a previously scouted mex or factory shows as dead, it means the factory has been upgraded (not that the factory is dead)
- Various adjustments to Yolona targeting to help close out the game where there aren't any high value targets remaining
- 15 LOUD specific adjustments (including not building ahwassa, experimental land transports or experimental counterintelligence units, being less likely to pause land factories, not treating experimental mobile aeon arti as a scathis, being more likely to upgrade T3 mexes and pgens to T4, building more t3 mass fabs, upgrading t3 mass fabs to t4, adding a workaround for an issue relating to Seraphim buildings that would cause shields to be built on repeat, and a few other changes).
Acknowledgements
- Azraeel - Testing on LOUD and highlighting a few bugs/issues, including noting T3 mass fabs can upgrade; that barrage artillery were being treated similarly to strategic artillery; and a bug with the Aeon mobile experimental arti
- umbrasolis - Posting another 1v1 replay vs M28
-
v117 Update
29 changes mostly based on M28 vs LOUD matches:- Further adjustments to logic for upgrading mexes, so it's more likely on a large map, but if a T2 mex upgrade finishes in a zone, a T3 upgrade shouldn't be started if there are T1 mexes in adjacent zones that could be upgraded instead
- Capped mobile shields based on gross energy income
- T1 land factories should no longer prioritise the slowest unit (with other changes made to try and still get the effect of not building LABs after the first couple of units) - more relevant for unit mods that add more T1 units
- Engineers should be more likely to build land factories if dropping on an island that as a whole has lots of mexes (even if the zone itself doesnt)
- Units in short range support should be more likely to attack - this is most relevant if e.g. a GC is 'escorting' a T3 mobile arti or MML, and the GC thinks it can win the battle by just attacking itself
- 145 LOUD related changes, including no longer building very weak units like hoplites and T3 sniperbots, and prioritising units that are much stronger in LOUD; RAS upgrade is less likely, T3 arti are more likely, fixed issue where transport drop events weren't triggering (meaning land facs wouldnt get built by the engi drop), fixed bug where MML and arti shots wouldn't be attempted to be dodged
Acknowledgements
- Tematus – 1v1 replay vs LOUD, and noting LOUD has halved the cost of T3 arti vs FAF
- Azraeel – various suggestions and highlighting issues in LOUD, such as units that are particularly good in LOUD and ones which don’t work well with M28
- Sprouto - fixing a lua error message that would appear in the log in games where M28 was active
-
v118 Hotfix
Hotfix due to a bug introduced in v117 that caused the game to crash with total mayhem depending on what other mods were enabled. Other changes:- Fixed a bug present for a long time with T3 arti target selection (that meant in most cases they weren't firing at the target they considered the best)
- Added new shot synchronisation logic for T3 arti so they are more likely to fire at the same target as other T3 arti
Acknowledgements
- TiborDeimos - Sending a log where M28 crashed with totalmayhem enabled
-
Thank's for the Hotfix. Wasn't sure if it went out of memory or was crashing because of some mods.
Still love this AI
-
@maudlin27 hi, I was wondering if the changes to the loud part will affect FAF's mod? Some mod units are weak, but I still want to see them in the game.
Also, when playing faf's high cheat multiplier, I found that the M28 hardly builds land T3. Basically, only a large number of ASF and experimental are built. Although I like to see a variety of experimental products, can M28 also make full use of the land factory in the case of high resource overflow? For example, if the resource overflow of M28 is high, can all these idle LAND factories build a large number of diversified T3 land, and directly set the production assembly point at the enemy base? -
@zhanghm18 Many of the LOUD changes relating to unit mods will affect FAF games using the same unit mods, but I’d expect the variety of land units built overall to increase slightly for the t1-t3 land stage from the changes made (not decrease), as the way it was setup before was M28 would prioritise base FAF t1-3 units (now it prioritises those units and certain mod units)
Re not building more land facs, I’d expect more to be built in 15km and smaller maps if M28 has lots if mass stored and isn’t close to the unit cap, subject to how much air the opponent has
-
@maudlin27 I guess the problem is that AI's population has always been close to cap in the case of high resource overflow. And I find a lot of times AI is obsessed with building a lot of ASFs and gunships (high cheat multipliers). Maybe that would make it easier for him to win? But in the case of extremely high resource overflows, I still expect him to build a variety of units.
And I tried the latest version, and I felt that the AI's unit diversity was not even as good as the previous version. AI is now obsessed with building specific 1-2 mod T3 units instead of building diverse T3 units by tag like before.
It would be nice if you could set up a simpler, more random unit selection logic for high cheat multipliers (e.g., cheats over 4X) -
@zhanghm18 The reason for preferring t3 air over t3 land when reaching the unit cap is the time from production to combat is much lower for air, so it ends up being a better use if the unit cap (eg you could probably build a gunship, attack the enemy base, lose it, and repeat 2 more times in the time it would take a brick to move to the enemy base and die)
-
v119 Update
18 changes, including:- New game option to disable M28's unit prioritisation logic (that e.g. means after a few LABs it builds tanks; or after a few loyalists/titans it builds bricks/percies) - so e.g. @zhanghm18 you should see more variety of units when you have the unit mods enabled
- New game option to disable M28's dodge micro (for those who dont want to turn off all micro per M28Easy)
- M28 should try and build SAMs and protect them with a shield if faced with an enemy ahwassa (if it has too few asfs)
- Reduced the extent to which M28 should be aggressive with units where the enemy has vulnerable buildings to stop cases where it could cause fatboys to ignore a nearby enemy megalith
- 10 LOUD related changes, including more unit prioritisations (e.g. t1 sniperbots shouldnt be built), reducing tendancy to upgrade hydros that are near the frontline, starting the first t2 mex upgrade earlier, and increasing the land to air factory ratio
Acknowledgements
- Azraeel - several replays and suggestions re LOUD games
- Vortex - LOUD suggestions and a replay re an early factory upgrade bug
- Fearghal - Replay highlighting an issue where M28's fatboy wouldn't try and run from an enemy megalith
-
@maudlin27 Thank you! I'll try the latest version later
-
@maudlin27 Tried it out and the new option is very good! I saw a lot of mod units that had never been built before on the M28.More AI options are a really good idea. We can restrict more of the AI's behavior based on how we like to play the game, which is fun!
But the V119 seems to break cybran's experimental shield logic. cybran doesn't seem to be building experimental shields at all now.
Maybe have the AI build an experimental shield for every five normal shields built (at high resources). Maybe this will ensure that the experimental shield doesn't go unnoticed by the AI?
But I do see AI building some experimental buildings in mods (such as experimental power Generators)
In addition, I found that the AI still seemed to build engineers repeatedly and self-destruct (in the case of high unit cap occupation, but the enemy's long-range artillery destroyed the AI's shield), it seemed that the AI wanted to build more engineers to replenish the shield on the one hand, and wanted the self-destruct engineer to save the unit cap on the other hand -
@maudlin27 Thanks again for your ongoing development of this great AI. Just played a game against the latest version. If you like and have a look at replay #23108870 from 51 mins on. The AI does strange things/nothing to recover from a situation where it has lost all energy generators.
Surely an exceptional case and probably something not in your key focus. But maybe there is an easy fix to this behavior?
-
Thanks for the new info for updates. Not sure if this is related to the update, but during a game it looks like there was an error.
If it's of any help, can post some error info here.
EXCEPTION_ACCESS_VIOLATION (0xc0000005) at address 0x0067a1a7
attempted to read memory at 0x5e50a9c1warning: Error running lua script: ...mmander forged alliance\mods\m28ai\lua\ai\m28map.lua(745): table index is NaN
stack traceback:
...mmander forged alliance\mods\m28ai\lua\ai\m28map.lua(745): in function `GetClosestPlateauOrZeroAndZoneToPosition' -
@lightwire Could you post the replay ID? The 'error running lua script' message is something I could look into.
@Hammi I'll have a look but if all of M28's power was destroyed then it's not something I'm likely to be able to solve - it should already prioritise building more power in such scenarios, but as the game will be lost if the opponent has killed all of its power, there's a limit to what I can do (without either negatively impacting its normal logic, or further complicating already cpu intensive processes for pausing units when stalling energy)
@zhanghm18 I can't think of a change in 119 that would've impacted on building experimental shields. If the shields are the same size as normal shields, M28 has great eco (including energy), only has Cybran on the team, and is building scathis and/or t3 arti I'd have expected it to build some.
For the engi self destruct this is likely a consequence of two competing systems fighting each other for which there isn't really a solution - i.e. it wants more engineers to spend its mass in high eco scenarios, but if it has got rid of all its T1-T2 units and has lots of engineers it will ctrl-K some of its t3 engineers (prioritising those without orders) to free up its unit cap, although I can probably mask the problem slightly more -
@maudlin27 said in M28AI Devlog (v119):
@Hammi I'll have a look but if all of M28's power was destroyed then it's not something I'm likely to be able to solve - it should already prioritise building more power in such scenarios, but as the game will be lost if the opponent has killed all of its power, there's a limit to what I can do (without either negatively impacting its normal logic, or further complicating already cpu intensive processes for pausing units when stalling energy)
I just find it interesting that the AI doesn't actually start again from scratch by building power. It just builds a factory and then sits there.
-
Unfortunately the replay desyncs around 26m so I can't see for sure what the circumstances are. At a high level, I'd expect if all factories are destroyed the ACU should try and build a new land factory; if there are engineers they should build power as a high priority; if there are no engineers, the factory should build some. The exception would be if there are enemies near the factory/engineers.
In the desynced version the ACU was trying to build a t1 land factory first which is in line with what I'd expect, but was hampered because of the energy drain from its T3 mexes. However, adding a fix for this (pausing T3 mexes) could cause its own problems elsewhere since it's very rare to want to do this.
-
@maudlin27 I think that's the reason for the problem. The experimental shield in the MOD is larger than the normal shield SIZE. This resulted in M28 not building them.
It should be noted that I remember that the M28 built these larger experimental shields in previous versions. But the problem started with some recent version (sorry, I'm not sure which one). -
Sure. After the game crashed, It didn't show the reply right away in the replay list.
I think this is the one.