Nestharus
o-o
- Reaction score
- 84
So... how would people like an algorithm that perfectly did automatic income based on gold cost with possibility of override or putting in relative values with an operator? : )
The algorithm devised follows % per gold group methodology.
Let's say that the first summon is 5 gold for 1 income. That would mean for every 5 gold, you get 1 income (that's your base).
Now let's say that for every 5 gold, we only get out a %^i of that gold.
So with % of 95, the first summon would be (.95^0*5), which is back to 5 gold, divide by 5 to get income, so 1.
Now let's say the next summon is 10 gold. What would be the income?
(.95^0*5+.95^1*5) is 9.75.
R2I(9.75/5+.5) = 2
etc =). But wait... if you got up to like 70k, you'd get almost no income per 5 gold wouldn't you?
.95^13999*5 is virtually 0. Furthermore, the loop to construct the income would be ginormous O_O.
So, we place a group cap. 30 sounds good ^_^.
Now you would end up having 30 groups of 2333.3333333 instead of 14000 groups of 5 for 70k.
But then you end up capping out the income loss, so now we need to add one more factor. For every time a number can be divided by 5, we increase the number of groups for that thing by a %. 50% sounds pretty good as it won't cap out drastically, will allow income to go up and down (similar to tower wars games), and etc...
These numbers actually closely reflect a regular line tower wars game. However, the line tower wars game starts to deviate at around the start of shrine 2. Why? Because it's much more sporadic than the algorithm : P.
Now let's say we can also plug in initial values for unit types... and we can either make them relative or not and use an operator. Let's say we want the phoenix to be -30k income instead of +, like normal. We can override the value by just plugging it in = P.
Another way is let's say we want to decrease the overall income because it's an attack, like divide it by 2. Plug in 2 and set relative to DIVIDE. Done.
It took me many hours to figure out a great algorithm for tower wars in general, and this is the one I came up with. It can do decreases and increases and follows normal patterns. It can also do linear (group size of 0), meaning it's one group, like 100 gold would be 20 gold (100/5), or it can do always maxed, so 70000 gold would be 14000 groups instead of x groups.
Anyways I found this interesting and I'm wondering if something like this would be of interest to other people. It's purely mathematics, so it could easily be applied to SC2 as well ^_^.
The algorithm devised follows % per gold group methodology.
Let's say that the first summon is 5 gold for 1 income. That would mean for every 5 gold, you get 1 income (that's your base).
Now let's say that for every 5 gold, we only get out a %^i of that gold.
So with % of 95, the first summon would be (.95^0*5), which is back to 5 gold, divide by 5 to get income, so 1.
Now let's say the next summon is 10 gold. What would be the income?
(.95^0*5+.95^1*5) is 9.75.
R2I(9.75/5+.5) = 2
etc =). But wait... if you got up to like 70k, you'd get almost no income per 5 gold wouldn't you?
.95^13999*5 is virtually 0. Furthermore, the loop to construct the income would be ginormous O_O.
So, we place a group cap. 30 sounds good ^_^.
Now you would end up having 30 groups of 2333.3333333 instead of 14000 groups of 5 for 70k.
But then you end up capping out the income loss, so now we need to add one more factor. For every time a number can be divided by 5, we increase the number of groups for that thing by a %. 50% sounds pretty good as it won't cap out drastically, will allow income to go up and down (similar to tower wars games), and etc...
These numbers actually closely reflect a regular line tower wars game. However, the line tower wars game starts to deviate at around the start of shrine 2. Why? Because it's much more sporadic than the algorithm : P.
Now let's say we can also plug in initial values for unit types... and we can either make them relative or not and use an operator. Let's say we want the phoenix to be -30k income instead of +, like normal. We can override the value by just plugging it in = P.
Another way is let's say we want to decrease the overall income because it's an attack, like divide it by 2. Plug in 2 and set relative to DIVIDE. Done.
It took me many hours to figure out a great algorithm for tower wars in general, and this is the one I came up with. It can do decreases and increases and follows normal patterns. It can also do linear (group size of 0), meaning it's one group, like 100 gold would be 20 gold (100/5), or it can do always maxed, so 70000 gold would be 14000 groups instead of x groups.
Anyways I found this interesting and I'm wondering if something like this would be of interest to other people. It's purely mathematics, so it could easily be applied to SC2 as well ^_^.