Gaming Zone > [MiA] Servers
Freon: New team balancer code running on the server
Piglet:
There's new code for team balancing on the server.
The original code seemed over-complex, and we were seeing the old code would occasionally swap players which resulted in a worse balance than before the swaps took place.
People have been complaining about this, so I've written new "pick the best pair of players to swap" code from scratch.
The new code works out the difference between the total current "adjusted" PPR's on each team, the picks the two players which when swapped will result in the team total "adjusted" PPR's being the same.
I may add some more logic to check whether a single player swap from a smaller to a larger team would be "better" - if I can clearly identify what "better" means in this case.
The server is only saving PPR's for games when there are more than 12 players, as we found that players who play during the day with a few players are getting artifically low ranking when then playing in the evening. It may be possible to do something to log PPR-at-player-count in the future.
If you're interested in looking at the code, all the code for Freon is in the package:
The balancing algorithm is here: Team_GameBase::BalanceBestPair
Adjusted PPR is is calculated here: Team_GameBase::GetPlayerAutoBalancingPPR_from_PRI - PPR is averaged over the last 30 maps that qualify. The current weighting is 70% of (average of last 30 maps) and 30% your current PPR in the game currently being played, once that stabilises
Swapping is triggered by a high PPR player joining or leaving, or by an admin forcing a re-evaluation.
If you see the wrong players getting swapped, please note the date and time and post it here (in UK time please) together with the map name you saw it happen on.
I currently have debug logging of every assessment made so I will be able to check what was done and see what happened.
I've simulated the strategy used in a spreadsheet which you can download here to try it out. You can plug in PPRs for two teams and see which two players would get swapped. It will also tell you where no swap is possible.
Miauz55555:
Would it be possible to turn it off when a team hits nine points? So from eight points up.
Piglet:
When a 12ppr person joins the team with 9 points and the other team has no points, and the team with 0 points wins the round as the 12 point player is waiting to join...at the start of the 9-1 round the teams stay as they are including the 12ppr player on the team with 9?
holyspam:
--- Quote from: Piglet on November 14, 2021, 10:52 ---When a 12ppr person joins the team with 9 points and the other team has no points, and the team with 0 points wins the round as the 12 point player is waiting to join...at the start of the 9-1 round the teams stay as they are including the 12ppr player on the team with 9?
--- End quote ---
If they couldn't land a single round then either
1. The balancer is completely broken or
2. They deserve a humiliating defeat :P
--- Quote from: Miauz55555 on November 13, 2021, 22:56 ---Would it be possible to turn it off when a team hits nine points? So from eight points up.
--- End quote ---
That's why it gets triggered only when a high PPR player joining, only when it's needed.
Piglet:
In the scenario I outlined a low-ppr player from the team with 1 point would be swapped with a high PPR player (possibly the new 12ppr player) - and have a good chance of getting a few...or more.. points with that player
Navigation
[0] Message Index
[#] Next page
Go to full version