FlexMatch: Express fair team rating rule with perhaps empty teams

Hello again!

I found that it’s impossible (at least with my knowledge about FlexMatch rule sets) to build such rule set which meets these requirements:

  1. Average rating of players in each team should be relatively close to each other (no team should be much stronger than another).

  2. Team can have 0 players if there is no many players online at that time.

I see two problems here:

  1. All rules that I could create for this purpose are using avg on the collection that can be empty. And my tests show that in this case the rule can’t match at all. It’s quite logical - there is no “right” value for the average of an empty collection.

  2. Even if we assume that avg on empty collection will return 0 it doesn’t solve our problem. Let’s assume that there is a single very high-rated player to match him with bots we should raise max distance of team ratings to at least his rating. But when where are many players raising this distance too high will just ruine the purpose of this rule at all.

For now I’ve decided to remove this rule from rule set, ignore teams built by FlexMatch and assign players to teams myself minimizing difference between team ratings. I think it should work but it’s not very elegant :slight_smile:
If somebody could help me figure out how to build such rule set I will be very happy. But if it’s really that hard then at least FlexMatch team will get one more use case story and perhaps make such scenarios more approachable in the future.

Thank you in advance!

Hey @Hinidu!

You are correct in that FlexMatch does not currently support creating a match in the way you describe today when one of the team has a team size of 0.

I would like to accurately capture the scenario to prioritize in our backlog. If we had a way to dynamically disable the fair team size rule at evaluation time in the event that one of the team sizes is 0, would that meet your use case?

Hey @Matchmaker!
Yes, I think the ability to disable fair team rating rule in the event that one of the team sizes is 0 would work for our use case.

Hey @Hinidu!

Thanks for clarifying. We will add this feature to our backlog.

Much appreciated!