BV to Weight Analysis

Introduction

The goal of this analysis is to find a relatively simple equation to describe the predicted BV of a unit by its weight (i.e. tonnage) and unit type. This will allow us to create a “generic” BV for each entity based on a simple equation. This generic BV can be used for balancing forces when you don’t want features of unit or pilot quality to determine that balance.

For the analysis, we downloaded information on all units from the current MegaMek database using existing Java features. we combined some unit types together for ease of analysis:

  • All mech types were combined togethe, including lams and tripod mechs into a single Mech category.
  • Superheavy Tanks were combined with Tanks.
  • Large Support Tanks were combined with Support Tanks.

For the actual analysis, we split unit types into grouops of Combat, Support, and Large Craft for ease of analysis.

We considered two basic models for predicting BV. First we considered a linear model:

\[\hat{bv}_i = \beta_0+\beta_1(weight_i)\]

This model predicts BV as a linear function of weight for all units of the same type. The slope (\(\beta_1\)) tells us the expected increase in BV for a one ton increase in weight. The intercept (\(\beta_0\)) is the predicted BV when weight is zero - its not a meaningful value in this case, but gives us a starting point for the estimation.

We also considered an “elasticity” model:

\[\log(\hat{bv}_i) = \beta_0+\beta_1*log(weight_i)\] In this model, we take the natural log of both the dependent and independent variable. The slope (\(\beta_1\)) in this model can be directly interpreted as the percent change in BV for a one percent increase in tonnage. In short, the model estimates relative change on relative change rather than absolute change on absolute change. The model is more complex but can often fit this kind of data better (as we will show below).

Combat Units

We focus first on all of the ground combat units, as these are the most likely to need to be randomly generated. Figure 1 shows a scatterplot of weight to BV for every unit, separately by combat unit type. The blue lines indicate the fit of a linear model, while the red lines are LOESS smoothed lines which can detect non-linear relationships.

Figure 1: Linear fit of weight to BV for all combat unit types. Blue line shows the linear fit and the red line shows a smoothed line.

A linear fit works pretty well for most of the units in Figure 1. The two biggest discrepancies are the diminishing returns shape at very high tonnages for mechs and the very non-linear relationship for infantry. The mech issue is likely a result of a single non-canonical 200-ton “Orca” mech that was part of an April Fool’s joke. The infantry issue is a more difficult issue. Most infantry units have very little weight and so they are concentrated at the lower left of the figure, but we see a spike around 50 tons. This is largely for field gunner units which are both much heavier and more effective. The few dots in the 150-ton range are beast-mounted infantry.

Figure 2 provides a similar structure, but on this figure both the x and y axis have been log-scaled. Thus the “linear” fit on these models actually represents the fit of an elasticity model. The fit of this model is very good across all units. Most notably, these transformations largely fixed the problem of nonlinearity for infantry units. We do now observe a slight bit of nonlinearity for Mechs in the low tonnage range, but this is for a very small set of industrial mech units.

Figure 2: Fit of weight to BV for all combat unit types using a log-scale on both axes. Blue line shows the linear fit and the red line shows a smoothed line.

To get a sense of how these models compare, we fit each type of model to each unit type. The results are shown in Table 1 for the linear models, and Table 2 for the elasticity models.

Table 1: Linear models predicting unit BV by its weight for all combat unit types.
Mech Aerospace fighter Battlearmor Conventional Fighter  Infantry ProtoMech Tank  VTOL
Intercept 351.09 304.67 −100.90 20.82 67.11 −12.95 129.52 11.29
Tonnage 21.42 23.56 86.46 9.29 2.07 38.03 14.91 21.68
Num.Obs. 4139 501 1188 46 407 86 1081 130
R2 0.544 0.483 0.149 0.555 0.216 0.874 0.628 0.283
Table 2: Elasticity models predicting unit BV by its weight for all combat unit types.
Mech Aerospace fighter Battlearmor Conventional Fighter  Infantry ProtoMech Tank  VTOL
Intercept 3.729 3.729 3.157 2.943 3.586 3.385 2.866 2.366
log(weight) 0.889 0.898 1.514 0.795 0.336 1.093 0.987 1.177
Num.Obs. 4139 501 1188 46 407 86 1081 130
R2 0.563 0.539 0.139 0.546 0.263 0.909 0.732 0.446

For all groups, the goodness of fit measure (R2) is either better or effectively the same for the elasticity model in comparison to the linear model In combination with its ability to fix the nonlinearity problem for infantry, these results would strongly recommend the use of an elasticity model to generate generic BV.

The goodness of fit does vary substantially across unit types in both models. While this is perhaps not ideal, it doesn’t necessarily represent an underlying problem with the models. Rather, it indicates that generic BV matching will result in more actual BV variation for those unit types.

Support Units

Figure 3 and Figure 4 plot the same figures as above but for support units.

Figure 3: Linear fit of weight to BV for all support unit types. Blue line shows the linear fit and the red line shows a smoothed line.
Figure 4: Fit of weight to BV for all support unit types using a log-scale on both axes. Blue line shows the linear fit and the red line shows a smoothed line.

Because we have far fewer units in these classes and they are not necessarily optimized for combat, we get a bit more noisinees in our smoothing measures. However, for both the linear and elasticity case we get decent fits. The elasticity fit seems to improve our model substantially for support tanks in particular.

Table 3 and @btl-model-elasticity-support provide tables analogous to the tables above for combat units. In all four cases, an elasticity model substantially improves fit.

Table 3: Linear models predicting unit BV by its weight for all support unit types.
Fixed Wing Support Small Craft Support Tank  Support VTOL
Intercept −48.37 −509.09 69.50 57.91
Tonnage 3.57 12.75 3.07 2.84
Num.Obs. 33 39 193 24
R2 0.180 0.471 0.534 0.246
Table 4: Elasticity models predicting unit BV by its weight for all support unit types.
Fixed Wing Support Small Craft Support Tank  Support VTOL
Intercept 1.250 −0.068 2.681 3.336
log(weight) 0.886 1.421 0.681 0.451
Num.Obs. 33 39 193 24
R2 0.401 0.817 0.806 0.568

Large Craft

Figure 5 and Figure 6 provide figures analogous to those above but for large craft. The dropshp and space station fits are particularly poor here. The space station is poor because of very few points and one massive outlier. The dropship data also has a couple of outliers that throw off the results. Switching to an elasticity model, however, improves the fit substantially in both cases.

Figure 5: Linear fit of weight to BV for all large craft unit types. Blue line shows the linear fit and the red line shows a smoothed line.
Figure 6: Fit of weight to BV for all large craft unit types using a log-scale on both axes. Blue line shows the linear fit and the red line shows a smoothed line.

Table 5 and Table 6 show tables analogous to those above but for large craft. For Jumpships and Warships we get substantially better fits with the elasticity model. The space station case is the only case of any unit types where the elasticity model actually performs worse. However, given the sparsity of data here, we don’t think randomly generating space stations makes much sense anyway.

Table 5: Linear models predicting unit BV by its weight for all large craft unit types.
DropShip JumpShip Space Station WarShip
Intercept 7778.178 487.905 −13554.652 33275.204
Tonnage 0.173 0.003 0.119 0.086
Num.Obs. 209 29 33 123
R2 0.066 0.109 0.397 0.347
Table 6: Elasticity models predicting unit BV by its weight for all large craft unit types.
DropShip JumpShip Space Station WarShip
Intercept 6.5266 0.0619 5.1322 −1.3484
log(weight) 0.2497 0.5607 0.2384 0.9382
Num.Obs. 209 29 33 123
R2 0.065 0.286 0.129 0.515

Interestingly, the R2 values are the lowest for dropships. This suggests that regardless of method dropship generation via generic BV will create a high level of variability.

Gun Emplacements

Gun emplacements need to be handled differently as they currently have no weight. In general, gun emplacements need reworking for many things including balance. For now, we will just use the mean weight of gun emplacements as a static generic BV.

[1] 205.486

Conclusions

Overall, the results here indicate that we should use an elasticity model for all cases. This improved fit, sometimes substantially, for most units and did not noticeably produce any poor fits.