Well, the concrete values are what I am trying to get from this thread. 4head
The actual code is this:
newbie_bonus = 0
time_bonus = 0
ratings = []
for team in match:
time_bonus += team.failed_matching_attempts * config.TIME_BONUS_WEIGHT
if not team.has_top_player():
newbie_bonus += team.has_newbie() * config.NEWBIE_BONUS_WEIGHT
for mean, dev in team.raw_ratings:
rating = mean - 3 * dev
ratings.append(rating)
rating_imbalance = abs(match[0].cumulated_rating - match[1].cumulated_rating)
fairness = max((config.MAXIMUM_RATING_IMBALANCE - rating_imbalance) / config.MAXIMUM_RATING_IMBALANCE, 0)
deviation = stats.pstdev(ratings)
uniformity = max((config.MAXIMUM_RATING_DEVIATION - deviation) / config.MAXIMUM_RATING_DEVIATION, 0)
quality = fairness * uniformity + newbie_bonus + time_bonus
The preliminary config values are:
self.NEWBIE_MIN_GAMES = 10
self.TOP_PLAYER_MIN_RATING = 1600
self.MINIMUM_GAME_QUALITY = 0.5
self.MAXIMUM_RATING_IMBALANCE = 600
self.MAXIMUM_RATING_DEVIATION = 300
self.TIME_BONUS_WEIGHT = 0.1
self.NEWBIE_BONUS_WEIGHT = 0.2
Explanation:
@BlackYps said in TMM Rating Allowance Needs to Use Ladder 1v1 Matching (or close to it):
I am currently writing a new matching algorithm to make a 4v4 queue possible. From my understanding trueskill doesn't factor in rating disparity between players when calculating the game quality so in order to get onl y games with similarly rated players we need to introduce our own quality metric. I will now explain my first draft for this so you can discuss if you think that is a good formula and make suggestions to improve it.
Currently I calculate quality = uniformity * fairness + newbie bonus + time bonus
Uniformity goes from 0 to 1 and is 1 if all players in the game have the same rating and is zero if the standard deviation of the ratings if all players is greater than 300
Fairness works the same but looks at difference in total team skills, so it is 0 if the rating difference between the teams is higher than 600.
The newbie bonus is to faster match new players and is a flat bonus if a new player is in one of the teams.
The time bonus increases with every time you were not successfully matched.
Additional explanation:
The deviation is roughly one third of the biggest rating difference if we assume a somewhat even rating distribution in the team.
If both uniformity and fairness are about 2/3 we barely reach the quality threshold of 0.5. That means that a game that has 200 team rating difference and a 300 difference between individual players is the borderline case of what is acceptable. One of these metrics can be worse if the other one is better.