Starcraft has 3 suicide units: spider mines, scourge, and infested terrans. They need to be handled much differently than other units. All of them do high damage but are easy to destroy, so they are units with a lot of leverage (meaning that using them well brings a lot of benefit). Spider mines are difficult because they don’t move after they’re placed; you have to foresee the future to place them well. Scourge is difficult because it does move. Infested terrans are difficult because they are rarely any use unless they coordinate with other units.

Steamhammer is one of the best bots at scourge usage, but objectively it is distressingly weak. It often hits a target with more scourge than are needed to destroy it, is overcautious about attacking targets defended by ground units, suicides scourge against mass air units that can defend themselves, retreats scourge that have no immediate target too far from the fight, and other blunders. But it’s daunting to think of all the work needed to play well with just this one unit type.

How many scourge per target? Well, each hits for 110 damage, so divide. If a mutalisk target (120 HP max) is hurt more than slightly, you can kill it with 1 scourge, and you don’t want to waste any. But if there’s a long chase to catch it, it might heal during the chase and you’ll need 1 extra. Theoretically you could account for that beforehand. Or a target might recharge at a shield battery, or suddenly be mass-repaired, or d-matrixed. That’s hard to predict, and if it happens you might want to turn the scourge away—unless extras are already handy.

Scourge can be shot down on the way to the target. A battlecruiser has 500 HP, so it dies to 5 scourge. It can fire one shot before the scourge strike, and the shot can kill one scourge, so you need to send 6. Well, actually whether it kills the scourge depends on upgrades. 2 scourge kill a corsair. 4 scourge kill 2 corsairs. But 12 scourge do not kill 6 corsairs; the corsair damage splashes and protoss may defeat most or all of the scourge. In general, any enemies nearby may cooperate to kill your scourge. I don’t have a better idea than to simulate the attack and see how many scourge may be shot down, to decide how many are needed and whether it is worth it.

Usually you want to send enough scourge to kill the target. Don’t sent 2 at a time against that lone battlecruiser (as many bots do, including Steamhammer and PurpleSwarm), because only 1 will hit and you’ll need twice as many. Usually, but not always. A mutalisk has 120 HP, so a scourge hit leaves it with 10. A muta with 10 HP is nearly useless in an air fight, so if you follow up the scourge with your own mutas then the enemy muta will flee or die, or both. Neutralizing an enemy mutalisk with 1 scourge hit is a crazy-efficient use of gas.

What tactics? Scourge see corsair and chase; corsair sees scourge and flees toward safety (like a cannon or a group of dragoons). The corsair can try dodging micro moves to throw the scourge off; I doubt that works well against a bot. Pro players like to predict the path of the fleeing corsair and intercept it with another pair of scourge sent from another direction. I don’t know any bot that tries that.

Later, there may be many scourge and many corsairs. To minimize the splash damage to the scourge, try converging in a wide arc. That may make it worth while.

With lurkers versus protoss, you want to snipe observers. Undetected lurkers can delay protoss a long time, so it may easily be worth it to spend several scourge to kill a single observer that tries to stay safe among dragoons. But don’t fly in headlong, try to analyze the dragoon locations and choose the best angle.

In general, good scourge planning and pathing is complicated and depends on the tactical situation. And how are you supposed to do the planning, which has to happen before you can do an accurate combat simulation, without combat simulations first to figure out what works? I guess expensive methods may be needed.

Where to go when there are no immediate targets? Scourge are fast, so if the enemy has little anti-air, which is common versus protoss early in the game, a good idea may be to swoop around the map looking at stuff. But scourge have short sight range, so that’s dangerous once the enemy is good at shooting up. Scourge want to stay near where enemy air units may appear: Over or near the front-line army (which will protect them), above cliffs or unwalkable areas near the fight, along paths where dropships or corsairs may fly, or in your own base to defend against air raids. Making the best choices means predicting the enemy, not a simple skill.

The bottom line: Scourge use is awesomely complex. I don’t want to code all the details, I think I have to aim for more general methods of search and machine learning.