BlackLilium Profile Joined April 2011 Poland 420 Posts Last Edited: 2015-06-26 11:35:57 #1 Udpate 26 June 2015

A solution has been found to bring the basic income equal the Standard HotS/LotV.

The income becomes lower only as a result of reduced efficiency, at higher worker counts.

The article and the graphs have been replaced to match the new mod.



A solution has been found to bring the basic income equal the Standard HotS/LotV.The income becomes lower only as a result of reduced efficiency, at higher worker counts.The article and the graphs have been replaced to match the new mod. Update 25 June 2015

A solution without triggers have been found. Thank you cacho56!

Also a small tint to hot minerals is now applied to make it more noticeable.



A solution without triggers have been found. Thank you cacho56!Also a small tint to hot minerals is now applied to make it more noticeable. Hot Mineral Harvesting



Forget about Double Harvesting!

Mod "Hot Mineral Harvesting" available in all regions.



Forget about Double Harvesting!Mod "Hot Mineral Harvesting" available in all regions. Abstract

We present a new harvesting model: Hot Mineral Harvesting (HMH).

When a mineral is mined, the patch becomes "hot", decreasing further harvesting efficiency for a few seconds.

With this mechanism we achieve mining efficiency degradation at 9+ workers, while maintaining optimal worker count per base at 16 and absolute maximum at 24.

However, this model does not rely on unpredictable worker bouncing (Starbow) or harvesting complexity (Double Harvesting)



We present a new harvesting model: Hot Mineral Harvesting (HMH).When a mineral is mined, the patch becomes "hot", decreasing further harvesting efficiency for a few seconds.With this mechanism we achieve mining efficiency degradation at 9+ workers, while maintaining optimal worker count per base at 16 and absolute maximum at 24.However, this model does not rely on unpredictable worker bouncing (Starbow) or harvesting complexity (Double Harvesting) Preface

Since the release of Double Harvesting mod, it received not only positive reviewes, but also some negative comments and concerns, such as:

Worker sits on the mineral patch too long



Workers clump up at the patches a lot



Workers can be in a hidden partially-mined state. It carries minerals that cannot be returned and looks as if it has none.



DH income early game too high, leading to harder cheeses



DH efficiency drop is too low



We, as well as some others, tried to tune up the DH mod on multiple occasions.

This was a hard work though, because of peculiar DH problem of sequential and interleaved harvesting.



DH was also trying to have an overall income close to the Standard. This caused early game to have slightly higher income, and late game - lower.

Inadvertently, it lead to many cheese builds that hit earlier and harder, giving less chance for the defender to scout them.



Few days ago we created "Double Harvesting Improved" which tried to solve some of the issues above. It included more triggers and weird behavior and the results were... rather poor.

So we stepped away from DH and searched for a different solution... which lead us to the Hot Mineral Harvesting model.



Since the release of Double Harvesting mod, it received not only positive reviewes, but also some negative comments and concerns, such as:We, as well as some others, tried to tune up the DH mod on multiple occasions.This was a hard work though, because of peculiar DH problem of sequential and interleaved harvesting.DH was also trying to have an overall income close to the Standard. This caused early game to have slightly higher income, and late game - lower.Inadvertently, it lead to many cheese builds that hit earlier and harder, giving less chance for the defender to scout them.Few days ago we created "Double Harvesting Improved" which tried to solve some of the issues above. It included more triggers and weird behavior and the results were... rather poor.So we stepped away from DH and searched for a different solution... which lead us to the Hot Mineral Harvesting model. Problem Statement

So what are our goals exactly? We want an economic model such that:

Worker efficiency drops when they are paired (i.e. 9+ workers in a base)



Optimal worker count in a base remains at 16



Maximum useful worker count in a base remains at 24



We want as few changes in worker behavior as possible



We don't want to increase the time a worker needs to sit at the mineral patch.



We want to avoid worker bouncing if possible, as it is random and ugly.





So what are our goals exactly? We want an economic model such that: Solution

Instead of changing the method of mining, we dynamically alter the amount of minerals harvested and time it takes to do so.

After mining, mineral patch becomes "hot" for few seconds.

If another worker mines while the patch is hot, it obtains less resources than usual, and it requires a bit more time to harvest it.

However, if the same worker returns, and there was no one else at the patch, the minerals become "cold" and provide full income.



The solution affects only the mineral patch, not the workers.

This gives much more freedom in terms of balancing.

The solution can also be combined with all previous harvesting models, including LotV, if needed.



Altering the amount of minerals has a limitation coming from integer numbers.

However, by altering the harvesting time as well, this gives much more freedom in balancing HMH.

These alterations have less contraints than DH, making the mod easier to adjust to whatever is needed.



In the mod we release (HMH 5-4) we changed the following

Cold patch provides 5 minerals (same as Standard)



Hot patch provides 3 minerals (75% efficiency)



Return delay increased from 0.5s to 0.6s



Cold mineral harvesting time is set to 2.686s (thus 0.6+2.686 matches Standard harvesting time)



Hot mineral harvesting time set to 3.17s



Gas mining is set to 3 to better match reduced mineral income



MULE income per one trip 30 -> 24, to better match normal worker efficiency. Mules should not be affected by hot minerals.







Detail: The hot/cold state to compute the actual amount of harvested minerals is checked when a worker finishes mining (before activating the hot state by itself). However, the time needed to harvest is checked when a worker starts mining. We resolved this through additional state "Warm" (see in implementation)



Instead of changing the method of mining, we dynamically alter the amount of minerals harvested and time it takes to do so.After mining, mineral patch becomes "hot" for few seconds.If another worker mines while the patch is hot, it obtainsresources than usual, and it requires a bit more time to harvest it.However, if the same worker returns, and there was no one else at the patch, the minerals become "cold" and provide full income.The solution affects only the mineral patch, not the workers.This gives much more freedom in terms of balancing.The solution can also be combined with all previous harvesting models, including LotV, if needed.Altering the amount of minerals has a limitation coming from integer numbers.However, by altering the harvesting time as well, this gives much more freedom in balancing HMH.These alterations have less contraints than DH, making the mod easier to adjust to whatever is needed.In the mod we release (HMH 5-4) we changed the followingDetail: The hot/cold state to compute the actual amount of harvested minerals is checked when a workermining (before activating the hot state by itself). However, the time needed to harvest is checked when a workermining. We resolved this through additional state "Warm" (see in implementation) Testing

We perform testing on 32 bases of standard layout, each having a different worker count. The test was run for 60 minutes.

In a replay, the number of minerals in the patches - at the beginning and end of the test - was counted. The difference gave us the number of minerals mined in each base, separately.

With the same test we compared the previous models: Standard, Starbow and DH 3x3 (TL DH 3x3).



Income

The income of HMH 5-4 matches the Standard in the 1-8 range. There is a slight drop, because you don't want to pair first workers on the closest mineral patches.

The difference become apparent in the 9-16 range. At 16, it becomes 75% of Standard.





It is probably better to compare each income curve when it is normalized: a single-worker base mines "1" in all models, and the rest is scaled apprioprietly.

We can see that the efficiency of HMH 5-4 drops faster than Standard and DH and is almost equivalent to Starbow.

The main difference to Starbow is how it was achieved (hot minerals vs bouncing). Moreover, Starbow has much higher early-game income.

While in the overall Starbow mod this is not a problem, since all units were rebalanced, it is a major problem in standard HotS play, leading to cheese and all-in builds that hit harder and are difficult to scout.





The efficiency 75% at 16 workers is what you have in Starbow, as well as in Broodwar economy.



New Worker Efficiency

The new worker efficiency measures the income benefit from the each added worker.

In the 4-8 worker region the 90% efficiency comes from the distance from mineral patches.

The 8-16 region is the main area which new economy mods try to alter. HMH has an unprecedented stability at ~45% in that region.

Other models have uncontrollable peaks at various spots, because the worker behavior is affected by them and not fully controlled.

The 17-24 region is a bit less important. It's the case when a base is over-saturated, either because you are about to expand, or you just lost a base.

HMH behaves somewhat strangely, with 17th and 18th worker giving no benefit, but higher counts still contribute.

We believe it is related to workers starting to bounce.





Base benefit

These graphs represent the benefit of having more bases with the same worker count.

The percentage value represents how much more minerals you get compared to an opponent with a fewer amount of bases and same number of harvesters.

As expected, all the mods give higher incentive to expand than the Standard model.

In mid worker counts (the most common case), HMH gives consistently higher benefit than DH model, compares well to Starbow and sometimes even exceeds it.











We perform testing on 32 bases of standard layout, each having a different worker count. The test was run for 60 minutes.In a replay, the number of minerals in the patches - at the beginning and end of the test - was counted. The difference gave us the number of minerals mined in each base, separately.With the same test we compared the previous models: Standard, Starbow and DH 3x3 (TL DH 3x3).The income of HMH 5-4 matches the Standard in the 1-8 range. There is adrop, because you don't want to pair first workers on the closest mineral patches.The difference become apparent in the 9-16 range. At 16, it becomes 75% of Standard.It is probably better to compare each income curve when it is normalized: a single-worker base mines "1" in all models, and the rest is scaled apprioprietly.We can see that the efficiency of HMH 5-4 drops faster than Standard and DH and is almost equivalent to Starbow.The main difference to Starbow isit was achieved (hot minerals vs bouncing). Moreover, Starbow has much higher early-game income.While in the overall Starbow mod this is not a problem, since all units were rebalanced, it is a major problem in standard HotS play, leading to cheese and all-in builds that hit harder and are difficult to scout.The efficiency 75% at 16 workers is what you have in Starbow, as well as in Broodwar economy.The new worker efficiency measures the income benefit from the each added worker.In the 4-8 worker region the 90% efficiency comes from the distance from mineral patches.The 8-16 region is the main area which new economy mods try to alter. HMH has an unprecedented stability at ~45% in that region.Other models have uncontrollable peaks at various spots, because the worker behavior is affected by them and not fully controlled.The 17-24 region is a bit less important. It's the case when a base is over-saturated, either because you are about to expand, or you just lost a base.HMH behaves somewhat strangely, with 17th and 18th worker giving no benefit, but higher counts still contribute.We believe it is related to workers starting to bounce.These graphs represent the benefit of having more bases with the same worker count.The percentage value represents how much more minerals you get compared to an opponent with a fewer amount of bases and same number of harvesters.As expected, all the mods give higher incentive to expand than the Standard model.In mid worker counts (the most common case), HMH gives consistently higher benefit than DH model, compares well to Starbow and sometimes even exceeds it. Math behind it

You may skip it if you don't like math

On the other hand, if you want to play with it, e.g. try to find your own HMH balance solution, you may want to type these formulas into an excell sheet.

That's what I did before doing a "field test". Field tests of HMH reflect the math theory very well!



We define the following terms.

The values provided are the defaults in the Standard, and we can change them in the mod

A =5 - amount of minerals harvested by a single worker



=5 - amount of minerals harvested by a single worker W =0.5s - wait time after the harvest is complete



=0.5s - wait time after the harvest is complete H =2.786s - harvest time



=2.786s - harvest time HotA - amount of minerals harvested from hot mineral patch



- amount of minerals harvested from hot mineral patch HotH - time for harvesting from hot mineral patch



- time for harvesting from hot mineral patch T = approx 3.966s - transport time. Function of mineral distance and worker speed, acceleration, turn rate etc. We don't want to change this, as it could affect scouting and combat directly.





Derived terms. These are values we compute.

C = W+H+T - total harvesting cycle



= W+H+T - total harvesting cycle HotC = W+HotH+HotT - total harvesting cycle



= W+HotH+HotT - total harvesting cycle MpM = A*60/C - base income of a single worker measured in minerals per minute



= A*60/C - base income of a single worker measured in minerals per minute pMpM = HotA*2*60/HotC - income of two workers paired, measures in minerals per minute. Assumes that workers don't have to wait for each other.



= HotA*2*60/HotC - income of two workers paired, measures in minerals per minute. Assumes that workers don't have to wait for each other. Max = HotA/HotH - maximum possible income from a single mineral patch



= HotA/HotH - maximum possible income from a single mineral patch pEff = pMpM / (2 * MpM) - efficiency of paired workers



= pMpM / (2 * MpM) - efficiency of paired workers maxEff = Max / (3 * MpM) - efficiency of workers which fully saturate a mineral patch. It is assumed that three workers suffice to fully saturate a patch.



= Max / (3 * MpM) - efficiency of workers which fully saturate a mineral patch. It is assumed that three workers suffice to fully saturate a patch. pContrib = (pMpM - MpM) / MpM - contribution of a worker when it is joining another one to form a pair.



= (pMpM - MpM) / MpM - contribution of a worker when it is joining another one to form a pair. maxContrib = (Max - pMpM) / MpM - contribution of a worker when it is joining a pair to form a triplet, fully saturating a mineral patch.





With Standard we have:

C = 7.2524s



= 7.2524s MpM = 41.4



= 41.4 pMpM = 82.7



= 82.7 Max = 107.7



= 107.7 pEff = 100%



= 100% maxEff = 86.8%



= 86.8% pContrib = 100%



= 100% maxContrib = 60.3%





With the mod we present here we have:

A = 5



= 5 W = 0.6s



= 0.6s H = 2.686s



= 2.686s HotA = 4



= 4 HotH = 3.17s



= 3.17s T = 3.966s



= 3.966s C = 7.2524s



= 7.2524s HotC = 7.7364s



= 7.7364s MpM = 41.4



= 41.4 pMpM = 62.0



= 62.0 Max = 75.5



= 75.5 pEff = 75%



= 75% maxEff = 61%



= 61% pContrib = 50%



= 50% maxContrib = 33%





Changing the ratio of W:H buffs/nerfs the 3 worker (maxContrib). We aimed for a value which would be lower than of 2nd worker (pContrib) but high enough so that it would still be relevant.

If W is too high compared to HotH, it may actually happen that 3rd worker contributes more than the second!



You may skip it if you don't like mathOn the other hand, if you want to play with it, e.g. try to find your own HMH balance solution, you may want to type these formulas into an excell sheet.That's what I did before doing a "field test". Field tests of HMH reflect the math theory very well!We define the following terms.The values provided are the defaults in the Standard, and we can change them in the modDerived terms. These are values we compute.With Standard we have:With the mod we present here we have:Changing the ratio of W:H buffs/nerfs the 3 worker (maxContrib). We aimed for a value which would be lower than of 2nd worker (pContrib) but high enough so that it would still be relevant.If W is too high compared to HotH, it may actually happen that 3rd worker contributesthan the second! Implementation

Thanks to cacho56, the mod does not use triggers, everything is driven by Effects and Behaviors.

The harvesting time change is applied when a worker starts gathering, but the amount of minerals obtained is checked at the end of harvesting.

This poses a problem. To that end I further expanded upon the original cacho56 idea, making it cleaner and better support the changing in harvest time.



We now have:

When a worker gains "Carry Minerals..." behavior it triggers and effect, shooting an invisible line in front of it to find which mineral field it was gathering from.



We apply two effects to minerals: "Warm Minerals" and "Hot Minerals".



"Hot Minerals" is applied first, with a validator requirement that minerals already have "Warm Minerals".



0.1s later we apply "Warm Minerals" unconditionally.



Both "Hot..." and "Warm..." behaviors are temporary and expire after 6.0s.



Warm minerals is a hidden behavior which does not alter the harvesting. Its only use is within the validator for "Hot...".



Hot minerals apply the harvesting changes as described in this mod.





When only one worker is mining, the effect is triggered every ~7.25s. "Warm Minerals" are gone, and "Hot Minerals" is never applied.

However, when at least two workers are minings, the second one finishes before the 6s mark, reapplying "Warm..." and applying "Hot...".

From that point onward, minerals remain hot until the number of workers drops down to 1 again.



With this approach, minerals never oscilate between Cold and Hot. They are either hot all the time or cold all the time.

With that achieved, it does not matter when in the gathering process the time increase and amount decrease is applied.



Thanks to cacho56, the mod does not use triggers, everything is driven by Effects and Behaviors.The harvesting time change is applied when a worker starts gathering, but the amount of minerals obtained is checked at the end of harvesting.This poses a problem. To that end I further expanded upon the original cacho56 idea, making it cleaner and better support the changing in harvest time.We now have:When only one worker is mining, the effect is triggered every ~7.25s. "Warm Minerals" are gone, and "Hot Minerals" is never applied.However, when at least two workers are minings, the second one finishesthe 6s mark, reapplying "Warm..." and applying "Hot...".From that point onward, minerals remain hot until the number of workers drops down to 1 again.With this approach, minerals never oscilate between Cold and Hot. They are either hot all the time or cold all the time.With that achieved, it does not matter when in the gathering process the time increase and amount decrease is applied. Before you try...

We want to strongly encourage you trying the mod. Maybe some new showmatches and tournaments? - would be awesome!

However, before you jump in, be aware, that the income rate above 8 workers (very common case) is lower.

Your build orders will not be as fast. You won't max up so quickly as in Standard.

A saturated 3 base HMH economy gives only a bit more than a saturated 2 base Standard economy.

Your HMH income will never explode as much as in Standard.

HMH encourages not only expanding, but also low-army count fights and - indirectly - scouting.



We want to strongly encourage you trying the mod. Maybe some new showmatches and tournaments? - would be awesome!However, before you jump in, be aware, that the income rate above 8 workers (very common case) is lower.Your build orders will not be as fast. You won't max up so quickly as in Standard.A saturated 3 base HMH economy gives only a bit more than a saturated 2 base Standard economy.Your HMH income will never explode as much as in Standard.HMH encourages not only expanding, but also low-army count fights and - indirectly - scouting. Acknowledgements

I would like to thank many people to make the topic of economy mods popular.

Special thanks to ZeromuS for making DH popular and maintaining it while I (initially) lost hope for it.

I thank cacho56 for his initial solution on how to make the mod without triggers.

I thank Barrin and Cascade for valuable measurements and simulation.

I thank LaLuSh and SC2John for more experiments and all the discussion we had.

I thank Xiphias and Ahli for their help measuring Starbow.

I thank Bacon_Infinity team - both Nick and Susan - for hosting multiple showmatches on their twitch (



I also want to thank all the positive and negative critics regarding the previous mod, as well as the previous version of HMH.

A good critique motivates to make things better and find another solution. Without your input HMH in the current form would never appear.



Finally, I would like to thank the TeamLiquid for making all this possible.

The community here is awesome, and tools are much more convenient than elsewhere to publish and advertise those mods.



I would like to thank many people to make the topic of economy mods popular.Special thanks to ZeromuS for making DH popular and maintaining it while I (initially) lost hope for it.I thank cacho56 for his initial solution on how to make the mod without triggers.I thank Barrin and Cascade for valuable measurements and simulation.I thank LaLuSh and SC2John for more experiments and all the discussion we had.I thank Xiphias and Ahli for their help measuring Starbow.I thank Bacon_Infinity team - both Nick and Susan - for hosting multiple showmatches on their twitch ( http://www.twitch.tv/bacon_infinity ), as well as the TL team for the tournament.I also want to thank all the positive and negative critics regarding the previous mod, as well as the previous version of HMH.A good critique motivates to make things better and find another solution. Without your input HMH in the current form would never appear.Finally, I would like to thank the TeamLiquid for making all this possible.The community here is awesome, and tools are much more convenient than elsewhere to publish and advertise those mods. Help?

I could use some help on the artistic side.

The hot minerals could use a better icon in the UI (a flame icon perhaps?)

Currently, I change the tint of the minerals when it gets hot, but there could be a better, more localized animation. Tinting looks particularly bad with lab mineral fields, as the mineral frame is tinted together with the minerals themselves.

Send me a PM if you want to do that



I could use some help on the artistic side.The hot minerals could use a better icon in the UI (a flame icon perhaps?)Currently, I change the tint of the minerals when it gets hot, but there could be a better, more localized animation. Tinting looks particularly bad with lab mineral fields, as the mineral frame is tinted together with the minerals themselves.Send me a PM if you want to do that Mod usage in other projects

Feel free to incorporate the mod in other projects that you have. Just please let me know that you are doing it.

If possible, I would encourage you to use the mod as a dependency with "latest version" enabled, rather than copy-pasting everything.

This way, if something changes in the mod (e.g. bug fix), it gets automatically propagated to your project.



Feel free to incorporate the mod in other projects that you have. Just please let me know that you are doing it.If possible, I would encourage you to use the mod as a dependency with "latest version" enabled, rather than copy-pasting everything.This way, if something changes in the mod (e.g. bug fix), it gets automatically propagated to your project. FAQ

How does compare to LotV model, which is likely to be present?

It is completely orthogonal. You can combine LotV with HMH.



Why not buff low-worker income above Standard, so that high-worker income is not so far below it?

Double Harvesting showmatches, especially the RuFF-vs-Scarlett, showed us that buff to early worker count can lead to cheese and all-ins which hit harder and earlier, making them hard to scout. It is completely orthogonal. You can combine LotV with HMH.Double Harvesting showmatches, especially the RuFF-vs-Scarlett, showed us that buff to early worker count can lead to cheese and all-ins which hit harder and earlier, making them hard to scout. [MOD]Economy - Hot Mineral Harvesting