PDA

View Full Version : Inner workings of the military advisor (F3 screen)


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.

digger760
30-03-2004, 22:39
looks like attack value of a unit has more wieghting than the defense.

EDIT:bah you edited the rest of the post after my comment..now it just looks stupid :(

ProPain's comment: Not meant to make you look stupid but a safety measure. More than once I have started making a long post to have the forum/comp crash halfway and losing all info. So now I post in parts to prevent losses.

ProPain
30-03-2004, 22:47
Yes, Topic still under construction (tests done now writing it up) so in 15 mins I'll reveal the 'secrets'on that :D

Socrates
30-03-2004, 23:25
Blah, in my game against Skyfish, I just saw the advisor saying I was weak all of a sudden (after being stronger), and then I knew I was doomed. [}:)] The guy had upgraded tons of chariots to mounties !!!

Seriously, very nice testing !! [thumbsup] I'll refer to that when I'll encounter a sensible point in one of my games (I can start right now with my game against Killer).

ProPain
30-03-2004, 23:35
Also when you do a mass upgrade you may have an opportunity to learn your opponents army strenght. If you upgrade 1 by 1 (assuming your not strong already) you can determine weak to average point (0,8 times strength) and/or average to strong point (1,2 times strength)

If you're strong you can disband units and get the same effect. You probably wanna save your game before doing this [lol]

Socrates
30-03-2004, 23:49
Mmmh, this is cheating, I hope no one heard you... You're an admin of this site... WILL YOU ALLOW CHEATING HERE ??? [cry] [cry] [cry]

digger760
31-03-2004, 08:13
I see nothing wrong with this:

quote:Originally posted by ProPain


Also when you do a mass upgrade you may have an opportunity to learn your opponents army strenght. If you upgrade 1 by 1 (assuming your not strong already) you can determine weak to average point (0,8 times strength) and/or average to strong point (1,2 times strength)


The following is cheating....but the laughing smiley at the end tells me that ProPain was joking.
quote:Originally posted by ProPain


If you're strong you can disband units and get the same effect. You probably wanna save your game before doing this [lol]

ProPain
31-03-2004, 12:26
My 2 cents.

Upgrading one by one is not cheating imo. It's tedious and boring, like counting culture or land tiles used to be before the c3c f8 screen, but everybody can do it.

However I wouldn't say disbanding units is cheating. It's not much different from taking all your citizens from working tiles to exactly discern other players f11 stats. And I hear no one complain when people take an old save and do f11 analysis. This isnt that much different. But I can also comprehend when people do consider thsi an unfair method.

So I'd say people should agree wether they wanna allow this or not per game they play.

Markstar
31-03-2004, 12:35
Nice job on the article!!! [goodjob]

It really makes me wonder why they would rate the attack value higher than defense. After all, in a certain (and not so low) percentage you get a bonus on the defense (terrain, fortified, etc), so imho it should be the other way around. [???]

Kemal
31-03-2004, 12:41
Excellent work on finding this out pp, it's good to finally have some more insight on how the military advisor does his job! [thumbsup]

However, I can't fully agree with your comparison about the F11 statistics and the disbanding of units you make:

quote:Originally posted by ProPain



However I wouldn't say disbanding units is cheating. It's not much different from taking all your citizens from working tiles to exactly discern other players f11 stats. And I hear no one complain when people take an old save and do f11 analysis. This isnt that much different. But I can also comprehend when people do consider thsi an unfair method.

So I'd say people should agree wether they wanna allow this or not per game they play.



This is because I feel that there is a significant difference between these two actions IMO. While both serve to get more detailed info on your rival, the removing and shifting of city labourers does not have any permanent effect on your own empire, while disbanding units from your own military has.
The big difference is that this means that the f11 tests don't really need the game to be saved and reloaded, since you can easily reposition your workers to the correct positions again without reloading, while it's not possible to revive disbanded units again.
The reason old saves are used for the f11 statistics is because it can take immense amounts of time to check all categories, which is not a good idea if you want games to progress on a decent pace.

I guess in the end it is, like you say, something that should be agreed upon by both players before starting the game, if both use it it seems fine with me, I wouldn't really want to call it cheating since it does in no way alter outcomes in game results, it just is a method for both players to get more info on a specific topic, military strengths.

Beam
31-03-2004, 13:05
That is some great analysis PP! Did you also plan to find a relation with the powergraph in F8? On more than one occasion I found that while being weak in F3 my powergraph in F8 looked very healthy.

On the cheating: any means of getting information by irreversably changing the state of the game, then reloading in the original state is cheating. Compare investigate cities, moving units to see terrain while losing movement points.

Matrix
06-04-2004, 21:50
Wauw. Superb job, ProPain! [goodjob]

ProPain
06-04-2004, 22:08
Turned out Oystein did a similar research on CFC, I looked for this on CFC but apparently missed it. He had some good remarks and improvements I need to add.

yndy
07-04-2004, 05:19
Yeah, I remembered his article, but yours seems more clear. Don't know why, maybe newer?

Hygro
23-04-2004, 02:58
This is really valuable information. Thanks, guys.

ProPain
23-04-2004, 10:28
Made 2 adjustments and 1 addition after I got some very good feedback from Oystein.

- adjusted interval that determines weak vs strong
- adjusted bombard ratio
- added 2 starting points

Socrates
29-04-2004, 18:36
I'm trying to understand the conclusion, but something bugs me.

First :
Units Strength (player 1) = Hitpoints * (1.5* AttackPoints + 1 * DefensePoints ) 0.5 * Bombard Points
Is there a "+" before "0.5" ?

Second :
Army Strength (player 1) = Sigma(1-n) Unit Strength (player 1)
What is "Sigma(1-n)" ? I can't find its explanation, and BTW is it multiplied by "Unit Strength" ?

After knowing this, I think I'll start to make little calculations in my games, just for fun. [evil]

col
29-04-2004, 19:20
I'd guess Sigma (1-n) means add up all the individual unit strengths to find the total army strength.

Socrates
29-04-2004, 19:45
LOL. Thanks col ! I could only think of the little sigma letter, which didn't help me. I don't know why it didn't occur to me that this sigma was the capital letter for the math sum... OK, and if you can put "+" where I said, or maybe I didn't understand it either ?

ProPain
29-04-2004, 20:58
Beam is right on sigma. Capital sigma is not available in the original greek form, so I solved it this way.

And yes, there's a + missing.

Aggie
23-05-2004, 09:06
In a SG we notice that we have an average army compared to a civ according to F3, but the diplo screen (via F4) says we are weaker. Do you have an explanation for that/did you research that?

ProPain
23-05-2004, 15:33
Never looked at it intensively. Not quite sure about f4 comments, arent they about no. of units only?

If you can post me the save I can take a look at it. Interesting to see what's the matter and if is possible narrowing down army strength intervals using both advisors.

Aggie
23-05-2004, 15:39
Here it is. The army compared to the Byzantines is the strange one. But IIRC the same goes for Portugal:

Download Attachment: icon_paperclip.gif AG8Sid800AD.zip (http://www.civ3duelzone.com/forum/uploaded/Aggie/2004523153716_AG8Sid800AD.zip)