archive by month
Skip to content

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.

Trackbacks

No Trackbacks

Comments

LetaBot on :

After the CIG, I will release the text mined build order form Liquidpedia (done by dennis soemers). Those ones also contain information for builds that are strong against (and build they usually lose to). Some build orders also contain information about which maps they are strong on.


You could perhaps use those as a starting point, just like AlphaGo used expert human players are a starting point for their machine learning.

Arrak on :

That sounds great to me, as well. Setting builds to deal with neverending waves of cheese/rush-bots bothers me a lot.

The builds I set otherwise are mainly for testing - lurkers, mutalisks, hydralisks, other things... In McRave's case, I set the build with the intention of helping the author improve his own bot, since his bot has helped me find bugs and weaknesses, and we'd talked some.

Looking ahead, there's definitely a need for reactive macro as well, especially for zerg -- the reaction to FFE is supposed to be 5-6 hatcheries, which is absurd against 1 base builds, but is safe to do after scouting FFE. A professional player can often infer the exact build they're playing against from timings.

My plan has been to improve the way my bot handles post-build macro (so I can take off silly followup drones in my set builds) and the variety of strategies it can execute correctly. There's been a lot of games where it needs to either continue building mutalisks, replenish drones, build a new base or extractor, or get hivetech early, where it simply doesn't do so. It still rushes hydralisks and lone mutalisks into marines/turrets, and lurkers into wraiths (instead of the other way around). This has been especially problematic against krasi0 and Iron.

By the way, I recently fixed the extractor trick (and a number of other bugs) when investigating why my bot stopped building extractors (presumably after an extractor was killed). There's a line in BuildingPlacer.cpp that needs to be rewritten as "closestGeyser = geyser->getTilePosition();" instead of getInitialTilePosition (which apparently returns an invalid tile for... "new" geysers?). This was not the bug I expected to find -- so it took me quite some time to track it down.

MicroDK on :

Yah! I fixed this and I can now build an extractor after doing extractor trick! :D Look for 10Hatch in the next update. ;)

Jay Scott on :

Aha, that’s why my first attempt to work around the BWAPI bug failed: I didn’t find all the places that mattered. Thanks! That makes the extractor trick usable, so I’ll document it in the next version. Unfortunately Steamhammer still has bugs in base tracking (in InformationManager) that can get it confused about how many geysers it has available.

krasi0 on :

Yay! Finally! It's been so long I've been waiting for our future opening learning war. I hope It's going to be much more fun than playing against the RNG which you currently use :P

Jay Scott on :

I expect it will be a while before it becomes clever enough to counter the openings of a sophisticated opponent like Krasi0. But I see how to do it in principle, so stand by! Also, there will still be random numbers. :-)

McRave on :

I recently fixed a lot of issues with changing from BWTA to BWEM, still working out the bugs. I also had a bug that stored enemy units under my strength and improperly never made use of enemy momentum, so my bot made poor judgement of fights. Hopefully the next update I push fixes that and I can look into fixing my FFE build a bit. Opening learning is probably one of the best ways to beat bots with static openings for sure. Hopefully the next Steamhammer version can punish FFE like Arrak is doing.

krasi0 on :

Could you elaborate on the issues with changing from BWTA to BWEM for those of us who consider making that switch, too? Thanks in advance!

MicroDK on :

This is what I have been thinking for a long time. We need openings to deal with early aggression but also openings for more economic enemies. And yes, doing enemy specific builds is not satisfactory in the long run against actively developed bots. I was thinking about turnong on the built in opening learning inherited from UAB but did not have time to do the testing and eventually bug fixing.

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.