Optimal Creep Spread in Theory
![[image loading]](http://i.imgur.com/RPfIL.png)
Creep spread by AcerScarlett @MLG Fall Championship 2012
Introduction
Zerg OP, right? Recently,”infestor OP” is the name of the game. However, half a year ago, what all the cool kids said back then was “queen OP.” Creep spread had become so out of control post-patch in May 2012 that in August, Blizzard once tried to nerf creep tumor radius in an attempt to slow Zerg creep spread, which they scrapped the idea of later on in order to “give players more opportunities to fully explore the slowly-shifting meta-game.” As a noob, I have no idea how creep spread should be balanced, nor do I care. As a research guy, all I care is concrete numbers behind creep spread, where no subjective opinion comes into play unlike balance whine. This thread is not another “use overlord to creep spread faster” or “multiple tumors spread creep faster.” Terrain factor, spread direction etc. are ignored here, too. Rather, it’s all about math. This thread attempts to mathematically prove/calculate what the optimal creep spread is. Here is the short conclusion:
When perfectly played, the total number of creep tumors increase quadratically, not exponentially, with a dedicated creeper queen, and the total number = “y” = f(x) at “x” seconds after the moment the very first creep tumor is laid down is
![[image loading]](http://i.imgur.com/dVW56.png)
High school level math knowledge is required to fully understand the content. I believe that there are many math nerds like Day[9] in Starcraft community, but if you are not one of them, you might find it boring. Welcome to Creep Tumor Mathematics 101 class!
Prerequisite
+ Show Spoiler +
Basic math/SC2 knowledge is obviously expected, but there are some things worth mentioning here.
State of Creep Tumor
Creep tumor has 4 different states: building, cooldown, spawnable, inactive
1. Building state is the state where a creep tumor is still visible to opponent without detectors. It is the first 15 seconds after its birth. (0~15 seconds)
2. Cooldown state is the state where a creep tumor is invisible to opponent without detectors yet still unable to spawn another creep tumor. It is the second 15 seconds after its birth. (15~30 seconds)
3. Spawnable state is the state where a creep tumor is able to spawn another creep tumor after cooldown ended. (30 seconds~)
4. Inactive state is the state where a creep tumor can no longer spawn another creep tumor because it already did once.
Queen’s Energy
Queen’s Spawn Creep Tumor ability costs 25 energy. All units/structures in game regenerate energy at 0.5625 [energy/second]. Therefore, it takes 25/0.5625 = 44.44…[sec] for a queen to regenerate 25 energy for the next creep tumor. For the sake of much easier calculation, duration between 2 Spawn Creep Tumor ability usages is 45[sec] in this thread. It’s possible to calculate everything with 44.44…[sec], but this is one compromise I made to keep it simple. All the creep tumors that are directly originated from a queen, not from another creep tumor, are called “original creep tumor” in this thread.
Greatest Integer Function (Floor Function)
Greatest Integer Function [p] is the largest integer not greater than p. For example,
[3.9]=3
[4.0]=4
[4.1]=4
For reference: Wikipedia on floor and ceiling functions
Proof of the Equation
+ Show Spoiler +
As you read in the introduction, with a dedicated creeper queen, the total number of creep tumors defined as y = f(x) at x seconds after the moment the very first creep tumor is laid down is
![[image loading]](http://i.imgur.com/dVW56.png)
This can be achieved only by a perfect play that even the best player in the world can’t perform. Regardless, it helps to know what the ultimate goal is in trying to constantly improve your play.
Proof (long and possibly difficult to understand)
The very first original creep tumor is spawned by a queen at x=0 by definition. After building state and cooldown state for 30 seconds in total, it spawns another creep tumor. Perfect play assumed in this proof means that spawnable state of a creep tumor lasts for 0 second, and the next creep tumor is spawned immediately. This reproductive cycle continues every 30 seconds. Therefore, the total number of creep tumors that stem from the first original creep tumor is
![[image loading]](http://i.imgur.com/upP02.png)
Greatest integer function is used because the number of creep tumors can only be an integer. (at least for now)
The second original creep tumor is spawned by the queen at x=45 because of the energy regeneration period. As a parent creep tumor, it spawns a child creep tumor after 30sec. Generation after generation, this cycle continues just like the first original creep tumor family did. With one child policy and 1 generation = 30sec, the total number of creep tumors that stem from the second original creep tumor is
![[image loading]](http://i.imgur.com/VwmRo.png)
Domain is 45=<x.
Another 45 seconds later at x=90, 3rd original creep tumor is spawned by the queen. Similarly, the total number of creep tumors that stem from the third original creep tumor is
![[image loading]](http://i.imgur.com/tn95F.png)
45*2=90 seconds. Domain is 90=<x.
Generally, the total number of creep tumors that stem from the “n”th original creep tumor is
![[image loading]](http://i.imgur.com/rKhsD.png)
y_1~y_3 are merely specific examples. Are you all still with me?
What necessitates the greatest integer functions above is the concept that a creep tumor either counts as 1 when it exists, or counts as 0 when it doesn’t. This concept is narrow and not useful in calculating further. Therefore, by extending the concept, decimal numbers of creep tumors are allowed from here on. For example, a creep tumor that is just spawned counts as 1 creep tumor, a creep tumor that has spent 15 seconds in building state counts as 1+15/30=1.5 creep tumors, a creep tumor that has spent 15 seconds in building state and 7.5 seconds in cooldown state counts as 1+(15+7.5)/30=1.75 creep tumors, and so on. Upon reaching 1+30/30=2 creep tumors, it immediately spawns another creep tumor so that the parent one becomes inactive state that is worth 1 creep tumor again. It might help to think of a pregnant woman having a baby that becomes bigger over time in her womb until she gives birth to the baby.
![[image loading]](http://i.imgur.com/AYjWF.png)
This broader concept doesn’t contradict with narrower concept, yet so much more useful. Basically, it just eliminates the greatest integer function and makes y_n continuous. One important thing to remember is that with this broader concept, y=13 could mean that there are 10 creep tumors that are worth 1, and 2 creep tumors that are worth 1.5 so that there are only 12 you can count on a map instead of 13. Using this broader concept, the total number of creep tumors that stem from the “n”th original creep tumor is
![[image loading]](http://i.imgur.com/QPBBi.png)
It’s a big deal that [ ] doesn’t exist in this version.
Now, what we want to know is not the total number of creep tumors that stem from a particular original creep tumor but rather the grand total of them from all original creep tumors. When “r” is defined as the total number of o”r”iginal creep tumors, the grand total “y” is
![[image loading]](http://i.imgur.com/Wd3jq.png)
By calculating this, (get your math textbook if it doesn’t make sense)
![[image loading]](http://i.imgur.com/yAA2J.png)
So far so good?
Because r=1 at x=0 by definition and the number of original creep tumors increase every 45 seconds because of the energy regeneration period,
![[image loading]](http://i.imgur.com/Jz45j.png)
Greatest integer function appears again when less than 25 energy of a queen is not taken into account. By allowing the number of original creep tumors to be a decimal according to queen’s energy up to 25,
![[image loading]](http://i.imgur.com/3Gn2B.png)
Whether an equation has [ ] or not might look like a minor thing, but [ ] makes it impossible to calculate the equation in any meaningful way.
Now that we have 2 equations with 3 variables, “y”, “x” , and “r”, the total number of creep tumors “y” can be shown as a function of time “x”.
![[image loading]](http://i.imgur.com/V5hl7.jpg)
Hence, optimal creep spread should have
![[image loading]](http://i.imgur.com/dVW56.png)
Q.E.D.
![[image loading]](http://i.imgur.com/ik5q9.png)
Does it make sense? Maybe I could have worded differently to make my proof easier to understand, but I guess the logic is coherent enough as it is. One intuitive way to check the equation is to substitute a random number for “x” and calculate “y”. f(0)=1, f(135)=13 etc. This table might help for reference.
![[image loading]](http://i.imgur.com/4VZbf.png)
Applying In-game Timings (ZvT)
+ Show Spoiler +
At 0:00, there is no queen available. Players have to mine minerals and make them. While people make queens in ZvZ and ZvP as well, ZvT has the most standardized queen timings. Of course, bad worker pairing, drone scout, sloppy execution etc. can delay these timing, but this is the standard I use in this thread:
15 hatchery at 2:10 +100sec = done at 3:50
16 pool at 2:45 + 65sec = done at 3:50
1st/2nd queen production at 3:50 +50sec = done at 4:40
1st/2nd queen injects at 4:40 + 45sec = next 25 energy for creep tumors ready at 5:25
3rd/4th queen production at 4:40 + 50sec = done at 5:30
3rd/4th queen inject at 5:30 +45sec = next 25 energy for creep tumors ready at 6:15
5th/6th queen production at 5:30 +50sec = done at 6:20
5th/6th queen inject at 6:20. They keep injecting. (6 queen build is the maximum assumed here)
Most importantly, 5:25, and 6:15 are the timings when 1st/2nd and 3rd/4th queens can use energy for creep tumors, respectively. These timing are so tight that sub-optimal play can easily delay them by 10sec or so. Note that prioritizing creep spread this way delays injects by 5 seconds every time new queens are made.
In-game time = “t” in seconds.
5:25 = 325sec
6:15 = 375sec
Therefore, for 1st/2nd queens, x=0 is at t=325. Similarly, x=0 at t=375 for 3rd/4th.
Namely, the total number of creep tumors from 1st/2nd queens is f(t-325), and f(t-375) for 3rd/4th.
![[image loading]](http://i.imgur.com/kbnqL.png)
![[image loading]](http://i.imgur.com/hq8M4.png)
The total number of creep tumors as a function of in-game time = “z”.
3 queen build = only 1st queen is used as the dedicated creeper = z_3q
StarTaleLife almost always take this path with early gas.
![[image loading]](http://i.imgur.com/MOV6O.png)
4 queen build = 1st and 2nd queens are used as the dedicated creepers = z_4q
![[image loading]](http://i.imgur.com/VgN52.png)
Until 5th/6th queens become available for creep tumors at t=375, there is no difference among 4/5/6 queen builds.
![[image loading]](http://i.imgur.com/YjAM9.png)
5 queen build = 1st, 2nd and 3rd queens are used as the dedicated creepers = z_5q
![[image loading]](http://i.imgur.com/3Cbn1.png)
6 queen build =1st, 2nd, 3rd and 4th queens are used as the dedicated creepers = z_6q
![[image loading]](http://i.imgur.com/4aXQd.png)
Graph based on these equations:
![[image loading]](http://i.imgur.com/2Xw5Y.png)
Table:
![[image loading]](http://i.imgur.com/FPvrQ.png)
Efficiency
+ Show Spoiler +
Easier calculated than done. No one in the world plays as good as the theory. Then, how efficiently are we playing compared to the optimal play in terms of creep spread? To find out, I took Scarlett’s creep spread on Cloud Kingdom as an example.
![[image loading]](http://i.imgur.com/RPfIL.png)
This game is a perfect example because her opponent StarTaleBomber applied almost no pressure for 14min, and Scarlett used 4 queen build with 2 queens exclusively for creep tumors after 5:25.
+22
05:25~08:00 22 in total
+15
08:00~09:00 37 in total
+15
09:00~10:00 52 in total
+17
10:00~11:00 69 in total
+16
11:00~12:00 85 in total
+9
12:00~13:00 94 in total
By taking these numbers as numerators and using z_4q from the table above as denominators, it is possible to calculate the efficiency.
![[image loading]](http://i.imgur.com/QR0H4.png)
One of the best creep spread I have ever seen among pro games still seems to have some room for improvement. 50-70% with 4 queen build is impressive nonetheless. In ZvT, Terran player’s job is to keep this efficiency as low as possible with hellion/banshee etc. For 4 queen build, my wild guess is that 50%+ would lead into out-of-control creep spread that covers the entire map. 20%- or so would be considered relatively bad creep spread and where Terran wants Zerg to be. 20% with 4 queen build at 13min mark would look like this:
![[image loading]](http://i.imgur.com/P7fRh.png)
+2 queen range patch must have dramatically increased this efficiency. It would be interesting if someone made a program for calculating the efficiency from replays. With y= (x+45)(x+60)/2700 equation, efficiency for any build order in ZvX with any number of queens can be calculated. Knowing projected creep spread at arbitrary time might help some build order theorycrafting.
This efficiency measurement is not without its own problem, though. Counting creep tumors in VODs/replays causes the numerators to use the greatest integer functions while such factor is eliminated for the denominators. Because of this, efficiency can never be 100% even in theory. Measuring efficiency for the first 2min or so is somewhat pointless due to high fluctuation. Also, having 90%+ efficiency is nearly impossible without some luck in picking the right moment to count. Lower than 100% theoretical ceiling makes Scarlett’s 70% look even more impressive. Despite this problem, it’s still a useful measurement in comparing the degree of creep spread.
Final Thoughts
+ Show Spoiler +
When creep spread was a popular topic right after the patch in May, I did some math on it. Slowly, the topic died down, so I decided not to post my work. Then at MLG several days ago, Scarlett showed us an amazing creep spread that convinced me to find my old work and follow through with it. Most of you probably skipped reading boring proof part, but I hope at least a few guys read the entire thread and maybe point out possible mistakes I made. If anyone has a VOD/replay that looks worth analyzing, please link. From what I’ve seen, LiquidTLO’s emphasis on creep spread gives him very high efficiency. On the other hand, Life’s emphasis on early gas and ling/muta micro tends to result in very low efficiency. Ultimately, it comes down to how much a player prioritizes creep spread with limited APM/attention. Did you enjoy reading despite tons of equations? Thank you for reading to the end. Any feedback is much appreciated. Ask me anything.
Orek's Articles/Guides
+ Show Spoiler +
+ Show Spoiler [Article etc.] +
BitByBit Fan Club
A bit on BitByBit
IlIlIlIlIlIl or lIlIlIlIlIlI?
Optimal Creep Spread in Theory
Various Businesses in Starcraft 2
Balance Discussion Math(Best of N format analysis)
Underground Activities in Starcraft 2
Artosis pylon Art
Map Size History & Analysis
Larva disappearing Glitch in 1.5 (not about 20th larva)
+ Show Spoiler [Guide] +