Mathematical Balancing
What is Mathematical Balancing?
Mathematical balancing is the use of mathematical formulas to aid in the balancing of units. It is a tool to help answer the question, "How expensive should this unit be?" or "How powerful should this unit be at this cost?" On the flip side, if you are a player, you can use it to try to find and exploit overpowered units.
Cons
Given the vast number of variables that a unit possesses, not to mentions their interactions with other units and with the players that control and fight against them, there is no feasible all-encompassing mathematical model that can be used as the sole source of balance other than the game itself (which is a mathematical simulation). Furthermore, the proof of a game is in the play--no matter what the mathematical model says, if it doesn't happen in play, or if it's not fun, it is wrong.
Pros
While mathematical models may be unable to account for every variable, they can be a useful supplement to playtesting. Indeed, they offer several things that cannot be matched by playtesting:
- Speed. With a formula, you can evaluate large groups of units quickly, whereas playtesting takes a long time, particularly with traditionally underused units.
- Bias. While mathematical models are certainly prone to their own sort of bias if you are not careful (among them, assuming that your model is more accurate than it is), they often do not suffer from the same types of bias that may result from playtesting.
- New units. At some point every unit was new and not playtested yet. At this point, you must rely entirely on mathematical balancing.
Elements of a Good Mathematical Model
- Clear assumptions. A mathematical model should make clear what assumptions it holds, so that you know whether it is likely to give an accurate prediction in a particular case, and if not, what sort of inaccuracies the model may have.
- Well-chosen assumptions. If you choose a strict set of assumptions, you can often arrive at an appropriate model more easily--however, the stricter your assumptions, the narrower the range of units and situations where it will be accurate. Likewise, if you choose a looser set of assumptions, your model will be accurate over a larger range, but coming up with the model will be more difficult. Choosing the right assumptions will lead to a better tradeoff between accuracy and tractability.
- Specific results. Likewise, the results of a mathematical model should mean something very specific (how well this relates to actual gameplay is another matter). You should know exactly what a particular model says about a unit, and just as importantly, what it doesn't say.
- Determinism. A mathematical model should give a definite answer, regardless of who is running it. The interpretation of the results is open to debate, but the raw results should not be.
Using Mathematical Models
- A particular model will cover some qualities of a unit, while ignoring others. However, it is not enough to simply consider these two categories; you must also consider the interactions within each and between them.
- One way to use a mathematical model is to compare two units. This works best when the units are similar in the areas not covered by the model. However, even if the units differ beyond the scope of the model, if the model tells you that one unit is superior inside the model, and you estimate that the same unit is superior in the areas outside the model, then this is a sign that the unit may be overpowered compared to the other.
- Another way is to choose a model that gives a good approximation of a unit's ability at a particular task, and apply it to every unit.
A List of Mathematical Models
Tools
The csv.lua include of CAEdit is useful for mass extraction of unit statistics. I'll try to add some clearer comments on its use.
source:trunk/tools/SpringModEdit/include/csv.lua
Discussion
Licho: regarding kingraptors excel- I dont think this is good idea. It's the very idea Tired used and it just cannot work. Tbh Im only interested int stats/metadata about units. But since even DPS is impossible to determine using data in unitdefs, obviously its use is going to be limited..
There isnt even any clear ratio between energy and metal (you cannot say that energy is 100x cheaper than metal etc), its all too complex and obviously real "benefit" of unit changes through the game so does the real "cost" too - knowing real benefits and costs of unit is what makes good strategy :) (What I mean changing - for example early on flea has huge benefit - it can cripple enemy, but later its benefit is decreased. If you stall energy, relative cost of aircrafts increase, if you are flooded with e relative cost of aircrafts decrease - etc..)
Equalizing cost by some formula which only looks at few inaccurate stats will just make the game more unbalanced imo (because obviously it will give higher improtance to some type of unit over another). You cannot even compare builders reliably, unless you take into account complex stuff like terrain which can handle, time needed to open nanospray, size, probability of getting stuck etc .. :) By running it through some equations you will only neglect some aspects and give greater value on other aspects.
Evil4Zerggin: Nobody (I hope) is saying that we should come up with a mathematical model and mindlessly price all units according to it. However, I think it is still a useful tool, even if it cannot account for all variables. To take the builder comparison, suppose we find that one builder gives more worker time than another for its cost. If that builder is weaker in other attributes, then yes, the calculation doesn't really tell us much--sure, the builder gives more worker time per cost, but it has other weaknesses that may or may not make up for it. But if the builder is also stronger in other attributes, then we can suspect the builder of being OP compared to the other--it gives more worker time per cost, and it is faster, has a better buildlist, is more versatile, or what have you.
Saktoth: Having a formula that takes a huge amount of data, and outputs just a 'suggested cost' at the end is fine. It gives us something quite clear that we can look at at a number and compare it to our current balance. Having more precise variables like an accuracy based on weapon velocity, accel, traverse etc, and a difficulty to hit based on hitsphere size, speed, manouverability etc is good too, but having a final 'suggested cost' is helpful. Hell, the Unit Help already does this for some variables! (If we could output those values it'd be a start). As for DPS etc being 'impossible to determine', since getting rid of min intensity and flank bonus makes it relatively accurate for most weapons.
KingRaptor: Eh, I just wanted to make something more complex than the ad hoc models being suggested now - maybe my idea really is too complex to work (even though I meant it to be used specifically for combat units, and gave it a lot of fudge room). Perhaps it would be more effective to simply have the spreadsheet compare unit stats and let a human analyze the relative balance of the units? Anyway, play experience should always take precedence over mathematical models.
Attachments
-
cabalancer.xls
(42.0 KB) - added by KingRaptor
3 years ago.
A redesigned balance spreadsheet.