cyrili wrote:I'm a rather new and inexperienced player, but I asked myself: why isn't there a button to automatically balance teams (possibly even with constraints).
From the documentation it results that game quality is:
From [1] page 36 (look there for variable definitions) and "trueskill-0.4.4\trueskill\__init__.py" lines 515 to 568Except for 1 exponential function and 1 square root it's a very straightforward calculation that isn't very demanding for a computer.
In the worst case scenario of 12 players (2 teams) the calculation would have to be done 12!/6!/6!/2 = 462 times, so why not optimize automatically?
A quick and dirty "2 team"-implementation: Thus:
From this it is visible that the square-root does not depend on team composition, consequently only the exponential function has to be maximized in regards to A. It is apparent that the exponent is always negative, so for q to be maximal the exponent has to be close to zero. For this to be the case:
In other words: The sum of all mean-skills of each team have to be closest possible together for a game to have the best possible balance. (I suspect this is also valid for 3+ team games) In this case it would be really straight forward to implement.
Questions about beta..:I am very confused about the meaning of beta. I get the 80/20 thing, but relative to what players?? Is it a global constant? a lobby specific constant? a function of the skill level?
From the faf source code it appears to me to be fixed at 250 globally. When i tried to predict the game quality it worked on noob games (up to +/- 0.2%), but in the one pro game i got in it was off by 10%.
data source: game.log
code used (C++):
- Code:
float beta = 250.0f;
float temp1 = beta*beta*n; //b^2*A^T*A
float temp2 = 0.0f; //A^T*S*A
for (int i = 0; i < n; i++) { temp2 += players[i].dev * players[i].dev; }
float temp3 = 0.0f; //u^T*A = A^T*u
for (int i = 0; i < n; i++) { temp3 += (float)players[i].team * players[i].mean; }
float quality = exp((-0.5f*temp3*temp3) / (temp1 + temp2)) * sqrt(temp1 / (temp1 + temp2));
Final words:Hope someone finds the time to read this trough and check my calculations.
If they happen to be true I could propose to implement it myself, but I'm not very fluent in python.
Either ways, I would really enjoy having an "auto-balance" button in the lobby.
sources: