So there is a problem with the power meter -- it doesn't reflect ability to fight wars that well.
After some investigation, it appears that the amount a unit contributes to Power is determined by the iPower stat in the XML file. BetterAI doesn't change XML by policy.
However, this value is pushed through here:
So we can do transformations of the XML power value in-code.
To give an idea how bad it is: (land units)
Warrior: 1
Archer: 2
Spearman: 2
Charoit: 2
Axeman: 3
Horse Archer: 3
Catapult: 3
Longbow: 4
Crossbow: 4
Elephant: 4
Trech: 4
Maceman: 5
Pikeman: 6
Musketman: 6
Knight: 6
Cannon: 8
Rifleman: 10
Gernader: 10
Machine Gun: 10
Cavalry: 12
Infantry: 16
Marine: 18
SAM Infantry: 20
Artillery: 20
Gunship: 20
Tank: 25
Mech. Inf: 30
Modern Armor: 40
This is (basically) linear in unit Combat.
But unit power isn't linear in Combat -- higher Combat both increases damage done and increases chance to do damage.
I've run the numbers before, and the power gain from higher Combat is roughly quadratic --ie, a strength 20 unit is worth about 4 strength 10 units in a knock-down last-unit-standing brawl. In a skirmish, the strength 20 unit is even better.
Given that existing unit power is roughly linear in Combat Strength, if we square the value we'll get a better approximation of actual Power.
The issue remaining is that Power is added to other factors (like technology, buildings, etc) to create a total Power statistic.
We can't just square everything, sadly.
But if we can create a more accurate Power statistic, this will generate better AI performance -- the AI with a swarm of crappy units won't think it is more powerful than the high-tech civilization next to it. And the AI with a tech advantage will quite rightly figure out it can crush the low-tech civilization next to it...
After some investigation, it appears that the amount a unit contributes to Power is determined by the iPower stat in the XML file. BetterAI doesn't change XML by policy.
However, this value is pushed through here:
Code:
int CvUnitInfo::getPowerValue() const
{
return m_iPowerValue;
}
So we can do transformations of the XML power value in-code.
To give an idea how bad it is: (land units)
Warrior: 1
Archer: 2
Spearman: 2
Charoit: 2
Axeman: 3
Horse Archer: 3
Catapult: 3
Longbow: 4
Crossbow: 4
Elephant: 4
Trech: 4
Maceman: 5
Pikeman: 6
Musketman: 6
Knight: 6
Cannon: 8
Rifleman: 10
Gernader: 10
Machine Gun: 10
Cavalry: 12
Infantry: 16
Marine: 18
SAM Infantry: 20
Artillery: 20
Gunship: 20
Tank: 25
Mech. Inf: 30
Modern Armor: 40
This is (basically) linear in unit Combat.
But unit power isn't linear in Combat -- higher Combat both increases damage done and increases chance to do damage.
I've run the numbers before, and the power gain from higher Combat is roughly quadratic --ie, a strength 20 unit is worth about 4 strength 10 units in a knock-down last-unit-standing brawl. In a skirmish, the strength 20 unit is even better.
Given that existing unit power is roughly linear in Combat Strength, if we square the value we'll get a better approximation of actual Power.
The issue remaining is that Power is added to other factors (like technology, buildings, etc) to create a total Power statistic.
We can't just square everything, sadly.
But if we can create a more accurate Power statistic, this will generate better AI performance -- the AI with a swarm of crappy units won't think it is more powerful than the high-tech civilization next to it. And the AI with a tech advantage will quite rightly figure out it can crush the low-tech civilization next to it...