Everybody says that AI should use bombard units better.
That's true, but nobody really knows exact way how to do it.
So, I decided to try to make hypothetical artillery algorithm.
(if someone from Firaxis reads this, this could be a guideline how to make a real algorithm)
When to build them?
There should be two modes:
-artillery low mode (same as Civ3 now)
-artillery heavy mode
Artillery heavy mode should be initiated:
-when best defending unit of neighbor civ has higher defense then your best attacking unit with movement of 2 or more
-when best defending unit of neighbor civ has same or higher defense then your best attacking unit with movement of 1
This will mean making more bombard units when you have just Cavalry against Infantry (but not Riflemen), or Swordsmen against Greek Hoplites (but not Mounted Warriors vs Hoplites).
Now I'm not sure what build ratio should be for artillery heavy mode.
Goal acquisition:
-Artillery should be used offensively against stacks of units or cities.
-In order to choose city for bombardment, you need to have as many bombard units as enemy has units in defending stack, but never less then 3.
-Bombard units should be accompanied with as many defensive units equal to half number of artillery units (rounded up), but never less then 2 (this is pretty conservative, but we don't want human player to "harvest" enemy bombard units for free).
-Stack should retreat (go to nearest city), if number of defenders gets lower then one quarter or number of artilleries or 1.
-If stack has fewer defenders then normal but still not enough to retreat, reinforce it with more defenders.
-When choosing cities, put higher priority on those near the borders and lower priority on those away of borders (using bombard stack deep intro enemy territory is suicide).
-Target unit stack on open only if they are on your border or one tile in enemy border.
-When attacking enemy unit stacks on open there lower limit on number of artilleries still applies (as many as enemy units), but not if artillery is in city and can bombard a target without moving (then fire with whatever you have).
When having not enough artillery to have a valid target, use them in defense mode:
-put them in city near the border, but only if there is enough defenders (half number of arties or at least 2)
-If no one city has as many defense units then put them in two or more cities.
-If your artillery stack is captured, put high attack priority on enemy group with them for recapture.
Well, that all that I could think of at this moment.
If the engine in which Civ3 is made, has functions similar to those I used in descriptions, then this should be possible to program.
Any ideas how to improve it?
P.S.
Possible problem: Harvesting AI's bombard units.
That's why I gave high number of defenders to any AI stack of units. Still, it would maybe be better to slightly change game rules, so only half of artilleries gets captured and rest destroyed. Just to help AI a little.
That's true, but nobody really knows exact way how to do it.
So, I decided to try to make hypothetical artillery algorithm.
(if someone from Firaxis reads this, this could be a guideline how to make a real algorithm)
When to build them?
There should be two modes:
-artillery low mode (same as Civ3 now)
-artillery heavy mode
Artillery heavy mode should be initiated:
-when best defending unit of neighbor civ has higher defense then your best attacking unit with movement of 2 or more
-when best defending unit of neighbor civ has same or higher defense then your best attacking unit with movement of 1
This will mean making more bombard units when you have just Cavalry against Infantry (but not Riflemen), or Swordsmen against Greek Hoplites (but not Mounted Warriors vs Hoplites).
Now I'm not sure what build ratio should be for artillery heavy mode.
Goal acquisition:
-Artillery should be used offensively against stacks of units or cities.
-In order to choose city for bombardment, you need to have as many bombard units as enemy has units in defending stack, but never less then 3.
-Bombard units should be accompanied with as many defensive units equal to half number of artillery units (rounded up), but never less then 2 (this is pretty conservative, but we don't want human player to "harvest" enemy bombard units for free).
-Stack should retreat (go to nearest city), if number of defenders gets lower then one quarter or number of artilleries or 1.
-If stack has fewer defenders then normal but still not enough to retreat, reinforce it with more defenders.
-When choosing cities, put higher priority on those near the borders and lower priority on those away of borders (using bombard stack deep intro enemy territory is suicide).
-Target unit stack on open only if they are on your border or one tile in enemy border.
-When attacking enemy unit stacks on open there lower limit on number of artilleries still applies (as many as enemy units), but not if artillery is in city and can bombard a target without moving (then fire with whatever you have).
When having not enough artillery to have a valid target, use them in defense mode:
-put them in city near the border, but only if there is enough defenders (half number of arties or at least 2)
-If no one city has as many defense units then put them in two or more cities.
-If your artillery stack is captured, put high attack priority on enemy group with them for recapture.
Well, that all that I could think of at this moment.
If the engine in which Civ3 is made, has functions similar to those I used in descriptions, then this should be possible to program.
Any ideas how to improve it?
P.S.
Possible problem: Harvesting AI's bombard units.
That's why I gave high number of defenders to any AI stack of units. Still, it would maybe be better to slightly change game rules, so only half of artilleries gets captured and rest destroyed. Just to help AI a little.
Comment