Categories
Uncategorized

Using Graphs to Recommend Champions (League of Legends)

In class, we learned about the various uses for graphs and Dijkstra’s algorithm. This made me consider how graphs are used in video games, considering the clear and visible variables that they use, and how much easier it would be to collect data from a game than it would be in real life. Graphs can help find relationships with variables and Dijkstra’s algorithm can be used to find the maximum distance between those variables. One use of these tools relating to video games would be for recommendations. Specifically, I will discuss about champion recommendation in the video game League of Legends.

League of Legends is Multiplayer Online Battle Arena (MOBA) game where two teams of players battle each other with characters called Champions. Players select Champions based on the roles they prefer to take to aid their team in the fight. There is a large inventory of Champions players can choose from. To ensure players try a variety of Champions, the developer of the game may wish to recommend other Champions that may suit the play style of the player. A naïve way to recommend Champions would be to compare the key attributes between the player’s most used Champion and other Champions in the Champion roster, finding one that shares the most features. However, using graph theory, it is possible to generate a network to find recommendations using the player base instead of the Champions themselves.

Suppose a player, who enjoys playing with Champion A, also enjoys playing with Champion B. Then it is very likely other players who enjoy playing Champion A may enjoy playing with Champion B. However, to generate a graph that strongly supports these predictions would require a lot of player data. Luckily, the game has a large player base, reaching 100 million unique monthly players at one point in 2017 (Spezzy 2020).

Typical attribute-based recommendation

By having every Champion in the game be represented as a node and the weighted connection between two Champions be represented by the edges of the graph, we can find a much better representation of champion picks in general. These connections can be found by using the most played champions for every player in a given sample. If two champions appear in the same top five most played champions for a player, it can be concluded that there is a connection between them.

Example of connections per champion (Williams 2020)

While a graph like this would seem useful at first glance, it has its issues stemming from the mechanics of the game. Recommendations from this graph will most likely recommend champions who are in the same role as other champions since players tend to dedicate themselves to playing certain positions. A quick fix to this problem is to find each player’s top three Champions per role instead. We can then use Dijkstra’s algorithm to find champions with minimal distance from each other to give out much better recommendations than we would have with an attribute-based recommendation system.

Recommendation graph that skewed towards champions of the same position (Williams 2020)

In conclusion, graphs and Dijkstra’s algorithm allow for much better champion recommendations by taking advantage of the large amount of data from video games. I believe that this idea could also be extended for other recommendations services by checking what items or choices are chosen by users in common and recommending them to other users.

Sources:

Williams, J. J. (2020, September 20). Graph Networks for Champion Recommendation (League of Legends). Retrieved October 15, 2020, from https://towardsdatascience.com/graph-networks-for-champion-recommendation-league-of-legends-189c8d55f2b

S. (2020, August 03). Did you know? Total League of Legends Player Count – UPDATED 2020. Retrieved October 15, 2020, from https://leaguefeed.net/did-you-know-total-league-of-legends-player-count-updated-2020/

4 replies on “Using Graphs to Recommend Champions (League of Legends)”

Leave a Reply