Infinite research and bounded returns (warning: math!)

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

Post Reply
golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Infinite research and bounded returns (warning: math!)

Post by golfmiketango »

My understanding is that, as currently implemented, infinite research in all its varieties does not give infinite benefits, but, somewhat counterintuitively, strictly bounded benefits. I'm not sure of the actual numbers used to achieve this -- heck, I could even be wrong in my understanding, which is based on something I overheard somebody say on twitch before 0.15 dropped -- but if correct, it probably works something like this:

b1 = C * 1/2
b2 = C * 1/4
b3 = C * 1/8
.
.
.

where C is some arbitrary constant and bn is the additive benefit provided by a given infinite research level, such that the total benefit accruing to the sum of the researches winds up being the sum of the geometric series:

C * lim n→∞ Σ(1/(2^n))

which, if do research forever, is just "C" because the infinite sum just approaches "1". This is sort of like trying to leave a room by going halfway to the door every 5 seconds. We go slower and slower, decelerating at a rate that ensures perpetual minute progress, but without any hope of an eventual exit.

In my opinion, if I'm right about the above, this kind-of sucks. My understanding is that infinite research has been provided as a way to incentivise extreme late-game "megabase" play, and specifically to address the pre-0.15 problem that mostly all there was to do once you won factorio was to keep launching more rockets, which, aside from glory, provides no benefit to the player (indeed, for the imaginary in-game hero, it makes pretty much no sense at all). I agree with that assessment, and I agree that some kind of infinite research is a fine amelioration of this somewhat unsolvable problem. But a "bounded" infinitude as specified above is very quickly going to become equivalent to the old arrangement; it simply makes it more expensive to reach the same result.

By way of example -- and let me stress that these are made-up, hypothetical numbers, so, caveat emptor -- let's say we're talking about infinite mining productivity research and C is 1000%. Then when we reach the 20th level of research, the benefit we stand to gain is: 1000% / 2^20, approximately 0.001%. That is to say, basically no appreciable benefit at all. And the further we go down this rabbit hole, the more absurdly pathetic this incentive will become. Perhaps, in a sense, this is as it should be, but no matter how hard we try, we'll never break through that 1000% boundary, which is demoralizing.

It means that once we've effectively achieved a benefit that's psychologically equivalent to 1000% (and at level 19 above, I'd say we clearly already have, as net benefit has already exceeded 99.998%), we have no more reason to continue, just like we did with rockets. The only thing left is glory.

I want to argue that there is something you can do to the numbers to fix this problem.

A sixty-three bit integer -- which is what I presume are the type of "benefit" values we are talking about -- can hold something on the order of 10^19 -- something like a thousand times the distance between the earth and the sun in millimeters. So, we have some wiggle room. One solution is to make C very large. But no matter how large we make it, there's some basic psychological problem knowing that beyond a certain readily attainable level, no appreciable benefit is coming.

I'd like to propose an alternative arrangement. Imagine the C * (infinite sum) setup were preserved, but we picked some other infinite series, whose constituent terms still approach zero as n approaches infinity, but which is not bounded in summation. A classic example would be the harmonic series:

xn = 1/n

which is just {1, 1/2, 1/3, 1/4, 1/5,...}

This series converges to zero but its partial summation diverges to infinity. There are, of course, other series one could pick with this quality, but I think it's an OK starting point.

However, the sum benefit would be C*1 at research level one, which is awkward. So instead, I like the idea of starting a few terms into the series, say, at n=4: {1/4, 1/5, 1/6, ...}. If C=1, the research levels now look like this:

research level ---> cumulative benefit as a fraction of one*
1 ---> 0.25
2 ---> 0.45
3 ---> ~0.62
4 ---> ~0.76
9 ---> ~1.00
100 ---> ~3.35
1000 ---> ~5.65
10^5 ---> ~10.26
10^6 ---> ~12.57
10^7 ---> ~14.86

So, as you can see, an absolutely mind-boggling amount of research is going to need to occur before anyone reaches anything like a C*15 benefit level, therefore, it would be possible to put an absolute maximum in, by simply specifying that, just as a way to keep things from breaking, after the 9,999,999th level of research, no further benefit accrues, and testing that C*15 is not a game-breaking level of benefit. Such a restriction should still provide a meaningful very-late-game incentive up to many weeks of gameplay (and one could still accumulate useless "glory" levels up to 2^63 which should not be a constraint for any vanilla campaign).

Let me know your thoughts. Sorry for the tldr and math!
footnote

User avatar
Ingolifs
Long Handed Inserter
Long Handed Inserter
Posts: 81
Joined: Fri Mar 17, 2017 3:18 am
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by Ingolifs »

I haven't quite reached infinite research myself but I believe you have this the wrong way around.

Each tier gives the same benefit while the cost increases exponentially. What you described is a scenario where the research is the same each tier while the benefit is halved (which would give a bounded benefit at t=infinity)
The first relation increases logarithmically which does increase without bound (but very slowly), while the second is an exponential decay sort of thing that has a well defined asymptote.

golfmiketango
Filter Inserter
Filter Inserter
Posts: 549
Joined: Fri Jan 29, 2016 2:48 am
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by golfmiketango »

Ingolifs wrote:I haven't quite reached infinite research myself but I believe you have this the wrong way around.

Each tier gives the same benefit while the cost increases exponentially. What you described is a scenario where the research is the same each tier while the benefit is halved (which would give a bounded benefit at t=infinity)
The first relation increases logarithmically which does increase without bound (but very slowly), while the second is an exponential decay sort of thing that has a well defined asymptote.
Could be. I just noticed that, in my rich resources campaign, at least, mousing over the wierd "+" symbol that the infinite researches put where the research products would normally be, it says "+2%" for the infinite mining productivity. Can that really be right? So for linearly scaled costs, we get linear benefits? That almost seems OP -- i.e., wouldn't this mean we could reach a state where we maintain the same rate of researches with the exact same number of mining drills indefinitely, assuming we found a magical ore patch that never depleted?

Looks like some science is called for.

-gmt

User avatar
thereaverofdarkness
Filter Inserter
Filter Inserter
Posts: 558
Joined: Wed Jun 01, 2016 5:07 am
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by thereaverofdarkness »

golfmiketango wrote:Can that really be right? So for linearly scaled costs, we get linear benefits?
You will never be able to research indefinitely. Each research tier will take slightly longer than the last, and will provide slightly less (effective) benefit. Consider that a 2% productivity bonus at 100% productivity is only half as much of an increase as it was at 0%.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by DaveMcW »

Without any magical infinite ore patches, all research is limited by the ore on the map. Even "infinite" maps are capped at 2,000,000 x 2,000,000 by the game engine. You can calculate ore frequency and richness to find a maximum tech level. This somewhere in the low double digits for the exponential techs, and much higher for the others.

The maximum effective level for Follower robot count is 3601. The follower limit of 36,000 be reached by spamming one destroyer capsule per tick for 120 seconds.

The maximum effective level for Mining productivity is 5665. That gives 1 ore per tick, which is the fastest a mining drill can go.

Mining productivity gives a flat 2% bonus, and the cost increases by +100 per level. So if you have enough mining drills to handle 100 / 0.02 = 5000 science packs, you can research at the same speed on a magical infinite ore patch until you reach Mining productivity 5665. (Also, budget some income to constantly expand your factory to handle the extra resources.)
Last edited by DaveMcW on Tue May 09, 2017 5:36 am, edited 2 times in total.

saturn7
Long Handed Inserter
Long Handed Inserter
Posts: 89
Joined: Wed Apr 27, 2016 6:14 pm
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by saturn7 »

DaveMcW wrote:Without any magical infinite ore patches, all research is limited by the ore on the map. Even "infinite" maps are capped at 2,000,000 x 2,000,000 by the game engine. You can calculate ore frequency and richness to find a maximum tech level. This somewhere in the low double digits for the exponential techs, and much higher for Mining productivity.

The maximum effective level for Mining productivity is 5665. That gives 1 ore per tick, which is the fastest a mining drill can go.

Mining productivity gives a flat 2% bonus, and the cost increases by +100 per level. So if you have enough mining drills to handle 100 / 0.02 = 5000 science packs, you can research at the same speed on a magical infinite ore patch until you reach Mining productivity 5665. (Also, budget some income to constantly expand your factory to handle the extra resources.)
You can artificially slow the mining drills (productivity modules for a fixed amount, or arbitrarily by only giving them low power). With that, mining productivity benefits should theoretically be unlimited.

User avatar
DaveMcW
Smart Inserter
Smart Inserter
Posts: 3700
Joined: Tue May 13, 2014 11:06 am
Contact:

Re: Infinite research and bounded returns (warning: math!)

Post by DaveMcW »

Good point. So each level of mining productivity costs approximately 5000 no-productivity science packs, and the only limit is the resources on the map.

Post Reply

Return to “Ideas and Suggestions”