top of page

A game that balances itself (concept)

In each competitive game, there are some values we can tweak to modify the winrate of the players who pick one particular character or use one particular strategy. The main idea of this concept is: what if we make some of these values to depend on the current winrate of the hero or strategy?

In my opinion, this is a deep question. I'll even use it as a topic for my graduate thesis. One interesting thing I want to discuss is how we can use the theoretical insights in practice.

 

Let's consider Overwatch. This game has N damage-dealers and we want to balance them. To balance the heroes is to make picking each a viable option in certain cases AND to not let one of the heroes completely counter the other one. This is my definition of balance; the developer can choose this definition or some of the others. The equations will change, but the general idea will remain the same.

OK, let's write down the mathematical meaning of these requirements. To do this, we'll use the knowledge of the mathematical game theory. The payoff matrix of our game will have the N columns and N rows for each of the damage-dealers we're considering - these heroes will be the strategies for both of the players. The entries of our matrix will be the values between 0 and 1. The element at the ith row and jth column will represent the winrate of the ith hero when facing the jth hero. You can get these winrate values by telling the testers to play these heroes in a certain amount of 1v1 matches. The more matches they will play, the higher will be the accuracy of these values.

payoff.png

The matrix is that simple just because we're considering only the damage-dealers - the most independent heroes of the game whose winrate is almost unaffected by the other heroes in the team. Other roles or some very specific DDs will need another model of the game and another approach to balancing them.

It's easy to notice that the matrix we got can be transforming into a skew-symmetric by subtracting 0.5 from all of its elements. This means that the players have the same optimal strategy. It makes the calculation of the optimal strategies significantly easier.

skewpayoff.png

The first of our requirements was to make picking each hero a viable option in some cases. Mathematically, this means that we want to make our matrix the payoff matrix with no dominated strategies. We can verify that this condition is met by calculating the optimal mixed strategy and checking if there are any zeros in it.

 

The second of our requirements was to not let one of the heroes counter the other completely. While this may sound similar to the first condition, the mathematical meanings are different. The second requirement means we want a payoff matrix to contain only the elements the absolute values of which are less than A, where A is the maximum winrate the hero may have against the other one.

requirements.png

Now, the task is to change the elements of the payoff matrix to suit our requirements. The solution, though, is in no way a trivial one. The problem is, we cannot affect the entries of the matrix directly as we cannot set the winrate of the heroes. Instead, we can set the values of the different in-game parameters such as damage, movement speed and so on. These values affect the winrates of the heroes in some way we don't know. The goal is to find the approximate functions that determine how changing the value of the parameter affects the winrate of the hero.

 

We'll consider the simple situation where we need to balance only one of the parameters. Our matrix will look like that: 

parameterizedpayoff.png

Using our testers we can find the winrate with some degree of error. We can either consider this error or not depending on our goals and expectations. The numbers we found for different values of the parameter that we try to balance can be used to interpolate the function. I think the spline interpolation is good for tasks like these. However, a developer can always choose an interpolation method depending on his preference.

 

After that, we find the winrate we need to make the game balanced. It can be calculated using the formula below (assuming the average winrate of the hero should be 0.5):

CodeCogsEqn (1).gif

This formula isn't optimal. The optimal formula for calculating the required winrate is a topic for another research.

The last thing we need to do is to calculate the value of the parameter at which our interpolated function will have the required winrate as a value. After that, the game will probably become balanced.

Now if we'll make so that the game will calculate the value for the parameter based on the current winrate, we'll make a game that literally balances itself. We need to investigate more on the stability of the game rules to be sure that the parameter value will converge.

If our game has multiple parameters, we can choose one of them, the key parameter, using common sense to make the algorithm described above applicable. There are countless cases when we can't do it; how to balance the game in these cases is a difficult question that needs further research to be answered.

Anyway, I think this is a way forward. I want to research more on this topic in the near future. I hope I will be able to shed some light on the dark spots of this concept and bring it to life.

bottom of page