AA Formula Discussed...

BomberEscort

Don't be alarmed; this is a kindness
Supporter
Joined
Jul 28, 2003
Messages
1,131
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...
 
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)...
 
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:
 
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.
 
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...
 
Very nice:goodjob:
 
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%)
---------------------------------------------------------------------
 
Good work on the tests. This will help out my air defense strategy a lot.:goodjob:
 
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...
 
Originally posted by Chieftess
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...

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...
 
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 :(
 
Originally posted by cldwarhist
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.

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...)
 
Originally posted by BomberEscort
Conclusions...
  • Hit Points and Experience do not affect interception by AA.
  • Stealth Ability does not affect interception by AA.
  • Terrain has no effect...
  • SAM Missile Battery is not cumulative with Mobile AA.
  • SAM Missile Battery by itself is severly limited from previous versions.
  • 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...

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.
 
Originally posted by alexman

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...

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: ;)
 
Originally posted by BomberEscort
...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...) ...

Radar Tower's have no effect...
 
BomberEscort I would not have told you how it works if I hadn't already tested it.
 
How did you do your testing, was it similar to Test #10 above (besides the results)? I will test it again...
 
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:
 
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
 
Top Bottom