Following the recent 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:
As of v13 I'm now using github so you can also access the mod here:
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 (v20 summary)
v20 - Late game
This version improves some of the AI's late game ability, both fixing an issue that led to severe underutilisation of T3 mobile artillery in some cases, and having it build experimental units.
- Experimental units will now sometimes be built late game
- Improved use of T3 mobile artillery
- Better use of heavily upgraded ACUs (including bugfix that caused Cybran ACUs to do nothing)
- Tweaks to Engineer management
- Other minor bugfixes
Key areas of focus by version (history):
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