Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
StarCraft Micromanagement with Reinforcement Learning and Curriculum Transfer (arxiv.org)
98 points by mav3r1ck on April 19, 2018 | hide | past | favorite | 53 comments


For those who don't know Starcraft: microing refers to the small scale/precise maneuvering of units during a battle, as well as activating special unit abilities at certain times. In the lower level leagues microing is not as important as having a good overall large-scale "macro" strategy. The microing really starts coming into play at the higher levels where it can give the edge needed to win a battle.

I am not very surprised that machine learning has been able to successfully execute micromanagement. In my opinion the macro decisions are more interesting, since they typically require higher level reasoning (and comprehension of what the opponent is doing). We have yet to see an AI system that can successfully execute macro strategy when playing against a human opponent.


How can this be so? In my experience playing Starcraft the decision space for macro is very, very, very limited. You are essentially locked into a handful of viable build orders for the early game, a handful of timing attack opportunities in the early and mid game, and after that things veer so off track that very few players do more than wing it.


I'd disagree. At the pro level, choices like unit composition and expansion timing are very strongly influenced by what the other player is doing. I've seen videos where a caster (like Lowko) breaks down "the build order" that a player did in a pro level game, only for the pro to turn around and say something like: I wasn't following a strict build order, just reacting to what I saw from the opponent.

I watched a pro game just the other day where one of the players noticed that their protoss opponent had a late timing on their second pylon in their main base - as in, it should have been there, but wasn't. That protoss player has a well-known penchant for early game stargate harassment, so the other player read this situation and reacted by delaying their first expansion and instead producing early-game air defenses.

As another example, take unit composition. If a terran player is running a bio-based army (marine, marauder, medivac), what sort of units should zerg produce? Infestors are usually a good choice in this matchup. On the other hand, mass infestors will be much worse against a primarily mech-based terran army; instead you might see many vipers on the field (which, vice versa, wouldn't be great against a bio army).

Pro players are essentially always scouting what their opponent's doing because the macro decisions can make or break the game. The general sentiment I've seen that is good macro skills will push you far up into SC2 leagues, and it's not until diamond/masters that micro starts to really matter.


I completely agree with your assessment.

I watch a fair bit of pro play, and also play enough to bounce between low diamond and high platinum on NA. It is almost always my macro that wins or looses games.

Most people at my level wouldn't even have consistent enough play to be able to notice the difference between well and poorly micro'd games. But if they miss an upgrade, or build the wrong comp, or worse, don't expand, that is the win/loose for 98% of games below masters.

Which all around sucks for me, because my micro is on point :)


This is sometimes called the game's "meta" but it's very unclear how much of this is real and how much is basically just fashion.

Some good but not quite star quality players like Ketroc deliberately ignore the meta. Ketroc plays with loads of Ravens, he did this when people said Ravens were strong but hard to use, he still did it when the accepted wisdom was that they were now useless, and last time I looked he was still at it after yet further balance changes to SC2. How he uses them changes, but he likes Ravens and they never stopped being viable.

Games like Chess have meta too. A year ago humans believed that materiel was essential and strong position made up only for small differences like losing a pawn or two. Then Google's Alpha Zero AI says hold my beer, sacrificing loads of my pieces for positional advantage is fine, because I can use that advantage to pin your extra pieces and still mate you away.


Sorry, a bit of ambiguity here, I was talking about SC:BW, as the paper is also concerned.

I think that SC2 and BW differ in this respect because SC2 has been constantly updated throughout its competitions to make more strategies and units viable. The last balance patch for BW was two years after release in 2001 (although a recent bug fix is said to have slightly buffed valkryies, there is some dispute about whether this actually pans out in practice but I haven't looked into it).


The problem here is the conflation of "macro" with "strategy". If the parent comment had defined the terms properly, there'd be less disagreement here. They rightly define micromanagement as the control and use of small numbers of units, whereas macromanagement refers to the management of the non-fighting, production related activities like producing workers constantly until saturated, producing supply depots on time, producing units constantly from the correct number of facilities, and so forth. Strategy itself refers to a broad game plan which may incorporate unit composition, large-scale plans for army movements, plans to limit the economy of the opponent, and so on.

Thus, strategy is the widest tent, and someone like sOs shows the truly massive number of strategies that can be employed. In contrast, macromanagement does indeed have a smaller decision space, since really the "decision" with macro is pre-defined. Make your economy and production as efficient as possible. There may be slight variations in how its done, especially in Brood War where the economics are much more nuanced than SC2. Nevertheless, if you watch a variety of pros macro out mass marine-marauder-medivac, they will usually have very very similar expansion timings, identical numbers of barracks, and any changes in the timings/build orders is strategic, not macro-related. There may be "on the fly" macro adjustments due to harassment damage, however strategy is far far more fluid of a category than macro.

When it comes to micro and decision space, however, I believe that it is mostly a matter of execution and not decision. We've seen perfect blink micro stalkers, dragoon AI bots, and I think it'd be far easier to take down top players in a 1v1 micro fight since computers are not limited by mouse accuracy, emotional concerns, stress, fatigue, and a number of other factors which affect your hands' abilities. In contrast, a top player should have a much better edge over a computer in strategic realms, since strategies must be tailored to the expected opponent's strategy and mind games heavily factor into this equation.

God, what a beautiful game.


Marines in TvZ would be so OP with perfect splits...


It's really not. It seems limited because of what people have decided are strategies that win and so the strategies that people try. However, this is not, entirely, what macro refers to. Try playing a game of starcraft. Try to keep up with worker construction, base management, unit construction, and basic map presence. It's harder than you think, even at the top levels of the game.


The decision space for macro is very limited, but correct execution of it extremely important.

The basics (Spend your money, don't queue units, don't get supply blocked) are trivial. Executing them perfectly for 20 minutes, during a stressful game, is impossible. The best players in the world can't do it.


> and after that things veer so off track that very few players do more than wing it

If you ignore the part where you have lots of choice, then there's little choice, indeed :)


In practice there's a lot of small variations on each of those, depending on what your opponent is doing, the map, previous encounters, etc.


I am sure AI friends can come up with some interesting strategies.


I actually find the advanced micro to be far more interesting in the edge cases where you can break the game's balance system. I remember when the Brood War api first was released a while ago, there was an AI bot that won some competition with just mutalisks because the AI micro prevented them from overlapping their AOE hit boxes as they moved around. So you had mass mutalisks that the opponent couldn't use AOE against. It was able to effectively micro mutas against goliaths/corsairs/valkyries/etc.


You don't even need an AI to do this. ByuN micros reapers so well that he was literally the only player at the top echelons of play who revealed they could be OP. Blizzard nerfed the reaper twice specifically due to his play.


Creating a micromanagement AI is only the first step. This must be piped into a macro AI, which produces the units with with micromanagement can be done. Then, another critical layer beyond micro or macro is scouting the opponent and predicting what their plan is. Next, you need to adapt your own strategy, which must also be planned at the start of the match since you can't scout instantaneously or perfectly. Finally, your own initial strategy choice must be tailored to the map, to the player you're playing against, to recent games/strategies other pros have exposed as powerful/weak. There are an incredible number of layers of complexity to what a truly fierce Starcraft AI would need to do.

And yet, something similar may have been said about Go, Chess, Checkers, Poker, Jeopardy, or many other games before this. If enough talented minds and powerful devices focus on Starcraft, how would humans compete? Does anyone here think top pros would win in a best of 7 or a best of 11, for instance? Which top pros, and BW or SC2? To me, I just think it'd be arrogant to assume SC is different from all the other realms in which humans have been bested by machines.


SC2 has a lot of things that help the player over an AI, like imperfect information, a very large ruleset, and continuous movement and time.

The main advantage AI can exploit is "infinite micro" units. There are certain units in SC2 that are primarily limited by someone's ability to pay attention to them. Terran Reapers, for instance, in early patches could dance back and forth just within range Zerg Roaches, but out of range of being counterattacked (though the reapers would quickly die if player stopped paying attention). This required such fast movement that it was almost never employed except by professionals during the early game when not much was going on.

If an AI is not limited by the number of actions a person can take, these "infinite micro" units become extremely powerful. In particular, most of these types of units are within the Terran race and most powerful in the early game. The best AI in the near future will likely focus on early all-in attacks using these sorts of units (primarily reapers, widow mines, hellions, and medivacs). The human player would have to rely on defensive structures that would put them at a major disadvantage and then catch up in the mid-late game, relying on the fact that the AI gets worse as the game goes on and becomes less predictable.

Another thing to note is that Terran strategy relies quite heavily on killing the enemy workers in the early game, but the inbuilt controls for targeting workers are quite clunky and prioritise military targets. Players can target individual workers manually, but generally do so with their whole army at once, while an AI could select the perfect number of units required to 1-shot a worker, give them the command, then select another group, and so on.


> like imperfect information

The information is only imperfect for a human but an IA can have a way better access to information: - if you scout you opponent mineral line and click on the minerals, you know exactly how much minerals he's harvested since the beginning of the game. If you scout your opponent army and building, you know exactly how much he spent. Then you can deduce if he has something hidden somewhere or in production. Of course this is impossible to do for a human, but really easy for a computer. - scouting is easy but requires a lot of actions, an IA could have one mutalisk wandering over the map the whole game without being killed, which is impossible for a human unless you dedicate full time on this.

Imho, beating humans to StarCraft isn't a big deal in itself, but it would need a lot of work to build the AI to deal with the game's complexity. But it's merely domain specific work that has little to no interest on AI in general. Creating an AI that trains itself how to be good at StarCraft will take much more times and effort, but at least it will provide value outside of the specific problem.


> Then you can deduce if he has something hidden somewhere or in production. Of course this is impossible to do for a human, but really easy for a computer.

This is definitly not impossible for humans. High level SC players are able to keep track of the mineral and gas spendings of their opponent in the early game (After the early game there is usually no complete information to calculate this). Just seeing the timing of taking the gas geysers gives you information about the earliest possible time a certain unit/building can be produced.

Of course a AI can scout more and take more variables into account but humans are surprisingly good at this too.

> Imho, beating humans to StarCraft isn't a big deal in itself, but it would need a lot of work to build the AI to deal with the game's complexity. But it's merely domain specific work that has little to no interest on AI in general.

The same thing was said about early chess AIs and the Alpha GO project. In the end both lead to major advancements in AI. If you solve the domain specific problem starcraft you could easily apply the gained knowledge to similiar problems.


At the top levels, it's a lot more about where those units/buildings are than whether they exist. You know they're going to be mining and spending efficiently, so just seeing the number of workers gives you a very good idea of how much other stuff they have. Pros also check to see what technologies are being researched (buildings have a different animation while researching).

You can't get much more scouting than that because there is a cost associated with scouting, either because you lose a worker's time or because you spread out your army.


> You can't get much more scouting than that because there is a cost associated with scouting, either because you lose a worker's time or because you spread out your army.

I agree but I was mainly talking about the time it takes to perform the scouting. A AI could scout 5 different places at the same time which is pretty hard for a human to do without falling behind elsewhere. I know SC pros are really good at multitasking but at some point the AI is just superior. If this gives the AI a significant advantage is a different question.


> The same thing was said about early chess AIs and the Alpha GO project

Afaik, chess AI (I mean, modern ones like deep blue) had little to no wide impact on AI. They had a lot of impact on chess though.

But it's way easier to model a chessboard than a game like StarCraft, the domain specific work is just orders of magnitude bigger.


> Afaik, chess AI (I mean, modern ones like deep blue) had little to no wide impact on AI.

Apart from the pure technical side (which I am no expert in so you might be right) the impact on public attention and awareness for AI was huge for those projects. It's important that "normal" people get a feeling for AIs and what they are able to accomplish.


It depends what your goals are, but those development nevertheless sound useful.

If you want to stay "human-comparable", it sounds as if it wouldn't be hard to artificially impose those restriction on an AI - e.g. you could simulate a "viewport" that the AI can move around and restrict the micro engine to only take inputs from within that viewport, etc.

(Assuming the AI could make use of that advantage anyway. If I remember correctly, there is a lot of research going on that uses "attention" itself as a primitive in AI architecture. So depending on the architecture, AI might not always be able to make use of that advantage.)

On the other hand, an AI that does use infinite-micro strategy might be useful for UI research. E.g., you could pit it against a human player and use the human player's performance as a benchmark for UI improvements.


I don't think anyone doubts computers will eventually beat pros in Starcraft. I do think it will take quite a bit longer though, even with recent advancements seen in the likes of AlphaGo.

From a human perspective, Starcraft doesn't seem "harder" than Chess or Go, but it has more fluidity and ambiguity, both things computers struggle with. And the ruleset, as it were, is VASTLY more complicated.


I disagree that Starcraft doesn't seem harder. The strategic depth is arguably comparable, but the difference is you need the dexterity of a master pianist to execute.


I want an AI assisted mode with API hooks where people can code their own sophisticated "macros" that can be activated with a command/button. Limit the code to X number of characters. It would be awesome to see a tournament with this.


There is some stuff like this, you would see it on the ladder in SC2. Hacks that would perfectly split your marines against incoming banelings (they explode and do splash damage so the more you split the less effective they were), or auto burrowing/unburrowing roaches (which hides them from the enemy and they heal underground). It sounds cool but it’s way cooler when you saw a pro doing all that stuff themselves almost as good and still going back and building units etc.


Check this out. 100 zerglings vs 20 siege tanks - https://www.youtube.com/watch?v=IKVFZ28ybQs


Interesting. It seems that this is possible mostly by the lag time between target acquisition and firing by the siege tanks, compounded with the relatively high speed of the zerglings - most any other unit in the game wouldn't be able to react in time.


I appreciate the manual dexterity, but imagine the amount of strategy that AI assisted play would open up.


If you're looking for more strategic gameplay instead of micromanagement, Starcraft isn't the best game to pick. Lowering the importance of high APM for a game like Starcraft through the use of smart macros is just a hack, why not just play (or design) a game that doesn't need any of that. Of course, the obvious choice is any turn based game.

But even if you want to stay in RTS land, one of the more recent titles that comes to mind where micromanagement is not as important and strategy/planning is very important is Ashes of the Singularity. Spoiler: the game may seem "slow" compared to Starcraft but that's also part of reducing the importance of high APM.


I agree with d1zzy, if you don't like the micro part of Starcraft, there are plenty of strategy games that cater to a more strategy-focused style of play.


I like the micro just as much as anyone else. But I don't agree that there is just one way to play a game and that if someone wants to deviate from it, somehow that goes against the purity of the established way. Blizzard has benefitted greatly in the past by letting the public mod their games (dota). I don't see anything wrong with extending that to Star Craft.



if this were available in true form, would that reduce the game to the fastest unit no matter what the damage.

as an example see the zerg vs tank below.

I understand the idea of code manipulation but what might be better is just having human programmed AI's fight each other (which I am fairly sure is going and can be viewed live but I do not have the link handy.


When playing humans though the AI's can be limited in certain fashions, such as by lowering the available actions per minute (overall), or per unit; which lowers their non-human skills.


Interesting, outside of the academic merits of the research, I wonder if they could partner with Blizzard (or other similar RTS game studios) and start shipping games with AI that is very difficult to beat? That would usher in a new era of solo and offline game play that could be very fun and challenging! Plus we'd be training Skynet, err, I mean the neural network in the process!


A 'perfectly' micro-ing AI is both boring to implement and boring to play against. Somebody made one for SC2 back when that was popular, take a look at these videos to see how uninteresting it would become after the first attempt.

https://www.youtube.com/watch?v=0EYH-csTttw

https://www.youtube.com/watch?v=IKVFZ28ybQs

https://www.youtube.com/watch?v=DXUOWXidcY0


But even the best AIs in Starcraft are still quite bad compared to competitive players.


yeah but I'm pretty sure these bots still get crushed by humans because of macro, planning and positioning, which is why it takes top firms on the planet so long to solve the problem


If the AI wasn't very smart, then you'd expect there to be some optimal path that would beat them. But Starcraft has always been a game with very little skill ceiling on micro. Well micro'd units have the potential overcome huge macro advantages. A famous real-world example would be Boxer's Immortal Marines:

https://www.youtube.com/watch?v=WJp0t9n8DWk


My understanding is that a micromanagement-based AI is likely not to be an "interesting" difficult AI to beat. The DeepMind project is aimed more towards (with its apm caps) at building something that makes good decisions (e.g., unit composition, build orders, crisis management) instead of relying on brute force optimal control of units. While it is likely possible to completely break the balance of the game with perfect unit control, playing against such an AI (which is really just a bot at this point) would get stale pretty quickly.


Just like playing against MarineKing would get stale quickly for most players :P

The problem with starcraft is that its like chess - for a lot of players it really DOES get stale pretty quickly, with only one or two interesting moments in a game (assuming no early blunders). The games that are interesting involve near perfect play for 10-20 minutes and then frequently one split second decision. Macro changes or new strategies are quickly picked up and interated on, and I think thats what the hardcore still stick around for


The difference is that an interesting AI could likely be scaled back meaningfully for lower skill levels. Make MarineKing play with only the mouse against a lower skilled opponent? The results might be less stale.

Rate limiting a brute-force AI would make it trivially bad.


Not really. Stopping MarineKing from sending tons of APM is only part of the challenge. His choices for what to do in any given frame (yes, frame) are also just better than basically every player on the ladder. If you remove his keyboard, you'll find that he still wins most games against folks who don't know the game.


I've always felt like macro is pretty easy to automate, once you've identified a lot of the potentials in the early game you can get going pretty well. Is AI playing against each other getting to some sort of endgame consistently (against equal opponents), or are they having blowouts because of some small difference in midgame?

Also wondering what the interface is - are they creating a virtual mouse/keyboard to enter inputs, are they playing in some sort of headless mode? How do they deal with recognizing units?


If this project uses the BWAPI (which it says it does in the paper), then I assume that this doesn't need to recognize units as that state is available from the game. On the other hand, the DeepMind "research environment" (https://deepmind.com/blog/deepmind-and-blizzard-open-starcra...), presents a simplified view of the map that requires AIs to recognize units as simplified blobs on the map and issue commands that more closely resemble what a human would do via mouse and keyboard.


But can your AI learn to drop mules so it can capture some escaping ultras?

Better link: https://clips.twitch.tv/BusyDrabFennelRedCoat


Funny enough, after I posted this as a joke I realized this is exactly the kind of thing an AI would be incredibly good at finding. It makes it all that much more impressive seeing Buyn do it.


Three great short videos showing an old StarCraft bot in action. I recommend watching #3 then #2. The second shows a pro player for comparison.

https://www.youtube.com/channel/UCOBfAiPhRlKOhdJHaAJ2OpQ


The thing with StarCraft is that there are many types of units and types of damage, you need to alternate between moving and attacking, different units have different roles in a formation, etc.

When I pick targets I prefer to kill units that deal the most damage or have low HP first.


Anybody know if the military in any country is looking into using similar strategies to manage real wars?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: