11 August 2018

Natural Diminishing Returns on Linear Functions

So, I actually went into a discussion with a fellow guild member on natural diminishing returns. He claimed there are no diminishing returns if the function that relates to the main stat that increases damage and the damage increase is linear. Well, he's right. There are no diminishing returns as we might know it, however, there are a natural diminishing returns. Let's break it down.

Diminishing Returns

First of all, let's clarify what diminishing returns means - in case you don't know, you can skip this paragraph if you do. Diminishing means a decrease and returns means something you get back. Both words together mean you get back a decreased value. In an example, we say we learn a language for one hour and we manage to keep 24 words from this session. Now we learn another hour with no pause in between and we manage to keep 22 additional words from the lengthened session. We keep pushing learning for longer and longer, but at three hours or so we would have only kept maybe 60 words in mind when we expected to have 24 words for each hour for three hours, so 24 * 3 = 72. As you can see there's a trend down, the diminishing returns.

Common Occurrence in Games

From my experience with a handful of people, I've seen that diminishing returns is known by people who are less active or interested in theorycrafting as a mechanic that affects loot drops. The longer you farm the same content the less loot or drops you get. This - of course - is diminishing returns as well. However, in the theorycrafting community, it's more about the damage increase or stat gain.

Damage as a Linear Function

For the purpose of the explanation I'm gonna use the damage calculation from Guild Wars 2:
damage = (weaponStrength * power * skillMod * positiveMods) / (armor * negativeMods)
Now, the fun part is - if you didn't sleep during your physics classes - we know that we're going to keep a few variables the same. If we compare our damage to another example and only change one value the rest becomes constant.

For our purpose, we only change power. Let's say we have the following values:
damage = (1150 * 1000 * 0.35 * 1) / (2597 * 1) = 154.98652291105122
Now, we change the value of power and leave every other value constant:
damage = (1150 * 2000 * 0.35 * 1) / (2597 * 1) = 309.97304582210245
As you can see, we doubled the power and our damage value doubles as well. Do not believe me?
Here you go:
309.97304582210245 / 154.98652291105122 = 2.0
This means, as long as all the other values do not change we can directly modify the value by the factor we change it. To simplify our calculation we can replace any constant values with a 1:
damage = (1 * 1000 * 1 * 1) / (1 * 1) or damage = 1000

Next up let's look at how our damage behaves if we increase our power by one steadily. For this, I'm gonna plot the function. Though we already claimed that our simplified function is damage = power.
Additionally, we started with 1000 and I claimed to steadily increase it by one. It shouldn't be hard to realize that the function we get is linear starting at 1000 and increasing by x:
 f(x): y = 1000 + x
 Nice and big for everyone to read.

Natural Diminishing Returns Behind Linear Functions

Thus far, we haven't seen any diminishing returns. Now let's do the following:

We start off with 1000 power which directly translates to 1000 damage or 1000 * otherFactors damage to be specific. If we add 1000 power to our base of 1000 we get 2000 power or twice the damage. This means if we double our modifier we double our damage. Funny enough we can look at the damage increase for each point of power we get. To calculate this increase there are multiple ways to do it but my favorite way is to calculate:
damageChange = (newStat / oldStat - 1) * 100
damageChange = ((oldStat + change) / oldStat - 1) * 100
We could calculate this 500 times.. or we simply leave that to the computer. Time is to precious to waste anyways.
damageChange = ((oldStat + x) / (oldStat + x - 1) - 1) * 100
Now let's run it for oldStat = 1000.
As you can see the line decreases. This means for each point of power each additional point of power loses in value or worth. Well, yeah, there you have it, diminishing returns in linear functions.

Worse With Min-Maxing

(min-maxing describes the act of more or less pushing and pulling out the last few improvements. It's the difference between 95% of what's possible and ~99% of what's possible. Might write a blog post about that as well... *shrug*)
However, in many games "one does not simply double their main stat". The stat gain in many games behaves like a log function at higher values. This means the more stats you get the harder it will be to get even more of it.

If you do not know what this looks like here you go:

As you can see, it's easy to get power at the start but at some point, if you have your main stat everywhere you can have it, it's just a few sources here and there where you can still get some making it hard to keep ongoing.
***NOTE: This is not a graph that represents the exact way this behaves in any games or in Guild Wars 2.

Liked the post? Noticed an error? Wanna discuss the content or leave a comment*? You can join or check into the discord to do so! (*Note: Comments are disabled to avoid saving user data on this website.)
>> Join Discord

About Me

My photo
I'm a B.Sc. Games Engineer and I created this blog to share my ideas, theorycrafting, thoughts and whatever I'm working on or doing.