Last week was the high point of the Dota 2 competitive year: it was the week of The International, Valve's biggest tournament. On Saturday, Team Liquid walked away with more than $10 million after defeating Newbee 3-0 in the grand final.

Right now, one of the requirements to be a good Dota 2 player is that you've got to be a living, breathing human. The game does include some basic computer-controlled bots to practice against, but any seasoned player of the game should have no trouble prevailing over these bots, even on their hardest "Unfair" difficulty (though the Unfair Viper bot is a legendary jerk that's utterly miserable to play against). Last Friday, however, we got a hint of a new, altogether more threatening kind of computer-controlled player: an AI-controlled bot built by Elon Musk's OpenAI. The OpenAI bot took on a number of professional players and it crushed them.

The OpenAI bot can't play the full game of Dota 2. It can play only one hero, Shadow Fiend, of the game's 113 playable characters (with two more coming later this year); it can only play against Shadow Fiend; and rather than playing in five-on-five matches, it plays a very narrow subset of the game: one-on-one solo matches.

These aren't random choices; 1v1 solo mid Shadow Fiend mirror matches, where two humans both play Shadow Fiend against one another, are a classic showcase of individual player ability. Shadow Fiend is played this way for a few reasons. First, he has three skill shot magical attacks (near, medium, and far Shadow Razes) that put a particular emphasis on positioning and judgement to successfully land the attack (or dodge it).

Second, while his regular attack damage starts off very low, he has a very powerful steroid ability, called Necromastery. Each time he successfully lands the killing blow on a creep (automated drone units that spawn every 30 seconds and mindlessly fight one another) he captures that creep's soul, gaining two points of bonus damage. This means that more than most other heroes in the game, Shadow Fiend particularly rewards accurate last hits (the Dota 2 terminology for a killing blow).

The OpenAI bot doesn't know how to play Dota 2. But over hundreds of in-game hours of playing 1v1 solo mid Shadow Fiend games against itself in Microsoft's Azure cloud, the AI started to learn how to win the game. Early iterations of the bot AI would just stand around in their base, wander the map aimlessly, and end up getting killed in stupid ways. As we might expect from a bot, the AI is very strong at last hitting; it can precisely judge when to time its attacks to land the killing blows. Similarly, it's very good at precisely judging the range of its Shadow Raze spells.

But the bot went beyond that, discovering other techniques that are well-known to human players. For example, the Shadow Raze spell has a short wind-up before the spell is actually cast. If a "stop" command is given during this wind-up, the spell is cancelled. This fake casting is useful because opponents will see the wind-up and try to dodge the incoming spell; a well-timed fake cast can force the opponent to move to a less-favorable position or miss a last hit, without expending any mana or putting the spell onto cooldown. The AI can also manipulate the creep positioning by selectively drawing their aggression.

After about two weeks of training, the OpenAI bot was able to consistently beat the Dota 2 pros. Over the course of last week, it was pitted against big names in the scene, such as Artour "Arteezy" Babaev and Sumail "Suma1L" Hassan (both of North American team Evil Geniuses), and former pros such as William "Blitz" Lee. All of these players are known for their play in the mid lane (where one-on-one matchups are the norm); none of them took a game off the AI. On stage, we saw the bot take on Danil "Dendi" Ishutin, arguably the most beloved of all Dota 2 players and another strong mid player. The bot relentlessly crushed him 2-0.

Having defeated the pros, the bot was thrown open to attendees at KeyArena. In-game cosmetics were offered to the first 50 people who could beat the bot. The bot did in fact fall, with all 50 cosmetics being won, mostly by using cheesy techniques to distract the enemy creeps or buying unusual items. This exploits a weakness of the AI; it's much less good at handling situations it has never seen before than a human would be.

The OpenAI team says that playing Dota 2, even in this limited way, is considerably more complex than playing a game such as chess or Go. Not only is the range of possible actions greater, but Dota 2 has hidden information; players can stand out of vision, for example, so the bot doesn't know where an attack might come from. OpenAI's next goal is to devise bots that can play full five-on-five matches, collaborating and communicating with each other to play as an actual team.

That's an enormously larger undertaking, of course, but if they can pull it off, humanity's domination of Dota 2 is clearly going to end: Skynet is going to beat us all.

Listing image by Valve