Alright, so there were many questions and speculations about how Elvenar Spire squad size(s) are calculated. As far as I can tell, the calculation was never disclosed, except for statements that many different things have an impact on that – including total AW levels. But what is *the *formula? We’ve done a few modeling rounds, and are very close already in most cases. But with extra data we can now refine some of the model parameters even further. So today, we update to Model v4.1…

#### * – * – *

##### Previous Work

As I mentioned, we’ve done several modeling rounds already, and a lot of information there is still very much relevant. To avoid copy/pasting ad infinitum, I’ll list previous work here, and may refer to it throughout the text. You almost certainly want to read it beforehand if you haven’t read it already.

- Is here mostly for historical reasons; explains some basics and provides a limited model for the end-of-chapter-15 cities (end-game at the time)

- Our last formula so far, still only for the end-of-chapter-15 cities

Model v2.1

Model v2.1 – Expansions

Model v2.1 – Ancient Wonders

Model v2.1 – Research

Model v2.1 – Misc

- Model v2.1 changes direction of analysis, and effectively lays foundation to Model v3.0. It looks at factors that we deem important for the calculation, and those components are still the same ones that we use in Model v3.0.
- Model v2.1 didn’t provide a specific formula for the Spire squad size, but most of the information and underlying analysis there are still relevant. If you want to understand how Model v3.0 came to be, you definitely want to read up on Model v2.1.

- Model v3.0 was our first general-purpose model, i.e. applicable to any city. Being a pure regression model it was pretty accurate, but the form was quite ugly, and it didn’t cover certain aspects of real-life behavior of Spire squad size (e.g. some research not having any impact).

- Model v4.0 was our first model that produced pretty accurate results across the board (except for the smallest cities) in concise form.

#### Model v4.1

You really need to read Model v4.0 post first. This one is really just an addendum to that. There are no fundamental changes here at all – we simply refine some of the model parameters for extra precision, given additional data we collected since then. As such, I am simply posting updated formula(s) here – everything else is described in v4.0.

All insights and interpretations from v4.0 still apply

##### Underlying Variables

Before we get to the formula, we need to talk about what are the underlying variables used there. This is all described in Model v4.0.

**M**– total number of unlockedtech items (research)*mandatory***A**– total number of AW levels**P**– number of placed premium expansions**V**– number of placed non-premium expansions (including initial 6)**X**– total number of placed expansions (including initial 6)

##### Formula v4.0

##### Formula v4.1

Alternatively, we can write the same thing like this:

The first form makes it easier to see what is going on. I.e. both premium and non-premium expansions add to Spire squad size, but premium ones only add 75% of what non-premium do.

The second form is slightly easier to calculate as total number of expansions is directly observable.

And here is a Google Sheets calculator for the Model v4.1. You’ll need to copy it in order to be able to edit.

##### Model Accuracy

This version doesn’t *fundamentally *change accuracy of v4.0, but it improves fit for clean datapoints a bit. Realistically, we’re talking about going from +/-5 down to +/-2 or even less. A large portion of clean datapoints are now less than 1.0 away from the observed values, so are within even regular rounding error.

We’re still off on the tiny cities, so errors there are expected for now. But if you have full relic boosts and your results are more than a couple of points away from Model v4.1 predictions, the first things I would suggest is to check you input data. Research numbers are commonly done incorrectly, so double check that. AW levels also can be tricky as it seems that AWs that are still upgrading do count as completed for the Spire SS calculation – unlike, say, Trader bonus calculation where these would not.

If you’re still off after double checking your inputs, let me know. But so far every single city with full boosts lined up very accurately with this model, after considering input errors as per above.

Model v4.1 has the most improvements on more marginal cases, such as cities with low tech levels, but a lot of AWs and/or expansions. For more mainstream cities the differences are very subtle.

#### Insights

As I mentioned above, all the insights from Model v4.0 still apply. I do like the new form better, as we only have one somewhat arbitrary coefficient in 3.574 – everything else looks like something picked by a human, with nice round numbers (well, to a certain extent). The relationship between premium and non-premium expansions is also more visible now.

And this 3.574 coefficient is not a final thing either, as it still encapsulates something that impacts calculation for the tiny cities. So that part is likely to be revised still, but the other 3 components look solid.

#### Model Issues

Just like the previous iteration, the updated formula doesn’t work quite well for very small Spire SS. With more data it is confirmed, this is not a fluke of observational errors. But we also have a pretty plausible hypothesis that this last adjustment is related to the base relics boost. Basically, the model works very well for all cities with maxed out base relic boosts (700% each), but it overestimates Spire squad size for cities that haven’t reached that level just yet.

So this is an area of active research, and if you have cities with less than maximum boost, let me know. This should be the last piece of the puzzle. I think ๐

#### Interpretation

All interpretations from Model v4.0 still apply.

#### Conclusion

So we’ve got a fairly marginal update for our model this time around. No groundbreaking changes here ๐ But it works slightly better, and it looks slightly better, so what’s not to like?

We still need to explain behavior for tiniest of cities. But now we have a good working hypothesis that this is related to base relics boost numbers. Need more data to collect for such cities before we can see some patterns, so let me know if you have a city like that.

So you can already start playing with this formula and see if your city data fits. Most of the parameters are easy to observe, except for the total unlocked mandatory research, but Model v4.0 post outlines how to calculate that. The rest is pretty easy.

So that’s it for now. Let me know in the comments if your city does or does not match well with the model forecast. It would be particularly interesting if it doesn’t, especially if significantly so. But by now the chances are there is something wrong with your input ๐

As I said, I think we’re almost there!