12,787
edits
mNo edit summary |
(Update for v1.0.5) |
||
Line 1: | Line 1: | ||
{{V|1.0. | {{V|1.0.5}} | ||
Let's say you have 120 bars, 80% resource preservation, and 0% doubling chance. | Let's say you have 120 bars, 80% resource preservation, and 0% doubling chance. If a dagger takes one bar to create, how many daggers would you create on average out of 120 bars? | ||
The answer is <math>\frac{120}{1 - 80/100} = \frac{120}{0.2} = 600.</math> | |||
The main idea behind resource preservation is that you can reuse the preserved resources to make more items, but those resources when used will themselves be preserved also. | |||
The main idea behind | |||
Using the same example with 120 bars, you take 120 actions producing 120 daggers, but with 80% preservation you are left with <math>120 \times 0.8 = 96</math> bars. | Using the same example with 120 bars, you take 120 actions producing 120 daggers, but with 80% preservation you are left with <math>120 \times 0.8 = 96</math> bars. | ||
Line 19: | Line 16: | ||
So the number of daggers produced is <math>120 + (120 \times 0.8) + (120 \times 0.8 \times 0.8) + | So the number of daggers produced is <math>120 + (120 \times 0.8) + (120 \times 0.8 \times 0.8) +\cdots + (120 \times 0.8^n)</math> where <math>n</math> goes to infinity. | ||
If we generalize and represent the number of starting resources (<math>120</math>) with <math>a</math> and the probability (<math>0.8</math>) with <math>r</math>, the number of actions performed with <math>a</math> action's worth of starting resources and a resource preservation of <math>r</math> (where <math>0 \le r \lt 1</math>) can be expressed as follows: | |||
<math>a + (a \times r) + (a \times r \times r) + \cdots + (a \times r^n) = \sum\limits^{\infty}_{n=0} ar^n</math> | |||
This expression is an [https://en.wikipedia.org/wiki/Geometric_progression#Infinite_geometric_series infinite geometric series], which can simply be expressed as <math>\displaystyle \lim_{n \to \infty}\tfrac{a(1 - r^n)}{1 - r} = \frac{a}{1 - r}</math>. | |||
<math>\frac{120}{1 - 0.8} = 600</math>. | So, coming back to our example where <math>a = 120</math> and <math>r = 0.8</math>, we get <math>\frac{120}{1 - 0.8} = 600</math>. | ||
{{Menu}} | {{Menu}} | ||
[[Category:Math]] | [[Category:Math]] |