Following the 2021 Supreme Computer Cup I was inspired to have a go at developing a basic AI for FAF. As I had zero experience of coding in Lua, I thought at the same time I would write down things as I learnt them to have both a guide for other people interested in getting started in developing an AI, and a dev log for the creation of my AI.
See below for a link to the current AI development guide and devlog (2022-12 update - as people were having issues viewing the original file I've split it out and have separated the main 'devlog' part of M27 development from the more general notes on getting things setup to develop the AI and useful functions)
Devlog extracts: https://docs.google.com/document/d/1uQlEoN-kti7G2MnhwD60uaaHwVevPNYH/edit?usp=sharing&ouid=100973959280546778272&rtpof=true&sd=true
Development guide extracts: https://docs.google.com/document/d/1puzW5hKcOBNE7wu7bXj6qXfTJ60r2f93/edit?usp=sharing&ouid=100973959280546778272&rtpof=true&sd=true
You can also access the mod on Github:
https://github.com/maudlin27/M27AI
I've copied the current overview from the guide below:
This document is intended to do 3 things at once (meaning it does none of them very well!):
- Act as a guide to people new to FAF AI development, including collating any other useful resources out there on AI development
- Be a sort of dev log of my thought process and development steps for creating my first FAF AI, with extracts of code thrown in
- Form my main ‘todo’ list for further developments of my AI
If you see any errors, or have any comments or suggestions (in particular any AI developers who read this since you’ll probably know better/easier ways of doing things than the methods I’ve chosen) let me know and I can update the guide where relevant.
If you’re here for useful resources and/or details of how to write AI and don’t care about the dev log aspect then just skip to section 2) Setup and background and section 5) Index of useful functions, and/or browse the index for points that may be of interest.
Latest changes (v67 summary)
- 13 bugfixes,
- 25 misc changes
Most changes are minor, the more noticeable are sharing of mobile shield and stealth technology, and a slightly increased likelihood of building game-enders in team games.
Note: Most of my focus is currently on M28 - the below links to a separate M28 devlog:
https://forum.faforever.com/topic/5331/m28ai-devlog-pre-release
Areas of focus by version (history):
v1-3: Release
v4 - Intel and threat detection
v5 - Use of ACU and hotfix
v7 - Engineers and building upgrades
v9 - Air
v10 - Anti-Turtle
v11-v12 - Pathfinding and misc changes
v13 - Anti-navy
v14 - ACU and mobile shields
v15-v18 - CPU optimisation and hotfixes
v19 - Rally points and air domination strategy
v20 - Late game
v21-23 - Eco management
v24 - Bombers
v25 - Misc
v26 - Nukes
v27 - T3 Arti
v28 - Game options/compatibility
v29 - Optimisation and TMD
v30 - Czar, Soulripper and Defences
v31 - Bombers (again) and TML
v32-33 - Plateaus
v34-35 - Turtling
v36 - Skirmishers
v37-38 - Game enders
v39 - Quantum optics
v40 - Deceiver
v41 - Hives and shield disruptor
v42 - Misc and multi-TML defence
v43 - Misc and UEF experimentals
v44-46 - Teamwork
v47 - Optimisation
v48 - Personality
v49 - Hotfix
v50-51 - Navy
v52 - Desync hotfix
v53 - Shield boats
v54 - Temporary eco strategy
v55 - Experimental defence
v56 - Stealth boat
v57 - Pathfinding (again!)
v58 - Misc (RC tweaks)
v59 - Gunships
v60 - Naval enhancements
v61 - Stats
v62 - Land spam
v63 - T3 arti prioritisation
v64 - Mass fabs
v65-v66 - Skirmisher and T3 arti tweaks
v67 - Misc