As promised, I’ve uploaded Steamhammer 3.4.1 which has fixes that primarily benefit terran and protoss. I anticipate that protoss will be significantly stronger, terran a bit stronger, and zerg minutely better. For the debug display this time, I turned on drawing of worker info. Among other things, each worker is drawn with a letter representing its task, M for mining minerals, G for gas, B for constructing a building, and others (11 codes in all; the most obscure is Q for a worker which was posted to a location and tasked to build there).
I wanted to handle one more bug, a longstanding problem with terran addons, but I decided that the fix was too involved. This is enough for now. Next I’ll switch to prep for AIST.
expansions
• Expansion timings changed for terran and protoss. There is a hard-coded list of timings to take bases. It bears little resemblance to good play, but I adjusted it to be less ridiculous (you may slightly lower the volume of your laughter). The new list, which is the same for terran and protoss in all matchups even though that’s silly, calls for a faster natural, slower later bases, and more total bases in the late game.
• A bug caused terran and protoss to “expand to the main base” when contained, especially by cannons. A command center or nexus, or sometimes more than one, would be built in the main, where it stood for the rest of the game as a monument to the value of wasting resources. It happened often to terran, occasionally to protoss. I fixed one cause. I did not verify that there are no other causes....
• A bit of code requires terran and protoss to take the natural as the second base. I added an exception: If Steamhammer no longer owns its starting base, the constraint is released. This only happens in rare emergencies, but when it does happen, it could make a big difference.
BOSS
• BOSS limited refinery buildings to 3, affecting terran and protoss (zerg does not use BOSS for its production). The result was that, if the game went on long, Steamhammer would take 6 bases and only 3 gas, and as the geysers ran dry it would become severely short of vespene and throttle back production, and struggle to win a won game. This game versus Iron is an example. The limit mostly affected protoss, since terran rarely plays well enough to get that far. I changed the limit from 3 to 6. It was a hardcoded constant in DFBB_BuildOrderSmartSearch::calculateSearchSettings()
, so this was a one-character change that took me 10 minutes to find. It is as big a change as I am willing to make in BOSS, which is on the jettison list.
3 was probably adequate for UAlbertaBot back in the day. I hope the increase never causes the search to blow up; it was fine in my tests, but I’m not sure I understand the ramifications.
micro
• Improved behavior for units that refuse to retreat. When a cluster of friendly units is predicted to lose a battle and ordered to retreat, there are a few special cases where units keep attacking anyway. One is broodlings; a broodling does not want to waste its brief life. A more important case is a dark templar when no DTs have yet been killed; the DT is probably undetected and in any case has been safe so far, so it does not benefit from retreating.
Formerly, the non-retreat was implemented by giving the non-retreating unit the order to attack move to its own location, so that it could find a nearby enemy and keep up the attack. That caused micro bobbles when the unit stopped what it was doing, thought about it for a moment, then possibly chose a new target, or possibly went into a long reverie. I changed it so that if the unit already had an order to attack a given enemy, it kept the order, and otherwise it was given a new order to attack move to the squad order location. As a result, an initial attack by dark templar is far more incisive than before—it is night and day, formerly the DTs might vibrate uselessly as their “attack where you are” orders kept switching to new locations every time they tried to advance. This is the most important fix in this Steamhammer update.
• I added an experimental change to the dark templar exception: A dark templar will also refuse to retreat whenever it believes itself undetected. It’s experimental because it will cause misbehavior when a non-retreating DT advances into detection range, and perhaps takes hits, before retreating again, and then repeats the behavior. I’m hoping it will be a net win.
terran
• Tanks no longer falsely believe that they can target undetected units. Oops.
• I refactored the tank micro code for clarity and efficiency. Instead of taking a negligible amount of cpu time, it takes a less than negligible amount.
• Terran is limited to 1 starport at most, by a special case check in the production manager. Pointy-haired BOSS enjoys ordering unnecessary production buildings. The change saves a little gas, but mostly saves room in the main base so that buildings are less likely to spill across the map. Limits for barracks and factories would have been more valuable but trickier.
protoss
• Limit gateways a little more flexibly. BOSS loves gateways above all other buildings and will not stop adding more. Formerly, Steamhammer artificially limited itself to 10 gateways, a workaround originally borrowed from Locutus. An improvement, but it built too many gateways, then grew its economy, then had too few. I changed it to allow up to 4 gateways per base with an upper limit of 12 gateways. In my tests it is usually better, never worse, and still crude and wrong. It should hold until I can fire BOSS.
• Try to use all the gateways, at least in the “dragoons” opening group. This is the more important fix. If there are more gateways, request more production. Formerly, protoss would often use only 6 of its 10 gateways. No evil is more heinous.
• It turns out that a unit mix of dark templar and dragoons is gas-heavy and may leave minerals unused. Who knew? I added zealots to production in the “dark templar” opening group, again trying to use all gateways.
zerg
• The scourge limit wasn’t working as intended because I changed the wrong number. Fixed.
• I made a change in production that I hope will reduce cases where a creep colony is left unmorphed to a sunken. Later I’ll leave creeps deliberately unmorphed until they are needed, but I still want the current case to work.