So Imba, I am going to quit the game! (Part 1)

Overview on an AI empowered system to tackle the game balance problem at ease.

Yirui Feng
7 min readMay 11, 2019

Imba or OP are some terms frequently mentioned in a lot of games. They refer to the imbalanced experience players feel while playing a game. When imbalance occurs, players will usually turns to two extremes, either enjoy the game a lot for a short period of time or hate the game immediately. Eventually, most of them will quit the game, which will in turn affects the game retention and revenue. Thus, game balance has became one of the most important factors to consider while designing a game.

Converge to emotionless eventually and discard the game

However balance optimisation has never been an easy job to do even for the most experienced game designer. A game can consist of very complex systems. Each system may have hundreds of values and rules to follow. Tuning a single value or rule from one system could affect another or simply can affect the fairness of the game. It may sounds quite sophisticated. But, we, as homo sapiens, could always figure out some ways to tackle a problem.

“Conventionally”, there are mainly three ways that designers are using to ensure the balance of a game:

I got intuition …

Well, since designers are recruited as an expert, they should be able to form the intuition based on their past experience and knowledge possessed. With the intuition, it will not be that difficult to know what is suitable for the game designed. However, if the game design goes beyond their knowledge base, intuition will just be a trying-hard-guess.

I believe I know math …

The second approach would be using math to understand and balance the game. Almost everything can be abstracted to a math formula or model, and so does a game. Each game rule and value can be used together to construct some mathematical formulas and models. However, as the complexity of the game increased, the formulas and models will also become hard to solve and understand. As the Murphy’s law states, everything can go wrong if you give them a chance. Not to mention that we have provided loads of chances for complicated formulas and models. Ultimately, the mathematical approach will become a delicate machine, which unless carefully maintained, it could break easily.

I want my playtesters…

The third one is to leverage the idea of crowdsourcing.

Game is only balanced when players feel so.

So why don’t we introduce playtesters to play and provide feedbacks before release. This method could be very effective in identifying which aspect of the game needs to be changed. Yet, it is very costly and time consuming, and it could be misleading if the playtester population is small.

Then what should we do to ease the balance optimisation process?

Before we jump to the possible solution, let’s review the problems that we are faced with:

First, do we need a game designer? The answer is definitely yes. Even with the advancement of AI, it doesn’t have the capability to create a complex game out of no where. Game designers still play an important role in designing the game despite the fact that the game may not be balanced at all. Besides, they also need to work with marketing and operation teams to ensure that the game designed suits the needs.

Second, how to solve the balance problems when a game consisted of complex systems? Let’s assume that we have a system to allow us quickly compose various scenarios and examine the outcomes, then we could define an objective function and transform the balancing problems into an optimisation problems to understand under which circumstances is target value max/minimised. That specific circumstances will contain the balance breaker inside the game.

This may sounds a bit vague, please allow me to explain this with the following example. Imaging we have a virtual game with 3 different characters, 3 weapons and 1 battle field.

Icons made by Eucalyp from www.flaticon.com

The goal of this game is to pass the battle field with 1 character and 1 weapon chose. And the final score is generated based on the time cost to pass the level. Therefore now the objective function becomes finding the character and weapon combo that could minimise the time to pass the battle field. Since we have a system to generate the possible combinations, we could test each combo and know how long does it take for each combo to pass the battle field.

Looking at the figure above, it is obvious that the second character with the third weapon contains the balance breaker for this specific game as it took much less time. Then how should we decide which one is the balance breaker, the character or the weapon? This leads us to the third question.

Third, how should we present the results to the designers so that they could understand easily which component from a combo is the balance breaker in a game? This is actually case by case. For instance, in this specific scenario, we can examine the effects of different components in reducing the time costed to pass the battle field.

Since we are only interested in the second character and the third weapon, we could examine when changing other combo component to either the second character or the third weapon, how much time does it save in order to measure the effects of these two components. As a result, the second character is the game balancer in the game.

Now you may asking, so what? And where is the system and the AI part that I am interested? Don’t worry, it’s coming!

After understanding the three main problems, the overall system architecture is much more clear. We need a system to populate the combo, a game simulator, a database to store the logs generated via simulation and the combo information, and finally a data visualisation tool for game designer to view the results

Components needed for the balance test system

Eventually, the whole system is shown below:

System overview for game balance optimisation

Up to this point, do you still remember the assumption here? We assume that there is a system to help us automatically populate combos from the game components. So the question here is what this system is? And what if the number of combinations is even too much for a computer to handle. Here is where the AI part comes in.

As there could be billions of combinations from a single game (e.g various characters, skills, levels, strategies and etc.), one straightforward method to generate and evaluate the population is to use Genetic Algorithm (GA).

The idea of this algorithm is simple, it is inspired by natural selection process, which involves selection, breeding and mutation.

To begin with, an initial population will be randomly generated and this is called the first generation. Each of the individuals (combo) from the population will be examined via the environment (simulator) and will be given a fitness score based on their performance. Individuals who performed worse will be eliminated from the population. The remaining survivor will exchange their traits or DNA (component in this case) to produce the next generation. A portion of the offsprings will mutate on certain traits/DNA (component will mutate to a better version if available in the game design). The new generation will then be put into the environment to be tested again. The whole process will be repeated until certain criteria is met (e.g. reached 100 generation or fitness score stopped increasing)

With GA included, now the overall structure has changed to the figure below:

Game balance system with GA included

Generator is responsible for initialisation, breeding and mutation. Fitness Evaluator is used to change the level of performance from the battle simulator to a fitness value.

With this, game designers can quickly design the experiments, verify their hypothesis and make changes accordingly even with a complex game system.

While GA sounds so good, there are still two major limitations that need to be understood. First and foremost, the result from GA may not be the global optimum. Second, the result heavily depends on the initial generation. Thus, the combo factory is not limited to GA only, other advanced techniques could also be applied here.

In this part, a system for game balancing was introduced and the rationality to design like this was also explained. Taking the readability of this article into consideration, I will move the coding details and a case study to the next one.

Hope this is useful to you! Stay tuned and see ya~

Entrance to part 2:

--

--