1. We have added a Gift Upgrades feature that allows you to gift an account upgrade to another member, just in time for the holiday season. You can see the gift option when going to the Account Upgrades screen, or on any user profile screen.
    Dismiss Notice

Another attempt at getting the AI to use artillery

Discussion in 'Civ3 - Creation & Customization' started by Predator145, May 28, 2020.

  1. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    Hi, I've been reading on past attempts of people trying to mod around the broken artillery strategy flag where the unit does nothing but fortify in the city it's built and only hit units within range.I've tested them in the WWII Pacific scenario and have found them to be unsatisfactory. My goal is to have the AI use arty in both sieging cities and supporting in the open. This is gonna be long a detailed.

    So here's the TLDR: Use Quintillus/Steph editor to assign artillery units to air bombard and land units.

    Here are some attempts and their results:

    1.) Glass Cannon: The 2 previous Civ games have artillery line be glass cannons with the last unit having the "ignore walls" ability. Civ3 doesn't have that ability. So you'd need your artillery to have 40 attack to even have a decent chance of breaking a metropolis. This is broken vs anything in the open. But the main reason this solution doesn't work is that once the attack stat is that high, the Civ3 AI builds NOTHING BUT ARTILLERY in their offensive unit slot and uses them unescorted like they use longbows. This cripples them. I'm not sure how civ1 and civ2 handles this. From memory they build a mix of fast offensives and slow glass cannons. Even if you give mono unit civ3 AI 40/10/1 artillery they'd be better off making tanks. And having the offensive/defensive strat means they will never use the bombard function. Only artillery, cruise missile, sea power and air bombard strats can use it. Which brings us to:

    2.) Cruise missile: It's just as broken as the artillery strat. The unit will just fortify in the city and bombard those within range, never moving.

    3.) Sea Power: With the Quintillus/Steph editor you can put your artillery units sea power strat. Have them still be land units. This confuses the AI and it will not build the unit because the artillery line's stats will always be less than that of contemporary warships. So auto build is a must. The AI will either assign the artillery unit as "defensive sea power" or "offensive sea power". The defensive one is just as broken as the artillery and cruise missile strat, not relocating at all. But the offensive one will move out to bombard enemy cities. They do so unescorted and will only go for enemy cities. And even then they march right up to the city to bombard despite having 2 range. Most of the artillery will be assigned as defensive. So while looking good for a screenshot, this solution offers little to gameplay.

    That leaves us with the last solution I've yet to see anyone post:

    4.) Air bombard. As with Seapower you need autobuild as all bomber units will out range artillery and thus the AI will never build them. Have the unit be a land unit so that it can provide defensive bombard support. Do not assign it to air unit with stealth as they AI will futilely try to make fighters. The AI will actively move their pieces into the front cities but NEVER STEP OUTSIDE. The movement of these artillery pieces is not shown by the game somehow but they do move. How they'd behave without rail roads I'm not sure as they're very reluctant to be out of a city. But I'm sure they moved out as not all of the Chinese cities have rail connection but their artillery pieces managed to arrive at Nanning and Foochow.

    The AI will then bombard enemy units within range. This accomplishes far more than the previous solutions. I gave them 5 bombard range to compensate for them not stepping out of the city (do not animate battles on the first turn as this could crash the game). But then I noticed once their are no more enemies in the open to bombard they'd just fortify instead of bombarding the cities within their 5 range. The bombardment function seems to ignore cities unless they're up close. The goal is to have the AI siege cities as well.

    So I added a bombing attack with an operational range of 5. The AI promptly bombs any city within reach but then ignores the enemy units at its doorstep. Bombing ignores units in the open and will always go for cities. Even though now the AI has both bombard and bombing at 5 range, it's not able to switch up. It will ALWAYS HITS CITIES if there are any within range.

    This means the AI needs 2 separate artillery units: one for sieging cities and one for supporting in the open. I have them auto produced with 2 small wonders. The siege one has both 5 range bombard and 5 range bombing. The support one however has 5 range bombard and only 2 range bombing so that they can't reach enemy cities and will hit the units up close instead. The reason for retaining the 2 range bombing I will explain below.

    The AI though never stepping out of cities will do so in the case of TRANSPORTING VIA SHIP. It will land them often unescorted next to cities and then fire at them. That's why I retained the bombing function as bombard would only hit units. And with no army to back it up, it's not much use. Once the city is taken it will move into that city. Being ill guarded means they need defense stats and a capture flag. Having a defense stat also helps them defend border towns better as the AI does not focus defensive units where it needs them.

    Offensive "Field Guns"

    With all their artillery being in border towns the invading AI army still doesn't have defensive bombard support. During testing I've discovered that the AI when building an Offensive strat unit will take bombard value into consideration. So it ended up mixing in some 6/6/1 artillery with 12 bombard. This class of "field guns" will escort the AI's offensive army (which often sorely lacks defensive strat units). Tweak the stats carefully however, as too high and you'll up with the AI ceasing to build fast attackers. I've never found a lackluster attack stat on a high defense unit with offensive strat to be a problem with the AI as it will never suicide into bad odds. A very scary army to face is the Javelin Thrower+Longbow stack because the JT too is of offensive strat and will escort the LBs.

    In order to have the AI build mix of units, the stats have to be just right. A good example is the Light Tank+Combat Engineer mix. This line of idea is still untested largely. So I'm not sure.

    I hope some people can tests these ideas and develop more on them.
     
  2. Lionic

    Lionic King

    Joined:
    Feb 3, 2010
    Messages:
    671
    One more strategy that worked well for me was producing artillery units through enslavement. The AI actively uses such artillery in the offense. Drawbacks are that it allocates lots of it's units to protect this artillery and that sooner or later to many artilleries make AI turns insanely long.
     
    Predator145 likes this.
  3. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    Do you give every combat unit in the game enslave into a catapult and delete yours? Or is there a way for the AI to auto build foreign artillery pieces?
     
  4. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,479
    Gender:
    Male
    Location:
    The lone and level sands
    First off: W:eek:W!

    Questions:

    Can you elaborate? - For starters, when building, does the AI consider a unit's Attack value to be a direct combination of its {Land Attack value } + {Bombard value}? Example: is a unit with a {Land Attack value of "4" + a Bombard value of "4"} the direct equivalent of a unit of either (1) a Land Attack value of "8", or (2) a unit with a Bombard value of "8"?

    Second:

    Do you mean "Escort" in the same way that a Naval unit can be flagged as needing an escort? Also., what, precisely, do you mean by the, "AI's offensive army"?

    "Light Tank+Combat Engineer mix" ... ?

    :cooool:
     
  5. Lionic

    Lionic King

    Joined:
    Feb 3, 2010
    Messages:
    671
    I have allowed some (it was somewhere about 7 years ago, I may not remember all the details) of the land units to produce various artillery units by enslaving them. Did not delete units enslaved by me. I suppose that AI MAY occasionally build "captured" artillery piece in case producing artillery costs population and there are foreign citizens in the city of origin, but that would be a very rare occasion.
     
  6. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    The Light Tank+Combat Engineer example is that of the AI of the WW2 Pacific Scenario building both fast offensive unit and a stronger slower one if the stats of those 2 are balanced vs each other. Once Medium Tanks (13/8/2 with blitz) are available it will build nothing but that as its offensive flag unit.

    I'm not sure how much worth the bombard strength is. We know that the longbow with bombard strength of 2 will not be built as long as the AI can still make Medieval Infantry. I know from testing that by having Artillery with 12A/1D/1M and its usual bombard strength of 12, ROF of 2 and 2 range would result in the AI building nothing but Artillery instead of Combat Engineers (11/6/1) and Light Tanks(8/5/3 with blitz). I also just managed to get the AI to mix in an offensive flag 7/10/1 with 8 defensive bombard Artillery before Medium Tanks were available. It will build a few along side Light Tanks and Combat Engineers.

    Unfortunately the "Requires Escort" flag does not work at all on land. But since the AI will only bring a couple of defensive flag units along with its offensive stack it benefits from having offensive flag units with high defense as they will travel in the same stack, bolstering its defensive bulk. Afterwards its back to the usual incompetent trickle.
     
  7. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,479
    Gender:
    Male
    Location:
    The lone and level sands
    Long ago ( :old: ) , I started a thread about AI unit build choices. It went on for 6 years, well over 500 posts, dozens of test cases, and thousands of iterations - And then tom2050 really picked up the ball and ran with it, delving into the various effects of Flags.

    Early on, I stumbled across a formula by a fellow called Oystein, stating that the AI would choose equally, between two ground units, if the sum result of each was, "(((3*A)+(2+D))*HP + Bombard)," meaning that a (2 AF, 2 DF, 2 HP, 0B) - total value = 20 - should be built with equal frequency as a unit with the values (4 AF, 4DF, 1 HP, 0B) - total value likewise = 20.

    Notes:
    1. We ignored Bombard throughout, as we knew how broken Artillery was, and remains, so the actual formula we used was, "(((3*A)+(2+D))*HP)"
    2. The results were ... interesting.
    And, ultimately, none of realized how close we were to so much more detailed. information.

    To be continued ...
     
  8. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    Wow, lots of info that thread.

    I wonder how much speed is taken into the AI's calculation. We know it undervalues it. It builds horsemen over archers but I don't know if it still does that if it has access to 2/2/1 offense like Bowmen and Javelin Throwers. It certainly doesn't even mix in horsemen and even mounted warriors if it has access to swordsmen and longbow. I think any unit added must not have more attack and defense than the fast offensive unit you want it to primarily build. The 6/4/1 Grenadier totally replacing 6/3/3 Cavalry is a good example of what not to do.
     
  9. nick0515

    nick0515 Fantasy World Builder

    Joined:
    Jan 5, 2008
    Messages:
    2,509
    Gender:
    Male
    Location:
    New Zealand
    One thing about artillery that was discovered some time ago is that 4+ range makes they AI use artillery better but I'm so out of touch I can't remember how. Maybe makes the AI bombrad units when it doesn't normally or something like that? I forget what the problems with artillery even are exactly.
     
  10. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,479
    Gender:
    Male
    Location:
    The lone and level sands
    :D

    From all of my testing - Not at all.
     
  11. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    With the broken artillery flag on 1 range bombard units won't even bombard units next to the cities they're stuck in. 2 range and above bombard units will bombard those within that range but will remain stuck as if there was an immobile flag on them. As long as you keep the artillery or cruise missile flag on, there is no hope for same nationality artillery units to move anywhere.
     
  12. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    I'm sure it does but in a very undervalued way. On an offensive unit 1 speed is probably worth the same as 1 defense. The AI however loves blitz, amphibious and all terrain as roads. I've tested an attack helicopter as an offensive flag air unit. This automatically gives it the capture ability and will behave and be treated like a ground unit that can walk on water. It fully benefis from rails. There is no way to replicate a civ2 air unit. With 2 less attack than the highest offensive flag unit, 1 defense and 3 movement with all terrain as roads, blitz, radar and amphibious the AI mixes quite a few of them in. But I'm not sure I'm gonna keep it as it forces the human player to spread defenders too thinly. There is no way to turn the capture ability off. The moment you check the offensive flag it will activate regardless whether you check the capture flag or not.
     
  13. Vuldacon

    Vuldacon Dedicated to Excellence Supporter

    Joined:
    Nov 14, 2001
    Messages:
    6,594
    Gender:
    Male
    Location:
    USA
    The AI does used Bombardment from inside Cities even with 1 tile distance. In my EFZI2 Games, Any Zombie Unit that has Bombardment uses it against the Human Factions from inside a Building.

    The AI will use Bombardment outside on the Map IF a Bombarding Unit is Pre-placed with a Defensive Unit. This is because the AI did not build the Unit and the AI follows the Settings you set. Same thing with Any Pre-placed Unit... the AI will use the Unit with Multiple settings, changing each turn for what is wanted. Offense, Defense, Build Road, Irrigate, Clear Pollution, etc...
    .
    The programing for the AI basically forces it to decide on One setting when building a Unit that has multiple settings. There are exceptions to this such as the Legionnaire or other Units you can set to Attack and Build Road or Irrigate without flagging all Worker Actions. The AI can and does build Units with different settings each time it builds a Unit that has multiple settings to choose from but IF you pre-place a Unit with Multiple settings on the Map or in the Game, the AI will use that Unit as a Human Player does. It will use all settings varied from turn to turn as it chooses what it wants from all settings each turn.

    As for the AI using Bombardment outside on the Map with Pre-placed Units, it tends to Go to some destination with the Defending Unit and Bombard a City each turn. Funny that the Enemy AI tends Not to attack the Bombarding Unit as if it cannot defend against it. Using Bombardment on the Map remains problematic but you can have the AI use Multiple Settings for a Pre-placed Unit, varied each turn.
     
    Predator145 likes this.
  14. Ozymandias

    Ozymandias I saw the Great Library burn.

    Joined:
    Nov 5, 2001
    Messages:
    9,479
    Gender:
    Male
    Location:
    The lone and level sands
    You're jumping ahead of me by (hopefully) about 1 week. There s much more info out there, including more AI tests for flag choices. I will forewarn you that simply testing non-artillery ground units - again, over the course of years - was exhausting, but not exhaustive. For instance, I'm piecing together what is known about the AI's flag preferences re:flags in unit builds.

    :confused: I'm going to invite the Unquestioned Masters of this, @Quintillus & @Civinator to weigh in on this

    Insofar as Artillery goes, @Vuldacon - as posted above - knows far more about this than I.
     
  15. Predator145

    Predator145 Chieftain

    Joined:
    May 22, 2020
    Messages:
    65
    Gender:
    Male
    From some more testing I've found out:

    Artillery units set as land units and flagged as air bombard will have a "bombing" attack as a command option. But this attack is in fact a bombard attack and will only work if the target is inside that unit's bombard range. So if you have a bombard range 2 and operation range 5 artillery its bombing attack won't do anything to a target 4 tiles away. You can click but the command won't execute. Should the AI attempt doing that with battle animations on, which it will if there are no targets within the 2 bombard range it will result in the artillery being stuck in a firing loop, forcing you to close the game and restart the computer to boot up Civ3. Even with no bombing option and operational range, 5 range bombard attack could cause that crash. But it seems to go way if you don't animate battles for a couple turns. It's best to just leave animations off.

    That means bombing is not an option on a land unit artillery despite what that extra button appears to be. It is only if you set it to be an air unit. That's a bummer as I dislike the "smart artillery" in C3C. Artillery is strong enough as it is. But those making the game decided to listen to people who didn't know how to use it:mad:. You can beat muskets with cats, rifles with trebs in C3C. Is there a way to revert bombard back to vanilla mode?

    I've also tested land transports. My attempt at a a land unit, air transport flag train failed as the AI just transport the troops into enemy territory like an APC and then get killed there. Not remotely realistic for a train but perfectly ok for auto built trucks and APCs.

    So I tried making trains immobile with re-base in the hope the AI would load units into it which it does and then re-base from city to city. But the trains would just just stick to the front cities once they get there. It will load the troops in but without airdrop or mobility it doesn't do anything.
     

Share This Page