0

This question comes out of a game mod I was playing. In the game you get income every 30 seconds (period = $30s$), in order to increase your income you can send units (sending units will give you 10% of the unit cost in income).

In the game, you get to a kind of next stage when you reach $1M$ gold, so my question is how do I reach that fastest?

Let's say I started saving all my income as soon as my income reached $50K$, then it would take $\frac{1M}{50K}=20$ periods. Or I can instead double my income to $100K$, which would take $$1.1^x=2, x\approx7.27254$$ $$\frac{1M}{100K}+7.27254\approx17.27$$

But how do I check this for all values?

SOLUTION I ended up bruteforcing the solution to my problem, at the answer seems to be 90910, which is faster than 100K by 0.434248915812692 periods/rounds.

Akudo
  • 39

1 Answers1

1

It takes ten rounds for any "investment" to pay itself back entirely. After that you will start earning from it. So if you, at any point, with your current income, have more than ten rounds left until you reach a million, then spend as much as you are allowed. If there are fewer than ten rounds, save it all. If there are exactly ten rounds, it doesn't matter either way.

Arthur
  • 199,419
  • I don't see how that answers my question :) – Akudo Oct 18 '17 at 13:01
  • @Akudo Isn't your question how to reach a million the fastest? I just gave you a pretty simple way to figure it out. Of course, there is some calculation involved in checking how long it takes, but I can't give it all away :) – Arthur Oct 18 '17 at 13:03
  • Okay, I chose 100K as optimal income before saving as my conjecture as your post proposed, and found a number that disproved that conjecture.

    92K, disproves it:

    $$10.49205869\cdot ln(\frac{100000}{92000})+10 > \frac{100000}{92000}$$ Formula comes from: $$92000\cdot1.1^x=100000$$ isolated for x.

    So I'm just gonna bruteforce the solution it seems, would've been nice with a more beautiful approach.

    – Akudo Oct 18 '17 at 15:24
  • @Akudo You seem to be assuming a continuous income pay. That's not what your question states. Also, I didn't say "make the income $100,000$". I said "Spend money if it takes you more than ten turns to get to a million with your current income and wealth". If you spend all your money one turn to make your income greater than $90,909$, then you're good to go, because it will take eleven income events to reach a million. That means that after the next income, when you have money to spend again, you are ten turns away from a million. – Arthur Oct 18 '17 at 15:41
  • So at that point it doesn't matter. Keep saving and you have ten turns left to a million. Spend all your money that last turn, and your income will get past $100,000$, which means it still takes ten more turns. Spend only part of it, it doesn't matter. However, any spendings in turns after that will only delay reaching the million. – Arthur Oct 18 '17 at 15:42