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

AA Formula Discussed...

Discussion in 'Civ3 - General Discussions' started by BomberEscort, Jan 22, 2004.

  1. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    I have just checked some info by alexman on the AA interception rates at Apolyton...

    I have varied the experience of the units and this does effect the interception rates as does varying the Aircraft interception rates (from the default of 50%). This agrees with testing done by somateria at http://forums.civfanatics.com/showt...100#post1498100

    This is similar to the real world, in that you do not want your flaks shooting in an area with your planes... When I raised the interception to 100% only 2 bombers out of 100 were hit by flak as opposed to 21/300 without... (Regular v. Regular, Bomber D = 4, AA Defense = 4)

    More testing is definately necessary, I have verified that 'Preserve random seed' is off for each test...

    So far my formula is (Preliminary Formula):
    The four best AA units are used in the calculation...

    (1 - [AirUnitsDefense/{(SumofAAUnitsDefenseInTile*0.10)+AirUnitsDefense}] * UnknownFormulaForExperience * (UnknownFormulaForInterceptionRates--maybe?)

    Note: alexman's formula gives very similar results to mine, minus my unknowns...

    I base the above on a preview of some of the data below:

    Bomber D = 4, AA D = 4, Both Reg, Int @ 50% --- 21/300 (7%)
    Bomber D = 4, AA D = 4, Reg B/Vet AA, Int @ 50% --- 27/300 (9%)
    Bomber D = 4, AA D = 4, Reg B/Vet AA, Int @ 50% --- 31/300 (10.3%)
    Bomber D = 4, AA D = 4, Both Reg, Int @ 100% --- 2/100 (2%)

    ...I have much more data I will post when I am finished

    To support the cumulative Defense assertion:
    Ratio of 1:2 (BomberD:AAUnitD)
    Bomber D = 2/ AA D = 4, Both Reg, Int @ 50% --- 58/300 (19.3%)
    Bomber D = 4/ AA D = 4x2AAUnits, Both Reg, Int @ 50% --- 53/300 (17.6%)

    Ratio of 1:4 (BomberD:AAUnitD)
    Bomber D = 1/ AA D = 4, Both Reg, Int @ 50% --- 90/300 (30%)
    Bomber D = 2/ AA D = 4x2AAUnits, Both Reg, Int @ 50% --- 87/300 (29%)

    Either way, we are on the right track, but maybe someone from Firaxis could give us the exact formula...
     
  2. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Questions to be answered...

    Does unit experience affect Air Unit interception by AA units?
    Does varying Interception Percentage from the default of 50% affect Air Unit interception by AA units?

    I will test both of theses tonight...

    Test #1: 500 Trials, BomberD = 2, FlakD = 2, Int = 50%
    (Reg-Reg, Reg-Vet, Reg-Elite), 1 Flak

    Test #2: 500 Trials, BomberD = 2, FlakD = 2, Int = 100%
    (Reg-Reg, Reg-Vet, Reg-Elite), 1 Flak

    Test #3: 500 Trials, CustomStealthUnitD = 2, FlakD = 2, Int = 50% (5% for Stealth)(Reg-Reg), 1 Flak...

    If 'stealth' is not a factor, Test #3 should be very similar to Test #1 Reg v. Reg...

    Results posted soon (hopefully tomorrow)...
     
  3. Warspite2

    Warspite2 Chieftain

    Joined:
    Feb 10, 2003
    Messages:
    493
    This is good info here. It answers many questions about how experience levels with aircraft and AA work. Your other tests should be interesting as well. Nice work! :goodjob:
     
  4. cldwarhist

    cldwarhist Chieftain

    Joined:
    Oct 16, 2003
    Messages:
    53
    Things sure would be easier if you could set interception rates in the C3C Editor for each unit - e.g. helicopters would have a higher rate of being interception than stealth or bombers.
     
  5. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Here are the results of my testing...


    Test #1
    Interception = 50%, #AA = 1, AA Defense = 2, AirD = 2
    Regular v. Regular------ 48/500 Destroyed----- 9.6%
    Regular v. Veteran------ 56/500 Destroyed-----11.2%
    Regular v. Elite-------- 50/500 Destroyed----- 9.2%

    Test #2
    Interception = 100%, #AA = 1, AA Defense = 2, AirD = 2
    Regular v. Regular------ 47/500 Destroyed----- 9.4%
    Regular v. Veteran------ 46/500 Destroyed----- 9.2%
    Regular v. Elite-------- 43/500 Destroyed----- 8.6%

    Test #3
    Interception = 50%, #AA = 1, AA Defense = 2, AirD = 2 (Stealth)
    Regular v. Regular------ 39/500 Destroyed----- 7.8%
    Regular v. Veteran------ 44/500 Destroyed----- 8.8%
    Regular v. Elite-------- 48/500 Destroyed----- 9.6%


    Conclusions from Tests #1-#3:
    Hit Points and Experience do not affect interception by AA
    Stealth Ability does not affect interception by AA

    I was driving home from work last night and wondering why alexman's data was differing from mine. I came to the conclusion that he was testing with the latest patch, where I was testing with C3C v1.00. I upgraded and my results agree with his. Sadly, it seems at one time experience and interceptions rates were factored into the formula but are now removed. Also the SAM Missile battery has been neutered. I will get to that in a later test though...


    Test #4
    #AA = 2 Flak, AA Defense = 2ea, AirD = 2
    Regular v. Regular------ 88/500 Destroyed-----17.6%

    Test #5
    #AA = 1 MSAM, AA Defense = 4, AirD = 2
    Regular v. Regular------ 93/500 Destroyed-----18.6%

    Test #6
    #AA = 1 MSAM, 1 Flak, AA Defense = 4 & 2, AirD = 2
    Regular v. Regular------114/500 Destroyed-----22.8%

    Test #7
    #AA = 3 Flak, AA Defense = 2ea, AirD = 2
    Regular v. Regular------115/500 Destroyed-----23.0%

    Test #8
    #AA = 4 MSAM, AA Defense = 4ea, AirD = 2
    Regular v. Regular------270/500 Destroyed-----54.0%

    Test #9
    #AA = 2 MSAM, 1 Flak, AA Defense = 4ea & 2, AirD = 2
    Regular v. Regular------156/500 Destroyed-----31.2%

    Test #10
    SAM Missile Battery, AA Defense = 8, AirD = 2
    Regular Bomber ------ 18/500 Destroyed----- 3.6%

    Test #11
    SAM Missile Battery + 4 MSAMs, AA Defense = 8 + 4ea, AirD = 2
    Regular v. Regular------268/500 Destroyed-----53.6%

    Test #12
    Same as Test #9 except on Hills
    Regular v. Regular------167/500 Destroyed-----33.4%

    Test #13
    #AA = 1 MSAM, AA Defense = 4, AirD = 6 (Stealth Fighter)
    Regular v. Regular------ 43/500 Destroyed----- 8.6%


    Conclusions...
    • Hit Points and Experience do not affect interception by AA.
    • Stealth Ability does not affect interception by AA.
    • Terrain has no effect.
    • Radar Towers have no effect.
    • SAM Missile Battery is cumulative with Mobile AA.
    • If more than 4 AA in a square, only the best four will defend...
    • A Defense of zero will result in always being shot down, this is why Stealth Aircraft now have a Defense...
     
  6. Bobisback

    Bobisback Chieftain

    Joined:
    Feb 16, 2003
    Messages:
    1,155
    Very nice:goodjob:
     
  7. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Here is the interception formula...

    Chance Air Unit is Destoyed By AAUnit #1 = 1 - [AirD/(AirD + (AAUnitD#1 * 0.1))]

    Chance Air Unit is Destoyed By AAUnit #2 = {1 - [AirD/(AirD + (AAUnitD#2 * 0.1))]} * Chance AAUnit#1 Misses

    Chance Air Unit is Destoyed By AAUnit #3 = {1 - [AirD/(AirD + (AAUnitD#3 * 0.1))]} * Chance AAUnit#1 Misses * Chance AAUnit#2 Misses

    Chance Air Unit is Destoyed By AAUnit #4 = {1 - [AirD/(AirD + (AAUnitD#4 * 0.1))]} * Chance AAUnit#1 Misses * Chance AAUnit#2 Misses * Chance AAUnit#3 Misses

    Interception Percentage = Sum of above fomulas

    It is done as above because AAUnit#2 only gets a chance to fire if AAUnit#1 Misses... AAunit#3 only gets a chance if #1 and #2 miss, etc...

    Luckily, these formula's approximate to:

    1 - [{AirD/(AirD + (AverageOfAAUnit#1-#4D * 0.1))}^#AAUnits]

    This is not an exact match, but is close enough for government work... ;) Errors only start to show when the Average AA Unit Value is very different than either end (AAUnit#1D and the MinDefender)... For 'dead nuts' :sniper: calculations , use the long formulas...

    Note: AAUnits must be sorted in decending order, with highest Defense AA unit as AAUnit#1
    ---------------------------------------------------------------------
    TEST #1 - #3
    A Bomber Attacks a tile with 1 Flak
    AirD = 2

    AirUnit Destroyed By AAUnit#1 = 1 - [2/(2 + (2 * 0.1))] = 0.0909
    AAUnit#1 Missed AirUnit = 1 - 0.0909 = 0.9090

    Percentage Air Unit Destroyed = 0.0909 (9.09%)

    Test #1-#3: 421/4500 Destroyed = 9.35%
    Standard Deviation = 19.3 Bombers (+/- 0.43%)
    1 s.d. = 9.09% +/- 0.43% (8.66% - 9.52%) <---
    ---------------------------------------------------------------------
    TEST #4
    A Bomber Attacks a tile with 2 Flak...
    AirD = 2

    AirUnit Destroyed By AAUnit#1 = 1 - [2/(2 + (2 * 0.1))] = 0.0909
    AAUnit#1 Missed AirUnit = 1 - 0.0909 = 0.9090

    AirUnit Destroyed By AAUnit#2 = 1 - [2/(2 + (2 * 0.1))] = 0.0909
    AAUnit#2 Missed AirUnit = 1 - 0.0909 = 0.9090

    Percentage Air Unit Destroyed = 0.0909 + (0.0909 * 0.9090) = 0.0909 + 0.0826 = 0.1735 (17.35%)

    Test #4: 88/500 Destroyed = 17.6%
    Standard Deviation = 8.52 Bombers (+/- 1.70%)
    1 s.d. = 17.6% +/- 1.70% (15.9% - 19.3%) <---
    --------------------------------------------------------------------
    TEST #6
    A Bomber Attacks a tile with 1 MSAM and a Flak...
    AirD = 2

    AirUnit Destroyed By AAUnit#1 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#1 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#2 = 1 - [2/(2 + (2 * 0.1))] = 0.0909
    AAUnit#2 Missed AirUnit = 1 - 0.0909 = 0.9090

    Percentage Air Unit Destroyed = 0.1667 + (0.0909 * 0.8333) = 0.1667 + 0.0757 = 0.2424 (24.24%)

    Test #6: 114/500 Destroyed = 22.8%
    Standard Deviation = 9.38 Bombers (+/- 1.88%)
    1 s.d. = 22.80% +/- 1.88% (20.92% - 24.68%) <---
    ---------------------------------------------------------------------
    TEST #9
    A Bomber Attacks a tile with 2 MSAMs and a Flak...
    AirD = 2

    AirUnit Destroyed By AAUnit#1 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#1 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#2 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#2 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#3 = 1 - [2/(2 + (2 * 0.1))] = 0.0909
    AAUnit#3 Missed AirUnit = 1 - 0.0909 = 0.9090

    Percentage Air Unit Destroyed = 0.1667 + (0.1667 * 0.8333) + (0.0909 * 0.8333 * 0.8333) = 0.1667 + 0.1389 + 0.0631 = 0.3687 (36.87%)

    Test #9: 156/500 Destroyed = 31.2%
    Standard Deviation = 10.79 Bombers (+/- 2.16%)
    1 s.d. = 36.87% +/- 2.16% (34.71% - 39.03%)
    2 s.d. = 36.87% +/- 4.32% (32.55% - 41.19%)
    3 s.d. = 36.87% +/- 6.48% (30.39% - 43.35%) <--- Very odd result!
    ---------------------------------------------------------------------
    TEST #10
    A Bomber Attacks a tile with 4 MSAMs
    AirD = 2

    AirUnit Destroyed By AAUnit#1 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#1 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#2 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#2 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#3 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#3 Missed AirUnit = 1 - 0.1667 = 0.8333

    AirUnit Destroyed By AAUnit#4 = 1 - [2/(2 + (4 * 0.1))] = 0.1667
    AAUnit#4 Missed AirUnit = 1 - 0.1667 = 0.8333

    Percentage Air Unit Destroyed = 0.1667 + (0.1667 * 0.8333) + (0.1667 * 0.8333 * 0.8333) +

    (0.1667 * 0.8333 * 0.8333 * 0.8333) = 0.1667 + 0.1389 + 0.1158 + 0.0965 = 0.5179 (51.79%)

    Test #10: 270/500 Destroyed = 54.0%
    Standard Deviation = 11.17 Bombers (+/- 2.23%)
    1 s.d. = 51.79% +/- 2.23% (49.56% - 54.02%) <---
    ---------------------------------------------------------------------
    A Stealth Bomber Attacks a tile with 2 AEGIS Cruisers, 1 Destroyer and 1 Battleship...
    AirD = 5

    AirUnit Destroyed By AAUnit#1 = 1 - [5/(5 + (3 * 0.1))] = 0.0566
    AAUnit#1 Missed AirUnit = 1 - 0.0566 = 0.9434

    AirUnit Destroyed By AAUnit#2 = 1 - [5/(5 + (3 * 0.1))] = 0.0566
    AAUnit#2 Missed AirUnit = 1 - 0.0566 = 0.9434

    AirUnit Destroyed By AAUnit#3 = 1 - [5/(5 + (2 * 0.1))] = 0.0385
    AAUnit#3 Missed AirUnit = 1 - 0.0385 = 0.9615

    AirUnit Destroyed By AAUnit#4 = 1 - [5/(5 + (1 * 0.1))] = 0.0196
    AAUnit#4 Missed AirUnit = 1 - 0.0196 = 0.9804

    Percentage Air Unit Destroyed = 0.0566 + (0.0566 * 0.9434) + (0.0385 * 0.9434 * 0.9434) + (0.0196 * 0.9434 * 0.9434 * 0.9804) = 0.0566 + 0.0534 + 0.0343 + 0.0171 = 0.1614 (16.14%)
    ---------------------------------------------------------------------
     
  8. lbhhh

    lbhhh Chieftain

    Joined:
    Jun 17, 2003
    Messages:
    923
    Location:
    Montreal, QC
    Good work on the tests. This will help out my air defense strategy a lot.:goodjob:
     
  9. Chieftess

    Chieftess Moderator Retired Moderator

    Joined:
    Feb 10, 2002
    Messages:
    24,160
    Location:
    Baltimore
    Wow, someone sure has more than enough time on their hands. :goodjob: So, I guess the general strategy is to have 4 AA units (FLAK and MSAMs) per stack/border town, which would be adequate defense...
     
  10. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Actually, the more the better... Now that Air Units have lethal Bombard means that those AA can be killed... Best setup is to have 6+ MSAMs guarded by 3+ units with a defense higher than 6. That way the high D units defend the stack and keep the AA units from taking the hits... Even though 6 are in the stack only 4 will defend at a time though... If you are not going to use any other defenders bring more than 4 MSAMs because they will surely be damaged and probably killed over time...
     
  11. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    This information should be incorporated into my Combat Calculator tonight, I'll try to have it posted by Monday... Sadly, I do not have internet access at home :(
     
  12. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Helicopter interception is handled the same way as Fighter-Bomber interception (default of 50%), give the helicopter stealth and it drops to 5%... As it is now, there are only two classes of interception... Stealth and Non-Stealth. We could use at the minimum 1 more category, maybe call them 'Propeller, Jet, and Stealth'.

    Maybe someone could run a Binomial Distribution to see if all the above tests fall within exceptable ranges... If not I will do it sometime later...

    Also, I forgot to test if Radar Towers in range of the AA make any difference... I will post these results soon... It stands to reason that they would (it also stands to reason that crew experience would also ;) but experience doesn't matter...)
     
  13. alexman

    alexman Chieftain

    Joined:
    Feb 28, 2002
    Messages:
    778
    Location:
    Maryland, USA
    The SAM battery works like this:
    • For each bomber, there is a chance equal to the interception chance for the SAM to fire (50% against conventional, 5% against stealth)
    • If the SAM doesn't fire, the bomber continues as if the SAM were not present. This includes the chance of getting shot down by AA fire.
    • If the SAM fires, it has a A/(A+D) probability to shoot down the plane (A=8 for the SAM, D=2 for the Bomber). If the plane is not shot down, the Bomber survives, but it loses its chance to do any damage as well.

    I agree with the rest of your conclusions.
     
  14. Grille

    Grille panel insect

    Joined:
    Dec 19, 2002
    Messages:
    2,709
    Location:
    Kiel, Germany
    Always bothered me - thank you!
    :)
     
  15. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    This is the way I thought it worked, but this does not agree with Test #10 above... I had AirD @ 8 and the Bombard D @ 999 so it would survive the assault of 500 bombers, over 80% should have been shot down, but it was only 3.6%... It seems like something has changed... More testing, I guess :rolleyes: ;)
     
  16. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Radar Tower's have no effect...
     
  17. alexman

    alexman Chieftain

    Joined:
    Feb 28, 2002
    Messages:
    778
    Location:
    Maryland, USA
    BomberEscort I would not have told you how it works if I hadn't already tested it.
     
  18. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    How did you do your testing, was it similar to Test #10 above (besides the results)? I will test it again...
     
  19. alexman

    alexman Chieftain

    Joined:
    Feb 28, 2002
    Messages:
    778
    Location:
    Maryland, USA
    Try without having any AA units, because they scew the results, since they can shoot down the bombers too.

    This is what I did:

    Give bombers a 1 defense and SAM a 1000 strength so the SAM kills virtually whenever it intercepts. You get a 50% kill ratio.

    Then change the interception ratio and observe how the kill ratio follows it exactly.

    Now that we've established how the interception chance works, set it to 100% so the SAM fires every time. Make the SAM strength equal to the bomber defense, and observe that the SAM shoots the bomber down 50%of the time, as it should. The other 50% of the time, nothing happens. Not even a bomber animation. That's because the SAM fired but missed, so the bomber didn't continue with its mission.

    Have fun! :goodjob:
     
  20. BomberEscort

    BomberEscort Don't be alarmed; this is a kindness

    Joined:
    Jul 28, 2003
    Messages:
    1,102
    Gender:
    Male
    Location:
    Kansas City
    Test #10 was without the AA units, just the SAM
    Test #11 was with 4 MSAMs and the SAM

    This is similar to what I did...

    I gave the Bombers 2D and 1 Bombard Attack...
    I set the SAM to 8 Attack With a 999 Bombard Defense to keep those bombers from leveling it...
    Interception was set to 50% (default)...

    I got 3.6%, maybe this is a statistical fluke. I will test this when I get home tonight... If it is a fluke then...

    The formula for the SAM seems to be:

    BomberDestroyed = (SAMAttack/(SAMAttack + Air D))*IntPct

    Based on this formula, I expect the result to be
    BomberDestroyed = (8/(8+2))*.50) = .40 (40%)*

    * Not 80% since only 50% of the 8Att/2Def Battles even happen...

    Based on this I would expect a 2D Bomber v. 2A SAM to be destroyed 25% of the time... (2/(2+2))*.50 = .25 (25%)

    More testing tonight... :D
     

Share This Page