I’ve uploaded Steamhammer 2.3.6 to SSCAIT. The main purpose of this point release is to fix a combat simulation bug that I cleverly—nay, brilliantly inserted just before the AIIDE tournament, to ensure that Steamhammer’s results didn’t discourage other bot authors. The bug caused deviations from excellence such as scoring 67% against Iron rather than 95%. The bug had a variety of effects, but the most important is that mutalisks were afraid of enemies that they could not see, even enemies like vultures that could not shoot back. Come into view and die, stay out of sight and live forever.
After AIIDE prep I wanted to do something fun, so I also added queen skills, improved defiler plague, and fixed a bunch of easier bugs and weaknesses, including a few important ones. Important changes are in bold.
combat simulation
• Setup of combat simulation is corrected. In the AIIDE version I added code in the CombatSimulation
class (which works the details of setting up a combat sim) to bypass the combat sim and return a short-circuit result in certain easy cases where the enemy has undetected cloaked units. FAP does not simulate cloaking and detection, so it was an important improvement. I reversed a condition in an important bit of code, which had the effect that the short-circuit worked correctly in the cases where it was supposed to, but also worked in cases where it was not supposed to. Ouch.
related to bases
• An infested command center was misrecorded as belonging to both sides. That was a fun bug! There was a correct record saying it was zerg, and a leftover incorrect record claiming that it was still terran. I didn’t test mind control, but the bug must have affected that too. The most obvious effect was that a squad might be ordered to attack the location of the “enemy base,” after which they would gather around the infested CC and warm their hands (well, claws).
• A lifted command center no longer establishes a base. The code that checked “does somebody own this base?” did not consider whether a command center in the correct location might be in the air. That generally led units to collect underneath the lifted CC until it was either shot down or moved away from the base location. It didn’t cause any losses that I saw, but it did cause bad play.
• Workers start transferring to a new base before the base’s resource depot completes. It’s something of a big deal, because Steamhammer zerg deliberately overproduces drones to populate a new base as soon as the hatchery starts, so that the base can become productive as early as possible. But then it didn’t transfer the drones until the hatchery completed. Now it computes the distance and transfers the drones to arrive after the hatchery finishes. It uses the shorter air distance instead of the true ground distance so workers are sent later than they could be, but it’s nevertheless an honorable improvement. Be afraid of the big macro.
queens
For fun, I added broodling and ensnare and made command center infestation more reliable. Steamhammer already had parasite skills. Parasite was more successful than I expected; in recent games I think the queen sometimes paid for itself in information about the enemy. Broodling and ensnare make games more fun when they come up, especially ensnare, and they’re not too costly. There remains a lot of room to improve queen play, especially queen maneuvering and coordination.
• Broodling. If Steamhammer sees enough enemy units that want to turn into broodlings (like tanks, or high templar, or ultralisks), it will eventually make 1 or 2 queens and research broodling. Making 2 queens is new behavior. If broodling is researched, then broodling is the queen’s highest priority: The queen will stay home until it has enough energy, then join the army and broodling any enemy that wants it enough. Only if there is extra energy will it consider ensnare or parasite.
• Ensnare. If Steamhammer sees a substantial number of enemies that enjoy being ensnared, it will eventually produce a queen, research ensnare, and oblige them. If ensnare is researched, then ensnare has priority over parasite: Steamhammer will only use parasite if the queen has enough energy that a future ensnare could still happen. (Ensnare and parasite both cost 75 energy.) The ensnare code works similarly to plague: It scans around and scores the possible ensnare targets to choose the best. It likes to ensnare fast units, and it likes to reveal cloaked units with ensnare, and of course it likes to goop up as many enemies as possible. Also, I updated FAP to understand that ensnare slows down the movement and firing rate of units. FAP’s understanding of ensnared movement is approximate, but its understanding of firing rate is nearly accurate. That way Steamhammer understands that ensnared units are weaker, and now might be a good time to attack them.
• If ensnare or broodling is researched, eventually also research the queen energy upgrade.
• Infest command centers more reliably. Formerly, Steamhammer had no special infestation skill at all. It could infest a command center solely as a side effect of the queen’s behavior of staying with the army; if the army was hitting a command center, then the queen was in infestation range because the army was there. If the queen didn’t have energy for a spell, it stayed home and could not infest. Now the queen wakes up whenever an infestable command center is seen on the map, and moves toward it. Also, formerly the army might destroy the command center before the queen could infest it. Now the army recognizes when a queen is near and stops attacking the command center when it becomes infestable (below 1/2 HP). The army is more efficient, and more command centers turn to the dark side where they belong.
• Change to queen behavior that mainly affects cases where Steamhammer is contained to its natural: If a queen has enough energy to cast a spell, then its fallback retreat position is the front defense point, where it may be able to do some good. Otherwise its fallback retreat is the main base, where it should be relatively safe to sit and gain energy. This can make the queen more useful in a bad situation, but the queen is not likely to help much.
defilers
• There was an awesome extra digit in the constant “how many HP can plague eat up at most?” that Steamhammer uses in its forecast of how much damage a given plague will do. Oh... that is why it insisted on plaguing buildings even as I discounted them more and more—it thought it would do awesome damage! After fixing it, Steamhammer still loves to plague buildings; the practical effect of the fix is limited. But it has shifted its preference somewhat toward enemy units.
• I simplified the plague scoring code and tweaked it. Plague gets a higher score for putting a terran building into the red (so that it burns down if not repaired), and it will plague even a single enemy unit if it seems worth it.
• The defiler might retreat to the main base and be useless when Steamhammer was contained to its natural and needed the defiler there to break out. I changed the defiler’s fallback retreat point to be the front defense point, which is also where any sunken colonies are placed. It’s not quite the same as the queen’s fallback retreat behavior. The queen needs a safe place to gather energy, the defiler can consume.
zerg
• The finishing unit mix is drone-mutalisk. Formerly, when the opponent looked dead and Steamhammer wanted to chase down its last buildings, it made mutalisks plus whatever ground unit came out of the usual unit mix calculation, usually zerglings. That had rare unfortunate results when Steamhammer made too many ground units and could not get mutalisks. The drone count is capped at 75, so with a drone-mutalisk mix, Steamhammer will not run itself out of supply to make mutalisks and should almost never fail to finish off the opponent.
• Ensure that there is at least one zergling or hydralisk in the army at all times after the opening book. Steamhammer scouts the enemy army primarily with its own army. If its army was wiped out in battle, it might sit back behind sunkens and drone up, thinking that the enemy army was also weak, and never learn better because it didn’t have forward units to see the enemy move out. “You mean, if I keep my eyes closed, I’m not safe after all?”
• If terran or protoss has too much air, make a defensive spore colony even if Steamhammer also has a spire. Formerly, Steamhammer skipped the spore if it had a spire, because it used to be that scourge was defense enough. But if the enemy has too many air units, scourge is not enough. McRave (after an update this summer) is especially good at massing its corsairs and shooting down scourge. (In ZvZ, Steamhammer follows different rules for making defensive spores.)
• A temporary production freeze happened if Steamhammer wanted to upgrade air carapace... at the same time that it was morphing a greater spire. All production stopped until the greater spire completed. It was surprisingly common, it seemed to happen in most games where Steamhammer got a greater spire. Anyway, fixed now.
openings
• Added a protoss opening GoonObserver
to directly counter DT rushes and other cloak rushes. Unfortunately the automatic “oh no, cloaked units, hurry and build cannons” reaction still happens and tends to delay the observers, but it’s still not a bad counter.