League of Legends with Neo4j : champions diversity in Worlds 2019

Jimmy Crequer
Neo4j Developer Blog
5 min readOct 29, 2019

League of Legends biggest event “Worlds 2019” is being held right now in Europe. As we have reached the semi-finals, I wanted to do a small breakdown of the champions played so far.

In League of Legends, players assume the role of an unseen “summoner” that controls a “champion” with unique abilities and battle against a team of other players. The goal is usually to destroy the opposing team’s “Nexus”, a structure that lies at the heart of a base protected by defensive structures. Each League of Legends match is discrete, with all champions starting off fairly weak but increases in strength by accumulating items and experience over the course of the game. (Wikipedia)

This article is part of a series around League of Legends and Neo4j, if you are interested you can also check my previous article about European casters.

The Graph

I used data from the groups stage and the quarterfinals to build the graph. You can find the full CSV data below but here is what a row looks like.

G2 Esports,DAMWON Gaming,Akali,Qiyana,Renekton,Alistar,Leona,Pantheon,Syndra,Rakan,Elise,LeBlanc,Ryze,Gragas,Yasuo,Xayah,Nautilus,Irelia,Taliyah,Kayle,Kai'Sa,Ornn
  • The first 2columns are the 2 teams that faced each other. In the example row, G2 Esports and DAMWON Gaming.
  • The next 5 columns are the champions banned by the first team. Here, G2 Esports banned Akali, Qiyana, Renekton, Alistar and Leona.
  • The following 5 columns are the champions banned by the second team. DAMWON Gaming banned Pantheon, Syndra, Rakan, Elise and LeBlanc.
  • The next 5 columns are the champions chosen (picked) by the first team, ordered by role. Here, G2 Esports picked Ryze (Top Lane), Gragas (Jungle), Yasuo (Mid Lane), Xayah (Bot Lane) and Nautilus (Support).
  • The last 5 columns are the champions chosen by the second team. In the example, DAMWON Gaming picked Irelia (Top Lane), Taliyah (Jungle),Kayle (Mid Lane), Kai’Sa (Bot Lane) and Ornn (Support).

This is how our DB schema looks like. As you can see, it is pretty straight-forward.

DB Schema for this article

The dataset is available here, while the import instructions can be found there.

Champions Diversity

An indicator of how balanced is the game is the champions diversity in pro play. We can easily check the number of unique champions played so far throughout the tournament with the following Cypher query.

MATCH (c:Champion)
RETURN COUNT(c)

So far 91 unique champions have been used (picked or banned), among the 145 available. This is quite good if we compare to the precedent editions : 76 in 2018 and 2017. Next, let’s look at the popular picks and bans for this year.

MATCH (champ:Champion)<-[:PICKED|:BANNED]-()
WITH champ, COUNT(*) AS cnt
RETURN champ.name AS champion, (100 * cnt / 66) + "%" AS presence
ORDER BY cnt DESC
LIMIT 10

(There were 66 games played so far, that’s why I used 66 to get the presence percentage)

Most popular champions

Pantheon is the only champion to be present every game (banned almost every time). Next come Qiyana, Akali and Renekton followed by Xayah and Kai’Sa. Let’s look a bit closer at the champions diversity for each lane to see if it can explain this result.

MATCH ()-[r:PICKED]->(champ:Champion)
WITH r.role AS role, collect(DISTINCT champ.name) AS uniqueChamps
RETURN role, size(uniqueChamps) AS numberOfUniqueChamps, uniqueChamps
ORDER BY size(uniqueChamps) DESC
Champions diversity per role

Looking at these results, we can infer that the current meta (trend) is around a stable Jungle and Bot Lane/Support duo, enabling diversity and counter picks in the Top and Mid Lanes, where it is important to get an advantage early.

You may have noticed that some champions (Ryze, Qiyana, …) appear in multiple roles. When drafting a composition, champions flexibility (the ability to be played at multiple roles) is crucial to hide your strategy until the end or to avoid bad lane matchups. Those champions are highly regarded and can sometimes decide the outcome of the game when properly used. Let’s look at which champions are “flex picks”.

MATCH ()-[r:PICKED]->(champ:Champion)
WITH champ, collect(DISTINCT r.role) AS roles
WHERE size(roles) > 1
RETURN champ.name AS champion, roles
ORDER BY size(roles) DESC
Champions flexibility

8 champions have been played into 3 different positions, and I think this is what makes this year’s Worlds very interesting because of all strategies that it allows. It also requires players to go out of their comfort zone and learn to play new champions at a competitive level.

Towards the semi-finals

Let’s look at the upcoming matchups. We can use Neo4j to visualize the relations between teams and the champions they played, enabling us to foresee which champions might be contested during the upcoming games.

Invictus Gaming vs FunPlus Phoenix

MATCH p = (t:Team)--(c:Champion)
WHERE t.name IN ["Invictus Gaming", "FunPlus Phoenix"]
RETURN p
Champions Graph for Invictus Gaming vs FunPlus Phoenix

If we put aside the most popular picks (Qiyana, Kayle, Nautilus, Kai’sa, Xayah, Gragas, Lee Sin, etc…), champions like Rek’Sai, Camille and Gangplank might be contested during the draft phase. If we look at specific champions for each team, Jayce and Orianna are high valued for Invictus Gaming while FunPlus Phoenix might rely on the Varus Tahm Kench duo.

SK Telecom T1 vs G2 Esports

MATCH p = (t:Team)--(c:Champion)
WHERE t.name IN ["SK Telecom T1", "G2 Esports"]
RETURN p
Champions Graph for SK Telecom T1 vs G2 Esports

For the second match, Alistar, Rakan and Yasuo are definitely the picks to watch, since both teams like to them play. Regarding each team specific champions, G2 Esports can always go for Rek’Sai in the jungle or Jayce, while SK Telecom T1 may use Draven and Thresh to get an advantage in the Bot Lane.

Definitely, more analysis can be done on this topic and I am open to any comments or suggestions! This time I didn’t include ban and pick order, which I think can be very interesting to try to understand more how teams decide how and when to play a specific champion, for instance :

  • Which champion is the most first picked?
  • Which role’s pick is saved until the last pick?
  • Which champions are banned in the first banning phase? And in the second one?

--

--