archive by month
Skip to content

the many uses of the extractor trick

In a comment to next up for Steamhammer, MicroDK speculated (correctly) about the purpose of getting an extra pair of zerglings using the extractor trick. Liquipedia has an entry on the extractor trick but does not mention all of its uses. Steamhammer’s upcoming “go extractor trick drone” and “go extractor trick zergling” only scratch the surface.

An extra drone. The most common use of the extractor trick is to get an extra drone early, going to 10 drones while your overlord and hatchery provide only 9 supply. When you are at 9 supply, as your minerals approach 100, start an extractor. Using up the drone takes your supply down to 8, so you can start another drone and return to 9 supply. Then cancel the extractor to get the drone back and you have 10 supply in units. You can do it any time you are supply blocked, but it usually only pays off at 9 supply when your build order is such that otherwise the extra drone would wait a long time.

Extra zerglings. The second most common use of the extractor trick is to get an extra pair of zerglings when rushing with a 4 pool or 5 pool. When you reach 9 supply, instead of starting an overlord right away, do the extractor trick and spawn zerglings. They’ll be earlier than if you waited until after the overlord, which puts more pressure on the opponent. 4 pool rushbot ZZZKBot never builds a second overlord, but keeps its supply down by constantly attacking and uses the extractor trick whenever it can to get more zerglings.

Exceed max supply. Protoss mind control famously allows protoss to exceed the 200 supply limit. Zerg can also exceed the 200 supply limit with the extractor trick. It’s not practical and I’ve never seen it happen, but I can imagine the situation: You’re at 197 and you want just one more ultralisk (4 supply) before your attack....

The double extractor trick. If you have 2 drones and 2 geysers, you can do a double extractor trick: Make 2 extractors and go over your supply limit by 2. It’s rare, but I have seen it in a pro game. Or if you have 3 geysers, etc., though I’ve never seen that and doubt it would be useful.

Field repairs. Another side effect of starting and canceling a zerg building is that an injured drone is restored to full health. It’s still called an extractor trick even though the purpose is different. If your scout drone is harassing the enemy base and gets hurt, it can use the geyser in the enemy main or natural to bring its hit points back and harass some more. It’s common in pro games, and I intend to eventually implement it in Steamhammer. Or if you’re being rushed, you may be able to rescue a drone that is in danger of dying.

Other buildings. Nothing says that you have to use an extractor for the trick. Any zerg building will do. An extractor is the cheapest, 50 minerals, and can be built away from the zerg base wherever there is a geyser. If you have creep available but no geyser (maybe you’ve already taken your gas), you could build a creep colony instead, 75 minerals. If all you have is open ground, you could build and cancel a hatchery at 300 minerals—though it’s hard to imagine a situation where that would pay off.

It’s kind of depressing how limited and stereotyped bots are in using flexible tricks like this. Someday we’ll do better!

Trackbacks

No Trackbacks

Comments

Arrak on :

The extra drone makes a huge difference in 9Pool especially. You can apply early pressure and still get a good economy up and running.

I saw another interesting use for extractor tricks -- getting drones to the other side to stop a walled-off cannon-rush behind the mineral line, blocking the building zone and killing the probe.

Also, I found another bug when trying to do a 10Hatch 9Pool build -- it looks like it freezes if I try to do the extractor trick twice (before hatch, and after pool). Couldn't figure it out...

Jay Scott on :

Hmm, I imagine it is another manifestation of the same underlying BWAPI bug. Shown by experience to be hard to trace. :-/

MicroDK on :

I tested a 10Hatch 10Pool doing the extractor trick twice (in main) without any problems... ;)

Arrak on :

So it only happens when there is excess supply, which was caused by a typo in my build. I narrowed it down to this line in doExtractorTrick: "_queue.queueAsHighestPriority(MacroAct(BWAPI::UnitTypes::Zerg_Drone));". Apparently, calling this line causes it to freeze.

To reproduce the bug you could use: "ETCrash": { "Race": "Zerg", "OpeningBuildOrder": [ "5 x drone", "go extractor trick", "hatchery", "overlord", "drone", "spawning pool", "drone", "go extractor trick" ] } which gives the excess supply before the second ET.

Jay Scott on :

That is quite a hard freeze, isn’t it? It is adding a new item to the front of the queue while the current queue item is in process, which I guess causes an infinite loop. In any case, the code is certainly not correct. When startExtractorTrick() returns to manageBuildOrderQueue(), the next action is to remove the front item in the queue. I must have never tested that error case.

Jay Scott on :

One fix would be to find a larva and morph it on the spot, instead of queuing the drone. A more longwinded fix would be to create a new extractor trick state and have doExtractorTrick() carry out the work. The simplest thing of all would be to ignore that error state (the error of “doing the extractor trick when you don’t need to”) and delete the queue-a-drone line. Of course then if you get rushed your build may break, but in that case you may want to break out of your build anyway.

Jay Scott on :

Anyway, thanks for the bug report, and especially for the test case which made it easy to solve the bug!

Jay Scott on :

OK, I fixed the infinite loop bug in the next version of Steamhammer by the method of adding a new extractor trick state. The behavior is that it waits until a larva and resources are available and makes the unit (in this version, not necessarily a drone). If you do it directly in startExtractorTrick(), the behavior is that it makes the unit IF a larva and resources are available, and otherwise does nothing. It could be what you want... maybe. I’m afraid I changed a lot more code than I can paste into a comment.

PurpleWaveJadien on :

Pastebin or a Gist could be options

Jay Scott on :

Or, say, this blog. What makes it tricky is that the version Arrak has has the command “go extractor trick” and the version I fixed has the commands “go extractor trick drone” and “go extractor trick zergling”. It’s a feature change that breaks backward compatibility. I could post a patch that adjusts various files, and it might apply correctly to somebody else’s code, but Arrak would still have to update openings to match. I thought it might be easier to follow my hints and code the simple fix than to apply a complicated patch. But what do y’all want? I can do both.

Marian on :

Extractor trick is not for free though, you get only about 66% refund when you cancel your building.
That's why you don't do it with e.g. hatchery.

Jay Scott on :

Actually you get 75% of your mineral cost back, rounded down to the nearest integer. I should have put it into the post! For an extractor, you spend 50 and get 37 back when you cancel it, for a net cost of 13 minerals. For a creep colony, you spend 75 and get 56 back, a net cost of 19. For a hatchery the net cost is 75, and it’s hard to imagine when that could be worth it.

krasi0 on :

BTW, which bot is that famous ZZZKBot? Does it play on SSCAIT and if so, under what name?

Jay Scott on :

You are of course asking for newer visitors! ZZZKBot by Chris Coxe is a polished 4 pool bot and a perennial strong contender. In the SSCAIT 2016 competition it played different strategies against some opponents. CIG 2016: 4th place. AIIDE 2016: 2nd place. SSCAIT 2016: Lost the bronze match.

krasi0 on :

Ah, I see now. But after SSCAIT 2016, the author uploaded a broken version which crashes all the time and never fixed it? :(

Jay Scott on :

ZZZKBot is on the list for CIG 2017, and not as a re-entrant from the previous year. Apparently we will get to see it play again.

PurpleWaveJadien on :

The original entry form had it listed as playing with BWAPI 4.2.0, so it seems likely to have been updated.

MicroDK on :

I believe its name is Chris Coxe on SSCAIT.

Add Comment

E-Mail addresses will not be displayed and will only be used for E-Mail notifications.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.
CAPTCHA

Form options

Submitted comments will be subject to moderation before being displayed.