So what condition would you use?
I would check every (say) one minute for the average position of the non-builder units.
1] If in combat, and the average position does not "progress", I would follow the change is strategy you suggested (artillery/aircraft).
2] If not in combat, we are talking about a pathing stalemate (probably because of a map bottleneck or non-adequate pathing design). In this case, I would order an alternative route.
If its a function in buildbasestrategy.ai then you don't have to update every race. You'd only have to add it to a single race to test it.
To test it, yes.
Because if it is OK and operational, I would indeed add it to the core buildbasestrategy.
To create the code though, is strenuous. I would need 3 days or more.
...And this will not be enough.
I would ALSO need one more function to discern artillery (aircraft is easy, from the unitstats of each race, simply searching for UnitStatsAI.UC_AirMed class squads).
And this should be done for every race.
This is minor of course.
To be honest, there are TONS of things I want to add to the AI.
For example alternative strategies, race-specific strategies (for example Tyranids or Daemons do not play as the other races - and for both I have already made many additions).
But in the end, prioritization always leaves AI... Last.
-In search of Papasmurf...