timing the Styx build and variants
Here’s a table of variants of the Styx build. The left one, 7 drone hatchery first, is the original; the other 3 are natural variations. The story from Dan Gant is that an entire population of machine learning agents all converged on the original build, so according to those agents, it’s the best choice. I won’t accept their opinion without checking. Steamhammer, of course, includes all 4 of these builds, and has additional decorations beside.
step | 7 drone hatch 1st | 7 drone gas 1st | 8 drone hatch 1st | 8 drone gas 1st |
---|---|---|---|---|
1 | 5 x drone (9 total) | |||
2 | spawning pool | |||
3 | drone (back to 9 total) | |||
4 | extractor trick (10th drone) | |||
5 | overlord | |||
6 | 3 x zergling | |||
7 | hatchery | extractor | hatchery | extractor |
8 | extractor | hatchery | extractor | hatchery |
9 | 4 x zergling | 2 x zergling | 4 x zergling | 2 x zergling |
10 | metabolic boost (zergling speed) | |||
11 | keep making zerglings |
The 4 variants differ in 2 features. Feature 1: The 8 drone variants, on the right of the table, throw in an extractor trick (step 4) to get an additional drone, leaving the zerg with 8 drones mining at the end of the build rather than 7. Feature 2: You’re making both a hatchery and an extractor, and you can make them in either order (steps 7 and 8). Hatchery first means the hatchery finishes a little earlier and may be able to raise the zergling count a little. There are also timing effects because of the different number of zerglings made (step 9) before starting zergling speed (step 10).
The machine learning agents concluded that the leftmost build is best. My intuition is that the rightmost build is best: The extra drone from the extractor trick doesn’t help at first, but provides more flexibility in the long run (in case you don’t win outright). Getting gas before hatchery barely delays the hatchery, because the extractor does not finish before the hatchery starts, but gets zergling speed significantly earlier, which I feel outweighs the couple extra zerglings you may gain by getting hatchery first.
I’m not trusting my intuition without checking, either. This post is about measurements. I can measure timings. I can’t measure which variant is objectively stronger, because it depends on the skill of the player. PerfectBot is not available to tell us. Are you better at taking advantage of zergling numbers, or zergling speed?
All tests were run on the map Heartbreak Ridge. I didn’t use Steamhammer’s existing builds, but wrote special ones to reduce variance. Each build calls for exactly 40 pairs of zerglings. There is no drone scouting. The second hatchery goes in the main base because long drone movements will vary more. Overlords were inserted by Steamhammer’s usual method, which is heuristic but consistent. Zerglings stayed put and did no fighting so that overlords were made at predictable points; I disabled the Recon squad and convinced the opponent to also stay home. Building placement is different between the 2 starting bases on the map, so I only timed games from the 9 o’clock base. Zerglings gathering around the main hatchery interfered with drone movement when placing buildings and caused variations in the timings, so I had them gather at a distance. I recorded data for 5 runs of each build.
Zergling speed timing: The frame when metabolic boost finished upgrading. The gas-first builds get zergling speed over 330 frames faster, around 14 seconds at 24 frames per second. That’s a long time during a game, but don’t forget that it is only a window of opportunity. If there is any advantage to be gained by a gas-first build, it must be gained during that interval. With hatchery first, the extractor trick to gain the 8th drone causes a 100 frame or 4 second delay, which is much more than I expected. With gas first, the extractor trick causes no measurable delay. Now that’s interesting.
build | median | low | high |
---|---|---|---|
7 drone hatchery | 5955 | 5941 | 6003 |
7 drone gas | 5621 | 5591 | 5659 |
8 drone hatchery | 6055 | 6054 | 6092 |
8 drone gas | 5621 | 5594 | 5633 |
Zergling timing. For each build, I took the run with the median timing of zergling speed from above, and put only that data into these charts. The initial 6 zerglings happen after the extractor trick and before the hatchery/extractor decision, so only the 7 drone/8 drone division between the builds is meaningful. The numbers say there may be added variance in the extractor trick causing some delay on average, but no necessary delay. The 8th zergling (the fourth pair) comes after the hatchery and extractor and before zergling speed. For the hatchery first builds, zergling speed finishes after 22 or 24 zerglings have been produced. For the gas first builds, after 16 or 18 zerglings.
This scatter chart shows how similar the four variants are. The x axis is time, y is the zergling count. Blue is the original 7 drone hatchery first build. The other colors are visible a bit around the edges of the blue. The initial 6 zerglings appear at the lower left in a column. There are visible gaps where overlords are made.

Here is a more useful visualization. I subtracted the blue timings from each build and plotted the residuals. A point above the horizontal zero line means that that build was later than the 7 drone hatchery first build to reach that specific zergling count. A point below the line means it was earlier. The vertical axis gives the frame difference. 40 points are plotted for each build, one point for each zergling pair from 1 to 40.

The original blue build is quite good at pumping out lings. It is ahead of the others at more timings than not. But every build is ahead at some timings. The regular spikes are related to overlord spawning. If you are fighting hard you will not need to make overlords, and the results may be different. You can think of each timing when a build is ahead as a window of opportunity, and compare the zergling count windows to the zergling speed window of 14 seconds for the gas-first variants.
Extra minerals. The 7 drone variants are just about perfectly tuned to balance mineral income and larva production from 2 hatcheries. After starting 40 pairs of zerglings, less than 50 minerals are on hand and the larva count is 0 or 1. That means that the 8 drone variants cannot gain an edge in zergling production, even in the long run. Instead, the 8th drone allows flexibility in case the build does damage but does not win outright; the player has more resources to switch into another line.
After starting 40 pairs of zerglings, the 8 drone variants have banked about 400 minerals. Normally, you’d prefer to spend them before getting that far. One idea is to spend the minerals on a sunken—perhaps an offensive sunken against zerg. Another is to add a third hatchery, pause zerglings briefly to make a few drones to keep the hatchery fed, and go back into zergling production at a higher rate. Another is to put the 8th drone on gas and prepare to suddenly switch into a tech build.
Comments
Jay Scott on :
- Dan said: My version of the story of the machine learning agents is simplified and wrong in some points. Also, he still prefers the blue build.
- Hao Pan said: It’s tough for terran to defend, too, and explained why.
MarcoDBAA on :
http://webcache.googleusercontent.com/search?q=cache:UcxJsEinS3EJ:satirist.org/ai/starcraft/blog/archives/878-timing-the-Styx-build-and-variants.html+&cd=1&hl=de&ct=clnk&gl=de
Jay Scott on :
Dan on :
To clarify: From what I recall (and I don't recall well) the agents didn't tend to learn a precise build that you could point at as saying "this is the best". Agents learned different variants, and a single agent wouldn't necessarily execute the same build every time (as they recalculated build queues every few seconds). Some even added unused Evolution Chambers or Lairs. But the main thrust they all had in common was the 9-Pool into two-Hatchery speedling idea.
The blue order is what I added to PurpleSwarm just because I thought it would be the most effective version of that idea. I didn't test any variants.
Specifically, I think "have the most Zerglings possible" variants produce the nastiest timing attack. As you say, "If there is any advantage to be gained by a gas-first build, it must be gained during that interval." -- and the later Metabolic Boost timing is still fast enough to kill 9-Pool Lair builds, even if you hold your Zerglings at home before speed finishes as PurpleSwarm does against other 9-Pool builds.
So another good experiment would be to compare winrates of the variants against Zerg opponents (but it could take a few days on desktop to generate enough games to measure a meaningful difference).