M28AI Devlog (v146)
-
v68 Update
Adds personalities, ratings, and some co-op fixes- M28 should in most cases have their own (taunt) personalities, based on campaign characters - in practice, this means that they should be more likely to make use of voice taunts, with those taunts aligning to their particular character
- Added rating details (making use of the latest FAF update which supports AI having their own rating)
- Fixed a couple of bugs with the co-op missions Fort Clarke Assault (M28 wouldn't build its initial factory) and Prothyon-16 (M28 would start in the water instead of getting dropped via transport)
- 9 other tweaks and fixes
Acknowledgements
- Marlo – comments on getting in-game audio to play
- Chucups – noting M28 started in the water on prothyon-16
- QAI3000 – Noting M28 wouldn't build a Campaign issue with fort Clarke assault
- AwarE – Replay where M28 failed to do anything/didn’t load
- Jip – How to get a voice message to only play for allies; Reworking and improving a pull request I'd drafted to allow AI to have their own rating, so that the details could be modified by AI mods (rather than needing to be coded into the FAF lobby logic), meaning M28 now gets to have a rating that is more reflective of it's difficulty
-
v69 Update
Mini update, with 9 fixes and tweaks, including:- Fixed a bug where MAA could be overbuilt (due to M28 incorrectly thinking it was under air attack)
- Reduced the amount of experimental shields to be built (if a mod features them)
- 2 adjustments to late-game shielding
- Novax targeting should factor in if the target is under construction (so no longer prioritise a 5% complete GC over say an energy storage)
Acknowledgements
- Relent0r - Replay with desync issue (which unfortunately I was unable to resolve)
- Zhanghm – reminding me of an improvement with M28 using experimental shields that I forgot to look into
Trophies
No change from v59: Radde (Sladow trophy); and Radde, Mhad and GhillieWolf (Radde trophy). -
v70 Update
12 fixes and tweaks, including:- Fixed a rare bug that meant on certain maps M28 wouldn't work
- Various adjustments to land combat logic to try and make it more likely shorter ranged units (such as land experimentals) will attack the enemy, including fixing a bug where they would want to attack but not receive the order to attack
- Decreased the threat that indirect fire units provide to make it more likely M28 attacks an enemy with a high indirect fire threat but weak direct fire threat.
- Increased the search range of parts of the Novax targeting logic to work better on large maps.
Acknowledgements
- Fearghal - Noting a bug with M28 not working on one map; replay which highlighted flaws with M28's novax targeting on large maps
Trophies
No change from v59: Radde (Sladow trophy); and Radde, Mhad and GhillieWolf (Radde trophy). -
v71 Update
Small optimisation update which rewrites M28's approach for managing certain tables of units (where the unit dies) which can result in a significant improvement in late-game scenarios. Also made sure that M28 logic doesn't run if there are no M28AI in the game (so it can be more accurately used for profiling other mods).
Acknowledgements
- zhanghm18 - Replay where M28 would slowdown significantly/stop for a second in a late game type scenario, which made me realise tables weren't getting 'compacted' after having entries removed (something that has presumably been present since v1 of M28)
- Hdt80bro - Noting table.setn as an alternative to removing entries from tables (in the end I didn't go with this as it appeared to take slightly longer than the approach I used when testing, but is still useful to know)
-
v72 Update
Introducing an AI variant, M28 'Easy' - the idea is M28 logic but with most of the specialised micro disabled, with roughly 25 such areas disabled. Examples of microing disabled include:- Kiting with long ranged units (e.g. hoplites, sniperbots)
- Dodging bomber shots
- Engineers reclaiming nearby enemy engineers/tanks
- Shield cycling
- Gunships spreading out to minimise aoe damage
Mainly intended for people who find it frustrating to play against M28 due to it's near-infinite apm, but who still want to be challenged by M28's macro gameplay.
If there are any significant areas of micro you think M28 does that would be better disabled for such a mode let me know (although no guarantee I'll remove htem - some might just be a natural consequence of how M28 works, and others I may feel are appropriate at being similar to the sort of micro/actions a human player could do) - a full list of the 25 areas disabled is available in the devlog.
Also made a few optimisations to some code including a rewriting of how M28 handles mass and energy stalls and further minor optimisation of nuke and T3 arti targeting logic to try and reduce the tendency of M28 to stutter in the late-game.
Acknowledgements
- zhanghm18 - replays where there were significant pauses/stuttering by M28 (although unfortunately the replays desynced so I'm not sure if the optimisations made will be sufficient to solve this)
- Jip - quickly reviewing/merging a tweak to AI ratings
Trophies
No change from v59: Radde (Sladow trophy); and Radde, Mhad and GhillieWolf (Radde trophy). -
v73 Update
Small update/hotfix to patch a significant MAA production bug that has been present for a long time - essentially M28 is meant to check it's total MAA threat relative to the enemy airforce to avoid massively overbuilding MAA. The bug meant it would think its total MAA threat was 0 (so it would happily build hundreds of MAA in response to the enemy having only a couple of gunships).Also adjusted M28Easy to use attack-move to reclaim instead of manual reclaim orders
Acknowledgements
- Relent0r - suggesting adjustments to M28's reclaim logic for M28 Easy
-
v74 Update
11 niche changes/fixes, including:- Fixing an issue where M28's ACU sometimes wouldnt assist a hydro if there were 2 by its base
- Air factories should be less likely to upgrade when M28 is trying to spam t1 tanks
- Added a couple new M28 chat related messages and fixed a couple of bugs with chat messages (for Vendetta and potentially overlapping voice taunts)
- Added in basic logic to take account of non-M28 teammate SAMs and (to a much lesser extent) PD
- Further optimisation of nuke targeting logic and game-ender shield template logic
- Reduced the occurance of a number of error messages
Acknowledgements
- Zhanghm18 - Replay where M28 slowed down a lot due to its nuke targeting and special shielding logic.
Trophies
- No change from v59: Radde (Sladow trophy); and Radde, Mhad and GhillieWolf (Radde trophy).
-
v75 Update
13 tweaks, including:- Improved how gunships dodge Ahwassa bombs so they're less likely to lose a large chunk of them to friendly fire
- Adjustments to certain ecoing and upgrade decisions so factory upgrades are slightly less likely when stalling, while at least one mex should be upgrading nearby on completion of a T3 pgen.
- When queuing up its first experimental, M28 should clear other queued up experimental orders when construction starts to avoid it trying to build multiple at once (in a team game)
- When ctrl-king air units for reclaim, M28 should no longer ctrl-k them all in the same spot (leading to the wrecks being destroyed).
-
Er... why is it allowed to reclaim my buildings? As an ally
-
@melanol It isn’t, please send me a replay with a timestamp if it does as it’ll be a bug
-
@maudlin27 https://replay.faforever.com/21856317
44:54. Bottom left. T3 engies start reclaiming my T2 fabs to build a T3 shield. Then they go on doing this until I notice they eat my T3 pgen.
I had only 2 SIM mods: this and No build restrictions in campaign
-
Thanks, unfortunately for some reason the replay crashes for me just after loading; also it looks like you're using an out of date version of M28 (v67). That said, from your description I'm fairly confident I've found the reason so the next version should instead of reclaiming your units just send a message complaining that your units are in its way.
-
@maudlin27 said in M28AI Devlog (v75):
the next version should instead of reclaiming your units just send a message complaining that your units are in its way
GET OUT OF THE WAY MELANOL
M28AI did nothing wrong
-
@melanol said in M28AI Devlog (v75):
к
Well, everything is clear here. AI saw that there was too weak protection and decided to improve it)))
-
-
-
v76 Update
Very small update, essentially because I don't think I've got time for more substantial changes ahead of the Rainbow Cup and want this released a few days ahead just in case I've accidently broken something.- M28 should no longer reclaim teammates that are blocking where it wants to build it's late game arti-shield template (and instead just complain to them via a message)
- Fixed a bug where units with shields could have them paused due to stalling E but not unpause them later
- Added niche logic for units to be more aggressive if the enemy has nearby mexes and the unit's retreat is cut off
Acknowledgements
- Melanol - Noting M28 can reclaim friendly units
- Dr Dronken - posting a number of replays against M28Easy (one of which highlighted the paused shield bug)
- !MarLo - suggestion about increasing aggressiveness when retreat is cut off
-
-
Hi maudlin, I have a question about the campaign function. Is it also possible to activate your easy version for the opponent? Also, a little info, I have created a mod for submarines that increases the diving depth, so that they can only be hit by projectiles with a damage range of over 2. This was more of a player's wish. Thank you for your work, M28 is great.
-
-
-
Hi Maudlin; we have another issue with a total simulation freeze while playing against the most recent M28AI. Here is a replay that reproduces the issue: https://replay.faforever.com/21934024
-
@sparky222b Thanks for the replay, it looks like the game ran out of memory based on the crash report - for future reference you can enable this in the settings (and then check the results in the log created by the game in C:\Users[username]\AppData\Roaming\Forged Alliance Forever\logs):
This can happen when the game goes over 2GB (which can be viewed via taskmanager). Some of the solutions I'd normally suggest (lower unit cap, only 1 AI to reduce unit variety) were already done so the only other suggestions would be to limit the unit mods used, pick a non-naval map, and/or pick a smaller map. Jip's also been looking at memory usage and IIRC may have uncovered an issue with how the game handles guard orders that has a higher memory footprint, so my hope is that in time (i.e. a number of months) the situation might improve slightly. -
v77 Update (RC update)
Update based on the first weekend of the Rainbow Cup, featuring 43 fixes tweaks and new features. A full list of changes is included in the devlog, and I've summarised the potentially more impactful ones below.A caveat for people taking part in the Rainbow cup - although I would hope that M28 reflects the below changes in-game, as with any update there's the risk of bugs and no guarantee M28's behaviour will work as expected.
Summary of changes
- Fixed a bug that was preventing M28 building multiple T3 arti or game-enders on the Noro map; made it more likely to get a game-ender where an enemy base is outside the range of T3 arti
- 9 adjustments to nuke targeting, including taking into account reclaim damage, fixing an issue that meant it would often cancel nuke launch orders, and increasing the damage required to launch a missile (so it should no longer target a single T3 mex with a nuke)
- Introduced logic for the Aeon missile ship, and made some adjustments on how much navy is built on very small ponds (like Tabula Rasa)
- Slight improvement in how MAA are prioritised for production if M28 has a land experimental without MAA support
- Transports should drop early if under air attack
- If a player loses mexes near their base (but still has production facilities intact) and M28 builds on them, M28 should gift the mexes back to the player
- Added new logic for M28 engineers to assist a teammate's nearby T3 arti or gameender or battleship
- M28 will occasionally consider gifting its asfs to a teammate (if that teammate has a significantly stronger air force)
Acknowledgements
- Fearghal – Organising and funding the Rainbow cup (which provided the source for most of this version’s changes)
- Farms – screenshot of replay where M28 wasn’t starting a T3 land fac upgrade despite having more than 200 mass income; Noting how M28 rebuilt Farms' mexes (presumably when they got destroyed) preventing Farms from making use of them.
- FTX – suggestions on when to go gameender instead of T3 arti, and how much value to try and get from a nuke missile
- sparky222b – Replay crash report
-
@maudlin27 good changes