archive by month
Skip to content

proxy vs proxy

Basic proxy skills were one of the major new features added in the current Steamhammer, version 3.0. It was preparation for the future more than a plan to earn cheesy wins: Steamhammer will need more skills before it’s any good at deciding when to proxy, and before it can execute well. And zerg doesn’t have many proxy opportunities in the first place, since it can only build on creep. Zerg can make a proxy hatchery, or versus another zerg (or in rare cases if there is neutral creep on the map) it can try an offensive sunken or offensive spore, that’s all. I was unsurprised when I checked a couple days ago and found that Steamhammer had recorded a total of exactly one proxy opening on BASIL, an ill-advised proxy hatchery in Microwave’s natural that went down for a quick loss.

Today I noticed another proxy attempt, and it’s a funny game: Steamhammer-krasi0P on Roadrunner. For background, #7 Steamhammer’s 60-day record against #11 krasi0P is 23-22, virtually even. So Steamhammer feels a need to keep experimenting to find better openings.

hatchery and nexus

Steamhammer scouted at 5 supply, as soon as its first new drone hatched from the egg, which is necessary on a 4-player map if you want to find the enemy in time to drop a proxy hatch. The scouting drone went the wrong way while the overlord flew straight to the protoss base, but it made no difference; the drone scouted 2 empty bases and deduced the location of the enemy before the overlord came in sight of the nexus.

zerg base and cannons

Krasi0P plays 2 related but different strategies, it either cannons up the exit of the enemy natural, or it cannons the entrance to its own base (and follows up about the same in either case). The 2 strategies are nearly identical from krasi0P’s point of view, but call for contrasting reactions from the opponent, “ha ha, it’s easy for me but hard for you!” In this game, krasi0P chose the forward cannons, so both sides are building in the enemy natural. It’s the Starcraft equivalent of Spy vs Spy; which will win this time? The picture shows Steamhammer’s spawning pool just starting as the cannons warp in; there is no hope of breaking the containment early.

production beats containment

Well, it was a funny start, but the rest is disappointing. The cannons were strong, but a hatchery is a production building and it can make units that go kill you. Krasi0P didn’t have any better defensive idea than to pull probes and lose them all. Once the protoss base was destroyed, the result was foreordained, even though Steamhammer becomes accident-prone when it has units on both sides of a contain: It blunderfully tries to join them into a single army. But all it had to do was kill cannons that could never be replaced, and it eventually did.

(By the way, are the pictures a good size? I have a bigger screen now and the images are not the same size as in past posts. You can click through to get the full size pictures.)

still returning to normal

Well, so much for “back to normal.” My energy has improved somewhat but remains low. Let me try again.

progress

I’m pleased with how well Steamhammer has held up without updates. It remains #1 zerg on BASIL, in the top 10 overall and above 2700 elo except for occasional wobbles. Other zergs have improved at ZvZ so that ZvZ is no longer Steamhammer’s top matchup—I let it coast too long on an edge it has held for years. Instead, improving win rates versus terran has made ZvT the best matchup. In the last 60 days, Steamhammer is 18% versus #3 Krasi0, better than even against the tricky #4 Halo by Hao Pan (Steamhammer is tricky too), and about even versus #5 adias, all good rates facing higher-ranked opponents. ZvP skills trail far behind and need the most work.

My plan for Steamhammer remains to release a version 3.1 with minor improvements soon-ish. My rate of work has been low. So far I have restored several small side features from the rolled-back scout boss version and made one new tweak; each step was a trivial amount of effort. I want to restore a couple more side features and write one new feature from scratch, and then I’ll call it done. I could do it in a day if I worked hard, but I think it will take longer....

SSCAIT broadcast

I enjoyed Jealous as commentator last time. He contrasted well with the usual casters: Strong game knowledge, less familiarity with the bots so that their play looked fresh and surprising, and a slow and thorough style of examining the game events. Casters with varying approaches and knowledge make the casts more fun.

Commenting Broodwar games is a difficult skill! Even learning to consistently notice important events in the minimap takes practice and concentration.

how to play on hard maps

Humans build up a wealth of knowledge about each map they regularly play: The best proxy spots are here and there; this base is particularly vulnerable to muta harass; such-and-such expansion build is only safe in cross positions. Some of the knowledge is very specific: On Circuit Breaker, at a mineral only you can displace the resource depot toward the edge of the map and it’s a little safer, or protoss can place the nexus normally and provide some protection from vulture raids with a specific pylon wall. I eventually want to teach Steamhammer to collect strategy and tactics data per map and learn that kind of knowledge itself.

For now, though, bots have a simplified understanding of maps. The information that comes out of terrain analysis is a small fraction of what a human knows. So I asked myself: On a map with destructible neutral buildings, like say Hitchhiker, how should a bot decide which buildings to break down and when? Is there a rule of thumb that we can use as a first approximation of deep knowledge and tactical analysis?

One of the steps is to decide where you want to go. If you have a destination in mind, you can compare the different ways of reaching it and choose a set of paths to open (a set of neutral buildings to destroy or mineral blocks to mine out). Most bots today, I get the impression, don’t use this goal-oriented approach, but open a new path when they happen to find that it is nearby.

Two major reasons to open a closed path are to expand to a base through it, or to attack the enemy through it. Suppose you choose your next expansion by scoring the neutral bases and taking the one with the best score (or perhaps none if none passes a threshold). For a base that you have to open a path to reach, count the cost of opening the path against the score.

Opening a path for attack does not seem as simple. On Hitchhiker, you start with an open path down the center, but it is a narrow ravine that is easy for either player to defend. You can also destroy buildings to open side paths. A path you can attack through is also a path the enemy can attack you through, and if you open a side path and send your army there, what stops the enemy from countering down another path? How do you weigh risk and gain?

Maybe you can suggest a better idea, but here is my thought: If you are unable to attack down any existing path (the combat simulator keeps saying you’ll lose), and the reason is not that your army is puny because you are behind, then maybe you should open another path and attack there instead. That seems simple enough to implement and likely to be of some value.

Another reason to open a closed path is to create a shorter path to a place you can already reach. That’s the reason on SSCAIT maps; it applies on Heartbreak Ridge and Destination to the backdoor mineral blocks, and on Benzene to the backdoor neutral buildings. You want to open the path when it benefits you more than the enemy, which generally means that you can actually or potentially control the new path with your army. I think that strong current bots are not bad at doing this defensively for paths near their base, but I haven’t seen a bot open a path offensively.

the CoG maps

The CoG tournament expects participating bots to support all maps in a pool of 19, and randomly selects 5 maps from the pool to play in the tournament. The registration deadline was yesterday, so I guess everybody has already decided whether to participate. But there was mention of the CoG maps in the Undermind podcast #44, so I thought it was worth a post.

I described the maps in a 2018 post about the then-CIG maps. This year’s CoG map pool is the same, except that they removed the extremely difficult map Plasma, “because this map may too tricky to play by agents,” an understatement. Plasma has egg blocks that must be destroyed before ground units can walk to the enemy base, and also small mains where terran and protoss cannot fit all the buildings they need, and narrow ramps from the mains that only allow small units to pass. The combination of special features is more than current bots can be expected to support. The last time Steamhammer participated, I tested that it could play games on Plasma without crashing and made no other preparations. If the map had been selected, games on it would have looked ridiculously bad and distorted the tournament results.

With Plasma removed, I expect only a few of the other maps to pose any difficulty to bots. In order of difficulty, on Alchemist the 2 entrances to each base may cause misplays, but I think games should look normal except for misplaced buildings and overlooked opportunities. On Blue Storm, the narrow entrance to the center near each side’s natural will cause some bots to pile up units, trying to send them through where they do not fit. The most difficult will be Hitchhiker, where many bots will try to route through the destructible buildings and leave units trapped. From what I’ve seen, even bots which know how to destroy the buildings will be unable to plan a route to the enemy base, and are likely to blunder in confusion through the game. With 5 maps chosen out of 19, odds are good that at least one of the 3 more difficult maps will be included.

That is what I expect based on past experience, but I could be wrong. Compared to 2018, bots today rely on more and different libraries. Does BWEM have trouble with any of the maps? Does BWEB misplace walls on some of them? I don’t know.

returning to normal!

After more than a year of coping with unhappy realities, at times slowly and at times intensively, I’m finally returning to normal. After passing through final blasts of stress and (as it seemed to me) sky-spanning arches of paperwork, only niggling details are left. I’m gradually recovering my energy.

I have only just restored a usable development environment—not that it was hard, I am still energy-limited. Before, I was working on an ambitious update to scouting and overlord safety, which involved refactoring, and in many cases entirely rewriting, all code related to scouting, detectors, and overlord movement. I guess that I left it about 25% complete. It’s an important improvement, but also somewhat monolithic, and for now I don’t have the brain cycles to work on it. I rolled it back, I’ll return to it later.

Instead, Steamhammer 3.1 will come out soon-ish and have a small number of improvements that are easy to write and easy to test. I will fix the expansion order, for example (that will improve games on Heartbreak Ridge especially).

Today is the last day to register for the annual CoG tournament (known as CIG until last year). Steamhammer will not be participating.

bot versus human meta differences

In the Undermind 42 podcast, purple Dan Gant offers the opinion that the bot metagame and human meta will be similar in the long run: “there may be some differences but those differences will be slight” as bot and human meta converge over time.

Maybe so. We won’t know till we know. There are reasons to be sceptical, known instances where bot and human meta differ for reasons that seem fundamental and likely to endure. Here are examples. It’s possible to argue about each one, whether it constitutes a serious or a minor meta difference, but there certainly are differences.

My examples are all in zerg matchups. That might be because zerg is affected more, or just because I know more about zerg. I suspect the latter.

Locutus-style dragoon micro

Cadenzie had the impression that once Locutus had enough dragoons, hydras became weak against them. A dragoon has high speed and a longer range than a hydra, so with perfect micro it makes sense. We’ve seen similar events in other Locutus-human zerg games: Zerg has to win by playing a more efficient build order to stay ahead in macro—but in the limit as bots improve, protoss will have efficient reactive builds. If this is true, then zerg has to seek another way to fight dragoons.

I suspect that the answer is to include speed zerglings in the unit mix along with either hydras or mutalisks. We’ve seen games where tscmoo zerg can coordinate its lings and mutas to beat Locutus dragoons at low cost: The lings get in among the goons, interfering with their movement, and the combined arms attack becomes very effective. A similar tactic should work with lings and hydras, but it would require tactical coordination and strong micro.

In any case, higher efficiency of dragoons in bot play seems like a fundamental meta difference. Wraiths are another unit with high speed and long range, and they also show higher efficiency in bot play (among the best terrans).

splitting irradiated mutalisks

In pro ZvT, irradiate counters mutalisks. Once terran has irradiate, it rarely makes sense to spawn any more mutalisks. That is because mutalisks are stacked tightly to attack, and when 1 mutalisk in the stack is irradiated, the UI provides no way for the zerg player to select it out. You have to separate the mutas until you find the glowing one. Even the greatest zergs can’t quickly and reliably separate the mutas to split out the irradiated one, so frequently all the mutas take serious damage.

In bot games, the irradiated muta can instantly fly away from the group. Irradiate becomes a weak counter to mutalisks, and zerg may well want to continue spawning mutas. Terran will have to seek another counter.

This meta difference can be chalked up to a design issue with BWAPI. BWAPI provides bots the ability to know the status of every unit in a stack, and to be able to pick out any one of them, while the game UI for human players does not. It’s not obvious how to revise the API, but we may want to do it at some point.

mass unit control

Occasionally a top human zerg will collect more than 12 mutalisks—more than one control group—and harass with them all. It’s mechanically difficult, because each control group has to be separately commanded. Jaedong was the first to demonstrate the skill, as far as I have seen. Only the best zerg players can do it well.

Bots, of course, can control units individually and don’t much care how many there are. Bots can, in principle, better control large armies, such as large mutalisk clouds. I’m not sure how important the effect is, but it seems that it ought to have some affect on the meta.

Also see Artosis’s comment about his McRave game, “I’ve played against and cast the best Protoss players in the world, and this bot had a way better economy than anything I’ve ever seen.” Underneath, it is the same issue: Bots can individually control units, so they can make every worker at the earliest possible moment, never leave it idle, and on top of that do micro tricks to speed up mining for the entire game (humans can do that in the very early game). A potentially stronger economy is a fundamental meta difference.

Also Cadenzie’s comment “the individual unit control and multi-tasking is sometimes beyond human ability.” A difference like that must have metagame effects.

hardware failure

Sorry about the long silence. I suffered a hardware failure while locked down away from home, and getting things done has been... a little... difficult. I rescued all my data, but it’s demoralizing. And I’m still in an awkward computing situation.

I have no new progress on Steamhammer. In fact, I’m thinking of rolling back the scouting work that is underway, just so I can get an update out sooner. I can merge it back in later.

Steamhammer-adias long game

Steamhammer’s average game is kind of so-so, but its best games are good. Today it played an exciting macro game Steamhammer-adias on Jade. The game showed the strengths of Steamhammer’s queen play and burrowed zerglings, though adias shut the defilers down hard.

For background, Steamhammer’s 30 day record versus adias on BASIL is 17-10, so it wins more than it loses. But nearly all of its wins are with its cheesy hydra rush opening, in games like this one on Benzene: adias survives the rush, but it doesn’t know how to react and its build order breaks down so that it gets outmacroed and run over. Steamhammer is exploiting a bug.

The Jade game is different. Steamhammer opened with one of its anti-factory openings, the one that follows up with hydralisks. Adias set up to do its usual early game 2-vulture runby, but for some reason one of the vultures stayed behind and only 1 made it into the zerg main. It killed 2 drones before hydralisks nabbed it, not enough to set Steamhammer back severely.

vulture is about to die

A little later, after neatly clearing the spider mines in front of its base, Steamhammer went to attack with the hydras. Adias was in no danger, but it did lose a few goliaths unnecessarily due to clumsy maneuvering. That may have been why terran chose to take a third base, rather than build up and attack on 2 bases.

The picture shows terran trying to take its third base. The blood on the ground is from Steamhammer’s burrowed zergling. The zergling successfully delayed the expansion, but not for long because adias knew what to do: It brought tanks and scanned. Steamhammer also reacted correctly. In the minimap, the small orange splotch near the terran natural is a hydralisk attack which drew the goliaths out of position. Mutalisks went to the terran third and delayed it further. There are only 6 mutas, but they killed those 3 tanks and a number of followup terran units and delayed the third for longer than they should have. I think this was the key battle that set adias back far enough that Steamhammer could play a long game.

mutalisks begin to wreak havoc

Adias did finally bring enough units to take its third safely. Terran with 3 bases is very strong, but Steamhammer now has 6 bases and is ahead in workers. By keeping terran busy with a handful of units, zerg was able to drone heavily.

The picture shows Steamhammer’s queen parasiting the first science vessel. The little orange dot halfway between them is the parasite projectile. Terran did not have irradiate yet. The queen kept busy parasiting vessels for the rest of the game. Adias did not react to the parasites, which handed Steamhammer another crucial advantage: Zerg maintained vision of the terran main army via the parasites, and almost always knew its location, size, and composition.

parasite!

Adias is no pushover and it has its own strengths. Here a vulture raid has cleared the drones from one of Steamhammer’s bases. Steamhammer went from well ahead to about even in workers. Adias pulled these raids repeatedly. But unlike terran, a zerg with a strong economy can replace lost drones in short order. The raids did ensure that terran could firmly secure its third.

vulture raid with spider mines

OK, now terran has irradiate. Steamhammer has code to separate an irradiated mutalisk, and it worked when I wrote it, but bits decayed and now it does not work. It’s a devastating weakness. 6 mutalisks and a few scourge died to this one irradiate, and the surviving muta had a sliver of health.

But irradiate a hydra and it burrows to spare its comrades. This came up later in the game.

deadly irradiate

Here is terran’s big attack, the intended killing blow. The armies of both sides are disorganized. Steamhammer has just cleaned up another vulture raid at lower right (by the time the vultures were dead it had already restored its drone count) and is rushing back, while adias (perhaps hurrying to take advantage while zerg is out of position) has allowed its units to stretch into a narrow column. The line of tanks and goliaths continues north of this wide picture.

deadly irradiate

Well, zerg is more mobile. Steamhammer got its forces together before adias could sort its units into a ball, and rolled up the terran column with hydra-ultra. The picture shows adias dropping Steamhammer’s natural while this happens. Shortly after this, vultures raided the 4 o’clock base too. The terran army has been forced back, but the worker count went into terran’s favor, and adias still has 2 bases mining.

The scourge on the tail of the dropship did finally catch it after it reached the terran main. Almost safe! I think Steamhammer’s scourge control has a bug that causes it to chase some enemies too slowly.

deadly vulture drop

Oops, the terran army retreated to the natural, not to the third base. A small flight of 7 mutalisks, after erasing the dropped units, arrowed to the undefended third base and started to erase it too. Well, after defending adias still had enough SCVs, partly because its natural was running low, but Steamhammer had replaced its drone losses and was pulling ahead. Steamhammer suddenly switched to mutalisks as its primary unit, and was able to produce them faster than adias could produce goliaths to defend. In the picture terran and zerg are equal in supply, but adias could not hold against the mutas. Terran had the wrong unit mix.

too many mutalisks

The mutalisks depopulated the terran third, and then there was nothing adias could do. Another devastating irradiate finally forced the mutalisks back (most of the survivors were barely alive), but by then adias had only 14 SCVs and a smaller army size. Steamhammer soon maxed and ultraling finished it. For the cherry on top, the queen infested the main command center.

From Steamhammer’s point of view, the game was all about information. Even though adias knew how to counter it, the burrowed zergling saw what was happening before it died and made it possible for Steamhammer to delay the terran third. Then the queen’s parasites ensured that Steamhammer always knew the terran unit mix. Steamhammer used the information to make sudden switches in its own unit mix to take advantage of temporary opportunities.

This was a great game to show off the weaknesses of both sides. Adias repeatedly ran into trouble because it could not keep its units in good formation. Steamhammer needed to frequently replace dead drones, and suffered in the air from irradiate.

In the next game, on Circuit Breaker, Steamhammer repeated the opening, but the game went differently. Adias did its 2-vulture runby before Steamhammer was ready, killed a bunch of drones, and pulled far ahead to win easily. I made a version of an anti-factory opening timed to stop the 2 vultures, but this was not it.

Steamhammer and machine learning

I’ve mentioned it briefly before, but here’s a longer post. It is past time to start writing serious machine learning methods into Steamhammer. I’ve been writing code for it behind the scenes, though none is in Steamhammer yet, even in the development version. I selected a combination of techniques that will learn fast, will run fast, and I hope will be accurate enough. Right now I need to fix a numerical precision problem (I’ve always hated numerical analysis), but soon it should be ready to start testing on non-toy problems. It won’t be in the next Steamhammer 3.1, but perhaps a version or two after that, if all goes well.

The first application will be a “will I win this game?” evaluation function. The idea of evaluation functions is very general: You can evaluate anything, “how good is this build order?” “am I likely to win this fight?” “which tactical maneuver is better, A or B?”—anything you want to measure or compare, really. The use of evaluators is also very general. Whenever you want to make a choice, if you have the right evaluator and you can provide it the right inputs, you can compare the choices and pick the one that looks best. That is what search is, and search is one of the most basic ideas in AI.

The “am I winning?” evaluator will take several hundred numbers as inputs, unit counts and things like that. You can see my 2018 analysis of LastOrder for some of the possibilities. The output will be an evaluation of how likely Steamhammer is to win from the game position, I think a probability or something that can be converted to a probability. My initial estimate is that it should run in under 5 milliseconds. It doesn’t need to be run often, so even if that’s optimistic it will be fast enough. If it works as well as I hope, it will be possible to specialize the evaluator for each opponent. If that succeeds, there will be a pre-learned evaluator for unfamiliar opponents, and learning data in the opponent model will update it to understand that player. I’m seriously expecting the learning to be fast enough for that to help, though we’ll see.

The first use of the evaluator will be to select openings. Right now Steamhammer keeps tabs on whether a given opening won or lost. The bot does not know, at least until it plays a lot of games, whether it won because the opening gave it a huge strategic advantage, or whether it was behind after the opening but managed to scrape a win anyway. The evaluator will tell it, and it will select better openings. For example, against a much stronger opponent Steamhammer rarely wins and falls back on trying builds at random, hoping to hit one that works. Most of the random choices are poor, but it is losing every game anyway so it can’t tell. The evaluator will tell it which tries are more nearly successful; it will try those more often and have better chances. That is only an example; I expect the evaluator to help against most opponents.

A later use of the evaluator will be to construct new builds. I have plans in mind. There is already code in Steamhammer—it’s not finished or working, but the nub of the idea is there—to simulate build orders. When that is in place, Steamhammer will be able to evaluate builds that it has never played in a real game and get an idea of whether they will work. “I got run over fast. If I substitute 12 pool for 12 hatch, am I ready in time?” If that succeeds, Steamhammer will be able to customize builds to counter specific opponents. The potential is great, and this evaluator is a key step on the way.

Starcraft gives the players many many choices. It’s not possible to search any large proportion of them. In the search/knowledge tradeoff, I think that means that knowledge is preferred: You want to search few choices (at least compared to how many there are), but select and evaluate the choices with a lot of knowledge. That’s why I think that knowledge-rich machine learning methods are the right way.

Steamhammer-BananaBrain roller coaster game

Steamhammer versus BananaBrain on Moon Glaive was a fun back-and-forth game. Well, it was Randomhammer as zerg, that’s Steamhammer.

Steamhammer opened with a fast hatchery before pool, preparing zergling aggression. BananaBrain was also aggressive; it hid 2 gateways on the left of the map where they were unlikely to be scouted early. The gateways were more or less midway by ground between the 2 bases where zerg might be.

hidden gateways

The zerglings outfought the zealots, then made a beeline for the protoss base, where they wrecked the economy. Protoss was left with 1 probe mining and 1 more in production.

probe massacre

But protoss had still been producing army during the attack, though the units were too far away to defend the main. It’s the drawback of a proxy opening: Close to the enemy means far from home. Steamhammer did not see the units and concluded that it was safe, so it started a third base (see 8 o’clock in the minimap), added a hydralisk den, and morphed a lair in its natural. A good human player would have predicted the protoss army size and been ready for it, but bots to date are weak at inference. Steamhammer could not save the lair in its natural and threw away units trying, then pulled together a defense in its main barely in time. BananaBrain ran by the sunkens to attack drones, one of its great skills, and it was zerg’s turn to fall behind in economy. Notice how much the protoss probe count has recovered. The zerg drone count fell to 5 shortly after the picture.

drone massacre

Three drones escaped the carnage and ran across the map to the hidden zerg third, which protoss did not yet know about (though a human player would have guessed its general location from the direction of arriving units). After a short distraction when a small zerg squad again attacked the protoss main, BananaBrain put heavy pressure on the defended zerg main. Both sides were racing to rebuild workers and trying to afford tech.

dragoon attack on sunkens

It was around here when BananaBrain repeatedly tried to expand, and Steamhammer’s patrolling Recon squad repeatedly denied it with only a few units. Protoss chose to keep attacking rather than defend an expansion. BananaBrain has added tech and sent out corsairs, and zerg protected its overlords with a spore colony in the main. Steamhammer’s mineral bank of 900 is a sign that it is short of hatcheries—it knows that, and wants to add hatcheries.

stopping the nexus

Needing more hatcheries, Steamhammer also tried to expand, in a rather strange pattern where the first hatchery at a new base was offset and the second one placed at the base location. The natural was denied, then a new base at 10 o’clock was about to be killed by zealots—when a scouting observer finally ran down the left of the map and discovered the hidden base, now bustling with drones. The protoss army suddenly had a more alluring target, and ran there to raze it.

losing the hidden base

But Steamhammer had mined its third base for most of the game, and BananaBrain had never been able to expand. The protoss main was dry, and the zerg 10 o’clock now had a half dozen drones at work, and it shows in the production tab. Steamhammer scourged the sky of corsairs, defeated the zealots with hydra-ling and a few mutalisks, and tore down the proxy gates before finally tackling the protoss main.

protoss defeat

Whew, no big fights because of the damaged economies, but an exhausting struggle. Either side could have won easily at various points with smarter play at that moment.

Steamhammer can lift buildings

I have given Steamhammer a primitive ability to lift terran buildings. A terran opening can include a command like "go lift engineering bay" and every ebay that can lift, will. If it’s busy researching, it can’t lift. The StrategyManager code that manages terran production will lift every barracks and ebay if the plan calls for all factory production, so the command doesn’t have much practical use for those writing openings. Still, the lifted buildings will leave more space available in the main base, so fewer factories should end up in the middle of the map.

I thought the work would be trivial, but I had to make more changes to the parser than I expected. Now a MacroAct is able to parse and remember a command with a UnitType argument, in case I ever add any more commands like that.

Floating buildings are controlled by the new Scout Boss, which will find something useful for them to do. That’s why I added lifting now. I am also looking ahead: Lifting an infested command center is a zerg skill, and I’d like to be able to do that when appropriate. Steamhammer infests command centers on a regular basis, much more often than I’ve seen any other player do, bot or human.

You’ll need to write code if you want to lift off a specific building: Just this ebay that I built forward for scouting, not the one at home. A simple command has no way to specify. Still, I would like the production system to be able to tie production to specific units: Morph these hydras to lurkers, not the others; make this creep colony into a spore and that one into a sunken. I’ve seen only one game where it tried to make a spore (in main) and sunken (at natural) at the same time and got them switched, but it seems like something I had better get right.

Landing is not as easy as lifting off, because you have to decide where to land, and it depends on what you’re aiming for. Someday I’ll implement lifting off an endangered building and landing it again when the area is safe. It may involve ordering your own units out of the landing zone. That will likely be the first use case for landing. I think other cases will wait until there is an operations planner: Opening and closing “gates” in a wall, relocating a command center, floating in a proxy factory, reacting to enemy tricks like blocking the machine shop with a pylon....

does Steamhammer’s new gas steal work?

Does Steamhammer’s updated gas steal skill help it win games? I ran an analysis on Starcraft AI Ladder games to find out. Each of these tables represents data from 100 games against that opponent.

“Gas steal decision” means Steamhammer decided to try to steal gas. It gives the number of games it made the decision and the time when it decided, along with the win rate and the enemy gas timing in games where it decided to steal gas. “Gas steal success” counts games where it succeeded in making the extractor on the enemy geyser. That’s more important than making the decision. “None or failed” means games other than successes, and “gas steal killed” is the time the extractor was destroyed, given that it was made in the first place. The “enemy gas” column is the median game time when the enemy was first observed to use gas (they made a building or unit which costs gas); the purpose of stealing gas is to delay this time. When it is “-”, that means the enemy was never observed to use gas before the game ended.


#1 bananabrain

gas steal#medianearlylatewinsenemy gas
gas steal decision182:242:012:5822%5:32
gas steal success132:332:103:0823%6:38
none or failed87---21%4:49
gas steal killed136:012:5112:31

#2 halo

gas steal#medianearlylatewinsenemy gas
gas steal decision152:351:473:4033%4:06
gas steal success62:432:133:090%5:59
none or failed94---34%4:09
gas steal killed63:122:463:38

#4 microwave

gas steal#medianearlylatewinsenemy gas
gas steal decision62:322:013:2550%3:37
gas steal success12:042:042:04100%-
none or failed99---64%4:15
gas steal killed12:262:262:26

#5 ecgberht

gas steal#medianearlylatewinsenemy gas
gas steal decision152:131:535:0673%5:58
gas steal success122:252:015:0867%6:06
none or failed88---78%4:57
gas steal killed123:532:356:04

#6 purplewave

gas steal#medianearlylatewinsenemy gas
gas steal decision102:212:062:5190%5:17
gas steal success62:222:092:3683%5:30
none or failed94---90%4:55
gas steal killed63:062:483:16

#7 zzzkbot

gas steal#medianearlylatewinsenemy gas
gas steal decision112:112:002:5173%2:48
gas steal success12:162:162:160%-
none or failed99---61%2:52
gas steal killed17:257:257:25

Conclusion: The important rows to compare for each opponent are “gas steal success” versus “none or failed”. The numbers say that a successful gas steal does delay the enemy’s gas use. That is why Steamhammer tries it so often—it takes that as a sign that the trick is working. But by and large, stealing gas doesn’t lead to a higher win rate. These opponents can cope with having their gas stolen, at least as Steamhammer does it.

Maybe I should tone down the vespene theft. I have the impression that most opponents which are discombobulated by the gas steal are ones that Steamhammer will defeat anyway.

Steamhammer game record analysis

I thought I’d take the opportunity to update the script that analyzes Steamhammer’s learning data files to handle the new game record format.

Since yesterday, on the Starcraft AI Ladder both Microwave and Halo by Hao Pan have been updated. Halo in particular is performing better. Here’s the new crosstable, just for background, showing the new results since the ladder was reset yesterday.

#botoverallbanahalosteamicrecgbpurpzzzk
1bananabrain82.41%67%78%72%100%100%78%
2halo71.56%33%72%67%84%97%76%
3steamhammer56.94%22%28%67%81%89%56%
4microwave56.48%28%33%33%72%100%72%
5ecgberht36.41%0%16%19%28%75%81%
6purplewave17.59%0%3%11%0%25%67%
7zzzkbot28.57%22%24%44%28%19%33%

And here is the analysis of what Steamhammer learned against each opponent so far. This is only a small part of the information that can be extracted from the game records; many more tables and charts are possible.

#1 bananabrain

openinggameswins
11Gas10PoolMuta425%
11HatchTurtleHydra10%
4PoolHard10%
9PoolHatchSpeedAllIn10%
AntiZeal_12Hatch425%
Over10HatchBust1050%
OverhatchExpoMuta10%
OverhatchLateGas10%
Sparkle 2HatchMuta1331%
ZvZ_Overgas11Pool425%
10 openings4030%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Heavy rush38%33%410%25%33%0%
Naked expand12%0%512%80%0%0%
Proxy12%100%12%0%0%0%
Safe expand3075%27%1230%17%27%37%
Turtle512%40%410%50%0%60%
Unknown0%0%1435%21%0%0%
timing#medianearlylate
my combat unit373:061:473:11
my gas352:351:334:22
enemy scout401:581:253:02
enemy combat unit394:092:195:46
enemy gas304:532:5710:13
enemy air unit305:272:5811:35
enemy cloaked unit206:473:2912:54
game duration4010:124:4629:56

#2 halo

openinggameswins
2HatchLingAllInSpire20%
7-7HydraLingRush10%
9PoolExpo933%
9PoolSpeed10%
9PoolSunkHatch1242%
9PoolSunkSpeed10%
AntiFact_13Pool520%
AntiFactory2425%
Over10PoolLing10%
9 openings3628%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Factory719%29%514%60%43%0%
Fast rush1028%60%925%33%10%40%
Proxy1850%11%1747%6%56%6%
Unknown13%0%514%60%0%0%
timing#medianearlylate
my combat unit362:222:133:31
my gas344:021:345:03
enemy scout362:391:178:23
enemy combat unit362:291:554:27
enemy gas325:473:006:42
enemy air unit1612:205:3416:35
enemy cloaked unit229:375:3417:11
game duration3612:315:1631:21

#4 microwave

openinggameswins
9Hatch8Pool10%
9PoolHatchSpeedAllInB10%
9PoolSunkSpeed20%
Over10PoolLing10%
OverpoolSunk1377%
ZvZ_Overpool9Gas1878%
6 openings3667%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Fast rush411%25%13%0%0%75%
Heavy rush1953%74%617%100%16%68%
Naked expand1028%80%38%33%0%70%
Turtle13%100%26%100%0%0%
Unknown26%0%2467%62%0%50%
timing#medianearlylate
my combat unit362:252:173:05
my gas362:051:543:19
enemy scout362:331:274:26
enemy combat unit362:371:543:18
enemy gas274:322:4811:16
enemy air unit216:493:4611:17
enemy cloaked unit0---
game duration3612:073:2125:44

#5 ecgberht

openinggameswins
2HatchLingAllInSpire10%
2HatchLurkerAllIn10%
4PoolHard250%
9HatchExpo9Pool9Gas771%
9PoolSpeed1995%
9PoolSunkHatch10%
AntiFact_2Hatch5100%
7 openings3681%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Factory925%67%719%43%22%56%
Heavy rush2364%87%1233%92%39%35%
Proxy0%0%13%100%0%0%
Unknown38%100%1542%93%0%67%
Worker rush13%0%13%0%0%0%
timing#medianearlylate
my combat unit362:171:473:53
my gas341:501:454:05
enemy scout321:340:334:01
enemy combat unit352:582:225:39
enemy gas204:333:0810:19
enemy air unit155:424:0615:09
enemy cloaked unit95:535:3011:34
game duration365:423:5918:52

#6 purplewave

openinggameswins
11HatchTurtleHydra888%
11HatchTurtleMuta367%
12Hatch_4HatchLing2100%
AntiZeal_12Hatch475%
Over10Hatch6100%
Over10Hatch2SunkHard3100%
Over10HatchSlowLings4100%
OverpoolSpeed3100%
OverpoolTurtle367%
9 openings3689%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Fast rush0%0%13%100%0%0%
Heavy rush3494%88%1850%89%50%38%
Proxy0%0%26%0%0%0%
Safe expand0%0%13%100%0%0%
Unknown26%100%1439%100%0%50%
timing#medianearlylate
my combat unit303:052:233:35
my gas254:062:035:53
enemy scout312:091:343:10
enemy combat unit312:332:155:35
enemy gas254:463:585:45
enemy air unit54:193:585:33
enemy cloaked unit84:363:594:51
game duration365:570:018:09

#7 zzzkbot

openinggameswins
6PoolSpeed10%
9PoolSunkHatch250%
9PoolSunkSpeed1771%
OverpoolSunk1771%
ZvZ_Overpool9Gas1958%
5 openings5664%
planpredictedrecognizedaccuracy
countgameswinscountgameswinsgood?
Fast rush4988%63%1425%86%22%69%
Heavy rush12%0%24%50%0%0%
Turtle611%83%611%67%50%0%
Unknown0%0%3461%56%0%0%
timing#medianearlylate
my combat unit362:252:192:29
my gas362:371:553:23
enemy scout562:310:376:49
enemy combat unit562:431:453:42
enemy gas243:022:424:23
enemy air unit294:373:518:07
enemy cloaked unit0---
game duration567:513:1112:24

overall

totalZvTZvPZvZ
openinggameswinsgameswinsgameswinsgameswins
11Gas10PoolMuta425% 425%
11HatchTurtleHydra978% 978%
11HatchTurtleMuta367% 367%
12Hatch_4HatchLing2100% 2100%
2HatchLingAllInSpire30% 30%
2HatchLurkerAllIn10% 10%
4PoolHard333% 250% 10%
6PoolSpeed10% 10%
7-7HydraLingRush10% 10%
9Hatch8Pool10% 10%
9HatchExpo9Pool9Gas771% 771%
9PoolExpo933% 933%
9PoolHatchSpeedAllIn10% 10%
9PoolHatchSpeedAllInB10% 10%
9PoolSpeed2090% 2090%
9PoolSunkHatch1540% 1338% 250%
9PoolSunkSpeed2060% 10% 1963%
AntiFact_13Pool520% 520%
AntiFact_2Hatch5100% 5100%
AntiFactory2425% 425%
AntiZeal_12Hatch850% 850%
Over10Hatch6100% 6100%
Over10Hatch2SunkHard3100% 3100%
Over10HatchBust1050% 1050%
Over10HatchSlowLings4100% 4100%
Over10PoolLing20% 10% 10%
OverhatchExpoMuta10% 10%
OverhatchLateGas10% 10%
OverpoolSpeed3100% 3100%
OverpoolSunk3073% 3073%
OverpoolTurtle367% 367%
Sparkle 2HatchMuta1331% 1331%
ZvZ_Overgas11Pool425% 425%
ZvZ_Overpool9Gas3768% 3768%
total24060%7254%7658%9265%
openings played3413178

Starcraft AI Ladder crosstables

The Starcraft AI Ladder does not display crosstables or per-map results. I wanted to see the charts to know Steamhammer’s strengths and weaknesses, so I calculated them myself. I modified the script I use to analyze the CoG and AIIDE tournament results every year. The tournament manager’s results file is now in CSV format, a change, but of course it was no trouble to parse. The pop-up table legend explains how to interpret the results to know whether to count each game, only referring to a “Duration” column which the file itself names “Game Time” (to distinguish it from “Wall Time”), and which has value “0:00” on an unstarted game rather than “00:00:00”. My script skipped a total of 3 games out of 2793, all of them with PurpleWave as one player and all due to GAME_STATE_NOT_UPDATED_60S_BOTH_BOTS.

I found that the “Download Search Results” did not behave quite as its name suggests. It seemed to perhaps remember a previous search rather than the current setting, or anyway something unexpected. But after a couple tries I was able to get the complete record of games played since the last reset on 17 April (just a couple days ago). I trimmed off the incomplete round 133, so the file I analyzed includes all games of rounds 0 through 132. 2793 games in 2 days is a great number, far more than BASIL plays.

The ladder would be more valuable if it had more participants. As it is, I am learning from it, because nowhere else runs so many games so quickly.

crosstable

#botoverallBanaSteaMicrHaloEcgbPurpZZZK
1BananaBrain86.22%69%51%100%98%100%99%
2Steamhammer71.68%31%80%46%79%95%98%
3Microwave70.05%49%20%56%97%99%100%
4Halo61.86%0%54%44%94%99%80%
5Ecgberht27.35%2%21%3%6%36%95%
6PurpleWave20.88%0%5%1%1%64%56%
7ZZZKBot11.79%1%2%0%20%5%44%

BananaBrain is on top in this small field. Steamhammer is doing well; it scores nearly a third versus BananaBrain, wins most games versus Microwave, and is about equal with Halo by Hao Pan. Thanks to the huge number of games, Steamhammer’s learning is saturated so this should be its peak performance. Steamhammer eked out a slight overall lead over Microwave only due to its dominating head-to-head results; against every other bot, Microwave scored better.

The version of PurpleWave is broken; it crashes or oversteps a frame time limit most games. I have to imagine that fixes are progressing in the workshop. I suspect that this version of ZZZKBot may not be working perfectly either, but I didn’t look into it.

each bot’s results per map

BananaBrainoverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
Steamhammer69%79%57%64%77%31%77%77%77%69%85%
Microwave51%21%57%50%62%46%46%62%46%46%77%
Halo100%100%100%100%100%100%100%100%100%100%100%
Ecgberht98%86%100%93%100%100%100%100%100%100%100%
PurpleWave100%100%100%100%100%100%100%100%100%100%100%
ZZZKBot99%100%100%100%100%100%100%92%100%100%100%
overall86.22%81%86%85%90%79%87%88%87%86%94%

BananaBrain barely noticed opponents other than Steamhammer and Microwave. Against Steamhammer it had trouble on the map Tau Cross, and against Microwave on Benzene. Checking the mix of strategies played on those maps would probably explain the cause.

SteamhammeroverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain31%21%43%36%23%69%23%23%23%31%15%
Microwave80%93%100%100%100%69%62%77%77%54%69%
Halo46%14%36%29%69%54%38%69%46%77%31%
Ecgberht79%93%79%71%92%85%77%85%85%62%62%
PurpleWave95%100%100%100%100%100%92%92%92%100%77%
ZZZKBot98%100%100%100%100%100%100%92%92%100%100%
overall71.68%70%76%73%81%79%65%73%69%71%59%

Steamhammer’s results vary strongly from map to map. I think it is a sign that the opening selection is not paying enough attention to the map. I should have gone with a proper Bayesian calculation rather than an ad hoc algorithm.

MicrowaveoverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain49%79%43%50%38%54%54%38%54%54%23%
Steamhammer20%7%0%0%0%31%38%23%23%46%31%
Halo56%43%57%21%77%23%92%85%62%62%38%
Ecgberht97%79%100%93%100%100%100%100%100%100%100%
PurpleWave99%100%100%100%100%100%100%100%100%100%92%
ZZZKBot100%100%100%100%100%100%100%100%100%100%100%
overall70.05%68%67%61%69%68%81%74%73%77%64%

Microwave also shows a lot of variation from map to map. That’s harder for me to interpret, even though it is the same evidence: Microwave has fewer openings overall than Steamhammer, so it is possible that poor results on some maps are due to not having an appropriate strategy available. Of course it could also be that the opponent’s play is much stronger on some maps.

HalooverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain0%0%0%0%0%0%0%0%0%0%0%
Steamhammer54%86%64%71%31%46%62%31%54%23%69%
Microwave44%57%43%79%23%77%8%15%38%38%62%
Ecgberht94%100%93%100%92%100%100%92%85%92%85%
PurpleWave99%100%100%100%100%100%100%100%100%100%92%
ZZZKBot80%93%79%79%38%100%69%77%85%92%85%
overall61.86%73%63%71%47%71%56%53%60%58%65%

Halo by Hao Pan seems to have consistent trouble on Aztec, the only map in the pool with a low-ground main and a ramp up to the natural. That could be the cause. Most bots underestimate the difficulty of defending the main from enemies on high ground.

EcgberhtoverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain2%14%0%7%0%0%0%0%0%0%0%
Steamhammer21%7%21%29%8%15%23%15%15%38%38%
Microwave3%21%0%7%0%0%0%0%0%0%0%
Halo6%0%7%0%8%0%0%8%15%8%15%
PurpleWave36%7%7%14%100%100%8%15%92%23%8%
ZZZKBot95%93%100%100%85%100%92%100%92%100%92%
overall27.35%24%23%26%32%36%21%23%36%28%26%

For Steamhammer, Ecgberht is a tricky opponent that can sometimes pull surprise wins. Other bots don’t seem to have the same experience.

PurpleWaveoverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain0%0%0%0%0%0%0%0%0%0%0%
Steamhammer5%0%0%0%0%0%8%8%8%0%23%
Microwave1%0%0%0%0%0%0%0%0%0%8%
Halo1%0%0%0%0%0%0%0%0%0%8%
Ecgberht64%93%93%86%0%0%92%85%8%77%92%
ZZZKBot56%93%43%57%0%77%62%62%77%46%38%
overall20.88%31%23%24%0%13%27%26%15%21%28%

PurpleWave crashes every game on Aztec, and frequently on other maps. :-(

ZZZKBotoverallBenzenDestinHeartbAztecTauCroAndromCircuiEmpireFortrePython
BananaBrain1%0%0%0%0%0%0%8%0%0%0%
Steamhammer2%0%0%0%0%0%0%8%8%0%0%
Microwave0%0%0%0%0%0%0%0%0%0%0%
Halo20%7%21%21%62%0%31%23%15%8%15%
Ecgberht5%7%0%0%15%0%8%0%8%0%8%
PurpleWave44%7%57%43%100%23%38%38%23%54%62%
overall11.79%4%13%11%29%4%13%13%9%10%14%

zergs versus Krasi0

These two games were played a few days ago, after Krasio was updated. Krasio apparently forgets its learned data on update, and against some opponents takes a few games to remember how to win again.

Steamhammer-Krasio

In Steamhammer-Krasio on Moon Glaive, Steamhammer started aggressively with overpool (overlord on 9 drones then spawning pool), and the early zerglings prompted Krasio to play defensively with a bunker at its ramp. But sneaky sneaky Steamhammer made few lings and instead added a second hatchery and teched to lurkers. Despite some clumsy zerg play, the lurkers delayed terran from expanding until around 11 minutes into the game. In the picture, lurkers are about to deny Krasio’s attempt to take its natural.

lurkers deny expansion

Krasio did at last successfully double-expand, but by then zerg was ahead and was soon able to destroy the terran third.

breaking a terran base

The next terran expansion was too far away to defend, and the rest of the game was zerg all the way.

Microwave-Krasio

Microwave-Krasio on Icarus, Microwave opened with a hatchery on 12 and went for mutalisks. The early mutas made more losses than gains, but notice the strong zerg economy. Microwave did not fall behind in supply for the whole game—a sign that Krasio was doing something wrong strategically, since the terran unit control was clearly superior.

probe defeat

In the middle game Microwave switched to ground units, overrunning Krasio’s third base in the lower left. For the late game it suddenly switched back into mutalisks and amassed a sky-darkening cloud. Mutas erased Krasio’s second attempt at a third base, in the bottom right, and then it was too late for terran.

probe defeat

comparison

Despite the different unit mixes and play styles, the games are strategically similar. In both, Krasio did not play its best opening and fell behind early. The zergs were able to roll up outlying bases with relative ease because terran did not have the mobility to defend them, and then were so far ahead that they could win by brute force.

Krasio wins when it starts well, of course, and it usually starts well once it has a little experience. The top zergs have gained enough skill to be a threat, though. Both have adequate macro and know how to choose a poorly defended expansion to attack, skills that many bots lack. In the last 7 days, BASIL gives Steamhammer 4-4 versus Krasio, and Microwave 2-5.

When you can’t defend your own expansions, you need to keep your opponent off-balance instead. It’s an advanced skill, and even Krasio does not have it. Against the lurkers, terran could have tried vultures, or drops, or perhaps wraiths—harassment that lurkers will be poor at responding to. Against the mutalisks, terran had enough valkyries to be safe, but seemed to deploy only 1 or 2 at a time in any given fight. Also, since terran was behind, the goliaths were not the best unit choice because they slowed down army movements. Without them, a larger marine and medic army would have been able to maneuver rapidly in defense, or cross the map to threaten zerg bases. I think bots are starting to play well enough that this kind of strategy knowledge will help.

let me help you with that

This Steamhammer version is showing clear superiority over the previous one. I expected a small improvement that was hard to be sure of, but got an improvement that’s easy to see. Nevertheless, there is one new misbehavior: It takes bases in a poor order on some maps. On Heartbreak Ridge it takes the center base far too early, among other expansion order mistakes. Using the resource tracking info threw the base scoring out of whack, and my attempts to whack it back into whack were not enough. I have to hit it harder.

A funny picture:

probe defeat

Krasio is taking its third base as it should, and mining out the blocking minerals at a good timing so that it can transfer SCVs along the back path. Steamhammer has 2 drones in view. The drone on the right also wants to take the base, and is just noticing the command center in its way; it will give up and return home. The drone on the left knows, “We’re about to take this base, so I’d better clear this path that’s near it.” The SCV and drone are cooperating to mine out the stacked minerals, entirely to Krasio’s benefit.

Steamhammer stands at an advantage in this position, but ended up losing, most importantly because it took bases in the wrong order. Terran pushed out, and by the time zerg gained the strength to break the attack—which it did—the center base had already fallen. Many bots expand unsafely to that center base.