archive by month
Skip to content

Steamhammer wants opening learning 3: lurkers

I rewrote Steamhammer’s lurker micro. Now lurkers fight well enough rely on. They don’t burrow and unburrow too often, unlike most bots’ lurkers. They do tend to be clumsy getting into position in a narrow space, and a side effect of not unburrowing too often is that they may cooperate poorly with other units, but one step at a time. I’m adding lurker support to the strategy boss, because it was past time.

So far I’ve written only 1 lurker opening. I’ll start slow. But as soon as there is a choice of what lair tech to aim for, Steamhammer is faced with the decision. Choosing randomly will lead to mistakes.

Against a terran that goes straight infantry, as many do, lurkers are a strong choice. Against factory units, lurkers are a poor choice (though they can be good for drops and surprise attacks). The majority of terran bots go one way or the other, though some can do either or both. If the opponent’s unit choice can be predicted, then Steamhammer can choose an optimized counter-build from the start. It won’t have to lose time scouting and reacting.

Against protoss, both lurkers and mutalisks counter zealots; any lair tech works. And dragoons are useful against both lurkers and mutalisks; zerg wants zerglings and hydralisks to combat dragoons. So the opponent model tells whether to hurry up and get a lair and how soon to take the second gas. It’s less valuable than against terran, but useful.

Against an opponent that doesn’t bring detection, lurkers are strong against any ground unit mix. The opponent model can remember that too.

Andrey Kurdiumov

The new bot Andrey Kurdiumov is a slightly modified version of the latest UAlbertaBot. It no longer relies on BWTA. It is using the new SparCraft, so you can take it as a data point on how good the new SparCraft is. (But Andrey Kurdiumov is playing UAlbertaBot’s rush openings, so it will have fewer units of fewer kinds than most bots.) It appears to have been backported to use BWAPI 4.1.2 (rather than the latest UAlbertaBot’s 4.2.0) to get it to run; I doubt the port was much work.

Steamhammer wants opening learning 2: zealot rushes

Wuli’s zealot rush beats Steamhammer about 4 games out of 5. UAlbertaBot’s usually wins too. Carsten Nielsen’s wins fairly often, and Lukas Moravec sometimes plays a winning zealot rush. Steamhammer’s weakness is not the initial defense, which holds the zealots for quite a long time. It’s similar to games versus McRave; the weakness is in the transition to lair tech. Steamhammer ends up without enough drones.

Someday the strategy boss will be smart enough to understand the situation and make a safe transition. It will be easier if I improve Steamhammer’s defensive skills, which are simpleminded. But those things take time. In the short run, it’s easier to come up with an opening that beats zealot rushes. Then all Steamhammer needs is to know when to play that opening.

Bots should benefit hugely from opponent modeling, because other bots mostly play in stereotyped ways. Wuli and Carsten Nielsen never deviate from their rush builds. But Lukas Moravec, among others, plays more than 1 build. So to counter zealot rushes, a bot also wants plan recognition. If the scout sees 2 or more gates and a lack of other stuff (no gas, forge, or expansion), then the bot had better stay safe against a hard rush. If it sees a forge and cannons, it had better emphasize drones and hatcheries instead. Opponent modeling and plan recognition can be combined: Here are the plans the enemy has been seen to follow (described in some abstract way, such as the timings at which units appear). Based on scouting information, this past enemy behavior is the closest match, so let’s counter it. Since bots are predictable, simple opponent modeling is likely to give big leverage.

More about opponent modeling: If you know the opponent’s range of openings, then you can figure out how best to open yourself—what to do until you get scouting information and can adapt. Lukas Moravec never tries a fast rush, so you don’t need to stay safe against rushes. If the opponent never plays proxies (like most), then you don’t have to scout for proxies. If the opponent plays a mix of fast and slow openings, then you can try to estimate the best counter-mix with game theory. There are a ton of ways to gain advantage by knowing the opponent’s habits.

tscmoop-Steamhammer hell-for-leather game

This game Tscmoo protoss vs. Steamhammer went back and forth, with both sides repeatedly decimating the other’s workers. On the one hand it’s kind of entertaining, but on the other it shows how weak both bots still are. Steamhammer was much too hesitant with its mutalisks, and Tscmoo did not make the right units to keep control of the situation. They both made plenty of mistakes.

Tscmoo went for a forge expand build, much safer than the bare expansions it has been opening with recently. Steamhammer opened 12 hatchery and got away with it because tscmoo didn’t scout early (if protoss scouts it in time the scouting probe can delay the hatchery, and even if that fails protoss can pull ahead economically by starting the nexus before any cannons, since zerglings will be delayed). Steamhammer has a partial understanding of how to counter forge expand, and it made extra drones and went up to 4 bases. But zerg was also clumsy around the cannons and lost zerglings unnecessarily.

Tscmoo built up zealot numbers while teching. It got a templar archives and high templar, plus a stargate that it never used (but which zerg had to prepare against). Steamhammer started with hydraling on the ground since hydralisks are good against cannons, but seeing the zealots it switched to mutalisks. Zerg started its carapace upgrade shortly after protoss started attack +1, which was correct timing, and later in the game drew ahead in upgrades.

The mutalisks cleaned up probes in the protoss main, apparently putting zerg well ahead. Notice the red zealots in the middle on the minimap.

mutalisks clean up

But the zealots were too strong for the ground army and returned the favor. The mutalisks indecisively moved back and forth, taking occasional swipes at protoss stuff but reacting late to the zealots. Here zerg seems to be fighting back, but at the 3 o’clock expansion zealots are ravaging drones with little opposition.

zealots clean up

Zerg ingeniously transferred drones between bases during the fight and lost more than it should have. When the smoke cleared, zerg had 9 workers and protoss had 12. By the numbers, zerg was narrowly ahead in army, but protoss was merging archons and if the archons maneuvered well then Steamhammer would have to back off while both sides rebuilt. The game was still on.

archon fails to clean up

Well, the archons did not maneuver well. The first one tried to engage the mutalisks by itself, instead of retreating to the cannons to wait for the second archon. That would have been a difficult move for a bot to find. Protoss lost more probes and the templar archives came under fire.

At the same time, zealots returned and killed more drones. This time Steamhammer had the sense to defend its natural with a sunken, and the zealots could not land a killing blow. Steamhammer was able to restore a modest economy while Tscmoo kept losing probes, and archons, and high templar before they could merge, and finally buildings.

Tomorrow: Steamhammer wants opening learning 2.

Steamhammer wants opening learning 1: McRave

I still have some essential bugs to fix. Also I keep literally forgetting that I promised a public repository next, and having to remind myself; it’s not appealing work. But beyond all that, I’m thinking about the next step.

The next major feature will be a start on opponent modeling and opening learning. As I think about it more, I’m seeing how important a feature it is to add soon, so I don’t regret setting out down the path. I’m going to write a series of posts giving examples to show how key a feature opponent modeling is.

McRave

The current version of protoss McRave doesn’t play that strongly. Its new forge-expand strategy is not polished yet, and I think new weaknesses have been introduced. But even so, it beats Steamhammer. The live Steamhammer always plays low-econ pressure builds versus protoss, and (unlike most protoss bots, even Bereaver) McRave is a sturdy enough defender to hold off the pressure. While trying to pile on pressure, Steamhammer doesn’t make enough drones, and as the game wears on it can’t keep up.

It’s easy enough to change Steamhammer’s behavior. There is a standard opening which is slower than 12 hatch 11 pool and faster than 3 hatch before pool: It is 12 hatch 13 pool, squeezing in 2 extra drones before the spawning pool. Those 2 drones make a substantial difference in the economy, because the earlier you spawn a drone, the more it pays off. The trade is that zerglings come later and the opponent gets a window for early aggression. Anyway, this McRave version doesn’t go for early aggression, so I coded up a quick 12 hatch 13 pool into 3 hatch hydra build. Sure enough, my first draft won most test games against McRave.

I don’t want to make 12 hatch 13 pool a standard build versus protoss, because too many bots go for early attacks. Steamhammer’s low-econ openings are effective against most opponents. But I need economic openings to win against defensive opponents like McRave.

I could specify an enemy specific opening mix versus McRave and immediately turn a bunch of losses into wins, at least for a time. Steamhammer does that versus rushbots and a few others. Arrakhammer does it too; it has hand-made builds to beat Wuli and McRave, and one to give it a chance versus Iron. But it’s not satisfying. It’s not sustainable, because I have to keep updating the hand-made builds by hand as opponents appear and change. And it’s likely to fail in tournaments, because many opponents show up with surprise updates that are specifically intended to throw off opponents which tune against them.

The answer is so learn each opponent’s habits from experience.