archive by month
Skip to content

old bot Styx

Old zerg bot StyxZ has been getting updates recently, and I have been watching it steadily climb the rankings. Today Styx became the top zerg on BASIL, at least for the moment, so clearly it is time to write about it!

To give an impression of how far Styx has climbed, its lifetime win rate on SSCAIT is about 34%. In the last 24 hours on BASIL, I count 5 losses and 35 wins, an 88% win rate. On the BASIL crosstable its row is almost all red and stands out sharply in its new green environment. The degree of improvement is astounding.

Styx is distributed as a JAR file, so I unpacked it and took a look. I found that Styx is written in Kotlin, a recent language. That makes me wonder: Is this Styx version a complete rewrite, new code that replaces the older version? That would fit in with the quantum leap in results. But I also see both of the map analysis libraries BWTA and BWEM, which gives the impression that Styx is in the process of transitioning to BWEM, though perhaps it is using both to take advantage of different features. Also in there is the jts geometry library, which seems potentially useful for map-related calculations. The jts version is 1.16.1, officially released this past February (I love that it is the same as our Starcraft version number).

Also in the object code I see the ASS combat simulator, a project started only last year. I see the jsoniter JSON parser, which suggests that Styx is reading data files of some kind, whether static initialization and configuration or dynamic learning files.

The feeling I get is that work on Styx was restarted sometime this year, and a substantial amount of new work has been done. It’s hard to say exactly what, though, since I didn’t save an old version to compare.

What specifically makes Styx stronger? The most obvious improvement is a new build, much sharper than what Styx used to play: It is 9 pool, second hatchery, then zergling speed, and don’t waste time making extra drones but keep up zergling production with a 7 drone economy, which enough for constant production from the 2 hatcheries. The mass lings overrun opponents of every race, including solid defenders like McRave. The purple zerg PurpleSwarm has been playing a similar build for a while, also with success.

The new build is great, but it does make me wonder how much the other changes to Styx contribute.

Trackbacks

No Trackbacks

Comments

Bytekeeper on :

Hi! I think I can clarify a bit (since it's my bot):
It's a rewrite of the old bot. I have a github repo: https://github.com/Bytekeeper/bw_bot_ftt which was for my very first bot (which I disliked enough to just the same repo for StyxZ). I have not yet updated it with the new code, but will do so soon.

It uses jBWAPI which is now in a very useable state - and includes BWEM and a "fake BWTA" based on BWEM (that's where the BWTA references comes from).

I'm also the author of ASS so it's no surprise it uses it. This allows me to test/fix bugs in jBWAPI and ASS.

For now I use "jts" mostly to mark the area between minerals/gas and the main as non-buildable area. But in earlier versions of StyxZ I also used to to keep distances to enemy clusters.

I'm also using the same strategy as PurpleSwarm does because he explained in in a chat while letting Antiga try it vs humans. It motivated me enough to finally bring my bot to a state where it can fight.

Jsoniter and zstdlib are used to enable me to use Cherrviz (I recommend using https://github.com/bmnielsen/cherryvis-docker rather than setting it up manually).

StyxZ has no learning currently and only one strategy is embedded. My main focus is to abuse the combat sim (which is rather similar to Locutus' modified FAP, with some additional features) to make good decisions in combat.

So far the strategy is very powerful vs bots and the execution is "okish" - with better micro it could beat even more bots.

I'm really surprised how well it does.

Dan on :

It's hard to count of all of Bytekeeper's contributions, because you run out of fingers while committing a hand to retrieving your jaw from the floor.

Bytekeeper on :

Thanks, I appreciate it!
Coming from you it means a lot!

I see you use slightly different build, going extractor before the second hatch. I think I'll experiment with that as well since it seems to allow a slightly faster upgrade :)

(Yet more stealing from your ideas. I also use PurpleWaves code as a source for many of the quirks. And the actual "chat logs" inside is a great source for amusement as well ;) )

Dan on :

Aw, shucks.

The Extractor before 2nd Hatch is unintentional, a consequence of erroneous economic predictions (itself a consequence Protoss being its day job and Zerg being a weekend hobby), as evidenced by https://github.com/dgant/PurpleWave/blob/master/src/Planning/Plans/GamePlans/Zerg/ZvE/ZvE9Pool2HatchSpeed.scala#L73

I think in ZvZ at least the Hatchery first is better in most cases, as it's critical to have the biggest delta of Zerglings possible. It's okay for the speed to come later -- it's still fast enough to kill a 9 Pool 1 Hatch Muta before the Mutas can pose a threat. Other matchups may vary.

Dan on :

There's a bit of a story behind this build.

Some of my teammates were working on learning 100% of macro decisions for full ZvZ games with reinforcement learning. The decisions are conditioned on the current game state, so the hope was that agents would learn to react to the current game state.

But this build order is such an incredibly attractive local optimum that every agent converged on it, and wouldn't deviate even in response to changing conditions.

It's very hard to defend in ZvZ. You can't beat it by getting more Zerglings (10 Hatch can produce marginally more, but not enough to overcome the map distance) or faster Zerglings (9 pool survives 4 pool easily). You can try beating it with Mutalisks, but you need very precise ramp defense and/or strong simcity with Sunken Colonies to hold it. Bots lack both of those skills.

I plugged it into PurpleSwarm and enabled it against all races. In addition to being strong in ZvZ, it hits a few lethal timings against other races. For example, it amasses enough Zerglings to crack XIMP's wall early on. So it's pretty potent, and in ZvZ especially I think it'll force a bit of a reckoning.

In general, amateur StarCraft players have a tendency of self-deception, thinking their strategies are sound because they see other people running them successfully, but in practice lacking the skills or understanding of reactions to soundly execute them. This is just the latest lesson, and a reminder that rumors of the death of rush bots remain exaggerated.

Jay Scott on :

It’s a great story, and a great build. The story will stand forever, but I have ideas on how to counter the build and come out ahead. We’ll see how they work!

Dan on :

One idea worth trying would be a 9 gas and try to break them with fast speed before they gain a Zergling advantage. Swarm will sit at home against Overpool/9 Pool builds until it gets speed for that reason, but you can still attempt a break.

Jay Scott on :

My thinking is that no fast bust is likely to work. But a zerg defender that knows the timing always has leeway to get a little something extra, because of the travel time across the map.

Jay Scott on :

Agreed about self-deception. Bots show a similar effect. Steamhammer plays 12 hatch versus terran as if it were the most natural thing in the world, yet barely has a conception of how to defeat a bunker rush. At Steamhammer’s level of play, 12 hatch is not a sound opening. Rush it sometimes, like Halo by Hao Pan, and you force Steamhammer to play a less economic build.

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.