At any rate, enjoy - feedback and constructive criticism would be much appreciated. Footnotes denoted by stars (*).
Introduction
Every Zerg player should be familiar with the maxim, "build drones when safe, build army when not safe." It's likely that this piece of advice has helped a significant number of lower level players take their play to the next level, but rarely does anyone ask "how many drones do I NEED?" While any player can develop game sense regarding this by playing a large number of games, I was immediately reminded of w3jjjj's excellent thread on BW Zerg econ management. This guide singlehandedly improved my ICCUP rank from D- to D+, and while I don't think this thread will be quite as useful I do hope that the following will be useful for all Zerg players.
With that inspiration in mind, this post will attempt to delve into the question of, "How many drones do I need to produce X of some Zerg unit?". For the most part I won't get too specific into builds, but I will include some interesting results I found while crunching the numbers, and offer some suggestions in the way this information should be used. I will be the first to admit that I'm not a very good player, so you should take any opinion on balance and gameplay that I might express in this article with a grain of salt. I also do realize that there are some very good tools out there that already do similar things, which I recommend wholeheartedly that you use.
Theory
In the most general case, determining the worker-to-production ratio for one facility is very easy. The formula below should be obvious and can be applied to all three races.
Resource Cost of Unit = (Number of Workers) x (Mining Rate of 1 Worker per second) x (Build Time of Unit in seconds)
Or directly:
Number of Workers = Resource Cost / (Mining Rate x Build Time)
In the cases with multiple units being built at the same time, we simply multiply Resource Cost by the number of units we're looking to produce.
For simplicity, we'll assume worker mining rate is ~40 minerals/minute, and ~38 gas/minute. Then we would be able to determine something like the following table for Terran, as it has the simplest macro mechanics to account for:
While the information contained in this table is useful to remember for all stages of the game, the most interesting application is towards developing all-ins. For example, we can confirm the existence of builds like the Terran 6-rax: on one base, 24 SCVs and 1 MULE mine an approximate equivalent of 24 SCVs on two bases - exactly the amount of SCVs required for constant Marine production with Supply Depots.
A similar table can be generated for Protoss as well, although both warp-in build time and chrono boost will complicate certain calculations. In general, Protoss macro mechanics will only increase the number of probes necessary to maintain constant production. The table below only shows the effects of warp gates:
For Zerg, larva production and unit build time are completely independent, so for Hatcheries with larva injection it makes more sense to look at unit production cycles of larvae rather than X unit every 15 seconds. For the purposes of this article, I chose to treat 7 larvae every 45 seconds as the ideal cycle as opposed to the more commonly held 6.67 every 40 seconds.**
Note that some of the figures have been rounded - i.e., producing one Drone in a round of 7 larvae actually requires something like 1.67 Drones and 11.7 for a full round, but were rounded up to 2 and 12 respectively for formatting reasons. Costs were included for morphing units, i.e. a Brood Lord costs (150/150) + (Corruptor = 150/100) for a total of 300/250. Higher-tier units were included for completeness, but it's a little silly to think that someone would attempt to maintain constant production of full larvae cycles of Brood Lords and Ultralisks.
Discussion/Application
With this knowledge in mind, I'd like to take a look at other aspects of Zerg macromanagement, beginning with some very simple confirmations of knowledge we already know.
- 2-Base Infestor/Ling is a very economically efficient style of play - with 30 drones on minerals and 10 on gas, you can afford 20 lings and 2 infestors (and 2 overlords) in every production cycle after your tech has completed. Considering the incredible utility of the Infestor in all matchups, it shouldn't be any surprise that this composition remains incredibly strong even after Patch 1.4.
- 14 gas/pool should always use the first 25 energy on larvae injection, since your mining rate is enough to build a full round of drones or zerglings.
- Hatch-first builds with double Queens will have less than the requisite 24 to support double injection, and so should be spending your initial queen energy on at least one creep tumor.**** After the initial round of drone production, at least one injection should be used to provide enough larvae for the amount of minerals being mined.
- Pure Roach will completely drain your minerals, and will actually require mining at full 24-drone saturation if you want to maintain full production cycles. Obviously most players do not do this, and spend whatever leftover larvae/resources on tech units.
- Roach/Hydra is a fairly economically balanced composition on 3 bases at a 1:1 ratio, but its' utility is obviously limited by matchup, and there are some larvae that will go unused. May not require a 3rd Queen until much later.
It's possible to use these numbers to set different benchmarks whenever formulating different compositions or builds, especially all-ins. For example, a 2-base 2-gas build in ZvP is virtually unheard of in the current metagame, but with a fast Lair (delaying Metabolic Boost) opens up a lot of different tech options for aggressive play.*** More specifically, Ling/Hydra all-ins and Ling/Baneling with drops are both viable strategies that arise from this worker count, as they are virtually identical resource-wise, and two gas allows for a modest amount of teching to get either Hydra range (sometimes +1 carapace as well) or for faster Overlord Drop/Speed for bombing runs on mineral lines.
Of course, in a more general sense, simply having this knowledge is good to know in different game scenarios. For example, on two bases worth of gas you can only make 3 Mutalisks every round of production, so you must save gas for 3-4 rounds of production (or 2-3 full minutes!) to make a substantial amount of mutas in one cycle, i.e. when your Spire finishes.
Some Thoughts on Expansion Timings
The following section is an extension of the information above, assuming our only goal is to take and saturate expansions. I thought it was particularly interesting to try to use the information to try and make a purely numerical argument on how to best take additional bases.
Assuming we have the production to support it, the number of mining needed to produce 24 drones, 3 overlords, and 1 Hatchery in a single production cycle is 64 drones, or four bases' worth of mining.***** While certain other considerations will complicate the issue of going between 1 base and 2 bases for this number to be used, it does work splendidly when considering moving from 2 to 3 bases since we have an even numbers of production facilities and cycles.
+ Show Spoiler [Explanation] +
With 32 drones on minerals on 2 bases, each hatchery will consume mining equivalent to 13.3 workers - 10 for 6 drones, and 3.3 for overlords. Two hatcheries will produce 12 drones, consuming the mining of 26.6 workers in a single round, which leaves about 5.3 workers' worth of floated minerals. With a second production round we have once again 12 drones produced at a cost of 20 mining, but only one overlord needs to be produced for this round as there will be leftover supply from the previous round. The total remaining will be (5.3 + 5.3 + 3.3) for a total of 14, which is enough to satisfy the required 12 workers' worth of mining to produce a Hatchery.
Also note that the larvae work out quite perfectly, as 12 Drones + 2 Overlords are made in the first cycle, and 12 Drones + 1 Overlord + 1 Drone->Hatchery is made in the second cycle. Ideally, however, the Hatchery would be made first, so that the completion of the second production cycle would line up with the completion of the Hatchery for immediate mining at saturation. In this case, it may be wise to find a way to place the Hatchery down in a previous production cycle, such as a cycle of 48 Zerglings + 3 Overlords + 1 Hatchery.
Also note that the larvae work out quite perfectly, as 12 Drones + 2 Overlords are made in the first cycle, and 12 Drones + 1 Overlord + 1 Drone->Hatchery is made in the second cycle. Ideally, however, the Hatchery would be made first, so that the completion of the second production cycle would line up with the completion of the Hatchery for immediate mining at saturation. In this case, it may be wise to find a way to place the Hatchery down in a previous production cycle, such as a cycle of 48 Zerglings + 3 Overlords + 1 Hatchery.
Thus, when taking a 3rd base, we have enough mining and production such that a third base can be established in two production cycles time with enough drones to saturate it.
On going from 3 to 4 bases, an additional base of mining provides too many larvae and too few resources to satisfy drone/overlord production in a single cycle with only 16-drone saturation at each base. Even if the Hatchery can be placed in a previous production cycle, you will only have almost enough minerals to produce the requisite 24 drones and overlords, so you are forced to choose between 16-saturation or full-gas mining.
For going from 4 bases to 5 or higher, it should be obvious that Zerg will be capable of fully saturating a base in one production cycle, although the spawning Drones will have to wait for the Hatchery to finish building. It may be possible to use unspent minerals during the 3->4 base transition to double-expand as well.
With this in mind, here's a theoretical pattern for expansion timing for a Zerg player:
+ Show Spoiler [Theorycrafting] +
Suppose you are playing a Zergling heavy style, and after making a large army you decide to take your 3rd base at the end of a double cycle of Zerglings. While you can't outright kill your opponent, suppose that you are guaranteed to be able to stall him for at least 90 seconds. Thus, you add drones in the next two production cycles, and immediately take your fourth at the end of the second drone cycle. Two drones from the first round of production are transferred over to make two Extractors, and upon the completion of the second cycle all drones are transferred/rallied to the third.
By now, you've fully saturated your third and can resume army production. Although the fourth is not currently mining, it does not need to be immediately saturated if you feel you are unsafe.
Although in a real game this situation may never occur exactly as described, it does provide the backbone for a game plan. With this information, you should be able to develop different benchmarks and expansion timings for different composition/builds, like Roach/Infestor or Ling/Baneling, etc., even if you and your opponent fubar the opening stages of the game.
Concluding Remarks
Rarely are games ever as cut and dry as we want them to be. Nevertheless, I do hope that this information will help people out in improving their gameplay and will encourage other people to make more mathematically (or at least, numerically) driven posts to analyze the game.
In the future, I may look at expansion timings once again for Roach builds again and see how it stacks up with the theorycrafting above. More importantly, I'd like to see how this information could be used in developing 2-gas or 3-gas builds, even if they are only timing attacks or all-ins.
Although not all such analysis might not be useful or even applicable to real game scenarios, I do believe that more structured inquiry into subjects like these will help to further develop the knowledge and skill level of the SC2 playerbase. I look forward to seeing more posts with similar (or better!) approaches than mine.
Footnotes:
+ Show Spoiler [*] +
The math behind this is (16 SCVs at 100% efficiency) + (8 SCVs at 50% Efficiency) + (1 MULE = 4 SCVs) for a total of 24, though 1 SCV will maintain constant Supply Depot production for a total of 23. On the other side, we have (6 Barracks * 3 SCVs needed/Marine) + (5 SCVs needed/Depot) = 23.
+ Show Spoiler [**] +
The reasoning for this is due to how energy regeneration rates are set. At a rate of 0.5625 energy/second for all units, a Queen will regenerate 22.5 energy every 40 seconds, and thus be at a slight deficit in energy. A Zerg player with 40-second injections and a small bank of energy may be able to have 20 larvae 15 seconds faster than a player using 45-second cycles, but effectively waste a larva from capping the hatchery spawn too quickly. Note that with a quicker injection cycle, you may have to bump up the numbers listed in the table by 2-3 drones if you plan on producing full cycles.
+ Show Spoiler [***] +
Is this style of play particularly good - i.e., can the build be optimized such that the tech comes out fast enough to deal significant damage, and is it easily scouted? These are questions to be answered in the build refinement process, but from my limited experience it seems that 2 gas play seems sound enough, so long as you don't trade your army for nothing.
+ Show Spoiler [****] +
If you do choose to inject, you gain one larva which can lead to a slightly faster drone now, but at the cost of wasting 1 larva one cycle later. Even so, I would think the unquantifiable benefits of double creep tumors would outweigh such a gain.
+ Show Spoiler [*****] +
While it takes only 62 drones for the Hatchery, Drones, and Overlords, building 2 extractors (from non-mining drones) will add 50 minerals to the total cost, or the equivalent of 2 drones on minerals, for a total of 64.