M28AI Devlog (v58)

v50 Update
45 changes and fixes, including:

  • FA Mission 5 - 7 changes, this mission is now supported
  • FA Mission 6 - 2 changes, this mission is now supported
  • SC Aeon M1-M2 - 1 change made (M1 is now supported, I didn't get to the end of M2 in testing)
  • Kitoons replay - 1 change (increased the amount of battleships M28 can build when it has won navy)
  • Radde replays (various) - 10 changes, including a workaround for a rare issue where a novax satellite gets stuck; issues with power-stalling causing shields to stay down, experimenting with TMD being built in response to MMLs (this may well make M28 weaker), and fixes to some gunship movement logic
  • Bart replay - 20 changes, relating to various improvements when the game is in norush mode, and improved support for experimental shield and resource boosting mods
  • 4 other changes


  • Radde - various replays, which highlighted some bugs/issues and M28's weakness against MML
  • Bart - replay which highlighted various norush issues
  • Kitoons - Replay that showed 5 Cybran battleships aren't enough to break through a well shielded firebase

v51 Hotfix

  • Fixed a bug that would break M28's logic for the zone in question if M28 started building a T2 arti
  • Improved M28's approach to building spy planes to deal with cloaked laser ACUs so it should consider helping land experimentals near a cloaked ACU (previously it would just help gunships).


  • Radde - several 1v1 replays and highlighting M28 was bugged in one of them

Can I help you with something with m28? I'm interested in this project @maudlin27

Replays within a couple of days of an update showing M28 being beaten are usually useful, particularly if it's against an AiX version (since against 1.0 a decent player can just outplay it). Naval focused games are also likely to be more useful than land based since I get much fewer replays on naval based games (so M28 is likely to be worse at naval combat than it is at land combat).

If you've got coding experience then one issue I'm currently struggling with is figuring out the cause of the high memory usage for M28 and more generally for the default FAF AI - it's both higher than expected, and growing over time more than expected, and can cause the game to crash if it goes over 2GB (which is more likely on larger maps with lots of unit mods). More information is on the AI development discord if it was something you wanted to look at.

v52 Hotfix

  • Fixed a bug where M28 would stop using experimental bombers if it had 2+ (introduced in v50)
  • Fixed an oversight with M28's resource sharing logic which would only use absolute values, leading to some teammates overflowing mass while others didn't have lots (where their total capacity differed significantly).
  • Improved skirmisher enemy detection logic to include all direct fire enemies in adjacent zones (previously it would only include the closest enemy for performance reasons, but this would sometimes lead to e.g. hoplites running into an enemy guncom and dying)
  • Slight delaying in late game eco (mass fabs and quantum gateways) if the M28AI hasn't built an experimental in the zone in question yet.
  • Long range enemy threats such as T2 arti should be taken into account when deciding where units should retreat to (to reduce instances where units retreat to a location within range of enemy T2 arti)


  • Radde - 2 Replays beating 1.3 AiX resource M28 (due to the hotfix only some of my planned changes for this feature in v52)
  • Fertgl - Highlighting a bug with M28 not using experimental bombers

@gatorized Could you post the replay ID?

Introducing a new 'feature' - trophies! The first person to send me a replay for a more recent version of M28 than the current trophy holder, where the replay meets the trophy requirements, will be acknowledged as the winner of the trophy in the next update notes. The two trophies are:

  • The Radde trophy - Named after Radde who has sent a large number of replays fighting 1.3 and 1.4 resource M28s in recent months - awarded to the first person or team to beat M28 on a 15km-20km size mapgen when M28 has a 1.4 AiX resource bonus (i.e. it can still have 1.0 build rate bonus), with no SIM mods other than M28AI. 1v1 or teamgame submissions accepted (teamgame must have mirrored start positions and equal M28 numbers to player numbers)
  • The Sladow trophy - named after Sladow, who beat 1.7 AiX M28 (v39) - this trophy is awarded to the first person to beat a default AiX M28 1v1 (i.e. 1.5 resource and 1.5 build rate cheat modifiers) - i.e. any map, any mod.

Note the requirements for the trophy are subject to change with each release of M28.

v53 Update
Kiting and anti-firebase improvements, including:

  • 7 Changes mostly relating to trying to have hoplites do better at surviving against an enemy guncom (although the changes should be relevant to mongoose and sniperbots as well)
  • Replay 21200371 - 5 improvements relating to enemies setting up T2 arti firebases near M28's base
  • Fixed M28 not building navy on the map Sludge (along with 2 other minor changes)
  • Replay 21193022 - 7 changes, including improving the speed with which the rear M28 position will get T3 air and fixing a bug that lead to loads of TMD being built
  • Replay 21206374 - 6 changes, including TMD being built against Seraphim cruisers+aircraft carriers, and T2 being built against nearby enemy naval threats
  • 2 other changes, including having hover/amphibious units in the water retreat back to base rather than to the middle of the water zone they're in


  • Zhanghm – doing some testing on high memory scenarios to confirm the theory that the variety of units built in a game is likely the biggest factor in memory usage.
  • Radde – Land and naval replays, both 1v1 and team games, which highlighted a number of improvements required.
  • Fertgl – Screenshot/replay showing a poor choice of rally point by M28 on water for hover units.
  • Gatorized – Image referring to M28 not building navy (fortunately I was able to recognise the map from the screenshot, but for future reference a replay ID would make it easier for me to identify the issue).
  • Jip - Fixing a bug with the navmesh, being quick to merge a pull request fixing a categorisation bug, and continuing to fix minor FAF lua error messages

v54 Hotfix

  • Fixed a bug that would break M28's logic in some cases when faced with a nearby enemy firebase.

In the last few weeks or so, we've had a number of games with M28AI result in a complete sim freeze - the UI remains responsive but the game world is completely frozen, with no obvious error messages, Lua debugger windows, etc. I will upload a couple of game.log from sessions where this happened in case helpful.

[1] https://privatebin.net/?4afc224e8d84212e#5JABUWLuMgQvPQkZS6oXxZ8W5bhVG4oVnaeM94xin2Ls

[2] https://privatebin.net/?718c7a544a249cc0#9PC3zqM9osZyA8o4KGs5SeCFh7W44Q43ba8UndPXBPEg

@sparky222b Thanks for the report, do you have the replay IDs for the games?

@sparky222b Thanks, found the cause of the crash (if an M28 T2 arti tries targeting a mobile unit), will fix it in the next update

v55 Update
Aside from fixing a couple of major bugs introduced in recent versions, this update was around tweaks to the early-game logic based on Radde's trophy winning replays.

  • 21233524 - 11 changes, including slight improvements to early build order to try and reduce the tendency of M28 to stall power, and a fix to the logic for building an early bomber (that meant it was built when M28 had low power, instead of when it didnt have low power)
  • 21233818 - 14 changes, mostly focused around getting more MML sooner if the enemy setups up a T2 arti firebase near M28's base
  • 2 other fixes (fixing a crash caused when T2 arti tried to attack a fatboy, and a bug when M28 would consider building T3 mass fabs)

Trophy awards

  • Winner of the Radde and Sladow trophies – Radde – in record time Radde beat M28 with a 1.4 resource mod on a large land map, and then crushed it on winter duel at 1.5 AiX. Will the latest changes prove enough to combat a ‘winter duel T2 arti’ attack, or is M28 doomed to failure?

The current trophy holder will also be recognised in the original post of this forum thread.

Other Acknowledgements

  • Fearghal – logs highlighting error when M28 considers building mass fabs.
  • sparky222b – logs/replays with M28 crashes

Wow, that was really fast! Thank you @maudlin27!


The AI M28 just stood still on the map Twin Rivers - Happen twice in a row; do you have an idea why this is happening?

@magge Based on the game log M28AI wasn't loaded. Can you recall how the game was setup?

For example I've seen this error before where you click on the Load presets option in the game lobby (before the game started), or click on a rehost game option, in which case it would load the AI and use the default/easy AI, so it looks like a similar thing.

If you just created a new game from the FAF client, didn't load any presets, enabled the M28AI mod and selected the AI though then I don't know what caused it.

Thanks for the info - I will forward it to the host player Bash1990 and hopefully he can redo his hosting settings, maybe there was something faulty.

Edit: @maudlin27 He has reinstalled the AI mod and made his lobby settings default - And it is working now.

Thanks for confirming!

v56 release
More replay focused changes, mainly for dealing with nearby enemy firebases and naval production

  • 18 Changes relating to winter duel replays to try and get MML faster and attack more aggressively with them
  • 9 Changes mostly relating to navy from a mixed mapgen map to try and increase the build power assigned to navy when it's contested, including building torp launchers and subs
  • Refinements to T2 arti targeting so they choose their target a couple of seconds before firing (instead of 20 seconds)
  • 4 other fixes, including an infinite loop that could happen in some late-game scenarios

Trophy awards
Radde was lightnig fast again with replays securing the two trophies:

  • Radde Trophy - Radde
  • Sladow Trophy - Radde (beating a 1.7 AiX M28 on winter duel)

I'll adjust the trophy awards slightly going forward - the trophy will now to go the highest AI modifier beaten under the trophy requirements for the latest release of the AI (AiX for Sladow trophy, Resource modifier for Radde trophy); where multiple people beat it at the same modifier, it will go to the first person to beat it at that modifier.

I'll also try to keep the original post updated with the current trophy holder (i.e. ahead of the next version release)


  • Radde - for providing numerous replays in addition to the trophy winning ones
  • Fearghal - Replays/posts highlgithing several errors and a crash
  • Triangleleaf - Honourable mention for a replay beating a 2.0 AiX M28

v57 release
Campaign and replay related changes

  • Added a new 'no rush' type feature to the hostile campaign AI if it 's using M28 - you can now specify in game options how long it will be before M28 applies most of its logic (including attacking). This is to help make some of the missions where the AI starts with a huge army no longer impossible:

  • 3 fixes for Aeon M3 so M28 works as a hostile or allied AI

  • 9 changes based on Radde's trophy entry (beating M28 1.4 on a naval map), including reduced ecoing so that more resources can be spent defending against navy

  • 2 changes on Winter Duel (Sladow trophy entry) so more T1 arti get built and tanks should wait longer before attacking the enemy ACU

  • 3 other changes, including adding a threshold for torpedo bombers to be built so the enemy doesn't trigger an emergency response when sending a single engineer across the water

Trophy awards

  • Radde trophy - Radde and KuhwaKlimakleber - 1.4 resource 2v2, naval mapgen map
  • Sladow trophy - Triangleleaf - 1.8 AiX Winter Duel