To start, I'll explain the current process of matchmaking. Given that we have a list of players (like people added in discord)...
Using a rating system
We need a way of figuring out relative skill level for creating balanced teams. To do this, I'm using armarankings, and for the first pass of fort matchmaking in particular, I'm using the ratings from pickup season 1: https://armarankings.com/rankings?match ... -fortress1. This dataset currently has the richest set of fortress match results (with 583 matches). In the future, we'll migrate to using something more current (since these ratings aren't currently being updated from results) with hopefully just as much rating accuracy.
Bucketing into tiers
Now that we have a rating system to use, we can bucket players into categories for their relative skill level. The reason for doing this rather than strictly using ratings and sorting by that is to add an element of randomness and hopefully more fun to the matches. Players signed up are bucketed into the following four categories based on the percentile of their rating:
s-tier: top 10% of ratings
a-tier: 10-25%
b-tier: 25-60%
c-tier: 60-100%
Now that we've bucketed players, we choose two captains. If we have enough players signed up in s to b-tier, captains are randomly selected from those tiers. Captains should have no more than one tier difference between them (unless for example there's a single s-tier signed up and then only b-tier players).
Generating teams
With players and their associated tiers, we can now generate a list of players ordered by tier (like [s-tier players..., a-tier players..., ...]) which should roughly match the order in which a captain might pick players for their team. I'll quickly add a note that players within tiers are shuffled randomly; the list is not ordered any more granularly than by tier. Now we start going through the list player by player, following a similar picking system than we do in "manual" fort pickup: first player to team A, second and third player to team B, etc (ABBAABB...). The last step here is to associate captains with the appropriate teams, and voila, we have our (hopefully) balanced teams!
That's pretty much it. If you're curious to look at the python code that does this, feel free to have a look here. Shout out to Kronkleberry for doing most of the algorithm design as well as a proof of concept.
Random notes
- For this system to work from discord, we need your tron auth username when you add since there's currently no association between peoples' discord accounts and their tron usernames.
- When you !add fortauto <tron auth username>, you could technically pass in any username because of the bullet above. Please don't do this and just use yours If you use someone elses, it will mess up the matchmaking. I'll leave it to the community and mods to moderate this until there's a better system in place.
- If you want to mess around with this by creating sample matches or whatever, you can. The REST API used for matchmaking is publicly accessible and just accepts a JSON list of player usernames. Let me know if you're interested.