Should the AI only use Ranged units for garrison duty?

balparmak

Prince
Joined
Sep 20, 2015
Messages
547
I found that the AI often uses melee units as garrisons, while Ranged units are superior for this role in the significant majority of cases, which I think should be our benchmark for the AI instead of the most optimal use for each individual case. During sieges melee units cannot target the second ring/the attacking ranged&siege units, so their higher CS provides little benefit compared to the missed chance to kill or significantly damage some siege units. The same goes for coastal cities under attack by ships. There's a case for using siege units instead (esp. during the late game) but they're more expensive and require resources, so it's not clear cut. I'd like to basically force the AI to use ranged garrisons, then maybe add conditionals to use siege units for exposed coastal cities (and land cities after 3 range units are unlocked), I think this would be a simple way to empower the AI. Am I missing anything here?
 
I found that the AI often uses melee units as garrisons, while Ranged units are superior for this role in the significant majority of cases, which I think should be our benchmark for the AI instead of the most optimal use for each individual case. During sieges melee units cannot target the second ring/the attacking ranged&siege units, so their higher CS provides little benefit compared to the missed chance to kill or significantly damage some siege units. The same goes for coastal cities under attack by ships. There's a case for using siege units instead (esp. during the late game) but they're more expensive and require resources, so it's not clear cut. I'd like to basically force the AI to use ranged garrisons, then maybe add conditionals to use siege units for exposed coastal cities (and land cities after 3 range units are unlocked), I think this would be a simple way to empower the AI. Am I missing anything here?

They should still use a melee unit if no other garrison is available. Also, check with ilteroi before making any changes to tactical AI.
 
I think this is a particular problem with CS. Time after time CS are attacked by AI, CS/You/Others send/build ranged units, which are thrown into the frontline to be killed, whilst the melee unit sits in the city.

Another issue I have with CS/AI under siege, is how the city targets melee units just fortified around it whilst ignoring more dangerous ranged or siege ones. One trick I find when attacking them is never destroy their forts, but put a melee unit in it, & they will ignore everything but that unit. When the unit is severely injured replace with another.
 
Melee units tend to have more CS, so they make cities more defensive. It's not that straightforward that garnisoning ranged units is better always.

As I said, the benefit gained by that doesn't cover the opportunity cost of not being able to disable siege or naval units. A stationed melee unit may tank one or two more turns of attacks, but killing enemy ranged units can save a city, or significantly increase siege duration to allow reinforcements. I can provide some concrete numbers if I find time, but consider that base CS values don't even make a significant difference (a pikeman has 17CS, crossbowman has 15, tercio 25 - musketman 22) and I'm not sure if promotion bonuses are added up in their full value to city strength.
 
As I said, the benefit gained by that doesn't cover the opportunity cost of not being able to disable siege or naval units. A stationed melee unit may tank one or two more turns of attacks, but killing enemy ranged units can save a city, or significantly increase siege duration to allow reinforcements. I can provide some concrete numbers if I find time, but consider that base CS values don't even make a significant difference (a pikeman has 17CS, crossbowman has 15, tercio 25 - musketman 22) and I'm not sure if promotion bonuses are added up in their full value to city strength.
The biggest difference is early game between an Archer and a Horseman. It could sometimes makes the city 3 times stronger.
 
It gets hairier with land ranged units, but I don't know why CS don't at least build naval ranged units. naval ranged units are much better at defending than naval melee units, because they can contribute to defense in the event of a land invasion.
 
It gets hairier with land ranged units, but I don't know why CS don't at least build naval ranged units. naval ranged units are much better at defending than naval melee units, because they can contribute to defense in the event of a land invasion.

The problem is they soon get destroyed if they do. I try sending them to beseiged CS, but they always leave them next to the coast to be destroyed by Skirmisher units. I can understand getting destroyed by non mounted range units, but putting them next to the coast is silly.
 
The best set up obviously depends heavily on the specific situation but in the case a city is on the front line and thus can be directly attacked by enemy melee troops i will generally have a melee in the city and ranged behind.

When under intense siege i focus on enemy melee units as the enemy can't take the city with ranged units so if you kill the melee they are just stuck.

When fighting the AI you want to make sure you get a kill as much as possible rather then let a wounded unit retreat and a melee unit can be much more effective at ensuring a kill of a enemy unit in dangering a city.i.e. next to the city. The unit is likely to have already attacked the city and thus taken more damage due to the higher combat score from the melee stationed in the city, the melee unit can attack from the city without leaving the city and exposing itself so can contribute offensive damage and the higher combat score for the city will allows it's bombardment to do more damage all increasing the likelyhood of gettinng kills or at least doing the maximum damage possible.

If a ranged unit is in a city being attacked it will also take damage which can quickly severly reduce your firepower as you either have to remove them to heal which means you reduce your overall firepower reduce the speed they get xp or at least they do significantly reduced damge due to being injured and and injured ranged units can make it much harder to counter attack if/when the opportunity presents itself.

Coastal cities under attack are obviously a very different case and in this situation i much prefer a mounted ranged be stationed in the city with a good road network and as many mounted ranged units as i can cycle through during a single turn in the vicinity. Under optimal circumstances i can cycle in 5 or 6 mounted ranged units to kill units adjact to the city and use my normal ranged units to harrass units further out too sea.

Where possible i try to use that tactic also in normal city sieges and it can be devastating to enemy attacks but it can be particularly effective fighting amphibious attacks as you are less likely to need to have melee troops around unless you actually let them land so you can use mounted renaged trooped in place of melee.

The only time i would say ranged are almost always better as a garrison is a border city which may be harrassed by passing scounts/barbarians where a ranged unit can fend off annoying visitors rather than haviing to simply play passively knowing they can't actually take the city but can bother your workers and pillage your tiles.
 
It gets hairier with land ranged units, but I don't know why CS don't at least build naval ranged units. naval ranged units are much better at defending than naval melee units, because they can contribute to defense in the event of a land invasion.
A garrisoned ranged ship can't attack though.
 
A garrisoned ranged ship can't attack though.
Units can defend the city without being in the city. Put a land unit in the city, naval ranged on the coast, and you've restricted areas that the sieger can be without taking fire from units.
 
PC was broken for a few days, thanks for all comments & sorry for replying late. One thing I should've been more clear on is that I don't claim ranged units to be the best garrison units in every case, rather that they are the ones with the most general usability, hence providing a benefit in every case. Even if melee garrisons indeed give more survivability, there are cases where they're practically useless. Ranged garrisons are useful and cost-efficient, unless idk if the city is placed on flat land with two-tile hills everywhere around it, in that case you're dead anyway

So again, why not focus on the optimal case? Because that requires a lot more data, testing and is harder to code. Why have a hard rule? Because I don't think the AI garrison behavior is anything good right now and I haven't seen anyone praising the AI so far, with a hard and easy-to-implement rule we can boost the AI in a very efficient way.

That said I won't be dragging this further as obviously there isn't a consensus. If I find the time I may run tests to compare city survival rate with melee garrison vs ranged, and re-start the discussion with hard numbers. Coastal cities may still get this though, I don't see anyone arguing against that. Maybe a check for how coastal a city is could be needed (how many water tiles are surrounding it), I'll need this to run this by ilteroi in any case.
 
my biggest issue is with CS that are behind mountains, city states that have a tight corridor leading to their cities on the coast.

my opinion is that, if the enemy is just invading the CS territory, the melee should be on the front and the ranged behind (stationed in the city). Both fight and the city is not taking hits yet.

also, more ranged ships and a bias towards ranged land units if they are on the coast. Having just tercios is a crime.
 
Wait, did CBO make tactical AI changes? I thought it was just diploAI. Where are those files in the mod structure/dll activation?

It makes changes to unit AI types/flavors, which determine how the AI will use a unit.
 
Top Bottom