Scientifically Measuring Mining Speed

DescriptionI once asked the question, "just how many minerals per second does a SCV mine?" and I was surprised to find no clear answer. Liquipedia had a very minimal article on resource harvesting, with a graph generated from measuring income in replays.

I hope that this article provides some clear data about mining rates in SC2.==========TLDR Abstract:- From 0 to 2 SCVs/patch, each additional SCV adds ~39-45 minerals/game minute.- Going from 2 SCVs/patch to 3 SCVs/patch will yield diminishing returns.- 3 SCVs/patch will fully saturate a mineral patch. Adding additional SCVs will not increase mining rate at all.- At full saturation, each patch will yield ~102 minerals/minute.- A base with 8 mineral patches will yield ~672 minerals/min with 16 SCVs, or ~816 minerals with 24 SCVs.

- From 0 to 2 SCVs/geyser, each additional SCV adds ~33-42 gas/game minute.- Going to 3 SCVs/geyser yields a slightly smaller amount of gas.- 3 SCVs will usually saturate a geyser, but some far-corner geysers will require 4 SCVs to saturate. (the 4th SCV yields only a small increase in income)- At full saturation, each geyser will yield ~114 gas/minute.- A base with 2 vespene geysers will yield ~228 gas/minute with 6 SCVs (7 if unlucky).

With 3 SCVs / mineral patch, it takes ~14m:42s to mine out a base.With 2 SCVs / mineral patch, it takes ~17m:51s to mine out a base.With fully saturated gas, it takes ~13m:09s to deplete a geyser.

==========Methods- WorldEdit was used to generate a map with multiple copy-pasted "clones" of a base. The first "clone" was the full base, with 8 mineral patches and 2 gas placed in positions realistic for a melee map. Each of the other "clones" had all 1 mineral patch and 1 gas, and no other resouces. In between the clones, 8 mineral positions and 4 gas positions were represented.

- A real-world stopwatch was used for timing purposes.

- All tests were done in Normal speed. At normal speed, game-time and real-time correlate 1:1. This was verified with stopwatch timing of constructing a SCV (17 seconds game-time and real-time) and constructing a Command Center (100 seconds game-time and real-time).

- All timing tests were done from harvesting-in-progress. (ie, the stopwatch was started after the SCVs had been mining for a while) This is to avoid the delay from ordering a stationary SCV to start mining.

==========Results

1) Mining TheoryMining can be simplified into a "cycle" that is repeated endlessly (until the resource patch runs dry). The cycle begins/ends when the SCV returns a resource packet (mineral or gas) to the CC. It can easily be shown that for n SCVs, all of the SCVs spend equal time on each "cycle". If this was not true, the faster SCV would speed up until it "collided" with the previous SCV's mining cycle. This would force it to wait at the mineral patch, slowing it down.

For a single resource patch being harvested by n SCVs, there are only two possible cycles:- Unsaturated: Each SCV harvests for x seconds and travels for y seconds. None of the SCVs ever have to wait for the previous SCV to finish harvesting.- Saturated: The patch is always occupied. Each SCV harvests for x seconds, travels for y seconds, and waits for z seconds at the patch.

The saturation point is therefore defined by travel time and harvesting time:

Eq.v) #SCVs to Saturate = (x+y)/x

This makes intuitive sense - in the "fastest possible map" scenario (travel time = 0), only 1 SCV per patch is needed for saturation. In the "distance mining" scenario (travel time >> mining time) the number of SCVs needed for saturation is directly proportional to distance.

==========2) Measuring TimingsBased on the results of section (1), one would expect that you can fully predict mining behavior just by knowing the times x and y. Therefore, it is important to measure timings precisely.

The mining time x can be deduced from the saturation mining rate. Therefore, I put 8 SCVs on a single resource patch to ensure saturation, then measured timing two different ways (this was the most time consuming part of my test):- Resource packets returned at 1, 2, 5 and 10 minutes (this was my main data)- Time to return 10 resource packets. (this was a double-check)

Since this is a saturation test, the rate of resource return should not depend on distance to the resource patch. I tested two vespene geysers at different distances, and they indeed gave the same results.

Once mining time is precisely known, the round-trip travel time (y) to a resource patch can be calculated as follows:- Put a single SCV on that resource patch.- Measure time to return 10 resource packets.- This gives you the time-per-cycle. (= x + y)- Subtract x.

Unlike x which is a constant, y is highly variable due to travel distance. Using realistically placed mineral patches and gas geysers, I obtained the following values of y:

MINERALS: 3.8-4.8sec travel timeGAS: 3.6-5.0sec travel time

Note that the numbers are very similar, as one might expect since minerals and gas are at similar distance from the CC.

==========3) Calculating income rateUsing the equations (i)-(iv) and the empirically measured variables x and y, one can calculate expected income for SCVs on a single mineral patch or gas geyser:

- One SCV on one mineral patch harvests 39-45 minerals per game minute, depending on distance.- Two SCVs on one mineral patch harvest 78-90 minerals per game minute, depending on distance.- Three SCVs on one mineral patch harvest ~102 minerals per game minute. This is fully saturated and does not depend on distance.- One SCV on gas harvests 33-42 gas per game minute, depending on distance.- Two SCVs on gas harvest 67-84 gas per game minute, depending on distance.- Three SCVs on gas harvest 101-114 gas per game minute, depending on distance. In the case of far-diagonal gas placement you will need 4 SCVs for full saturation.- Four SCVs on gas harvest ~114 gas per game minute. This is fully saturated and does not depend on distance.- A fully saturated base with 8 minerals and 2 gas will harvest ~816 minerals and ~228 gas per game minute.

Note that in the worst case of far-diagonal gas placement, using only 3 SCVs causes you to lose ~13 gas per minute which is 11% of your total gas income! (that really sucks) You will definitely want to cough up those 50 minerals for the 4th SCV.

==========4) Verifying income rateEquations and math are all good, but it's worthless if it doesn't correlate to real data. So here's the data.

Gas income was measured more easily (I got tired) by timing the time spent obtaining 40 gas for 1 scv, 80 gas for 2 scvs, and 120 for 3-4 scvs. This was used to estimate the number of seconds per gas packet returned.

From my tests, average mining on 8 patches with 8 workers was ~43 minerals/worker/minute. 16 workers was ~42 minerals/worker/minute.

So I have nothing much to contribute other than confirming what you said, and stating that I found this graph to be inaccurate (possibly just mislabeled). I don't want to just remove it, but not sure how best to flag or edit the wiki to show that it needs to be replaced.

I just wanted to thank you personally for doing all this work. Your calculations were critical to creating accurate Value columns (dmg per sec per resources spent) for the unit spreadsheet I posted on the official battlenet SC2 forums.

`Twas brillig, and the slithy toves Did gyre and gimble in the wabe: All mimsy were the borogoves, And the mome raths outgrabe.

So I was searching for mining rates and came across this thread, and figured I'd do a little testing of my own in an attempt to add to the discussion using a real world map.

--edit--

I redid the minerals test on the map Abyss (8 player map) in order to get a more rounded picture of real-world average mining distances and angles. Will redo the gas test at some point too, on the same map.

tl;dr - My results broadly support the conclusions in the OP, with the exception of expected mineral income when using 24 harvesters per base.

Minerals at Start: 12,695Minerals at End: 60,715Total Income: 48,020Income Per minute: 8003.3Income Per mineral patch per minute: 83.4Income Per base per minute: 666.9Average Income Per harvester per minute: 41.7

Minerals at Start: 72325Minerals at End: 104155Total Income: 31,830Income Per minute: 6,366Income Per mineral patch per minute: 99.5Income Per base per minute: 795.8Average Income Per harvester per minute: 33.2

Minerals at Start: 29,710Minerals at End: 39,489Spending during test: 0Total Income: 9,779Income Per minute: 1,397Income Per mineral patch per minute: 116.4Average Income Per harvester per minute: 58.2

Gas at Start: 16,290Gas at End: 24,238Spending during test: 0Total Income: 7,948Income per minute: 1,135Income per geyser per minute: 114Average income per harvester per minute: 37.8

Conclusion:

My results return an almost identical income for gas, but slightly lower values for minerals. My recorded income of 666.9 minerals per minute per base, when using 2 harvesters per patch, is less than 1% shy of the expected 672, which I imagine is within acceptable tolerances, but when using 3 harvesters per patch, my recorded income of 796.1 minerals per minute per base is almost 3% off the expected rate of 818 (which could make the difference between being able to afford that cannon/roach/planetary fortress in time and dying to a timing attack). I suspect that harvesters are just spending more time bouncing back and forth between mineral patches than the theory calculations account for.

But yeah, basically all I've done is provided another data set that broadly supports everything in the OP, while noting that real world conditions don't quite live up to the theorycrafting. Shocking, I know

Did some follow up research and used your results to calculate amounts of minerals lost in harrass. I did the calculations (no empirics) about half year ago, were about to write a post about it to TL but had no rights and forgot about it... Today I posted it for some1 else so I thought I post my results here too.

edit: the minerals are lost from two reasons. 1. The amount lost to build back the probes, which is linear in amount of probes and 2. the lost mining time, which is non-linear relationship to amount of probes lost (the relationship is convex).

If you think it is interesting, I can explain more. I am an applied math student so I find this stuff fun to do, even though its necessarily not relevant (atleast at this level). Actually I would be interested in a sc2 math forum if there were one =). For example, statistical analysis, predicting outcomes, game theory for different setups, scenario analysis of different strategies etc =).

If you're interested in doing math in relation with sc2, try this one:

A couple year ago i wrote some articles i never published. The idea was the following : Players at SC2 should manage to get themself in a situation of guaranteed win, which is defined as a situation in which you have a) more army but the same eco as your opponent b) more eco but the same army as your opponent.

Because in this situation you can either go pure army or pure eco and be ahead 2 steps in eco with equal army, 2 steps ahead in army with equal eco or be one step ahead on both.

To complicate a little, the player which has this advantage has to make a confrontation happens before both players are maxed (because then his advantage is nullified). And he has to attack in a window that is a "timing push window" for him but not for his opponent! A timing push window is a window in which everything you invested on is paying. That is, you cut probes something like a minute earlier so that they have paid for themself. Plus there is no dead money in upgrades or tech. All your upgrades are done, your tech has kicked in aswell.

To complicate a little more, you not only have to push accross the map to make the confrontation happens, before maxing out and in a timing push window, but you have to be ahead enough that the time it will take to walk across the map with your army does not let your opponent catch up in army supply.

To complicate even more, races do not work the same. That is, Z can choose to make only drones with their hatches then only army. Other races have to build gateway etc. Terran have mules, which means their income is the highest at the time they have their first mule for instance, etc.

If you assume a perfectly balanced situation and no army composition advantage (good enough scouting), it means that the guy with the biggest army value wins the fight tuss the game.

Now puts all that into math and tell me which build of which race is the best ever!!

I expect the result to be 6 pool or something because your army value will be bigger no matter what, even against 11-11, for a brief period of time.

What would be cool would be to see if those math are any irrelevant to analyse game played by pros in X or Y tournament.

What would be ABSOLUTELY awesome would be to do analysis such as this one : a terran goes CC first, a terran goes double gas cloack banshee into CC. Given the delay on the CC and the number of scv not build, how much scv does the banshee has to kill to pay for itself? Ofcourse the banshee has to kill enough scv to get both players even in scv count or it didnt pay for itself. That number of scv could be X. Given one player researched cloack and the other one scanned, if the banshee killed X+1 scv before dying, in how much time after the killing will the banshee have paid for itself? That is, if one scv mine 40 ressource/minute, and the banshee is 200 ressource + 200 for cloack - 270 for scan, it will have paid for itself a little more than 3 minutes later. incomewise. But the player that lost scv has to remake them, and it's 50 minerals a piece, so given what number X is, it could be that the banshee would pay for itself by killing only 2-3 scv or something. Then you could take it to the next level by saying "yeah but what if we reach optimal saturation on 2 base for both player before the mining time lost in dead scv would make the banshee paying for itself?"

Well well well, speculations :D

And all that stuff doesnt take into account the harass possibilites, the cost of scouting, the risk/reward of assumptions players have to do all the time etc etc, making sc2 a game that's maybe not possible to fully grasp by abstract concept alone.

On November 12 2012 06:39 Natalya wrote:If you're interested in doing math in relation with sc2, try this one:

A couple year ago i wrote some articles i never published. The idea was the following : Players at SC2 should manage to get themself in a situation of guaranteed win, which is defined as a situation in which you have a) more army but the same eco as your opponent b) more eco but the same army as your opponent.

Because in this situation you can either go pure army or pure eco and be ahead 2 steps in eco with equal army, 2 steps ahead in army with equal eco or be one step ahead on both.

To complicate a little, the player which has this advantage has to make a confrontation happens before both players are maxed (because then his advantage is nullified). And he has to attack in a window that is a "timing push window" for him but not for his opponent! A timing push window is a window in which everything you invested on is paying. That is, you cut probes something like a minute earlier so that they have paid for themself. Plus there is no dead money in upgrades or tech. All your upgrades are done, your tech has kicked in aswell.

To complicate a little more, you not only have to push accross the map to make the confrontation happens, before maxing out and in a timing push window, but you have to be ahead enough that the time it will take to walk across the map with your army does not let your opponent catch up in army supply.

To complicate even more, races do not work the same. That is, Z can choose to make only drones with their hatches then only army. Other races have to build gateway etc. Terran have mules, which means their income is the highest at the time they have their first mule for instance, etc.

If you assume a perfectly balanced situation and no army composition advantage (good enough scouting), it means that the guy with the biggest army value wins the fight tuss the game.

Now puts all that into math and tell me which build of which race is the best ever!!

I expect the result to be 6 pool or something because your army value will be bigger no matter what, even against 11-11, for a brief period of time.

What would be cool would be to see if those math are any irrelevant to analyse game played by pros in X or Y tournament.

What would be ABSOLUTELY awesome would be to do analysis such as this one : a terran goes CC first, a terran goes double gas cloack banshee into CC. Given the delay on the CC and the number of scv not build, how much scv does the banshee has to kill to pay for itself? Ofcourse the banshee has to kill enough scv to get both players even in scv count or it didnt pay for itself. That number of scv could be X. Given one player researched cloack and the other one scanned, if the banshee killed X+1 scv before dying, in how much time after the killing will the banshee have paid for itself? That is, if one scv mine 40 ressource/minute, and the banshee is 200 ressource + 200 for cloack - 270 for scan, it will have paid for itself a little more than 3 minutes later. incomewise. But the player that lost scv has to remake them, and it's 50 minerals a piece, so given what number X is, it could be that the banshee would pay for itself by killing only 2-3 scv or something. Then you could take it to the next level by saying "yeah but what if we reach optimal saturation on 2 base for both player before the mining time lost in dead scv would make the banshee paying for itself?"

Well well well, speculations :D

And all that stuff doesnt take into account the harass possibilites, the cost of scouting, the risk/reward of assumptions players have to do all the time etc etc, making sc2 a game that's maybe not possible to fully grasp by abstract concept alone.

You're forgetting about defender's advantage.

As small as defender's advantage is in SC2 compared to BW, it does exist (mainly in pre-spreading and making concaves/positioning).

So you actually have to be ahead enough in army to CONFIDENTLY nullify this advantage in order attack. Also, when given the choice, it's always better to compound your economic advantage.

To complicate a little more, you not only have to push accross the map to make the confrontation happens, before maxing out and in a timing push window, but you have to be ahead enough that the time it will take to walk across the map with your army does not let your opponent catch up in army supply.

You're forgetting about defender's advantage.

As small as defender's advantage is in SC2 compared to BW, it does exist (mainly in pre-spreading and making concaves/positioning).

So you actually have to be ahead enough in army to CONFIDENTLY nullify this advantage in order attack. Also, when given the choice, it's always better to compound your economic advantage.

My quote of myself take into account the defender's advantage army value wise. The thing is, if you are trying to build a theory on something, you better not use the words that already exist about that thing. They might carry a lot of unperceived aprioris, meanings, etc. with them (I'm a philosopher).

About prespreading and concave, it's not evident the defender has the advantage. Take cloud kingdom for instance. In zvz the attacker can take an awesome concave around the choke near the 4rth and deny mining there. In order to force engagement into his concave, the attacker can send packs of 5 roaches to the main, nat and eventually third base.

I've been thinking a lot about timing mineral saturation with expansions. I was watching forgg stream and what really interested me was how interesting his economy management was. I don't think a lot of people understand expansion timing... But the thing that got me thinking was how little people considered the mule to change Terran economy. When you compare it to Zerg or Protoss economies, sure you can't produce multiple drones or chonoboost--- but you can equalize by expanding aggressively basically because the mules have allowed you to essentially saturate your base. It seems you need at most 2 workers per patch as Terran to be at the same income rate as P or Z.