Accessibility statement

Deep learning model predicts when you will die in Dota 2

Posted on 19 May 2023

Research by a multidisciplinary team at the University of York led by James Walker, explores using esports analytics to predict a death event in Dota 2.

Esports has rapidly become a popular form of entertainment, with millions of viewers tuning in to watch professional players compete in various video games. However, broadcasting esports matches comes with unique challenges, particularly when it comes to camera positioning and producing compelling commentary.

Dota 2 is an incredibly complex and fast-paced game. In the face of such challenges, it is not easy to know where to focus cameras or what to emphasize in a live commentary.

A death event in Dota 2 is of major significance. It alters the balance of power on the playfield for a period of time and can lead to dramatic shifts in win probabilities. But with just one camera monitoring the entire playfield, death events are often missed in broadcasts. This is where the Time to Die 2 framework comes in a highly complex machine learning model using deep learning, and thousands of data points tracked in real-time, to predict when someone will die in Dota 2 - five seconds into the future.

Challenges of predicting death in video games

Predicting the likelihood that a player is going to die in a game of Dota 2 is a big deal in the burgeoning field of esports analytics. Prediction systems are operationalized by esports broadcasts to enrich content delivery, eg by informing commentators that a certain player is likely to die soon. This becomes more attractive when you consider how difficult commentating Dota 2 is. The game is highly complex. As such it can be hard for commentators to assimilate the high volume of information present in the game in real time. Machine learning-driven tools that inform commentators are beneficial in improving the experience of watching Dota 2 broadcasts. Furthermore, prediction systems can detect dangerous moments in a game before it develops. Analysing the output of the model to identify when a dangerous situation may be developing would allow team coaches to train players to avoid situations where the danger would not have previously been observed.

But predicting death events is tough. Dota 2 is one of the largest esports titles, and from the perspective of data science, it is also wildly complex. Consider that each player selects a unique hero from a pool of about 120 at the start of the match, resulting in about 1.16e14 possible starting hero combinations. Furthermore, during gameplay, players have many options for strategy, eg they can choose from over 200 items to purchase, each with a unique effect. Additionally, timing when to focus on attacking or defending in-game objectives is very important. Each player on a team has a different role to play, similar to positions in traditional team sports, and teams must coordinate these different roles to perform effectively. Gameplay is further complicated by the ‘fog of war’, a mechanic which means that the players in Dota 2 have a limited view of the battlefield. For data scientists, that level of complexity brings many headaches when trying to create machine-learning models to help make predictions in the game.

Collecting data

Fortunately, help is on the way in terms of very large datasets. It is possible to curate large datasets of highly granular, high-dimensional, high-volume data from virtually every match for Dota 2 due to the open nature of the replay system, a tool which allows players to download ‘replays’ of past matches and play them inside the game client. Such large datasets allow data scientists to start breaking down the incredibly complex "data space" that DOTA 2 comprises.

We used data from nearly 10,000 Dota 2 matches - and three years of time across a dozen scientists - to train an incredibly complex deep-learning death prediction model for Dota 2, which accurately predicts player death events five seconds in the future with a very high degree of accuracy. This is just enough time to move the camera or sound of an alert to the commentators or audiences, and dramatically improve the lives of esports commentators and broadcasters - and thereby the viewing experience.

The Time to Die 2 framework is a revolutionary development in the world of Dota 2 and esports broadcasting. By predicting death events with a high degree of accuracy, this technology helps commentators stay on top of the action and keeps viewers engaged. With further development, the machine learning framework will also become a powerful analysis tool for players and teams.