Using AI to Predict Dota 2 — The International 8 — Games at 77% Accuracy

One of the most hotly debated parts of Dota 2 is the draft. In league matches, like at The International, each team has a Captain who’s responsible for selecting all 5 heroes. Due to the complexities of how a hero is played or in which lane, it becomes impossible for a human to memorize the best lineup to match against an opponent. Is it possible for a computer?
The game of Dota 2 consists of two teams, the radiant and the dire. Each team has 5 human players who can select 1 of 116 different heroes. Each hero comes with benefits and flaws, a sort of rock, paper, scissor effect. The draft is the pre-game selection of a hero for each team member to play during that game. In most public games, each person selects their own hero for that match, but in league games such as those at The International, only the captain can select heroes for his teammates.
At STRATZ, we collect every game of Dota 2 played every day. We download these games and run many different types of analytics on them in an attempt to gain insights into them. Let us only assume the following: if there are 116 heroes and 10 players, then 81,572,506,886,508 different player-hero combinations exist. Players such as PPD have spent their entire Dota 2 career trying to become the best drafter. Due to this large number of combinations, it would be impossible for him to just memorize who to pick after the opposing team picks X or Y, not to mention the countless changes that come with each new patch.
So what can the computer do? A Neural Network can have an infinite number of layers and an infinite number of neurons to connect to each layer. Prior to the start of The International 8, we designed and trained a model to predict the outcome of a game simply by looking at every team’s draft before each match. How did we do this? We started by looking only at ranked games because players often compete more seriously due to the stakes. A ranked game is a public game in which all players risk their skill rating. Winning increases a player’s rating, while losing lowers it. This is similar to a very popular term, Elo, which can be found in the world chess rankings. We then eliminated games that were not fully completed, such as games where a player refused to finish it or purposely threw it. This brings the daily match count of about 1 million games of Dota 2 down to about 250,000.
We collected approximately 14 days of games to give the neural net sufficient data to train the model. We started with a low layer count, a low neuron count, and a high learning rate. We trained over 100 different models with numerous variations of those factors and picked the one with the highest accuracy. On all 3,500,000 matches we had in our dataset, 80% were used to train and 20% were used for validation. We achieved an amazing 67.77% accuracy. Considering that a gambler looks for anything above 50.01% accuracy, we considered this a remarkable start. But how much further could we go?
As mentioned before, each hero has a rock, paper, scissor effect. Not only does this effect look at a hero vs a hero but also has an effect on how long the duration of the game will last. For example, hero A has a higher win rate in a shorter length game (30 min) while hero B has a higher win rate in a longer length game (60 min). Because of this, we cannot simply predict the outcome of the game based on 10 heroes at one point in time, we have to do it over the course of the highest probability of when a game could end. So, we created another model which takes into account the heroes and the estimated probability a game will end, which resulted in 7.087% accuracy. But how is this good, if it’s so low? This model determines the exact minute the game will end, meaning if a game ends at 42 minutes, and we predict it will end at 43 minutes, it would be considered wrong. This means that about 7% of the time we will get the exact minute the game will end.
Once we had both of these models, we were able to create a pretty interesting graph for each match. Due to the models needing extra time to train, we started this on Tuesday (Day 2) of The International 8 and throughout the week, we were able to create a graph for each game based on the lineups.

We finished with a 27–8 record, 77.4% accuracy! As we expected, certain hero lineups would have a higher percentage chance to win early in the game. If the game went longer, the opposing lineup would have a higher percentage. We announced all of our games on our Twitter @STRATZDota.

So where do we go from here? STRATZ has spent the last 6 months developing a backend that is now able to handle the large amount of games and process them in real time. We have created a desktop app that allows the players of Dota 2 to use these models as the draft is happening to help increase their odds of success in the game. Follow us in our Discord or on Twitter for updates on the release of the app to the public.
