Are you sure these would not simply create a new set of exploitable AI moves?
I am weary of any instruction to the AI using the words "never" or "always" because they scream "exploit me". Nonetheless, I agree that the AI could benefit from better threat mapping.
Of the rules you name, this is the only that is (relatively) simple in terms of AI coding. Simply increase target priority for wounded targets. (This could however lead to the AI being easy to bait.)
Given that one of the design requirements of the AI is that it needs to work with any set of xml rules, this rule may not be implementable.
Also note that even now the AI often finds itself in the position that it cannot take a city because it has run out of melee units. Building fewer melee units is bound to exacerbate that problem.)
#Parsing error unknown variable "front".
The notion of "front" is a rather high level abstraction on a map that is a proiri isotropic. Implementing these rule may not just be "hard" but impossible within the available computing resources.
Possibly, given that the team has no dedicated AI programmers.
But hiring some computer science grad students as summer internes could potentially move the AI along quite a bit.
These are the fixes that I have in mind and that should be relatively easy to do:
1) Learn to use fighters more effectively. Count the number of intercepting units and do airsweeps accordingly before sending bombers. I wouldn't mind if the AI "cheated" here (at least on higher difficulties) by knowing exactly how many intercepting units are active on a certain area even if normally it would be impossible to know with precision.
2) Set fighters in intercepting mode when under attack by bombers. Send in and build aintiaircraft units accordingly
3) Prioritize focused fire when using bombers, and don't let them sit in cities without doing a thing, unless using them would cause the unit to die (again cheating is all right here to know whether it will die or not in advance). Use them on unprotected targets if no better option is available.
4) Prioritize ranged units over melee with a ratio of grossly 2-1
5) Either make submarines truly invisible for the player (you can guess their position as soon as they fire) or make them automatically visible for the AI as soon as you fire for the duration of the next turn.
6) Rewrite the encircling tactic routine for naval units and rather prioritize focused ranged attacks from afar.
7) Make naval units work in groups as soon as a DoW is in place. at least 3-5 ranged with a melee or two for support.
8) have naval units automatically retreat inside the closest available port city when HP are yellow or red. If city cannot be reached in 2 turns, choose nearest friendly border instead.
9) Have naval units retreat inside port cities when isolated or unable to face the enemy (same rules as above). (right now they simply stay near the coast and do nothing waiting for the slaughter). When no port city is available, send them to a suicide attack against a near threat.
10) Learn to use nukes against something other than cities. Prioritize high concentrations of aircrafts/missiles and high concentrations of enemy units when near or even inside own borders (but avoid hitting your city directly)
11) Create a routine to calculate the rate of defensive bonuses of a city in early eras. Hills, forests, mountains, rivers should all have some "points" when directly around a city. Water tiles should be included if no naval unit is part of the conquering force.
If the defensive values are too high, the AI should refrain from attempting an assault until it gets better units or an adequate numbers of them. Prioritize less defended cities when available.
12) When moving calculate the tiles that will be potentially under threat the next turn. Always prioritize the tiles that aren't threatened first and the least threatened after, even if that means not using all the moves available.
13) If a ranged unit can attack a target, let it attack that target rather than simply not attacking at all and waste a turn. No buts unless a retreat action is in order.