Tech level and Admin level calculation

A military-oriented and sci-fi wargame, set on procedural planets with customizable factions and endless choices.

Moderator: Vic

Post Reply
beyondwudge
Posts: 81
Joined: Tue Dec 22, 2020 12:33 pm

Tech level and Admin level calculation

Post by beyondwudge »

Hi,

From the manual and in-game tool tips, I gather that:

Tech level = sqrt(techs_you_have)
Admin level = sqrt(sqrt(BP_per_turn))+sqrt(organisations).

In my current game I have 13 techs researched and sqrt(13) is around 3.606 (rounded). However, my Empire dashboard gives 3.68.

Likewise, I have a BP_per_turn of 155 (ignoring +76 size bonus) and 6 council/organisations. Sqrt(sqrt(155)) + sqrt(6) gives 5.978 (rounded). However, my dashboard reads 5.91.

For context, my civilisation level is reported fairly accurately with the calculation of sqrt(18)-1 given as just 3.24.

I have noticed that many value shifts in the game are rounded or at least reported with some rounding. In this case though, going from 3.61 to 3.68 and from 5.98 to 5.91 doesn't sound like a rounding issue. Also, the magnitude of both shifts being very similar, at about 0.07 from what their rounded value would be, suggests something systematic.

Does anyone else get this discrepancy and know the source of it?
Soar_Slitherine
Posts: 440
Joined: Sun Jun 07, 2020 11:33 am

RE: Tech level and Admin level calculation

Post by Soar_Slitherine »

For calculating the tech level it seems to add up all research progress, not just completed techs - a 50% researched tech will count as half a tech for tech level purposes. At least, I assume that's why I've observed tech level rising even on turns where no techs are completed.
zgrssd
Posts: 4227
Joined: Tue Jun 09, 2020 1:02 pm

RE: Tech level and Admin level calculation

Post by zgrssd »

Chances are Vic is using a floating point number for those calculations. Given the only .NET and Mono functions for this only take and return floats and doubles it seems like a given.

And while float math a lot of things, precise is not one of them. It is infuriatingly inprecise.
Usually you do not have such a massive inprecision with such a short number (you got way more significant digits). But usually you also do not run the Squareroot function if you can avoid it - so no idea what it might be doing wrong wich results in a very wierd value down the line.
DW2 Poll:
"Should the Civil and non-Combat Ships loose all or most of their weapon slots?"
https://www.matrixgames.com/forums/view ... 1&t=382690
beyondwudge
Posts: 81
Joined: Tue Dec 22, 2020 12:33 pm

RE: Tech level and Admin level calculation

Post by beyondwudge »

Soar,

I have a 47% researched tech. If I take sqrt(13.47) I do get 3.6701 which is very close to the reported 3.68 (within 0.01). However, even if I use 13.5 the figure is still 3.674 which rounds down to 3.67 and is a little bit off.

Zgrssd,

Given the above being true, it may be the last 0.01 is accounted for by the imprecision in the data types, their implementations and how they are being operated upon.

Soar,

If the partial tech is counted for calculating the tech level then do you have any ideas what might be subtracted from either a BP_per_turn or from the organisation count to give the slightly smaller result? I think we can rule out BP_per_turn being a float or double that is reported as a whole number because you would require a BP of 143 or 144 (instead of 155) to reduce the result with 6 organisations down to 5.91 with rounding.

Soar_Slitherine
Posts: 440
Joined: Sun Jun 07, 2020 11:33 am

RE: Tech level and Admin level calculation

Post by Soar_Slitherine »

Perhaps admin level doesn't count BP income from population (the service tax), since that BP income is actually modified based on admin level (manual 5.3.14.1.), so the equation would be recursive otherwise. I haven't checked if this assumption matches up with actual results, however. If you want to do the math on that, service tax BP income can be found under Reports -> Zones.
beyondwudge
Posts: 81
Joined: Tue Dec 22, 2020 12:33 pm

RE: Tech level and Admin level calculation

Post by beyondwudge »

Soar,

We would expect service tax collection to be 11 or 12 BP to cause the shift.

Service tax collection := 29 BP
Adjusted BP_per_turn = 155 BP - 29 BP = 126 BP

Adjusted Admin level = 5.79 = 5.8 (rounded) [ can't post the actual number, the forum seems to think I am posting a phone number... and therefore I'm not allowed to yet]?
Actual Admin level = 5.91.

However, that gives me the idea to list all the BP sources and see if a combination explains the actual admin level. I'll let you know if I find anything.

beyondwudge
Posts: 81
Joined: Tue Dec 22, 2020 12:33 pm

RE: Tech level and Admin level calculation

Post by beyondwudge »

I did some tests, running a game with a different combination of assets turned on and off and observing the change in admin level. Attached is a simple table of the BP contributions and the admin level that resulted (I tried to post it as text, but got the phone number error again). I forgot to include the org count but it stayed the same through-out all the rows below (I believe the count was 2).

Image

It appears that service tax and bonus BP do not affect the rating. However, it also appears that even with all the assets turned off there it is as if at least 25 BP is still being fed into the calculation. This hidden BP however seems to decrease as more asset produced BP is inputted. It might be possible to plot the hidden BP decline as a function of the asset BP, but, there is another issue.

The admin level for +40 asset and +50 asset is the same. The calculated result increases by about 0.1, which is enough for the Admin Level at 3 significant figure precision to change, but it doesn't. This suggests that the Admin Level calculation is based on more than the factors I've identified, that the Admin Level calculation only updates in steps as with Administrative strain, or that the Admin Level metric is misreporting the figure.
Attachments
ShadowEmpi..lFigures.jpg
ShadowEmpi..lFigures.jpg (7.33 KiB) Viewed 52 times
zgrssd
Posts: 4227
Joined: Tue Jun 09, 2020 1:02 pm

RE: Tech level and Admin level calculation

Post by zgrssd »

It appears that service tax and bonus BP do not affect the rating. However, it also appears that even with all the assets turned off there it is as if at least 25 BP is still being fed into the calculation. This hidden BP however seems to decrease as more asset produced BP is inputted. It might be possible to plot the hidden BP decline as a function of the asset BP, but, there is another issue.
Maybe it works similar to skill group sharing?

Grouped skills on a leader get a bonus from the largest skill, if they themself are low.
IIRC, the bonus is:
[Highest Skill value from the group] - [Skill value in this skill] / 2.
It is possible he did something similar here, feeding a 25 into the formula.
DW2 Poll:
"Should the Civil and non-Combat Ships loose all or most of their weapon slots?"
https://www.matrixgames.com/forums/view ... 1&t=382690
beyondwudge
Posts: 81
Joined: Tue Dec 22, 2020 12:33 pm

RE: Tech level and Admin level calculation

Post by beyondwudge »

<I did some calculations but the forum keeps insisting that I'm posting a phone number, email or some such that is not allowed. Even embedding a screenshot of the text I typed is causing the warning. I'll sort this out then come back to this.>
Attachments
screenshot.jpg
screenshot.jpg (68.17 KiB) Viewed 55 times
Post Reply

Return to “Shadow Empire”