- be maintainable in multiplayer
- check for available science packs, e.g. don't research robot worker speed without electromagnetic science packs.
- switch between technologies with agricultural science packs and without
- research the technology with the best benefit-to-cost ratio. (see below for a much longer explanation)
limited support for one-shot technologies. Those are better researched manually.
- use a priority system to prioritize technologies containing agricultural science
- disable individual technologies when agricultural science is present
The latter is a higher maintenance burden, but I chose it anyway: I saw no way to combine the priority with "research the technology with be best benefit-to-cost ratio."
I checked a few science switchers after my call in reddit (TODO). I share the most common pattern: for every technology one decider combinator. Every decider combinator gets the same input: The available science packs. All outputs are combined and then the best technology is selected according to benefit-to-cost. (Internally, I express this as an effective cost per benefit; the calculation accounts for the current productivity level and the affected share of production.).
For every research signal, I also output its current level using the same signal with an uncommon quality. This way, you can limit you research to a fixed level or say "only research plastic if its level is at most the level of rocket fuel". A condition like the latter is mostly obsolete with the benefit-to-cost value.
How I calculate benefit-to-cost: amortization
When you have effectively infinite technologies to research, how should you decide which technology to research next?
I'm not asking which technologies you personally prioritize. I'm interested in a way to compare infinite research technologies quantitatively.
A simple approach would be to always research the cheapest available technology. But that ignores how much benefit you get from the research.
For example, Mining Productivity 40 costs about 38k science, but only increases the productivity multiplier from +400% to +410%. That's an increase from 5.0× to 5.1× — only a relative 2% more output.
So the relevant question isn't just:
but rather:"How much does this research cost?"
The simple case: Mining Productivity 1"How much does it cost relative to the benefit it provides, and how long does that benefit take to pay back the research investment?"
Mining Productivity 1 costs 250 science and increases mining output by 10%.
How much science do we have to spend before this research has effectively paid for itself?
Without the research, suppose we spend
Code: Select all
xWith Mining Productivity 1, we first spend 250 science on the productivity research, leaving
Code: Select all
x - 250Code: Select all
x / 1.1Equivalently:
Code: Select all
x = 250 + x / 1.1Code: Select all
x = 2750Stepping up: Mining Productivity 2
The interesting part is what happens when we're already at Mining Productivity 1.
Now the alternatives are:
Case 2.1: Don't research the next productivity level.
Code: Select all
x / 1.1Code: Select all
500 / 1.1 + x / 1.2Code: Select all
x / 1.1 = 500 / 1.1 + x / 1.2Code: Select all
x = 6000This is the important distinction: the relevant cost of an infinite technology is not simply its science cost. It is its cost relative to the incremental benefit, expressed as the amount of subsequent research required to recover that investment.
General amortization rule
For these productivity researches, the general break-even point is:
(current productivity level + 10) × research cost
For example:
- Mining Productivity 41 costs 39,000 science → 1,950,000 science to amortize
- Asteroid Productivity 11 costs 86,498 science → 1,729,960 science to amortize
The same thing expressed as cost per percentage point
There is another way to look at exactly the same calculation.
Mining Productivity 41 costs 39,000 science and gives a 2% relative increase in output.
That's:
19,500 science per 1% additional output
Asteroid Productivity 11 costs 86,498 science for a 5% relative increase:
17,299.6 science per 1% additional output
So although Asteroid Productivity 11 costs more than twice as much science, its incremental benefit is also much larger.
This is the point I'm trying to make:
One important caveat: how much production is affected?For infinite technologies, comparing research costs directly can be very misleading. You should compare the research cost with the incremental benefit, or equivalently look at the amortization/payback time.
The calculation above compares the technologies as if the affected production were equally important.
In an actual factory, that's not necessarily true.
If 90% of your resources come from mining and only 10% from asteroids, then a 1% improvement to mining has a much larger effect on your overall resource production than a 1% improvement to asteroid production.
To weigh this in, the costs are scaled via a further constant combinator containing the production-share weighting. I am scaling by dividing the cost, which also prevents an integer overflow in my most advanced game.
Example condition: Research Scrap recycling productivity if all labs have electromagnetic science and there is less than 1k agricultural science Example showing how to limit a research by level: Artillery range limited to level 8. Blueprint at:
https://factorio-blueprints.com/bluepri ... -selection
