archive by month
Skip to content

which weaknesses are critical?

The tournament version Steamhammer 2.1.4 suffers from a command jam bug which reissues commands far too often, causing many to be dropped. It’s a critical bug with devastating effects, causing units to ignore their orders—to freeze in place, to wander past the enemy taking fire without noticing, and so on. It starts having an effect often before the zerg supply reaches 50, and the effect grows worse as supply increases. By the late game, large groups of units are sitting uselessly around the map doing nothing. It’s a critical bug and intolerably severe.

But how critical is it really? I look at every game that Steamhammer plays. Based on tournament losses, I estimate that if I had fixed the bug before SSCAIT started, Steamhammer’s rank would not be #10 as now, but #7—not much gain considering how closely the ranks are spaced, only a few percentage points up in win rate.

How can such a calamitous bug have so little practical effect? In Steamhammer’s early days, one version had a bug that subtly caused building construction to be delayed. I doubt any stream viewer noticed; I didn’t notice either, until surprised by unexpected losses. Experience and test games proved that it was a critical bug that caused a high rate of losses against early aggression. By comparison, the command jam bug is identifiable as the cause of loss in only a few games, like the one loss against XIMP by Tomas Vajda. In other games where the bug struck hard, as against ICEbot and MadMix, Steamhammer struggled more than it should have but won regardless.

Apparently the bug causes losses only against a narrow range of opponents which play macro games and are strong enough to exploit the weak play that the bug causes. There is no effect against a strong opponent like SAIDA, or against the weakest opponents which lose to Steamhammer’s first 6 zerglings. One explanation is that most opponents either prefer early aggression, or else fall to Steamhammer’s early aggression. Another explanation is that I may underestimate the damage the bug causes; maybe it leads to losses that are not clearly attributable.

forge expand reaction

Why is it still called “forge fast expand”? It was a fast expansion when invented, but by today’s standards it’s not fast at all. That’s why I say “forge expand.” (It has the same number of syllables as FFE).

Though I still have region work to do, today I decided to make an important improvement to how Steamhammer reacts to forge expand and other safe macro openings. The tournament Steamhammer makes 3 attempts to adapt: 1. If the enemy’s opening plan was predicted, it tries to select a good counter opening. 2. Otherwise, having missed the prediction and gone down a poor path, it cancels any planned static defense which is now unnecessary, and 3. makes extra drones to catch up in economy. If it’s still in its opening book, it stays the course and tries to minimize the disruption by changing planned zerglings into drones, which cost the same.

Its plans are still disrupted, though, because the extra drones and the omitted static defense cause minerals to build up. Steamhammer waits until the opening is over before it makes macro hatcheries and otherwise spends down its excess resources, and that is often too late. Zerg can’t keep up with the enemy’s economy and falls far behind.

Today I added 2 new reactions that happen when we want extra drones so that resources threaten to build up: 4. If possible, take gas early (or take another gas early). Putting drones on gas slows down mineral accumulation and may speed up tech openings, so that mutas or lurkers come out sooner. If gas accumulates too much, Steamhammer will stop gas collection, so there’s little downside. 5. Make extra hatcheries as conditions seem ripe. One or all of the extra hatcheries may be placed at expansions, depending on the situation. The rules are more cautious than the macro hatchery rules that apply once the opening is over, because they’re still trying not to disrupt the opening line. The overall effect of the new reactions is that Steamhammer pursues the tech of its opening line, sometimes faster since it has more income, gas, and larvas than expected, and transitions into the middle game in a stronger position. It’s making a big difference in test games, including wins from positions that were sure losses otherwise.

The fix is inspired by recent losses, especially the 2 losses to Skynet by Andrew Smith when it unexpectedly (to Steamhammer) switched from zealot rushes and DT rushes to forge expand. To my intuition, the forge expand reaction seems much less important than the command jam fix, which is a critical bug fix that affects far more games. And yet, taking into account test games and the rate at which Steamhammer was surprised by macro openings in the tournament, I estimate that it will save about 2/3 as many losses—in terms of improving elo, both seem almost equal. How does that happen?

Apparently you have to measure the severity of weaknesses, because intuition does not seem accurate. Unfortunately, to measure with an A/B test, first you need to fix the weakness. Maybe that is an advantage of machine learning, which does its entire job by measuring weaknesses and correcting them.

Trackbacks

No Trackbacks

Comments

MarcoDBAA on :

I think that you have to fix early game problems more urgently ,if you want to win as much as possible, because early game problems cascade into the late game, while late game problems might not even occur in a game. Even more so, if the bot will play aggressive strategies and/or needs to be in a good position to win the game later on. For a learning bot, this should be even more true, because you might skip late game problems by choosing another strategy, while this might not be possible for an early game problem.

P.S: Skynet switching it up might be a very important reason, that the bot is still doing relatively well, even though Bereaver finally did overtake him. Helps that Bereaver won vs SAIDA too. Even updates for his strategies.json file only could already help the bot to win more games again.

tolmar on :

How often does the bug occur? You probably have some rough idea of what percent change it is given its conditions, but how common are the conditions? Every game has an early game, but not every game has a late one, so early game bugs are more common. Bugs involving any specific unit are less common than bugs across all units. Bugs in building construction have more opportunity to occur than bugs using the units made with those buildings (a spawning pool placement bug prevents zergling bugs). Bugs in mining have more impact still. Bugs in drone production have even more opportunity to mess up.

How severe is the bug? If left to derpily muddle through as bots do, will Steamhammer ever recover? Will an important timing window have been missed during the derpy play? If the bug occurs during the phase where both bots are sitting around trying to realize that one of them has enough stuff to kill the other, forgetting about half your army for a few minutes doesn't really matter (you'll get to the same place eventually). If you 9pool, forget how to use zerglings for a while, and recover in the midgame, that could easily have been a loss - you'll still win if your bot is better at the midgame, but you lost a change to win if your bot is better at the midgame or early game. You also have to consider "win more" and "lose more" problems; if the bug only occurs when you're already losing, or reliably turns a crushing win into a marginal one, those don't actually effect win rates at all.

Jay Scott on :

In short: It’s complicated.

Tully Elliston on :

> I think that you have to fix early game problems more urgently ,if you want to win as much as possible, because early game problems cascade into the late game, while late game problems might not even occur in a game.

I think this is such an important principle, if you've got limited time and want to be competitive. Early game skills facilitate late game macro wins.

Dilyan on :

In human D- vs bots I tested I found out idle units all over the map actually benefits the player with idle units as the bot often loses constantly units to them as been more aggressive but without plan.
Critical weaknesses I found in general, losing overlords for free, losing units for free, losing workers for free and choosing wrong or weak build opening and after book ends the bot does not play according to the opening and current situation. Not specific SH but overall.

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.