archive by month
Skip to content

attack by defense

Many bots have been in this situation: You’re playing against Tscmoo—and you’ve broken into its base! You’re winning! Your units zero in on the mining workers, which flee... and they’re good at running away. Sometimes they lead the attackers on a goose chase until rescue arrives, and Tscmoo survives to win after all. I’ve seen it happen. Iron is also particularly good at leading goose chases. How do you get your bot to avoid wasting time and concentrate on what’s important?

There are a lot of ways. You can give buildings priority and chase nothing that you can’t immediately hit. You can refuse to chase any unit that is fast enough to escape. You can chase only a certain distance before you turn back. You can attack only units that are approaching, not those that are out of firing range and fleeing (watch out for kiting). You can chase only units that are inside the perimeter of your formation, so that they are partly surrounded and have to dodge well to escape, and then they leave the perimeter and you stop.

I want to suggest another way: Don’t attack, defend an area. Draw a box or a circle around the area you want to attack, and defend it from enemies. Add a margin for hysteresis, so you don’t vacillate if an enemy moves into and out of the area. If you are trying to stop mining, defend an area around the enemy’s resources, including the resource depot. Your squad’s goal is to clear the area of all enemy units and buildings—to defend this part of the enemy base against enemies. If the workers run away, let them; you’ll destroy the resource depot that much sooner. If you’re trying to camp the enemy production (assuming it’s grouped together somewhat), the same idea works by defending a different area. (If your goal is to destroy key tech, then prioritizing those buildings is probably what you want instead.) You’re really attacking, not defending, so once you’ve cleared the defended area, move or enlarge the box and keep up the fight.

Unlike yesterday’s trick strategy that is useful only in special cases, the “defend a box” skill is good in many situations. You may already have the skill and use it for defense; the idea is that “defense” and “offense” are a matter of point of view. To defend overlords from corsairs with hydras, draw a box for the hydras to defend and keep your overlords there. Similarly to defend a mineral line against, say, wraith harass. For an offensive example, take a slow tank push. You can implement it by telling the tanks to defend an area, and gradually moving the area forward. Tanks in the rear will unsiege as the defended area goes out of range, move to the front, and siege again, and that’s a push. The same thing works for a lurker push.

Trackbacks

No Trackbacks

Comments

Joseph Huang on :

This is kinda random/offtopic but I was looking at SparCraft Unit.cpp and apparently it only supports ground weapons, no wonder it suicides mutas.

Jay Scott on :

Yes, air units are... not supported. Neither are reavers. SparCraft works well for the limited set of units that UAlbertaBot makes.

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.