Looking at the defense stuff, the AI was indeed happy with just 1 defender until a war started, the AI will now add an extra defender to all cities as empire size reaches the following thresholds: 3, 7, 13, 22 cities...
I was considering suggesting that (# defenders should scale based on size). However, I would also like to suggest that AI defender count should probably be weighted:
- holy cities should get an extra defender
- border cities near hostile neighbors should get extra
- core cities can go lighter on defenders
- top cultural cities should get extra
- cities under cultural influence should get more
- coastal cities should probably get a slight extra
- cities on top of strategic resources should get extra
- cities near strategic resources should get more
- cities that can see large armies of non-allies should get more
That would mean on a 20-40 city civ, core cities would have at least 2. Cultural centers would have 4. Holy cities get 3. Border cities should be 3, up to 6+ on hostile borders. A city on top of a strategic resource might get 4-5 while near a resource would get 3-4. Not exactly sure how the numbers work out... maybe I'll muck in Excel in a bit.
In my 2-defender cities, one is a city-garrison unit, the other is some sort of assault unit to deal with pillagers. Next unit is usually healing w/ CG. After that it alternates between defender and anti-pillager.
Maybe pacifist civs would have more defender units (+25% to the count?). Civs next to powerful civs that they aren't friendly with might want to bump up the defender count as well.
I might now look into getting the AI to get a minimum number of siege units, like 100% bombard a turn...
That would be an excellent idea. Now if only you can convince the AI to bombard and assault a city on the same turn instead of letting defenders heal.
...
One thing I noticed with the 12/21 build. Not even sure if the worker AI is under your purview.
Towards late-game, I end up assembling a clump of 3-4 workers in a group. Give them the same # of defenders as a border city (usually 3-4 flat-ground optimized defensive units). Group it all together, then automate it (I don't care what they do at this point, and I don't allow them to remove upgrades). This usually keeps the workers from being stolen and provides a roving reaction force to confuse the AI.
The problem in my current game is one where I have a few new cities far away from my empire. Cities that I took in order to force capitulation of rogue vassals. Both of my automated worker stacks decided to strike out across *enemy* territory to get to those new cities.
Automated workers should probably never enter enemy territory and ideally stay away from enemy territory.
Another thought I had (probably outside the scope) is that any automated workers should halt being animated any time that war is declared. Which would put them back in the "need orders" queue for the player to look at and either re-automate or re-task.
Does the AI even understand the idea of defending workers? Or putting 2-3 workers together in a group (to get projects finished faster and allow for fewer worker defenders)?
...
And I agree that the AI should rally forth to destroy ships within their cultural waters more often. I also never see the AI putting ships on sea resources for defense. My usually strategy for ships is:
- at least 1 ship on every food resource (usually balanced atk/def), then 2 per
- at least 3 ships on oil (one attack, one medic, one scout)
- 3+ ship fleets patrolling the border waters or sailing forth
In later periods, it's usually destroyers first (until I get 3 on a spot), then alternate subs/battleships to get up to the proper count. I usually don't put more then 2 on any food resources. They can band together to attack interlopers. Oil patches are usually defended based on the size of the opposition but no more then 6-8 on a huge map in late-game (1-2 subs, 3-4 destroyers, 2-3 battleships, 1-2 carriers). Patrol fleets are usually a bit larger and move around, assault fleets include transports and are even larger yet.
Pacifist AIs should probably boost their defender counts, especially for resources near cultural / holy cities. Resources should probably be prioritized (based on whether they're being worked?) if there aren't enough units to go around.
(But sea battles are a huge topic. So is the AI defense of strategic resources.)