Research (Advanced)

From Europa Universalis 3 Wiki
Revision as of 19:28, 12 December 2014 by Meneth (talk | contribs) (Remove import category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This page exists to give a rigorous treatment to various questions arising with respect to technological progress in the game. Most of the information on this page is a more thorough working of the principles of the game's research dynamics which are described on the Research page. You are strongly advised to master the basics there before proceeding.

Introduction

A few comments about the mathematics displayed on this page. Since the EU3 Wiki is unable to render TeX markup, all equations here are images of TeX rendered elsewhere from the MediaWiki standard TeX rendering engine. While each of these images are only about 5KB in size at most, there are nevertheless 30+ images, so you may find that this page does not load as quickly as others on the wiki.

A few quick notes about the equations...

  • The conventions adopted in the equations here are those normal to mathematics typesetting. Namely, variables are in italics and functions/operators are in standard text. In some rare cases, plain text has been inserted; this is pretty obvious by the context.
  • Subscripts on variables generally denote variable flags (for those unfamiliar with programming lingo, flags are just variables that take values of 0 or 1; they switch on or off). The one exception to this is for Merchants as measured in the NatlTradeIncomeImpact term in the ProviceResearchOutput calculation.
  • All quantities that relate to actual game data are named as they are in the game (e.g., LocalTradeIncomeModifier); quantities not available to the player in the game (e.g., NationalResearchOutput) have been named to be as clear and as least confusing as possible.

Definitions

The following are some key variables/quantities which appear in this page. Knowing what quantities are being employed is essential to understanding the mathematics they're used in. You should be aware of the sometimes subtle distinctions between quantities—for example, the difference between Research Income and Income. Lastly, while considerable effort has gone into the variable naming conventions

NOTE: All declared figures on this page will be ANNUAL (and not monthly). This, because most of the useful income figures you can get in the game are expressed this way.

Country Size (CountrySize)
The total number of provinces owned by a country.
National Research Output (NationalResearchIncome)
A country's total cumulative research (income + research bonuses, war subsidies, etc.) impact per year.
Province Research Output (ProvinceResearchOutput)
A province's total research contribution: the tax, toll, production, trade, harbor fee incomes and manufactory research bonus of a province.
Size Modifier (SizeModifier)
The SizeModifier function. A table of this function's values for different size parameters may be found here.
Technology Cost (TechnologyCost)
The cost of a an arbitrary technology; see Research for the details.
Total Income (TotalIncome)
A country's total annual income.

Results

The results below are expressed in full generality, with any number of provinces added/subtracted. The marginal case of a single province—perhaps the one most likely to be used by players—may be obtained by taking x = 1 (basically dropping the summand operator and setting the parameter x to 1 in the SizeModifier).

How to tell whether adding/subtracting provinces will help or hurt your research

Adding provinces

To determine precisely whether adding new provinces will help or hurt you, you may use the following condition: ResearchEqualityCondition-Addition.png

If this condition is TRUE, then adding the province(s) will speed up your research rate.

Note that for large (CountrySize ≥ 8) countries, this simplifies to: ResearchEqualityCondition-Addition-LargeCountries.png

Subtracting provinces

To determine precisely whether subtracting (i.e., losing/selling) new provinces will help or hurt you, use the following condition: ResearchEqualityCondition-Subtraction.png If this condition is TRUE, then subtracting the province(s) will speed up your research rate. (NOTE: This condition is seldom true. See the Understanding these equations section for more details.)

To determine whether releasing provinces as vassals will help or hurt you, use the following condition: ResearchEqualityCondition-Subtraction-Vassals.png If this condition is TRUE, then releasing the province(s) as vassals will speed up your research rate.

As before, for large (CountrySize ≥ 8) countries these become: ResearchEqualityCondition-Subtraction-LargeCountries.png and ResearchEqualityCondition-Subtraction-Vassals-LargeCountries.png

How to tell how much a province affects your research

Adding provinces

To determine by how much adding province(s) affects your research, the equation is similar: ResearchRateChange-Addition.png This formula will tell you by what amount your research rate will change with the new provinces.

Subtracting provinces

Removing provinces gives a formula virtually identical to the equation above. ResearchRateChange-Subtraction.png This formula will tell you by what amount your research rate will change by removing provinces. NOTE: Be aware that your result for either of these two equations will be a decimal. (3rd grade math review: decimal * 100% = %)

Understanding these equations

Quick Conclusions (for the impatient)

1) Provinces of comparatively "average" value will generally always help you, or at least almost never can harm you. For large (8 < CountrySize < 60) countries, provinces can even be much poorer than this and still help you.
2) Just what minimum ratio of NewProvinceIncome : AverageProvinceIncome is needed to improve technology depends on what proportion of a country's research output is due to trading, research and other sources, as well as the size of your country.

For the purposes of a thorough analysis, we will employ here the large country simplification of the Equality Relation; we will also consider only the case of adding a single province in order to best illustrate some of the fundamental properties of this relation. To that end, we'll rename the ProvinceResearchOutput to NewProvinceResearchOutput in order to distinguish between new and old provinces. Also, we'll be using the following definitions: a new province will be relatively "poor" if it's ≤50% of the wealth of an "average" owned province; likewise, a new province of "average wealth" is ~100% of average, and a "rich" new province is ≥150% of average.

To begin, the ratio "NewProvinceResearchOutput : TotalResearchOutput" may be interpreted as the proportion of a new province's research value to that of the country's total research output. This makes sense, but what does it mean at the provincial level? This is difficult to really understand. Thus, we'll make some changes:

EqualityConditionSimplified.png

By substituting this relation into the left side of Eq.2 and dividing the extraneous terms, we can go even further:

EqualityConditionSimplifiedModifier.png We are now ready to interpret this relation much more clearly. To begin, let's describe what the two multiplicative terms are.

  • RawThresholdValue
Imagine for a moment that ThresholdModifier = 1; then, the RawThresholdValue term is plainly the minimum relative provincial wealth that a new province must have as compared to the average provincial wealth of the provinces a country already owns. Note that since the RawThresholdValue term — Ratio2.png — is always less than 1, we may conclude that in this case if a new province is at least of average income value (that is, the ratio on the left side is 1), it will always at least break even or increase your technology rate. This makes intuitive sense: if you acquire average-valued provinces, your average province wealth will remain the same, and so would (but for the increase in the SizeModifier penalty) the rate of your research. The relation above then merely formalizes and makes exact this notion, and makes clear that adding provinces of "average" value can not harm you. (But, in reality, you can get away with getting much poorer provinces than merely "average" and still have a net gain on your technology rate, as you'll soon see.)
  • ThresholdModifier
The ThresholdModifier, in turn, is a modifier based on non-size-related sources of research output. Specifically, the ThresholdModifier is the sum of the contributions of trading and research bonuses as proportions of provincial income. Note that technically ThresholdModifier ∈ [1,∞) -- that is, the ThresholdModifier term may be 1 at a minimum, and can be arbitrarily large. But in reality, almost no players with a country of 8 or more provinces can expect a ThresholdModifier > 2, as this implies that research bonuses and trading income are 50% or more of a country's research output. This becomes a very high standard indeed as the number of provinces owned increases.
Note that the general trend is that the ThresholdModifier → 1 rather quickly as CountrySize → ∞ that is to say, as you increase the size of your country, the importance of these non-provincial sources of research output diminish dramatically. Consider, however, that this leads quite naturally to an important case in the scope of gameplay where the ThresholdModifier may be quite large: the OPM/very small country case. Since these countries have virtually all of their research output deriving from trading and technology bonuses, they will have a very large ThresholdModifier value, indicating that any additional province will have to be significantly richer than their current one(s) to break even on technology progress. In fact, in the late game with a high trading income, an OPM could possibly have a Modifier much larger than 2 (think 10-15 range), which is why adding additional provinces at this point is prone to severely harm their very productive technology rates!
Now, we must point out two caveats/important qualifications that are important to be aware of in both of these terms. Firstly, it should be obvious to the user that there's no such thing in reality as an "average province": all countries have a capital province with a ProvinceTax enhanced by +2, and a collection of National Focus provinces with an enhancement of .5, followed by the rest. The "average province" totally ignores this distinction, and thus the "average province value" of a country as considered here will be inflated by this consideration--meaning that we are comparing a new province's relative wealth to something slightly larger than the "true" average of the player's owned provinces; equivalently, we could say that this will inflate the "true" RawThresholdValue term somewhat. Secondly, for added simplification to the ThresholdModifier term, we're going to ignore the new province's added NationalTradeImpact and NationalResearchImpact terms and set them both equal to zero. This will again tend to inflate the modifier term from its "true" value. Don't worry--the corruptions from the "true" values are overall quite small, and approach zero very quickly as CountrySize increases; thus, you can safely consider the threshold values (for CountrySize ≥ 8) as being the "true" value, and the threshold values for smaller sizes as being very reasonable approximations.

At this point, it should be clear to the reader that precisely at what point a province with a particular wealth-to-average fails to increase one's technology rate is really just an exercise in plugging in the CountrySize and ThresholdModifier parameters into the relation provided above. It IS this simple, but please keep in mind that it's insufficient to consider only one possible ThresholdModifier as just your CountrySize changes, because your ThresholdModifier will vary as time and the size of your country varies. Thus, to appropriately use this term, it's recommended to consider three different values of the ThresholdModifier over the course of a country's expansion in order to establish the likely bounds of the ThresholdModifier over the course of a game. We will use these three:

  • (1) a country with minimal relative trading income and/or research bonuses, corresponding to a ThresholdModifier = 1;
  • (2) a country with major relative trading and/or research bonuses, corresponding to a ThresholdModifier = 2;
  • (3) a country with extremely high relative trading and/or research bonuses, giving a ThresholdModifier = 5.

For most of a player-country's lifespan, the ThresholdModifier will vary between items (1) and (2); with a small size (if applicable!) in the early game, it will be closer to item (3).

The following table is a sample of these values:

Threshold New Province Wealth (as a % of "average") Chart (1 - 100 provinces)
Initial

CountrySize

Modifier = 1.0 Modifier = 2.0 Modifier = 5.0 ThresholdGraph.jpg
1 20.0% 40.0% 100.0%
2 33.3% 66.7% 166.7%
3 21.4% 42.9% 107.1%
4 26.7% 53.3% 133.3%
5 62.5% 125.0% 312.5%
6 33.3% 66.7% 166.7%
7 36.8% 73.7% 184.2%
8 10.0% 20.0% 50.0%
20 21.7% 43.5% 108.7%
50 41.0% 82.0% 204.9%
72 50.0% 100.0% 250.0%
100 58.1% 116.2% 290.7%


Threshold Table


There's lots of interesting information to get out of this chart. Firstly, note the stairstep bolding pattern encoded in the Threshold Table. This is intended as a sort of guide to indicate the normal "trajectory" of a country's shifting ThresholdModifier term as it expands. That is, for the player-country with a conventional playing style—one that begins with a high proportion of research output coming from non-provincial sources, but with time begins to rely much more on provincial income—the emphasized portions of the table demonstrate what the relevant threshold values must be to ensure that one's technology rate is still increasing.

The accompanying graph (which covers province sizes of 1-100 only) indicates the general trend for each ThresholdModifier value. As you can see, despite some inconsistency in small country sizes (due to the SizeModifier function's special nature), the behavior of the ThresholdValue quite clearly is increasing with CountrySize. In the limit as CountrySize→∞, the RawThresholdValue→1; thus, the actual ThresholdValueThresholdModifier.

(!) Remember that for the purposes of using this graph for your own country, the vast majority of countries will exist somewhere within the Blue and Red bands most of the time.

And the final, big result:

For countries larger than 8 provinces, additional provinces may very frequently be <50% of the value of your average provinces and still provide a benefit to your country's technology rate.

In fact, as you can see in the table, it's not until you reach a country size of 40-60 provinces that additional new poor provinces of ~50% average value become directly burdensome to technological progress (with 1 < ThresholdModifier < 2).

So does this mean that average provinces are always beneficial? Almost. If your ThresholdModifier = 1, then yes, it's beneficial; and indeed, as countries get larger, all other things being equal the ThresholdModifier should slide very close to 1. However, if you're a large country with lots of other bonuses to your TotalResearchOutput in play, it's still possible it could hurt you eventually.

This concludes the marginal case analysis. The general case doesn't really deviate from what's been described above, with the exception that NewProvinceIncome becomes AverageNewProvinceIncome. And because the right side of Equation 4 is the same as that in Eq.2 , the relevant threshold values also, fortunately, do not change (for CountrySize ≥ 8).

Using these equations

Overall, the equations provided above are pretty generalized and may seem quite abstract. But, fortunately, all of the information you need to apply them is readily available to you in-game. Unfortunately, this information is inexact: values provided to the player are as a rule rounded off or truncated to one decimal point (the game uses three decimal points for all of its calculations internally). There are some places in the game where information reporting is worse than others: the Budget Window is relatively bad, being rounded to one decimal place; things in the Province Window are better, often reported to 2 decimal places and truncated, not rounded.

Simulation considerations

These equations provide a kind of immediate "snapshot" of a province(s) impact upon a country's technology rate based on the conditions you feed it. As such, if the player is looking to subtract provinces, it's easy enough to simply apply these equations to the current set of national conditions and you'll get what you're after, since subtracting a province now is going to have the same effect as 100 years from now. However—if you're adding provinces, it's recommended that the user run two different rounds of these equations in order to model a short-run (no revolt risk; no Nationalism), and long-run (no revolt risk, all provincial improvements, state religion and culture) impact upon the research rate. Both will be different, and both will be relevant in their own way to assessing the impact of these provinces on your national research rate.

Information you need about your country/provinces & where to get it

(This section is going to be expanded & made very intuitive (w/ pics! oh boy!!) very soon.)

You will need to get the following information to use these equations.

On the national level:

  • Your total income.
  • Your minting rate.
  • Your war subsidies (if any).
  • Your research bonuses.
  • Your country's size.
  • Your Trade Efficiency (TE).
  • Your Production Efficiency (PE).
  • Your GlobalTaxIncomeModifier, GlobalTradeIncomeModifier and GlobalTariffs (modifier).

On the provincial level:

  • Base tax
  • Trade good price & amount produced
  • Whether a marketplace, workshop or manufactory is present (also whether manufactory is correct for trade good type)
  • Whether it's your capital, and whether it's in your National Focus region.
  • Whether it has a CoT, and if so, what level and how many free spots does it have;
  • Your LocalTaxIncomeModifier, LocalTradeIncomeModifier, LocalProductionEfficiencyModifier and LocalTariffs (modifier).

If you want to calculate your own modifiers, trade good units produced and trade good price, you'll also need:

The CountrySize term is simply the number of owned provinces in the country before adding the new ones. (If you're a big country, this is a little problematic to figure out; the best way is to just count them in the ledger on the "Country Overview" page. If you are the _largest_ country in a particular round, you can use the highest number of the vertical axis on the "Number of Provinces" graph in the ledger. Beware that this number is sometimes unreliable though!)

Necessary calculations

To apply these equations, we must work out three quantities: the NationalResearchOutput, the ProvinceResearchOutput, and the SizeModifier. These will all be treated in separate sections.

SizeModifier

This is the easiest to get. The SizeModifier function is:

ResearchSizeModifier.png

A table of its pre-computed values for particular CountrySize parameters may be found here.

NationalResearchOutput

This is the total amount of research a country conducts per year before the addition of new province(s), and is relatively straightforward to figure out, though it's a little inconvenient to do so without introducing some inaccuracy. Essentially,

NationalResearchOutput.png

The TotalIncome and the WarSubsidies (if applicable) terms are as reported in the Budget Window--times 12 (to annualize it). The MintingRate is the percentage of TotalIncome diverted to the treasury.

The NationalResearchBonuses are:

NationalResearchBonuses.png

But, now we have a problem. The NationalResearchBonuses are dependent on the technology category, and for the purposes of getting a "general" figure for a province's impact on research, this is not helpful. There are two options then: choosing to assess technological impact by category (no error, but changes the equation to express the rate of change in just _that_ category) or averaging out the NationalResearchBonuses to get an "average" term across all technology categories (error). The choice is up to the player, but remember to be consistent with other research considerations (such as in the ManufactoryBonus term in the ProvinceResearchOutput calculation below).

ProvinceResearchOutput

This is the hardest quantity to resolve. It amounts to accurately predicting what an as-yet-unowned province's research output will be under YOUR rule. The expression for this is:

ProvinceResearchOutput.png

Each of these terms will be treated separately. Note the added ResearchManufactory term at the end, indicating the additional potential bonus to research (again, to a particular _category_, so the question raised above of whether to average the general effect or not is still apropos).

  • ProvinceTaxIncome
This is the province's tax income. It requires an intermediate calculation of the ProvinceTax to get.
ProvinceTaxIncome.png
ProvinceTax.png
The basic tax equation is slightly different for overseas provinces in that they get an additional modifier term.
  • ProvinceHarborFees
These are the harbor fees attributable to the province having a CoT.
HarborFees.png
Harbor fees are zero for non-CoT provinces.
  • ProvinceTollIncome
This is the province's income from tolls. It is:
ProvinceTollIncome.png
As you can see, overseas provinces have no toll income.
  • ProvinceProductionIncome
This is the province's income from production (including from gold, which the game groups separately in the Budget Window, but is treated elsewhere as if it were simply production income). It's a bit more complicated than the others, requiring two intermediate calculations -- the ProvinceTradeValue of the province's trade good, and the base ProvinceProduction resulting from it.
ProvinceProductionIncome.png
ProvinceProduction.png
ProvinceTradeValue.png
Note that this formula indicates that overseas provinces will only have income from manufactories as their entire provincial production income.
  • ProvinceNatlTradeImpact
This is a province's impact on the national trade income. That is, this is the added/lost trade income that may occur if the province switches its CoT after ownership change.
ProvinceNatlTradeImpact.png
This quantity is a little different than the others in that it's quite complicated to figure out in advance exactly when a province will switch CoT's. Thus, some general principles will have to suffice here. Firstly, if you own a CoT that's relatively close (within the same continent/region of the map), and the province doesn't already trade at your CoT, it will generally flip to your CoT with an ownership change. Depending on your relative merchant placements in the two CoT's, you can have either a gain or loss in national trade income. This term will often be quite small for a single province, so if you're uncertain whether it will flip or not, it's reasonable to set it equal to zero.
  • ProvinceTariffIncome
Lastly, the province's tariff income takes the intermediate ProvinceTax and ProvinceProduction quantities and multiplies it by some modifiers. It is:
ProvinceTariffIncome.png
Observe that non-overseas provinces have no tariff income.

Once these five quantities are calculated, they're added together with the manufactory bonus (if applicable) as in Equation 4 to give the ProvinceResearchOutput.

Sources of Error

If you follow this page exactly and make no mistakes about gathering information about your country AND entering it, then your source of error is minimal. However, there will remain the possibility of the following errors:

  • TotalIncome, WarSubsidies: Taken from the Budget Window, these are rounded to a single decimal place. You _can_ calculate them yourself independently, but it's very time-consuming.
  • ProvinceNatlTradeImpact: If you predict incorrectly, this could be wrong and cause an error.
  • Averaging research across categories: obviously, this will introduce some error.

Derivations and Proofs

Please see the Research Math Proofs page for detailed proofs of the numbered equations.

Conclusion & End notes

This page's primary purpose has been to outline the mathematics involved in making decisions about adding provinces with respect to technology rate. It only very tangentially touches on the larger problem that spawns this concern—namely, how can I get the best (optimized) rate possible?

But, in the end, the question of "how to optimize" research progress is not as simple as determining whether a province helps or hurts you. If you take a poor province, it's still very likely to increase your technology rate—but will it increase it as much as whether you got a richer one? Of course not. Be aware, always, of the opportunity cost you face when you take a poor province. This is ESPECIALLY true in multiplayer: as your competitors are all also growing, the increase in your technology rate from a mediocre province may not keep up with their increases from better ones!

In the end, the only way to have the fastest technology rate possible is to have the richest provinces and the most technology rate-enhancing mix of national decisions.

See also