 |
|
Edward
|
|
A while back someone posted detailed information on how defense multipliers worked. I was surprised to find out that certain multipliers don't work together. However I can't remember which ones!
Possible defensive strength multipliers are:
Terrain
City Walls, SAM, Coastal Fortress
Fort (built by settler/engineer)
Veteran
Unit is Fortified
Misc (Pikeman vs. horse, Aegis vs. Missle)
Obviously you're not going to get the benefit of both a fort and city walls, but I remember a startling combination that didn't work. Something like "being fortified is meaningless behind a city wall".
Thanks
|
|
|  |
 |
|
Xin Yu
|
 |
Emeryville, CA, USA
Jan 1970 time: 21:12
|
|
I haven't really tested it but I tend to believe in it:
attack=8*base-attack*vet
defense=8*base-defense*vet*terrain*flag*max-modifier, where
base-defense=defense factor of the unit;
vet=1.5 for vet, 1 for non-vet;
terrain=terrain modification;
flag=1.5 if the defender has 'x2 vs mounted' flag and the attacker is a land unit with move=2, hp=1, and fp=1;
flag=3 if the defender has 'x2 vs air' flag and the attacker is a non-missile airunit;
flage=5 if the defender has 'x2 vs air' flag and the attacker is a missile unit;
max-modifier=maximum of all other modifiers, fortified=1.5, fortress=2, wall=3, etc.
Fortified units behind city walls will be useful if being attacked by units ignoring city walls (howitzer, bomber, etc.)
Special rules: fighter gain advantage against helicopter, partisan gain advantage against 0-attack units (settler, diplo, caravan, etc.), ships in city are not protected by walls and are punished when attacked by land and air units.
After attack and defense factors are calculated the odds are calculated as follows:
if attack<defense then probability of attack win=(attack-1)/(2*defense);
if attack >=defense then the probability of attack win=1-(defense+1)/(2*attack).
In other words the weaker of the two (attack, defense) gets punished twice the difference of attack and defense.
Remember that both attack and defense have been multiplied by 8 and there is no round-down.
[This message has been edited by Xin Yu (edited June 09, 2000).]
|
|
|  |
 |
|
Aurelius
|
|
San Francisco
Dec 1999 time: 05:12
|
|
[quote]<font size=1>Originally posted by Xin
Fortified units behind city walls will be useful if being attacked by units ignoring city walls (howitzer, bomber, etc.)
Wow, I've always assumed that the units got both the fortified bonus and the city walls. Well, one thing is 'certain', it's good to be fortified behind city walls as your units repair faster.
"partisan gain advantage against 0-attack units (settler, diplo, caravan,
etc.)"
I've always suspected such concerning Partisans vs engineers. Thanks Xin, can AI partisans pick out what they attack in a stack? It's uncanny how they always kill my engineers when stacked with superior defensive units.
Anyone, I don't seem to be able to get the answer to the question, "is there an advantage to attacking from defensive enhanced terrain?" (I've always wondered if a unit gets the defense when attacking)
later
Edited to increase font size...
[This message has been edited by Aurelius (edited June 09, 2000).]
|
|
|  |
 |
|  |
 |
|
Edward
|
|
Thanks, Xin Yu, for the excellent and thorough answer.
|
|
|  |
 |
|
Aurelius
|
|
San Francisco
Dec 1999 time: 05:12
|
|
Didn't catch the stop fast enough.
[This message has been edited by Aurelius (edited June 09, 2000).]
|
|
|  |
 |
|  |
 |
|
geofelt
|
|
Neptune Beach,Florida,USA
Jan 1970 time: 00:12
|
|
A battle is resolved in a series of exchanges, with the loser losing the attacker's hit points, and deductint it from it's reserve of hitpoints*10.
In the given example, the alpine's defense basic defense is 5 which is increased to 7 for vet status(rounded down). Tripling for walls, the defense factor is 21. The attacker, a vet armour is 10, increased to 15 for vet status. The alpine will have a reserve of 20 hit points, and the armour 30. The odds of winning a round for the defending alpine is 21/(21+15) or 21/36 or 58%. The odds of the armour losing are therefore 42%. --decimals dropped---
On the average, the alpine will lose .42 hitpoints each turn from it's reserve of 20, making it last(20/.42) or 47.6 exchanges. The armour, will lose more exchanges, but it has more hit point reserves. It will expect to lose .58 points each turn when attacking from it's reserve of 30, lasting(30/.58) 51.7 turns, making it a winner by a 51.7 to 47.6 margin.
If you put the alpine on a river or forest, it adds .5 of 7 to the defense of 21, giving it a total defense of 24 which is enough to turn the tables, giving it a likelyhood of surviving of 52 to 48.
|
|
|  |
 |
|
geofelt
|
|
Neptune Beach,Florida,USA
Jan 1970 time: 00:12
|
|
correction; the loser loses the attacker's firepower, not hit points. In this case, the firepower of both units is 1. That is why artillery with 2 firepower is so powerful.
|
|
|  |
 |
|
Sieve Too
|
|
New Hampshire, USA
Jan 1970 time: 05:12
|
|
Remember that the Pikeman bonus only applies to units with 1 HP. Pikemen are no better than Phalanx against 2 HP units like Dragoons or Cavarly.
Defensive bonuses are always multiplied together, not added. Fractions are not dropped.
Xin Yu's odds are per-round odds, not the odds that one unit will defeat another. One reason Armor can beat Alpine behind walls is that they have 3 HP vs the Alpines's 2 HP. As geofelt notes, FP makes a difference too. Artillery needs to win only 10 rounds against a 2 HP unit because of its FP of 2. High FP is also what makes air units so devastating.
|
|
|  |
 |
|
|
A more linear way of testing the combat formula is using the simplified combat. The test result is less tedious to collect because if you use traditional combat, whenever one does combat testing, it is too tedious to mark down the HP left for each result. This would make the estimation of the correct mean more difficult given same number of testing.
Xin Yu's description is very good. But I have some doubt about the multiplier 8. It is most likely to be a 2^n. 4 is unlikely. But 16 is also possible.
I don't know if Xin Yu gets it from experience or through rigorous testing.
As an aside, anyone has the proper trade formula? The one claimed to be tested by some of the veterans here are not in the archives. I am not talking about the one from the strategy guide.
PS I also have doubt on the case where the more powerful unit having twice the advantage as the lesser unit as stated by Xin Yu in his first answer, last paragraph.
We have to do more empirical testing or just try to hack into the code to get a confirmed result.
[This message has been edited by pikachu (edited June 12, 2000).]
|
|
|  |
 |
|  |
 |
|
Xin Yu
|
 |
Emeryville, CA, USA
Jan 1970 time: 21:12
|
|
First it is not my formula, I just simplified it. Somebody needs to dig this forum to find the original thread.
Let's compare the odds of 'attacker wins a round' in this formula with the one suggested in the strategy guide:
Strategy Guide: a/(a+d)
This Formular: (a+(a-d)+)/(a+d+|a-d|)
Where (a-d)+ is the positive part of (a-d), and |a-d| is the absolute value of (a-d).
Example: non-vet musk attack fortified vet pikemen. a=3, d=2*15*1.5=4.5.
Using Strategy Guide Formula: a/(a+d)=0.4. Musk wins 4 rounds out of 10, or 10 rounds (enough to defeat the pikemen) out of 25. Since Musks have 2*10 hp, on the average the Musk will eliminate the pikemen with 5 hp left.
Using This Formula: (a+(a-d)+)/(a+d+|a-d|)=(3+0)/(3+4.5+1.5)=1/3. Musk wins 10 rounds out of 30. Since Musks have 2*10 hp vs the 1*10 hp of pikemen, on the average the Musk will have 0 hp left when the pikemen is eliminated. In other words, a 50-50 chance. (Since the defender has an edge in civ2, the pikemen is more likely to survive).
Now somebody needs to do a test using 100 musks against 100 fortified pikemen. Then we'll know which formula is wrong.
|
|
|  |
 |
|
cavebear
|
 |
of the Pleistocene
Oct 1999 time: 00:12
|
|
First, I want to thank everyone for the detailed discussion of the battle calculations. I can even follow the math (yes, I remember absolute values, too). But what's next, the square root of i? *s*
Second, "ARGGGHHH!" In a practical sense, I am completely lost. Unless the relative values of the units (on a unit by unit comparison) is captured intuitively somehow, I see little hope of being able to estimate how to proceed in multiple unit affairs.
How can I possibly make a decent estimate of how 4 dragoons, 2 musketeers, and a pikesman will do against an unknown size 5 city (probably 2 musketeers and a pikesman behind city walls on grass)?
Mainly, though, I mean how can I best (in real time) estimate a battle outcome? Any idea within 20% of accurate would probably be good enough (is even *that* achievable?).
Granted that the game is an art, and you only get to do detailed calculations against the AI, but isn't there a workable "rule of thumb" that can help? What is the simplest expression of factors that is meaningful?
|
|
|  |
 |
|
Edward
|
|
WARNING!! WARNING!! 
The formula here for factoring multipliers has been proven to be incorrect. Combat multipliers are multiplied, not summed. It's left in it's original form so the debate on this thread will be easier to follow.
quote:

How can I possibly make a decent estimate of how 4 dragoons, 2 musketeers, and a pikesman will do against an unknown size 5 city (probably 2 musketeers and a pikesman behind city walls on grass)?
 |
Cavebear,
As DaveV pointed out, it seems the heuristic is:
rating = combatvalue*hitpoints*firepower
where, for the attacker, combatvalue =
unit's attack * [1 + (.5 if vet)]
and for the defender, combatvalue =
unit's defense * [1
+ (.5 if vet)
+ (.5 to 2 for terrain modifier)
+ (only the best of: 1.5 if fortified, 1 if in fort, 2 if in city walls, 1 if with SAM battery, 1 if in coastal fortress)
+ (1 if there's any special unit to unit stuff like pikeman vs. knight)
]
(I think Hasdrubal is correct, modifiers are summed, not multiplied; much like the fact that a library and university combo doubles a city's research (1*[1+.5+.5]), NOT (1*1.5*1.5 = 2.25) times as much research. I'm in the minority on this view.)
Compare the ratings of the attacker and the defender. The higher rating will most likely win the battle. The greater the difference, the more accurate the prediction. The greater the hitpoints involved in the battle, the more accurate the prediction.
To help you do this in real-time, you can see that for healthy units you don't need to remember the hitpoints, firepower, etc. Just make a chart where each unit only has one number (attack*firepower*hitpoints) for attack and one number (defend*hitpoints*firepower) for defense. Right before the battle you can modify for city walls and vet status. If a unit is in the yellow or red, multiply his rating by 2/3 or 1/3 respectively.
Due to loss of hitpoints, the victorious unit will come out with a rating, on average, of (victor's rating - loser's rating). Therefore to predict whether a city will be sacked, you can add up all the attacking units' ratings and compare with the sum of the defending units' ratings. Of course this is VERY rule-of-thumbish.
For your example (assuming no vets):
I look at my chart (or remember after a while):
dragoons are rating = 10 on attack (5*2*1)
musketeers are rating = 6 on attack (3*2*1), 18 if defending behind city walls (3*2*1)*(1+2).
pikemen are rating = 1 (1*1*1) on attack, 6 if defending behind city walls (2*1*1)*(1+2).
So the attackers are (4*10) + (2*6) + 1 = 53.
The defenders are (2*18) + 6 = 42.
Looks like you'll take the city. (But at only 5 to 4 odds, it'd be risky.)
DaveV used a similar formula to run through individual wins/losses and I'm sure arrived at a more accurate prediction of the battle's outcome.
[This message has been edited by Edward (edited June 13, 2000).]
|
|
|  |
 |
|
Sieve Too
|
|
New Hampshire, USA
Jan 1970 time: 05:12
|
|
quote:

Hasdrubal is correct, modifiers are summed, not multiplied;
 |
This is incorrect. My tests show the opposite.
I started with the assumption that the higher value (either attack or defense) should win more often against the lower value. From there, I changed all unit hitpoint values to 10, i.e. 100, and all FP values to 1. This way a very large sample of pseudo-random numbers would be used in each battle, reducing the effects of localized bias. I ran 20 trials of each of the below tests:
1) Vet Warrior attacks non-vet Warrior on grass. Both summing and multiplying predict the Vet Warrior to win - and he did all 20 times. This test was run just to prove that fractions are not rounded down.
2) Horseman (a=2) attacks Vet Warrior in a forest. Summing predicts an even match. d = (1+.5+.5 = 2). Multiplying predicts a likely win for the Warrior. d = (1*1.5*1.5 = 2.25).
Outcome: Warrior wins all 20 battles.
3) Horseman (a=2) attacks Vet Warrior fortifying on grass. Same as #2. Summing predicts an even match. d = (1+.5+.5 = 2). Multiplying predicts a likely win for the Warrior. d = (1*1.5*1.5 = 2.25).
Same outcome: Warrior wins all 20 battles.
This test and the next one prove that all bonuses are treated the same, i.e. all are multiplied.
4) Horseman (a=2) attacks non-vet Warrior fortifying in a forest. Same as #2 and #3. Summing predicts an even match. d = (1+.5+.5 = 2). Multiplying predicts a likely win for the Warrior. d = (1*1.5*1.5 = 2.25).
Same outcome: Warrior wins all 20 battles.
5) Archer (a=3) attacks Vet Warrior fortifying in a forest. Summing predicts a win for the Archer. d = (1+.5+.5+.5 = 2.5). Multiplying predicts a win for the Warrior. d = (1*1.5*1.5*1.5 = 3.375).
Outcome: Warrior wins 19 battles, Archer wins 1 battle.
Conclusion: Bonuses are multiplied, not summed.
The only anomaly is the one Archer win during test #5. I explain that one away due to the quirkiness of the pseudo-random number generator.
[This message has been edited by Sieve Too (edited June 13, 2000).]
|
|
|  |
All times are GMT. The time now is 05:12. Apolyton Time is 00:12. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|