Unit Efficiency: Geometric Average Method
Posted: 16 May 2007, 00:45
This is not my own work, and this is the premier posting of it. I hope that, eventually, the creator, who has given me permission to post it, will surface to contribute more under his own identity.
It is intended for general use, but may be applicable to Spring.
Unit Efficiency: Geometric Average Method
This article introduces a method for estimating the cost-efficiency of a unit.
Formulae
Efficiency = sqrt(damage per tick * durability) / cost (Eq. 1)
Damage per tick = damage per attack / ticks per attack (Eq. 2)
Durability = hit points (Eq. 3)
Derivation
We begin with a thought experiment. Consider a single unit; say, a single Flash. In combat, the Flash will deal a certain amount of damage every second. Obviously, the more damage the Flash deals per second, the more effective it is. However, we must also consider how long the Flash will be able to deliver this damage output. In a combat situation, this is dependent on how many hit points the Flash has. The longer the Flash survives, the more damage it deals.
From here we can develop a formula to estimate the cost-efficiency of a unit. In the interest of simplicity, we make several approximations:
Total Involvement: All units in combat are always able to attack.
Even Damage Distribution: Damage to a force is distributed so that all units suffer the same percentage of their durability in damage. In other words, all unit types suffer the same casualty percentages at all times.
Damage and Durability Proportionality: As a force suffers damage, its ability to deal damage (hereafter referred to as "firepower") decreases proportionally with the durability they have left.
Now consider what it means to have two equal forces, A and B, subject to the above approximations. We define some variables:
A and B are the proportions of the inital forces A and B remaining.
Adpt and Bdpt is the damage per tick that A and B deal when at full strength.
Adur and Bdur is the durability that A and B possess at full strength.
t is time.
When the two forces meet in combat, each of them will lose durability at a certain rate; by our approximations, this will likewise reduce their firepower. Therefore, if after some time one force loses a lesser proportion of their starting force, they will have also lost a lesser proportion of their firepower. As such, they will both lose less of their strength in the remainder of the combat and be more effective at reducing their enemy's strength and will prevail. As such, for two equal forces, both will reduce the other's proportionate durability at the same rate. That is,
dA/dt = dB/dt (Eq. 4a)
and since both A and B start at 1 (full strength),
A = B (Eq. 4b)
The proportional reduction of each force with time is how much damage they suffer per time divided by their durability. As such,
dA/dt = - Bdpt * B / Adur (Eq. 5a)
dB/dt = - Adpt * A / Bdur (Eq. 5b)
But these are equal, so
Adpt * A / Bdur = Bdpt * B / Adur
=> Adpt * A * Adur = Bdpt * B * Bdur
=> Adpt * Adur = Bdpt * Bdur (Eq. 6)
This fits the intuitive sense we developed in the thought experiment at the beginning of this derivation. The dpt of a force times its durability describes how powerful it is. We define this quantity as the power squared, for reasons which shall soon become apparent.
We must now relate this to the cost of a force. Suppose we have some force A subject to the above approximations with cost C and power P. Suppose we construct a second force B of the same unit types, but b times as large. The cost is now bC. Since there are twice as many units, the dpt is scaled by b, as is the durability. The power squared is then b^2 * P^2 = (bP)^2. An invariant quantity in the transformation from A to B is the power squared over the cost squared, since P^2 / C^2 = (bP)^2 / (bC)^2. This invariance is good, since efficiency should be something independent of how large a force is (an intensive quantity, as it were). However, it is more useful to have something inversely proportional to the cost, so we take the square root of these expressions, which yields
E = P / C (Eq. 6)
Efficiency = Power / Cost
In this case, as defined above,
Power = sqrt(dpt * durability) (Eq. 7)
Whence we arrive at Equation 1,
Efficiency = sqrt(dpt * durability) / cost (Eq. 1)
Note that this is the geometric average of two parameters divided by the cost. The single parameter case is simply the parameter divided by the cost, for example, worker time / cost.
Ideal Versus Non-Ideal
Of course, this formula is only as good as its approximations. We consider each of the approximations in turn:
Total Involvement: The major non-ideal factors here are range and mobility (speed, slope tolerance, etc.). A unit with a range advantage will be able to fire on the enemy without taking return fire. Meanwhile, a mobility advantage will offset this effect, and also allow more control of local force superiority. Therefore, this formula is best used for comparing units with similar ranges and mobility, or comparing the ranges and mobility of units with similar efficiencies.
Other non-ideal factors include ability to fire over obstacles, and targeting AI.
Even Damage Distribution: This is perhaps the approximation most directly affected by the human factor. Generally, one will want to first attack units that have high firepower but poor durability, such as artillery. At the same time, one will generally try to protect such assets. Victory should, of course, go to the more skilled player. The relevant question, then, is whether it is generally easier for the attacker or the defender to select the target of an attack. Usually this advantage will lie with the attacker.
Damage and Durability Proportionality: This approximation tends to be well-fulfilled in practice, due to the large number of units involved in most games of Spring. The amount of firepower one has is proportional to the number of units one has left.
Each of the variables in the formula also has some subtleties attached to it. Some factors to consider:
Damage per Tick: Splash damage, special damage against certain types of units, accuracy.
Durability: Resistance or vulnerability to certain attack types, armor.
Cost: What the relevant cost is (e.g., time, metal, energy).
Miscellaneous: Other abilities, psychological factors, factory cost, unit AI, synergy with other units.
Case Study: Warcraft III Melee Units
As a demonstration of the effectiveness of this formula, we apply it to the melee units of Warcraft III. We use hit points * (1 + 0.06 * armor) as the durability due to how armor works in Warcraft III, gold as the relevant cost.
The number before the slash is the unupgraded efficiency, the number after the fully upgraded efficiency. Stats taken from Mojo StormStout's Strategy Guide.
Alliance Footman (T1): 0.4889 / 0.6554
Alliance Knight (T3): 0.6113 / 0.8523
Orc Grunt (T1): 0.4755 / 0.7297
Orc Raider (T2): 0.5193 / 0.7010
Orc Tauren (T3): 0.5830 / 0.7777 (0.8980)*
Undead Ghoul (T1): 0.4859 / 0.7351
Undead Abomination (T2): 0.6579 / 0.8733
Night Elf Huntress (T1): 0.4085 / 0.5463 (0.5004 / 0.7225)**
Night Elf Druid of the Claw (T3): 0.6511 / 0.8440
*The Orc Tauren can get a special ability, Pulverize, that deals 60 extra points of splash damage on 25% of attacks. The number in parentheses is the result of the formula with 15 points of extra damage. The splash effect, of course, makes this much more impressive than this in practice.
**The Night Elf Huntress has a bouncing attack that can affect multiple units. The value in parentheses takes this into account, assuming the maximum number of bounces are made.
Note how all the unupgraded tier 1 efficiencies are quite close together; indeed, the lowest differs from the highest by less than 5%. Even when fully upgraded, their efficiencies are very close together, with the exception of the Footman, which is the only one of the four not to get a significant attack or hit point upgrade beyond standard attack and armor upgrades. There is a definite trend toward higher efficiencies as one moves to higher tiers. At the top tech end of the upgrade scale, the Alliance Knight and the Undead Abomination have the highest efficiencies; however, they are also the units with the least powerful abilities outside of the formula. The Orc Tauren gets Pulverize, as above, and the Druid of the Claw is also a part-time spellcaster. The speed of the Alliance Knight and the Disease Cloud and Cannibalize of the Undead Abomination, while useful, pale in comparison to these abilities.
It is intended for general use, but may be applicable to Spring.
Unit Efficiency: Geometric Average Method
This article introduces a method for estimating the cost-efficiency of a unit.
Formulae
Efficiency = sqrt(damage per tick * durability) / cost (Eq. 1)
Damage per tick = damage per attack / ticks per attack (Eq. 2)
Durability = hit points (Eq. 3)
Derivation
We begin with a thought experiment. Consider a single unit; say, a single Flash. In combat, the Flash will deal a certain amount of damage every second. Obviously, the more damage the Flash deals per second, the more effective it is. However, we must also consider how long the Flash will be able to deliver this damage output. In a combat situation, this is dependent on how many hit points the Flash has. The longer the Flash survives, the more damage it deals.
From here we can develop a formula to estimate the cost-efficiency of a unit. In the interest of simplicity, we make several approximations:
Total Involvement: All units in combat are always able to attack.
Even Damage Distribution: Damage to a force is distributed so that all units suffer the same percentage of their durability in damage. In other words, all unit types suffer the same casualty percentages at all times.
Damage and Durability Proportionality: As a force suffers damage, its ability to deal damage (hereafter referred to as "firepower") decreases proportionally with the durability they have left.
Now consider what it means to have two equal forces, A and B, subject to the above approximations. We define some variables:
A and B are the proportions of the inital forces A and B remaining.
Adpt and Bdpt is the damage per tick that A and B deal when at full strength.
Adur and Bdur is the durability that A and B possess at full strength.
t is time.
When the two forces meet in combat, each of them will lose durability at a certain rate; by our approximations, this will likewise reduce their firepower. Therefore, if after some time one force loses a lesser proportion of their starting force, they will have also lost a lesser proportion of their firepower. As such, they will both lose less of their strength in the remainder of the combat and be more effective at reducing their enemy's strength and will prevail. As such, for two equal forces, both will reduce the other's proportionate durability at the same rate. That is,
dA/dt = dB/dt (Eq. 4a)
and since both A and B start at 1 (full strength),
A = B (Eq. 4b)
The proportional reduction of each force with time is how much damage they suffer per time divided by their durability. As such,
dA/dt = - Bdpt * B / Adur (Eq. 5a)
dB/dt = - Adpt * A / Bdur (Eq. 5b)
But these are equal, so
Adpt * A / Bdur = Bdpt * B / Adur
=> Adpt * A * Adur = Bdpt * B * Bdur
=> Adpt * Adur = Bdpt * Bdur (Eq. 6)
This fits the intuitive sense we developed in the thought experiment at the beginning of this derivation. The dpt of a force times its durability describes how powerful it is. We define this quantity as the power squared, for reasons which shall soon become apparent.
We must now relate this to the cost of a force. Suppose we have some force A subject to the above approximations with cost C and power P. Suppose we construct a second force B of the same unit types, but b times as large. The cost is now bC. Since there are twice as many units, the dpt is scaled by b, as is the durability. The power squared is then b^2 * P^2 = (bP)^2. An invariant quantity in the transformation from A to B is the power squared over the cost squared, since P^2 / C^2 = (bP)^2 / (bC)^2. This invariance is good, since efficiency should be something independent of how large a force is (an intensive quantity, as it were). However, it is more useful to have something inversely proportional to the cost, so we take the square root of these expressions, which yields
E = P / C (Eq. 6)
Efficiency = Power / Cost
In this case, as defined above,
Power = sqrt(dpt * durability) (Eq. 7)
Whence we arrive at Equation 1,
Efficiency = sqrt(dpt * durability) / cost (Eq. 1)
Note that this is the geometric average of two parameters divided by the cost. The single parameter case is simply the parameter divided by the cost, for example, worker time / cost.
Ideal Versus Non-Ideal
Of course, this formula is only as good as its approximations. We consider each of the approximations in turn:
Total Involvement: The major non-ideal factors here are range and mobility (speed, slope tolerance, etc.). A unit with a range advantage will be able to fire on the enemy without taking return fire. Meanwhile, a mobility advantage will offset this effect, and also allow more control of local force superiority. Therefore, this formula is best used for comparing units with similar ranges and mobility, or comparing the ranges and mobility of units with similar efficiencies.
Other non-ideal factors include ability to fire over obstacles, and targeting AI.
Even Damage Distribution: This is perhaps the approximation most directly affected by the human factor. Generally, one will want to first attack units that have high firepower but poor durability, such as artillery. At the same time, one will generally try to protect such assets. Victory should, of course, go to the more skilled player. The relevant question, then, is whether it is generally easier for the attacker or the defender to select the target of an attack. Usually this advantage will lie with the attacker.
Damage and Durability Proportionality: This approximation tends to be well-fulfilled in practice, due to the large number of units involved in most games of Spring. The amount of firepower one has is proportional to the number of units one has left.
Each of the variables in the formula also has some subtleties attached to it. Some factors to consider:
Damage per Tick: Splash damage, special damage against certain types of units, accuracy.
Durability: Resistance or vulnerability to certain attack types, armor.
Cost: What the relevant cost is (e.g., time, metal, energy).
Miscellaneous: Other abilities, psychological factors, factory cost, unit AI, synergy with other units.
Case Study: Warcraft III Melee Units
As a demonstration of the effectiveness of this formula, we apply it to the melee units of Warcraft III. We use hit points * (1 + 0.06 * armor) as the durability due to how armor works in Warcraft III, gold as the relevant cost.
The number before the slash is the unupgraded efficiency, the number after the fully upgraded efficiency. Stats taken from Mojo StormStout's Strategy Guide.
Alliance Footman (T1): 0.4889 / 0.6554
Alliance Knight (T3): 0.6113 / 0.8523
Orc Grunt (T1): 0.4755 / 0.7297
Orc Raider (T2): 0.5193 / 0.7010
Orc Tauren (T3): 0.5830 / 0.7777 (0.8980)*
Undead Ghoul (T1): 0.4859 / 0.7351
Undead Abomination (T2): 0.6579 / 0.8733
Night Elf Huntress (T1): 0.4085 / 0.5463 (0.5004 / 0.7225)**
Night Elf Druid of the Claw (T3): 0.6511 / 0.8440
*The Orc Tauren can get a special ability, Pulverize, that deals 60 extra points of splash damage on 25% of attacks. The number in parentheses is the result of the formula with 15 points of extra damage. The splash effect, of course, makes this much more impressive than this in practice.
**The Night Elf Huntress has a bouncing attack that can affect multiple units. The value in parentheses takes this into account, assuming the maximum number of bounces are made.
Note how all the unupgraded tier 1 efficiencies are quite close together; indeed, the lowest differs from the highest by less than 5%. Even when fully upgraded, their efficiencies are very close together, with the exception of the Footman, which is the only one of the four not to get a significant attack or hit point upgrade beyond standard attack and armor upgrades. There is a definite trend toward higher efficiencies as one moves to higher tiers. At the top tech end of the upgrade scale, the Alliance Knight and the Undead Abomination have the highest efficiencies; however, they are also the units with the least powerful abilities outside of the formula. The Orc Tauren gets Pulverize, as above, and the Druid of the Claw is also a part-time spellcaster. The speed of the Alliance Knight and the Disease Cloud and Cannibalize of the Undead Abomination, while useful, pale in comparison to these abilities.