ElemedexA pocket encyclopedia of AI architectures
No. 054

AlphaStar

Grandmaster

It learned by watching nearly a million human replays, then went to live in a league where its own siblings made a living out of finding its weaknesses. It blinks its Stalkers away a moment before they fall. In its only live game, a Warp Prism carrying two Immortals kept it marching back and forth until it lost.

Height
Entity transformer + spatial ResNet + deep LSTM + 6 action heads
Weight
≈ 556 MB (fp32, estimate); plays on a single consumer GPU
Parameters
139 M (55 M at play time)
Context
Up to 512 entities (units, buildings, resources) per observation + a 128 × 128 map; LSTM memory of the whole game
Training data
971,000 human replays (MMR > 3,500) + 44 days of league play, with 16,000 concurrent games per agent
Year
2019
Generation
4 · Transformers
Creators
Vinyals, Babuschkin, Czarnecki, Silver et al. (DeepMind); Dario «TLO» Wünsch (Team Liquid)
Kind
System

Base stats

Total
267

Approximate, ordinal scales meant for comparing species with each other; the hard numbers are in the data sheet.

Weaknesses

  • It never played from pixels or with a mouse: even with a camera, it reads the units through the raw interface and targets off-screen more accurately than a human.
  • Exploitable: live, MaNa had it running back and forth with a Warp Prism, and the Battle.net evaluation did not measure what happens when an opponent faces it again and again.
  • Narrow: one network per race, evaluated on four maps and one patch; when Blizzard changed the map pool, it was made to play only on the maps that remained instead of being retrained.
  • Costly: twelve agents in parallel, each with 32 TPUs for 44 days.

Habitat

It was raised on 971,000 StarCraft II ladder replays released by Blizzard and on 44 days of league play on Google's TPUs. In 2019 it played incognito on the European Battle.net server, where it reached Grandmaster level as Protoss, Terran and Zerg. Those games were published as replays.

Moves

Abilities

The League
Main agents that must beat everyone, preferring the opponents that give them the most trouble, and exploiters that only hunt for weak spots (the main agents' or the whole league's) and are reset from time to time.
Composite action
Each action is assembled piece by piece: what to do, when to look again, whether to queue it, with which units and where. Some 10²⁶ options per step.
Human anchor
Throughout reinforcement learning, a penalty keeps it close to the policy learned by imitation, so that it does not abandon human strategies.

Anatomy

Autoregressive headsLeague (44 days)the same networkGame observationUnits:transformerMinimap:ResNetScalars:MLPCore: deep LSTMAction typeDelayQueued?Units: pointer networkTarget unitTarget pointAction (≤ 22 per 5 s)971,000 human replaysSupervised: imitate (KL)Main agents ×3Main exploiters ×3League exploiters ×6PFSP: hardest opponentsRL + KL to imitation policyAlphaStar Final (3 races)At playTraining

AlphaStar as described in the Nature paper (Vinyals et al., 2019, Extended Data Fig. 3, Fig. 1). Left: at each step, three encoders read the visible units, the minimap, and data such as resources; a deep LSTM keeps the memory of the game, and the heads choose the action piece by piece, each conditioned on the ones before. Right: the network first imitates human replays; then twelve copies (four per race) play in a league, the main agents against everyone, the exploiters hunting for weak spots. During reinforcement learning, a KL-divergence penalty keeps it close to the imitation policy. In the league, every agent is the others' environment.

Evolution chain

  • from self-play to a league of agents and exploiters, and no tree search024 AlphaGo
  • a transformer reads the units on the map025 Transformer
054 AlphaStar

AlphaStar is DeepMind's system for playing StarCraft II, Blizzard's real-time strategy game. In December 2018, a preliminary version beat Dario "TLO" Wünsch 5–0 and Grzegorz "MaNa" Komincz 5–0; the games were made public in January 2019 (AlphaStar team, 2019a; Vinyals et al. (2019), Methods: StarCraft Demonstration Evaluation). The final version, with a camera and a stricter action cap, reached Grandmaster level on Battle.net with all three races, above 99.8% of ranked players (Vinyals et al., 2019, Empirical Evaluation).

The problem

Chess and Go are turn-based games of perfect information. StarCraft runs in real time under a fog of war: you have to scout to find out what your opponent is doing. At each step there are some 10²⁶ possible actions (Vinyals et al., 2019, introduction), and a player must sustain macro (economy, production) and micro (fine control of each unit) at once, with no strategy better than all others: as in rock-paper-scissors, each one has its answer (AlphaStar team, 2019a). In 2017, DeepMind's first agents could not win a single game against the game's easiest built-in AI; the best one learned to lift off its Terran buildings and float them away so as not to lose before the 30-minute limit (Vinyals et al., 2017, sec. 4.4.1).

How it works

A Transformer reads the list of visible units with self-attention; a convolutional network reads the minimap. A deep LSTM keeps the memory of the game, and the action is assembled autoregressively: what to do, when to look again, whether to queue it, with which units (a pointer network picks them out of the list), and where (Vinyals et al., 2019, Learning Algorithm, Extended Data Fig. 3). It has 139 million parameters, of which 55 million are used at play time (-@vinyals2019, Methods: Architecture).

First comes imitation learning: predicting the actions in 971,000 replays by players with an MMR above 3,500, the top 22% (2019, Methods: Supervised Learning). That agent already beat 84% of human players (2019, Empirical Evaluation). Then comes reinforcement learning, with +1 for a win and −1 for a loss (-@vinyals2019, Methods: Reinforcement Learning), in a league with four agents per race: a main agent, which faces everyone and gives priority to the opponents it struggles with most; a main exploiter, which only looks for holes in the main agents; and two league exploiters, which look for weaknesses of the league as a whole. Each trained for 44 days on 32 TPUs; almost 900 players were created (2019, Learning Algorithm).

What changed

Compared with AlphaGo, tree search is gone: AlphaStar acts without simulating future moves (Vinyals et al., 2019, Methods: Related Work). Plain self-play becomes a league because it can run in circles (A beats B, B beats C, C beats A) without progress (-@vinyals2019, Learning Algorithm); the league held some three million such cycles involving at least one exploiter, and only about 200 among main agents (2019, Extended Data Fig. 8). And imitation does not stay at the start: a KL penalty ties it to the imitation policy throughout reinforcement learning. In ablations on a single map, with no human data the agent reached an Elo of 149, below the game's easiest bot (418); with all of it, 1540 (-@vinyals2019, Methods: Exploration and diversity, figs. 3E, 3J).

The games

The December games were Protoss versus Protoss on Catalyst LE, and TLO, a professional Zerg, had to play his off-race (AlphaStar team, 2019a). According to Ars Technica's report, in the fourth game against MaNa an all-Stalker army attacked his Immortals, Archons and Zealots from three sides, blinking damaged Stalkers to the rear while their shields recharged. In the live game, MaNa kept dropping two Immortals from a Warp Prism among AlphaStar's Probes and picking them up again before the defending Stalkers arrived, leaving them marching back and forth indecisively (Lee, 2019).

Limits

In December, AlphaStar saw everything visible on the map without moving the camera (AlphaStar team, 2019a; Canaan et al., 2019, sec. 2.4) and averaged some 280 actions per minute (APM), fewer than MaNa (390), though, as DeepMind clarified, with effective bursts sometimes higher than both players'. Live, MaNa beat a camera-based prototype trained, by DeepMind's account, for just seven days (AlphaStar team, 2019a). The Nature version moved a camera and made at most 22 actions every 5 seconds, but still targeted off-screen more accurately than a human (Vinyals et al., 2019, Methods: Camera View, APM Limits). The Battle.net evaluation does not measure how exploitable it is under repeated play (2019, Empirical Evaluation).

Sources