Our goal is to keep our Capture The Flag games as balanced as possible, while also adding some randomness. Games are balanced by one of three randomly chosen methods, including: 1) by points, 2) by win percentage and 3) by kills/deaths.
Before a game starts, our system creates two player lists. One containing players who have played for a while (many games played), and another list of newer players.
How experienced players are sorted:
The system sorts the “experienced” players by the sorting method (either by points, win percentage, or k/d). From this sorted list of experienced players, we group the top two players into a pair (so, #1 and #2 in the sort order). From this pair it randomly places them into opposite teams. Then it creates a pair from players #3 and #4 and does the same thing, and so on. If there’s one player left over (an odd number of players) the last player is placed on the team with the least points. So we have a well balanced game with some randomization to the teams.
How new players are added:
After the experienced players are placed on teams, any new players are randomly assigned a team. This prevents a new player who has played only 3 games, and won all of them (100% win percentage), from being at the top of the list sorted by win percentage. Or it prevents a player who played only 5 games, but has a 5:1 k/d, from being at the top of the sorted list of K/Ds.