Finding optimal economy path with best value

46 Views Asked by At

This problem is based on Warcraft 3 Legion Tower Defence custom map.

First level problem:

Let we say that from the beggining of the game we have infinite gold.

We have 1 builder from the start. He produces 2 wood per interval. We can buy more builders up to 7 by 50 gold.

Also we have upgrade option which will up builders production for 1(for unpurchased ones too). This will cost 60 gold for first upgrade, and will raise by 20 gold for each next upgrade till 200 (80, 100, ... , 200), so after 8th upgrade cost will not raise anymore.

So initial buiders/upgrades are 1/1. Which means 1 builder produces 2 wood.

Each interval of time we can choose between purchase builder or purchase upgrade.

For example 2 paths:

2/3 and 3/2 will produce same amount of wood, but first way will cost more gold but can bring more wood in future iterations.

The problem is to find best way for different invervals till 7/15.

Which way will bring most wood for N intervals?

Does math have approaches for such strategic economy systems?

Second level problem:

Let we say that from the beggining of the game we have infinite wood as well.

Now upgrades cost 60, 80, 100 ... 200 wood as well.

Builders farm wood with interval. Inteval of choice now = 15 * builders farm interval.

From which minimal interval of time will we get NET profit?(i.e.we will return the borrowed wood from the beginning of the game and produce 1 wood as minimal) We do not have option to skip the choice interval or wait some intervals to choose later.

Third level problem:

Let we say that the game lasts N intervals.

We have 100 gold and 100 wood from the start.

Purchuase of builder or upgrade now lasts 40 intervals (and only 1 in the same time).

Each 120 intervals we will get 150 gold with increment of 15 for each next. Now we can choose on which interval we can buy builder or upgrade (if we have resources for that).

Now we have an option to convert wood to income. 20 wood = 1 gold income. Income will give us gold every 120 intervals till the end of the game. 1 income = 1 gold given.

Are there can be formulas to calculate on which minimal interval we will have 7/15 with X income?


If there is such formula or approach to solve such problems without brute force, please, tell the term or share the link. Thank you!