Mathematical Anomolies and Unit Promotions

Zorbop

Chieftain
Joined
Jan 7, 2002
Messages
17
Location
st louis
I've noticed some odd mathematical anomolies for certain units. Most notably, situations where the combat 1 promotion is actually better than the city raider promotion for attacking cities. This happens only in rare situations, specificall, when the attackers base str is drastically higher than the defender and the defender has massive combat bonus's.

example: Praetorian (8) vs Archer (3). The archer is fortified in a city with a cultural defence of 40% and has the promotions city defence 1-3 So the combat comes out to 8 vs 3+3*(.4 cultural +.25 fortification +.5 defending city bonus +.75 city defender = +190%). This comes out to 8.0 vs 8.7, a 67% win for the archer (for simplicity, i am ignoring firsts strikes. the concept remains true with first strikes though)

So what's better here, city raider 1 or combat 1? You would think that city raider would always be better, seeing that 20% is higher than 10%. However, promotions given to the attacker are applied differently. SITUATIONAL BONUS'S (such as city raider) are applied to the DEFENDER. PERMANENT BONUS'S are applied to the ATTACKER (such as combat 1. permanent bonus's are always applied to whichever unit has the promotion: for our calculations, the attacker.).

If you were to take city raider 1, this would give a 20% bonus. This 20% bonus, however, is applied to the defender. Its not -20% of 8.7, however. Its -20% from the total defencive bonus... so 190% goes to 170%. This gives the archer a total str of 8.1, making the praetorian win 37% of the time.
However, imagine if you were to get +10% str promotion. This gives your praetorian +.8 str, instead of the -.6 str city raider gave to the archer.
So, with combat 1 instead of city raider, the odds are 8.8 vs 8.7 (63% chance for the praetorian to win). This is obviously the favorable situation.

Notice that this applies only in limited situations. For instance, if the archer had a defensive bonus of only +70% or so, city raider would actually be the better promotion.

There are a couple of situations where you can take advantage of this:
Praetorian/maceman vs archer
Swordsman/axeman vs warrior
Modern armour vs machine gun

It can also make a difference when choosing between combat 2 and shock for cavalry in the following situation:
Cavalry vs spearman


Note that it is only better to take the +10% str promotion if the defender has an extremely high defensive bonus (as is usually the case with archers).
 
You missed the +10% vs melee units from the City Garrison III promotion. But yeah it's a interesting observation you made there.
 
Very nice write-up aswell, this proves that you should think before promoting units, i'll keep this in mind when playing.
 
viz said:
You missed the +10% vs melee units from the City Garrison III promotion. But yeah it's a interesting observation you made there.
Haha ya i missed that. Well, imagine that the archer has only been fortified for 3 turns so it evens out ;).
 
Your rule about situational bonuses being a negative for the defender doesn't make sense for me, particularly when a spearman attacks.

For example, when a spearman attacker attacks a horse archer who is in a city without cultural defense, the only modifiers are the spearman's 100% situational modifier, which you say is subtracted from the defender.

Thus, the defending horse archer has a STR of 0 = 6 - 6(1.00)!!!

Am I doing the math right?
 
Wow, if what you are saying is true then.

Elephants facing spearmen (100% situational bonus) in cities are ALWAYS better off taking combat II instead of shock!!! :eek:

Let alone the fact that combat II helps against archers and stuff too!! :eek: That does not seem right!! I gotta check this out in the editor
 
civzombie said:
Your rule about situational bonuses being a negative for the defender doesn't make sense for me, particularly when a spearman attacks.

For example, when a spearman attacker attacks a horse archer who is in a city without cultural defense, the only modifiers are the spearman's 100% situational modifier, which you say is subtracted from the defender.

Thus, the defending horse archer has a STR of 0 = 6 - 6(1.00)!!!

Am I doing the math right?
Spearmen attacking Horse Archer.
4 vs 6 / (1 + 1) = 4 vs 3.

CivZombie said:
Wow, if what you are saying is true then.

Elephants facing spearmen (100% situational bonus) in cities are ALWAYS better off taking combat II instead of shock!!!

Let alone the fact that combat II helps against archers and stuff too!! That does not seem right!! I gotta check this out in the editor
Spearmen vs Elephants with Combat I, II
4 vs 8 + (8 * 0.2) / (1 + 1.00) = 4 vs 4.8

Spearmen vs Elephants with Combat I, Shock.
4 vs 8 + (8 * 0.1) / (1 + (1.00 - 0.25)) = 4 vs 5

Calculating this is new to me, so it may be wrong. If it is, someone will correct it.
 
Ever since my first fight in Civ4 I have been unable to understand why in the name of reason the programmers chose to apply some of an attacker's bonuses not to the attacking unit, but to deduct them from the defender. It is misleading to say, for example, that a unit gets +20% city attack when what happens is that the defender gets 20% deducted.
But thank goodness that in combat calculations the figures are not all rounded down !
 
@CivZombie:- both guys' calculations are correct. The difference is in that if when accounting the combined attack and defence bonuses onto the defender, if the result is NEGATIVE, then the equation used is different.

E.g. Chariot str 4 Com I vs Axeman str 5 Com I on open ground

First the combat I is applied to the attacker, that's 10% of 4 making 0.4. This is then added to the chariot's base str to give a value of 4.4.

Now the defender's bonus is calculated , which is 10% from combat I , minus 100% from chariot attack bonus vs axeman = -90%

Because the result is negative, the following equation is used :-

def value = str / (1-(def bonus/100))

because the def bon /100 is -0.9 (thats -90/100) when put into the equation it makes

def value = 5 / (1-(-0.9)) = 5 /1.9 = 2.63

Therefore back to original combat:-

Chariot Com I vs Axeman Com I is 4.4 vs 2.63


Hope you could follow that :)
 
Well it does depend on Att v. Defender

If the Elephant is Attacking

CII
9.6 v. 4 *(1+100%)= 9.6 v. 8=1.2 odds for elephant

Shock
8.8 v. 4* (1+75%)=8.8 v.7=1.25 odds for the elephant

For defense, your calcs are
CII
4 v. 8/(1+100%-20%)=4 v. 4.444=1.111 for elelphant

Shock
4 v. 8/(1+100%-25%-10%)=4 v. ~5=1.25 for the elephant

So Shock is better, but not as much as a simple analysis would suggest, although it is strongly better on defense
 
"The difference is in that if when accounting the combined attack and defence bonuses onto the defender, if the result is NEGATIVE, then the equation used is different."

Gotcha, that explains everything right there. How unintuitive! :crazyeye:

Thanks for your example, yes I follow it.
 
civzombie said:
Wow, if what you are saying is true then.

Elephants facing spearmen (100% situational bonus) in cities are ALWAYS better off taking combat II instead of shock!!! :eek:

Let alone the fact that combat II helps against archers and stuff too!! :eek: That does not seem right!! I gotta check this out in the editor


Sort of. They end up being very similar, so its usually just better to get combat 2 because it's more diverse. The calculations come out like this.

Elephant (8)
8 + 8*(.1 combat 1) = 8.8

vs spearman (4)
4 + 4*(1.0 vs mounted + .1 defending) = 8.4

If you take combat 2, your elephant gets an additional +10% (so a .8 str bonus)
if you take shock, then the spearman gets -25% from its total defensive bonus of +110%. Note that -25% on a spearman is ALWAYS 1 str. In this scenario 8.8 vs 7.4 is actually better than 9.6 vs 8.4, so shock is a bit better for that combat(only by 2% though... so still not worth it). However, if the spearman had substantion bonus's from other sources combat 2 would be superior, but not by much.

Allow me to illustrate it like this.
10% of 8 is .8 (combat 2)
25% of 4 is 1 (shock)
1 is actually higher than .8, so shock is theoretically more effective. But you have to remember that which is better is relative. If you are much weaker than your opponent (say the spearman has really high defensive bonus's), then it is BETTER to get your unit +.8 than -1.0 from your opponents. But if your unit is stronger or the str are similar, then the -1.0 comes out as numerically superior.


Notice how this is different from the praetorian example.
The praetorian has a str of 8, so +10% is .8
However, the archer has a str of 3, so -20%(city raider 1) is only .6!
This brings up another point... if it was always 8 vs 3 the -.6 from 3 is more significant than the + .8 from combat. This, however, is almost never the case. Archers tend to have rediculous bonus's when defending cities. When the strengths of the two are closer together (when was the last time you've seen an archer with less than a 100% bonus), the +.8 becomes better than -.6.
 
civzombie said:
Your rule about situational bonuses being a negative for the defender doesn't make sense for me, particularly when a spearman attacks.

For example, when a spearman attacker attacks a horse archer who is in a city without cultural defense, the only modifiers are the spearman's 100% situational modifier, which you say is subtracted from the defender.

Thus, the defending horse archer has a STR of 0 = 6 - 6(1.00)!!!

Am I doing the math right?

The trick here is that mounted units dont get bonus's when defending, so it goes to attacking spearman instead.
However, if, for example, an axeman with city raider 3 was attacking a spearman in a city, i believe drewbledsoes rule applies.
 
"so shock is a bit better for that combat(only by 2% though... so still not worth it). "

Can someone explain how combat calculation works when the attacker or the defender is injured.

Just a hunch, but I bet shock is more worth it when an injured elephant attacks a health spearmen while combat 2 is more worth it when a healthy elephant attacks an injured spearman.
 
civzombie said:
"so shock is a bit better for that combat(only by 2% though... so still not worth it). "

Can someone explain how combat calculation works when the attacker or the defender is injured.

Just a hunch, but I bet shock is more worth it when an injured elephant attacks a health spearmen while combat 2 is more worth it when a healthy elephant attacks an injured spearman.

You calculate attack and defence values in same way, but then multiply each by (hps/100)

e.g. combat I axe has attack value of 5.5 but only 72hps (out of 100) then attack value is 5.5 * .72 = 3.96
 
"You calculate attack and defence values in same way, but then multiply each by (hps/100)"

Gotcha. I guess injuries won't change the relative advantages between shock and combat2 :)
 
You'll find that promotions such as shock to be more valuable the more powerful the enemies base strength (before bonus's) is relative to yours.

for example... elephant attacking maceman on a hill. you have combat 1.
you can choose between combat 2 and shock.
combat 2
elephant: 8 + 8*(.2) = 9.6
maceman: 8 + 8*(.25) = 10
shock
elephant: 8 + 8*(.1) = 8.8
maceman: 8 + 8*(.25 - .25) = 8
obviously shock is a lot better here

to sum it up... When attacking, the better your base strength (before ANY combat bonus's) is relative to your opponents, the worse situational bonus's become. Likewise, ifyour opponents base strength is near to or higher than your own situational bonus's become quite good.

Combat bonus's also play a role. The higher the defenders combat bonus's, the worse situational bonus's are.
 
Back
Top Bottom