ProPain
30-03-2004, 22:34
Introduction
I've always wondered how the military advisor determines army strenght and what's the meaning of weak, average and strong armies. After talking about it with Markstar, KingReno, Kemal and Swingue I decided to do some test to determine the exact workings. So after some pondering how to do it I came up with a cunning plan (thank you Baldrick)
The Plan
My hypothesis has always been that attack and defense values for each units are added to determine 'unit strength'and summed up over alle units to determine 'army strength'. Still I'm not certain if a simple adding of stats is just it, so I have to figure that out. Suspicion is that hitpoints are also tied in the equasion somewhere. Also I want to know the intervals that determine if you're army is weak, average or strong.
Start Assumptions
Units Strength (player 1) = Hitpoints * (RatioQ * AttackPoints + RatioX * DefensePoints + RatioY * MOvement Points + RatioZ * Bombard Points)
Army Strength (player 1) = Sigma(1-n) Unit Strength (player 1)
ArmyStrenght(player 1) > (1+fraction_strong) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (1-fraction_weak)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Logically the fractions are related in other words there's only one comparison which makes one strong the other weak. This means that (1+fraction_strong)=1/(1-fraction_weak). If this werent to be true it would result in Player1 seeing he's strong against player 2, who in turn could be rated average against player1. That doenst make sense, if one player is strong, the other is weak.
determining the interval Faction
Easiest to determine is the fraction.
Original plan was to take an army of 200 warriors, make an AI army of 100 warriors. (assuming 200 warriors rate strong vs 100) and then disband a warrior at a time, each time checking the strength.
Unfortunately you can assign max 25 units of one kind as starting units in the editor. Also I discovered I needed to add a settler to my human player, because disbanding one warrior when you dont have a city results in defeat [confused]. I think it's weird because you still have 24 warriors left that can pop a settler from a hut.
So I settled on 25 warriors for the human player and and 10 warriors for the AI. Also I assigned 10 spears, 10 archers and 10 chariots to other AI players to get a feel for their relative strength. All units are regular (3 hitpoint) units.
http://www.civ3duelzone.com/forum/uploaded/ProPain/200433022557_1sttest.gif
13.67*KB
Although it seems jpg is crap for text pics, you can still see the intervals. (edit:replaced by gif)
Conclusions
- At first sight (1+fraction_strong) seems 1.2 and (1-fracion_weak) seems 0.8. However 0.8 does not equal 1/1.2 so either it's
a) 0.8 = (1-fr_weak); 1.25 = (1-fr_strong)
b) 0.833 = (1-fr_weak); 1.2 = (1-fr_strong)
Oystein pointed out to me that my first (now deleted formula) was wrong and "a)" solution is the correct one
- Movement is no factor to determine strength as the chariots have exactly the same 'average interval'as warriors but have twice the movement point. So RatioY is 0 and the whole parts disappears from the equasion.
- Attack and defense points are not rated equally as they follow a different pattern. About 16,5 warriors equal 10 archers, and 14,5 warriors equal 10 spears. This really amazed me and made me think on how to continue the testing.
So
ArmyStrenght(player 1) > (1.25) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (0.8)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Attack vs defense values
Easiest way to test the difference between attack and defense is to test with 2 modded units that only have attack or defense values.
I compared a (1,0,1) unit to a (0,1,1) unit.
AI got 10 units with (1,0,1) stats
I got 25 units with (0,1,1) stats and started the disbanding all over.
http://www.civ3duelzone.com/forum/uploaded/ProPain/2004330225114_2ndtest.gif
8.18*KB
(gif, much better!)
Conclusion
This clearly shows that 15 (0,1,1) units equal 10 (1,0,1) units. Movement doesnt count so an attack point is rated to be worth 1,5 defense points. Also note that the 20% fraction value works here too
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + RatioZ * Bombard Points)
Bombard Ratio
I did several test on this as I was amazed by the results, but all of them gave the same value. The one most comprehensive is depicted below. Human has 25 (0,1,1) units, AI has 10 (0(10),0,1) units.
http://www.civ3duelzone.com/forum/uploaded/ProPain/200433023110_3rdtest.gif
8.54*KB
Conclusion
17,5 (0,1,1) units rate equal to 10 (0,(10),0,1) units. So 10*10=100 bombard points equal 17,5 defense points. So 1 bombard points equals 0,175 defense point.
I think this value is weird but several different tests gave the same value.
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + 0.175 * Bombard Points)
Influence of hitpoints
First I tested the hitpoints on ordinary warrior. Compared 10 vets (4hitpoints) to 25 regular (3 hitpoints). Results
http://www.civ3duelzone.com/forum/uploaded/ProPain/2004330231356_4thtest.gif
8.41*KB
It shows that 10 vet warriors equal about 13,5 regular warriors. Logically the value is 13.33 or (4/3) which equals the hitpoints ratio. An other way to say it is that units strength is multiplied by the number of hitpoints. I havent tested but assume hitpoints are used instead of status. I have 2 reasons for this assumption:
1- Kemal has seen his army rate strong before an attack and average after an attack. He didnt lose any units but he did lose hitpoints
2- You're allowed to adjust hitpointsin the editor and so adjust the number of hitpoints associated with rank. Safest way is to use the hitpoints to determine strength, works always.
I also tested the influence from hitpoints on bombarding units. Bombard values are NOT affected by hitpoints, whereas units that only have defensive or offensive values are. I have pics of that too, can post for those interested.
This also solves the 'weird bombard value issue'. I compared reg spears to bombard units using the formula:
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + 0.175 * Bombard Points)
In this case we had reg spears means 3 hitpoints. So bombard ratio is not = 0.175 * hitpoints BUT 0.175*3 = 0.525 = 0,5 because I shouldnt have put bombard ratio inside the brackets! (thanks again to Oystein for pointing this out.)
Conclusion
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) 0.5 * Bombard Points
Overall Conclusion
The formulae used by the mil advisor are:
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) + 0.5 * Bombard Points
Army Strength (player 1) = Sigma(1-n) Unit Strength (player 1)
ArmyStrenght(player 1) > (1.2) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (0.8)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Addition : Oystein pointed out that everybody starts with 2 mil points no matter what, this is probably meant to avoid division by zero errors. COnsidering a conscript warrior is worth 5 mil points these 2 points will never influence the rating.
This allows you to estimate your opponents strength compared to yours. Also in the start of the game you can make good assumptions what your opponents army consist of as only limited units are available.
Also when you combine this with F11 stats (pop and mil service) that give an indication how many units your opponent has, you can determine 'average strength per unit'which should tell you something about the sort of unit someone is building.
I've always wondered how the military advisor determines army strenght and what's the meaning of weak, average and strong armies. After talking about it with Markstar, KingReno, Kemal and Swingue I decided to do some test to determine the exact workings. So after some pondering how to do it I came up with a cunning plan (thank you Baldrick)
The Plan
My hypothesis has always been that attack and defense values for each units are added to determine 'unit strength'and summed up over alle units to determine 'army strength'. Still I'm not certain if a simple adding of stats is just it, so I have to figure that out. Suspicion is that hitpoints are also tied in the equasion somewhere. Also I want to know the intervals that determine if you're army is weak, average or strong.
Start Assumptions
Units Strength (player 1) = Hitpoints * (RatioQ * AttackPoints + RatioX * DefensePoints + RatioY * MOvement Points + RatioZ * Bombard Points)
Army Strength (player 1) = Sigma(1-n) Unit Strength (player 1)
ArmyStrenght(player 1) > (1+fraction_strong) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (1-fraction_weak)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Logically the fractions are related in other words there's only one comparison which makes one strong the other weak. This means that (1+fraction_strong)=1/(1-fraction_weak). If this werent to be true it would result in Player1 seeing he's strong against player 2, who in turn could be rated average against player1. That doenst make sense, if one player is strong, the other is weak.
determining the interval Faction
Easiest to determine is the fraction.
Original plan was to take an army of 200 warriors, make an AI army of 100 warriors. (assuming 200 warriors rate strong vs 100) and then disband a warrior at a time, each time checking the strength.
Unfortunately you can assign max 25 units of one kind as starting units in the editor. Also I discovered I needed to add a settler to my human player, because disbanding one warrior when you dont have a city results in defeat [confused]. I think it's weird because you still have 24 warriors left that can pop a settler from a hut.
So I settled on 25 warriors for the human player and and 10 warriors for the AI. Also I assigned 10 spears, 10 archers and 10 chariots to other AI players to get a feel for their relative strength. All units are regular (3 hitpoint) units.
http://www.civ3duelzone.com/forum/uploaded/ProPain/200433022557_1sttest.gif
13.67*KB
Although it seems jpg is crap for text pics, you can still see the intervals. (edit:replaced by gif)
Conclusions
- At first sight (1+fraction_strong) seems 1.2 and (1-fracion_weak) seems 0.8. However 0.8 does not equal 1/1.2 so either it's
a) 0.8 = (1-fr_weak); 1.25 = (1-fr_strong)
b) 0.833 = (1-fr_weak); 1.2 = (1-fr_strong)
Oystein pointed out to me that my first (now deleted formula) was wrong and "a)" solution is the correct one
- Movement is no factor to determine strength as the chariots have exactly the same 'average interval'as warriors but have twice the movement point. So RatioY is 0 and the whole parts disappears from the equasion.
- Attack and defense points are not rated equally as they follow a different pattern. About 16,5 warriors equal 10 archers, and 14,5 warriors equal 10 spears. This really amazed me and made me think on how to continue the testing.
So
ArmyStrenght(player 1) > (1.25) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (0.8)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Attack vs defense values
Easiest way to test the difference between attack and defense is to test with 2 modded units that only have attack or defense values.
I compared a (1,0,1) unit to a (0,1,1) unit.
AI got 10 units with (1,0,1) stats
I got 25 units with (0,1,1) stats and started the disbanding all over.
http://www.civ3duelzone.com/forum/uploaded/ProPain/2004330225114_2ndtest.gif
8.18*KB
(gif, much better!)
Conclusion
This clearly shows that 15 (0,1,1) units equal 10 (1,0,1) units. Movement doesnt count so an attack point is rated to be worth 1,5 defense points. Also note that the 20% fraction value works here too
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + RatioZ * Bombard Points)
Bombard Ratio
I did several test on this as I was amazed by the results, but all of them gave the same value. The one most comprehensive is depicted below. Human has 25 (0,1,1) units, AI has 10 (0(10),0,1) units.
http://www.civ3duelzone.com/forum/uploaded/ProPain/200433023110_3rdtest.gif
8.54*KB
Conclusion
17,5 (0,1,1) units rate equal to 10 (0,(10),0,1) units. So 10*10=100 bombard points equal 17,5 defense points. So 1 bombard points equals 0,175 defense point.
I think this value is weird but several different tests gave the same value.
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + 0.175 * Bombard Points)
Influence of hitpoints
First I tested the hitpoints on ordinary warrior. Compared 10 vets (4hitpoints) to 25 regular (3 hitpoints). Results
http://www.civ3duelzone.com/forum/uploaded/ProPain/2004330231356_4thtest.gif
8.41*KB
It shows that 10 vet warriors equal about 13,5 regular warriors. Logically the value is 13.33 or (4/3) which equals the hitpoints ratio. An other way to say it is that units strength is multiplied by the number of hitpoints. I havent tested but assume hitpoints are used instead of status. I have 2 reasons for this assumption:
1- Kemal has seen his army rate strong before an attack and average after an attack. He didnt lose any units but he did lose hitpoints
2- You're allowed to adjust hitpointsin the editor and so adjust the number of hitpoints associated with rank. Safest way is to use the hitpoints to determine strength, works always.
I also tested the influence from hitpoints on bombarding units. Bombard values are NOT affected by hitpoints, whereas units that only have defensive or offensive values are. I have pics of that too, can post for those interested.
This also solves the 'weird bombard value issue'. I compared reg spears to bombard units using the formula:
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + 0.175 * Bombard Points)
In this case we had reg spears means 3 hitpoints. So bombard ratio is not = 0.175 * hitpoints BUT 0.175*3 = 0.525 = 0,5 because I shouldnt have put bombard ratio inside the brackets! (thanks again to Oystein for pointing this out.)
Conclusion
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) 0.5 * Bombard Points
Overall Conclusion
The formulae used by the mil advisor are:
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) + 0.5 * Bombard Points
Army Strength (player 1) = Sigma(1-n) Unit Strength (player 1)
ArmyStrenght(player 1) > (1.2) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (0.8)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.
Addition : Oystein pointed out that everybody starts with 2 mil points no matter what, this is probably meant to avoid division by zero errors. COnsidering a conscript warrior is worth 5 mil points these 2 points will never influence the rating.
This allows you to estimate your opponents strength compared to yours. Also in the start of the game you can make good assumptions what your opponents army consist of as only limited units are available.
Also when you combine this with F11 stats (pop and mil service) that give an indication how many units your opponent has, you can determine 'average strength per unit'which should tell you something about the sort of unit someone is building.