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 568
Except 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++):
Spoiler: show
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:
- http://www.moserware.com/assets/computing-your-skill/The%20Math%20Behind%20TrueSkill.pdf [1]
- http://www.moserware.com/2010/03/computing-your-skill.html [2]
- trueskill source code
- faf source code