AI Development Guide and M27AI v74 Devlog
-
@tyne141 The issue might've been fixed in the last update but to be safe I've added some further logic to the (WIP) v40 to make sure that specific scenario shouldnt happen (the issue being the engineers were stuck assisting the land factory, and never had their orders reassessed once the land factory had finished building all the units wanted for the plateau)
-
Thanks for the quick feedback; it's really great to watch the AI develop as you add to it. I'll try running a similar setup again on v40.
One other thing that a friend and I noticed when we played 2 humans VS. 2 M27s on V39 last night was that one time a commander killed itself by standing in the channel on High Noon and getting hit by 3 x T1 torpedo launchers. The commander seemed to retreat most of the time when it was damaged a certain amount but it didn't seem to detect it this time. The other thing was that the AI didn't seem to respond very quickly to T2 UEF cruisers attacking base buildings; it was still very challenging to win but we managed in the end partly through weakening their economy through cruiser missiles. I think we played about 3 games in a row and eventually won the last game. I can find the links for the replays if they're useful; I assume it was on V39 as I think we updated last night before playing. It's still really challenging as the AI was very quick to hit us with nukes and/or experimentals if we let it grow for too long.
-
@tyne141 Yes replays of games between M27 and humans are always useful even if there’s no obvious issue/error.
The t1 torp launcher/acu point sounds like a bug (Edit: Reviewing the code for this there was a flaw that likely explains what you've described which will be fixed in v40) while the vulnerability to cruisers is more of a weakness with its current logic that I need to try and improve at some point (so a replay that highlights this would be helpful).
-
@maudlin27 thanks very much.
I thought it might be mod compatibility but I was thinking Auto Reclaim. I look forward to seeing what the next release can do.
-
@maudlin27 - here are the replays:
- https://replay.faforever.com/17270495
- https://replay.faforever.com/17270834
- https://replay.faforever.com/17271124
From memory, we lost the first two games but it was in the second game that one of the commanders died early because it didn't move away from the torpedoes; the remaining team still beat us convincingly by teching up and hitting us with experimentals. I think we won in the third game mainly through long range naval.
For context, we haven't been playing too long but we're easily beating the standard AIs and Sorian etc; we don't really play against other humans much yet so we're not exactly great players but it's offered us more challenge than Sorian or LOUD which are the other AIs we've played against so far.
-
@tyne141 Thanks, the replays highlighted a number of flaws/tweaks to make so hopefully it can give a bit more of a challenge in the next release.
-
@maudlin27 - awesome, it's great to be playing against an AI as it is evolving so we know that we can't just learn how it behaves once and remember how to beat it.
Out of interest, is the intention to definitely add navy/sea eventually if there is time to do it well? Or is it potentially easier to make an AI difficult to beat if it concentrates its resources on land and air? I notice that some of the AIs that do build navy don't defend them too well so it is often easy to knock out naval factories in which case it is a massive waste of mass for the AI but I assume that an AI that can strategically use certain naval units could be quite tough to beat.
-
@tyne141 I've still not decided whether to get navy, and if so to what extent to do it - as you mention it's very easy to waste a lot of mass on navy if it's not implemented well, and it's further compounded by me not really knowing how to play navy well as a player.
-
V40 Update – Deceiver and naval defence
- New unit unlocked: The deceiver
- Various tweaks aimed at improving M27’s response to a nearby naval threat slightly
- Added basic support for the flying engineers mod
- 14 other misc changes and 11 bugfixes
Acknowledgements
- tyne141 – Replays highlighting issues with torpedo defences and cruisers
- splitice – Replay indicating incompatibility with flying engineers mod
-
@maudlin27 said in AI Development Guide and M27AI v40 Devlog:
Various tweaks aimed at improving M27’s response to a nearby naval threat slightly
Thanks for the acknowledgement; here's a couple more replays if you want:
It was 2 games of 2 humans VS 2 M27s on Eye of the Storm. We lost the first one but won the second. There didn't seem to be any major bugs but in the second match, the bottom right AI sent its commander diagonally across the whole map underwater which meant that it was completely vulnerable to torpedoes. So it almost got taken out by a lone T1 submarine. We lost the first match in a big part due to the M27 firebases being quite effective and me not defending against the T2 artillery quickly enough; however, in the second match it didn't really seem to build the firebases as effectively at the top or bottom so we just skirmished across gradually.
-
Played a heavily modded game (primarily fast build, increased storage, increased nuke defence build rate, defence expanded). 1x AIX vs 1x human.
@maudlin27 well done... took me over 2 hours (Uveso with the same settings would be sub 1hr typically).
Got forced to turtle up to the middle a bit the AI was very overwhelming with a constant stream of high tier units controlling the center.
I'm betting it would have had enough resources to build more experimentals however it didnt. Might have been able to win if it did. One area AIs can typically offer more challenge to human players (if resources permit) is by building experimentals as that requires extensive micro management as a human.
It never tried for a nuke win. T4 Arty was disabled in this match so there was no Arty win possible.
I won via area supression followed by brute force nuke win.
- Area for improvement.
Don't park within range of guns
- Area for improvement
In the above screenshot that was a fleet of T1 and T3 engineers primarily. Seems kind of useless?
Tried to invade with that engineer army multiple times. Cannon fodder strategy?
Overall - good game. Played well. Slowest point with large armies clashing -2, typically +2.
- Area for improvement.
-
Also flying engineer strategy:
- Fly in over land defences and take them
Might have been a good strategy for that engineer army.
-
@tyne141 Thanks for the replays, looking into further there's a bug with my logic on 'chokepoint' games (such as 2v2 eye of the storm) - will be fixed in v41 (I'm just working through a few adjustments before I release).
@splitice I'll have a look after the current release to see if there are any easy adjustments to help fix, but some of my logic's range is hardcoded which may cause issues if the mod is introducing very long range units. I'll double-check how it handles things when T4 arti is disabled though, as it's quite possible it is trying to build it, and when it fails due to the unit restriction it stops building any experimental, leading to poor use of resources. I'm just going through pre-release checks on my current release so it won't be until v42 for any changes re this though.
-
@maudlin27 Iterate the blueprints on start for unit ranges perhaps? Thats how unit stats are normally changed so it makes sense to do the same on first tick.
It didnt build zero experimentals (I saw a few galactic colossuses before taking the center) but they were limited. Towards the end of the game I would have expected to see waves of them.
-
v41 Update - Hives and Shield Disruptor
- Added new unit – Shield disruptor
- Added new unit – Hives
- Fixed various bugs/assumptions that meant M27 wouldn’t work with the survival map Final rush pro support (in preparation for an AI monthly tourney on this map)
- Fixed bug on some chokepoint maps (such as 2v2 Eye of the storm) with the chokepoint assignment
- 10 Other bug fixes
- 53 Misc changes, including various tweaks to late-game logic in high mass scenarios to try and build more land factories sooner, assist SML and SMD with fewer engineers if mass is overflowing, build more power, and adjustments to T3 arti targeting logic when the enemy has no T3 arti of their own. Also including various tweaks to the early game such as initial build order tweaks and slightly better use of early raiders so theyre less likely to die.
Acknowledgements:
- Tyne141 – Replays highlighting strange choice of destination for M27’s ACU when turtling
- Zlo – suggesting I ctrl-K obsolete radar rather than reclaiming it
- Relent0r –Querying whether M27 chooses not to upgrade mexes in range of enemy TML (prompting a tweak to incorporate such logic).
- Ice-IX – Bug where disbanded platoons would have their displayed name change even if the config settings said to not do this.
Benchmarking
As it's roughly 1 year since I first started working on M27, I thought I'd benchmark how well it was performing against several of the other AI (DilliDalli and RNG, as they're the 2 AI that during testing are most likely to beat M27), in part as one of my long term goals had been to create an AI capable of beating all other AI on the <700 rank map pool a majority of the time.While M27 just managed to reach this goal (after numerous small tweaks to its early-game logic), it was very close on several maps so this will be highly dependent on the map pool chosen. The devlog has more details on the results, but in summary (with 4 faction mirror matchups being played against each AI, and then another 4 in the case of a tie in results):
Maps with 100% win rate:
- Theta passage
- Auburn Canyon
Maps with a clear >50% win rate:
- Adaptive Hardshield Oasis (3 win 0 loss vs RNG, 4 win vs DilliDalli)
- Regor VI Highlands (4 win vs DilliDalli, 3 win 1 loss vs RNG)
Close fought maps:
- Loki - FAF version (3 win 1 loss vs DilliDalli, 2 win 2 loss vs RNG followed by 4 win 0 loss)
- Forbidden Pass – FAF version (7 win 1 loss vs RNG, 13 win 9 loss vs DilliDalli)
- Point of reach (4 win vs RNG, 2 win 2 loss vs DilliDalli followed by 4 win 0 loss)
In terms of the other map pool maps, Serenity Desert Small – FAF version currently has a bug that prevents RNG and DilliDalli working on it so the results aren't included
-
Great to see so many frequent updates.
If you want some more replays, here are a few more:- Four-Leaf Clover: https://replay.faforever.com/17387027
- We lost a few times because the T1 land skirmishing was quite effective but we ended up winning in this replay by turtleing and using tactical missiles - Flooded Strip Mine: https://replay.faforever.com/17432261
- This was just me playing with one ally M27 and two opponents; I was mainly just practising to see if I could beat it with T3 artillery; in this particular one I mostly beat the opponent opposite me but my ally lost its side so I lost in the end - 3 of us losing against 3 M27s on The Ditch: https://replay.faforever.com/17401339
- 2 of us on Fields of Isis: https://replay.faforever.com/17364957
- We lost quite a few times before we won but we found that a firebase with tactical missiles was quite effective against the AI as it only built so many missile defenses
Tactical missiles seem to be the biggest weakness we've found on land skirmish maps but on a map like Flooded Strip Mine that's larger the tactical missiles aren't so much of a weakness because of the range.
- Four-Leaf Clover: https://replay.faforever.com/17387027
-
@tyne141 Thanks, I’ll have a look ahead of the next release. I’m in the middle of tweaking M27’s tmd logic to handle massed tml and billy nukes so the replays highlighting tml issues are well timed!
-
So after trying to play with M27AI on DualGap Scale Adaptive around 2 min in the entire game freezes and I have to force kill it. This is the log I got from it game_17452319.log
-
@igneustempus Thanks, it looks like M27 will hard-crash on any maps that have mexes outside the playable area, I'll have it fixed for the next version
-
v42 Update
This update was almost entirely about fixing issues highlighted by replays people have sent me:- Various adjustments to Czar and Soul ripper logic to make them avoid large concentrations of enemy ground AA better
- Various adjustments to turtling logic so it's less likely to preemptively build T2 arti, large amounts of T2 PD, and/or mobile artillery
- Various adjustments to bomber defence logic, including expanding the cases where bombers will target enemy fixed AA buildings
- AiX Omni vision support - When a teammate/M27AI has map-wide omni vision then intel units shouldn't get built. If the enemy team has map-wide omni vision then stealth shouldn't be used.
- Multiple enemy TMLs and/or billy nukes should now be defended against
- Engineers should now be able to handle enemy cloaked selens blocking mexes
- 21 Other misc changes and 17 bug fixes, including fixing hard-crash caused by maps with mexes outside the playable area, and a bug that prevented backup logic for deciding what experimental to build from working (most relevant for unit restrictions and modded games)
Acknowledgements
- tyne141 – Replays highlighting M27’s vulnerability to massed TMLs
- Yung Dookie – mentioning they were practicing against M27, which meant I had a few replays I could check for flaws in M27’s approach
- Radde – A number of replays highlighting flaws in M27’s turtling approach
- Splitice – Highlighting M27’s issues with not building many experimentals (in a modded game) and units dying to long range units.
- IgneusTempus – Replay highlighting hard crash on dual gap