M28AI Devlog (WIP/pre-release)

5

It's very early days but I've started work on a new AI, with the highly original and inventive name M28AI. The hope is for M28 to become a more performant team focused AI (compared to M27 which was originally built as a 1v1 5km land map specialist before it had its functionality expanded bit by bit).

M28 isn't released yet, but I figured I'd do a devlog for it similar to the one I did for M27 to record progress. In case anyone's interested in following its progress in more detail, the link to the devlog is below:

https://docs.google.com/document/d/1e07YIwLK2AZbLHSsYU_5F4s4HWbhgNID/edit?usp=sharing&ouid=100973959280546778272&rtpof=true&sd=true

There's a lot of basic functionality that it needs to have introduced before it'd be in a state where I'd want to consider a release - my hope is that it'll be in a good enough state to warrant a release in 3-6 months. Currently the following have been implemented:

  • Land zone logic implementation (essentially the ability to read the map by dividing it into areas or 'land zones')
  • Initial build order (hydro and non-hydro variants)
  • Engineer expansion logic (i.e. building mexes and hydros on the map)

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

0

(Reserved)

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

0

Awesome! Very cool if we're going to have two specialized M27/28 AIs, one focused on 1v1 and one on team battles. I assume since this is going to be team focused, it will also focus on larger maps than the first M27 AI?

2

@saintsaturday It'll probably have a similar focus of 5km-20km maps, but my hope is it ends up running faster meaning it won't slow down the game as much on the larger maps (and so can support them a bit better). I'm also hoping it will end up playing slightly better on 20km maps (or at least have the potential to) as some of the downsides of M27's approach to managing threats to its base become more apparent on larger maps, particularly where it ends up receiving a teammate's base on full share.

FAF balance isn't really setup for 40km+ sized maps though so I can't see myself doing much testing on these (since the optimal strategy is usually to get a game-ender which M27 should already try and do).

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

1

Brief progress update:

  • Added ecoing logic, covering upgrading mexes and land factories to T3, building T2 and T3 PGens, and mass storage
  • Added reclaim logic for engineers
  • Added land scout logic, to provide a basic level of intel
  • Optimised engineer logic that managed to achieve negative game speeds on maps like point of reach despite there being no land, air or naval logic yet

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

0

@maudlin27 could you point us to the commit that optimized the logic? I'd love to see what happened

A work of art is never finished, merely abandoned

0

@jip See below for a link to the commit:
https://github.com/maudlin27/M28AI/commit/82fbcfff116a59da09d39b653a1fb8b0d93bd4dc#diff-aacec693b8e05ca3fb26c9a47a43372cb938685e86dbf5604c3a50b1f4001d77

My Devlog talks through the issue (section 2.11) but in short I've divided the map into 'land zones' (basically areas around mexes) and my engineer logic had a section for each zone where it would look for other zones that needed engineers and send any spare engineers they had to the other zones.

To make sure they didnt suicide by sending engineers along a path that would e.g. take them through an enemy base, they would check before sending the engineer that all of the land zones they would travel through appeared safe by getting the path to get to that zone, and then checking a pre-recorded flag for if that zone had enemies in it.

The performance improvement was to calculate at the start of the game the paths that would be taken from each land zone to each other land zone (rather than calculating on the fly), along with a slight limitation on the range of the logic, which resulted in a more than 99% decrease in the time taken.

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

4

Progress update:

  • M28 can now manage tanks, skirmishers, and indirect fire units
  • Expanded engineer logic to cover radar construction and tracking queued buildings
  • MAA will be constructed and utilised
  • Mobile shield logic incorporated

The M28 Devlog has been updated with more detail on the various changes.

As a reference point, on forbidden pass M28 has a c.75% win rate against DilliDalli, a 50% win rate against RNG, and a 0% win rate against M27, so its performance is slightly below that of v41 M27 on that map (although it's managing to do it without using PD, air, or its ACU, all three of which M27 typically needs to beat DilliDalli).

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog

2

Can't wait for new DG meta where you give 6 players worth of units and eco to each M28 and see who wins

3

Progress update: Added the following:

  • ACU combat logic
  • Mobile stealth
  • Enemy firebase avoidance (although still needs some work)
  • TMD

I'll probably pause work on M28 for a bit to tackle a backlog of minor but time consuming to fix bugs on M27.

If anyone had wanted to try it out pre-release, it should be in a playable state on land maps and can be played by downloading from Git and coyping the M28AI folder into the FAF mods folder:
https://github.com/maudlin27/M28AI

It currently can beat M27 on theta passage but is outclassed on every other map I've tried, and performs marginally better than DilliDalli and RNG on the maps tried (a small selection of 5km and 10km land focused maps).

M27AI developer; Devlog and more general AI development guide:
https://forum.faforever.com/topic/2373/ai-development-guide-and-m27ai-v70-devlog