Study of inner workings of Military Advisor

ProPain

King
Joined
Dec 10, 2001
Messages
668
Location
www.civ3duelzone.com
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 and Kemal 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. My suspicion is that hitpoints are also tied in the equasion somewhere. I want to know the intervals that determine if you're army is weak, average or strong as well.
All test are done with C3C 1.15

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) * ArmyStrength (player2) : Player 1 is rated strong
ArmyStrength (player 1) < (1-fraction)* ArmyStrength (player2) : Player 1 is rated weak
In between armies are rated average.

NB: With army I mean the sum of all your forces, not the leader created ones

Logically there can only be one fraction. Different fractions for strong and weak 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, so 1 fraction)

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 don't have a city or settler 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 on 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.



Although it seems jpg is crap for text pics, you can still see the intervals. (edit:replaced by gif)

Conclusions
- Apparently the fraction is 0.2 as the interval for average is between 8 and 12. So that was easy.
- 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. I suspect this is to prevent worker/settler units to count towards your army strength.
- Attack and defense points are not rated equally as they picture has a different pattern for those units. 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.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.

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.



Conclusion
This clearly shows that 15 (0,1,1) units equal 10 (1,0,1) units. Movement doesn't 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.



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 point equals 0.175 defense points.
I think this value is weird but several different tests gave the same result.

Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints + 0.175 * Bombard Points)

Influence of hitpoints
First I tested the hitpoints with ordinary warriors. Compared 10 vets (4hitpoints) to 25 regular warriors(3 hitpoints). Results



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 haven't tested this but I 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 didn't lose any units but he did lose hitpoints. (he compared with a different player than the one he attacked of course!)
2- You're allowed to adjust hitpoints in the editor and so adjust the number of hitpoints associated with rank. Safest way for the military advisor 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.

Conclusion

Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) 0.175 * Bombard Points

Overall Conclusion

The formulae used by the mil advisor are:
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) 0.175 * 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.

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.

Mass upgrades can now provide valueable information on your opponents actual strength provided you do them one by one and note the flip point between weak-average and/or average/strong.

ProPain
 
This is great internal information discovered on the game!
Congrats and thnx for helping everyone understnad the power struggle more clearly ("I can c clearly now!!").

Chaim (the crazy Iwan nago Home).
 
I have also made a study of this:
http://forums.civfanatics.com/showthread.php?postid=1211499#post1211499

Differences:
Generally, my formula is yours multiplied with 2. In this post, I divide by 2 to make it easier to compare our results.

The ratio where the army change from strong to average and from average to weak are 1.25 and 0.8. This is more natural since the product is 1.

The koefficient for bombardment is 0.5. If I divide this by 3, I get a result quite close to yours. Did you forget to divide by the hp of a regular unit after you found out that hp does not mather for bombardment?

Finally, one minor point. The total armystrength is 2 more than the sum of unit strength.
 
Originally posted by Oystein
I have also made a study of this:
http://forums.civfanatics.com/showthread.php?postid=1211499#post1211499

Differences:
Generally, my formula is yours multiplied with 2. In this post, I divide by 2 to make it easier to compare our results.

The ratio where the army change from strong to average and from average to weak are 1.25 and 0.8. This is more natural since the product is 1.
Of course, that makes sense.

The koefficient for bombardment is 0.5. If I divide this by 3, I get a result quite close to yours. Did you forget to divide by the hp of a regular unit after you found out that hp does not mather for bombardment?
:wallbash: Yes I did! and thanks for pointing that out as the 0.175 value was puzzling me. That's what you get when you test it before you test the unfluence of hitpoints.

Finally, one minor point. The total armystrength is 2 more than the sum of unit strength.
Good to know.

Read your thread , wish I'd found it before I started, would have saved me a few hours of doing these test. Thanks for the info!
 
ProPain said:
So 1 bombard point equals 0.175 defense points.
If I'm reading this right, it might explain why the AI is so willing to invade in the indutrial era when I have large stacks of artillery on rails...

This is good stuff. :thumbsup:

Edit: reading oystein's thread too...

So using Oystein's formula (3A+2D)HP+B, a single veteran 6/10 infantry = 152 rating points, and a 12/2/2 Artillery piece =...12 points? So one infantryman=12.67 Artillery pieces?

Am I getting this?
 
I have found evidence that the defensive value for each unit is not just it's defensive value for the unit (IE spearman = 2), but it's the total defensive strength with all modifiers included. (IE spearman in city = 3).

Although I have yet to prove/test it, I beleive 1 warrior fortified in mountains (+125% defence) will show as much stronger than a warrior with no terrain modifiers. using your formula:
Reg warrior
3 hp * (1.5 + 1) = 7.5
Warrior fortified in mountains
3hp * (1.5 + 2.25) = 11.25

Whoops, calc error there... editted to fix it
 
Interesting point. I can't really remember if I tested for fortifying for example, but I'll look into this for sure. Will take a while however as I'm very busy with rl stuff atm.
 
Interesting indeed.
Since it's sure that strength calculation is updated at once when you access F3 (and not once at turn start or similar), you could simply de-fortify units or move defenders out of the city and then observe a change on F3.
That is, if you know that the showing comparison is very close at the edge of (e.g.) average/strong classification limit (I used to recheck F3 multible times during one turn when drafting like mad).
 
or equally if you were say doing a warrior to sword upgrade programme....
 
Has anyone studied how much of an edge in strength the player needs to successfully make demands on a weaker ai?
 
Hmm, I wish that I had seen this work before starting to modify units to make higher technology levels count for more. I am going to have to print this out and do some number crunching of my own to see what affects my changes actually have compared to how the AI compares things.
 
Top Bottom