Closed jauggy closed 3 weeks ago
From my testing on integration server, the time taken for this algo on a 16 player game takes between 20-40ms. Seems longer when there is a large party.
7v7 takes 5 ms
6v6 takes 3 ms
5v5 takes 0.5 ms
Summary of how long balancer takes to complete 8v8: 20-40ms 7v7: 5ms 6v6: 3ms 5v5: 0.5ms
Based on this data, maybe I have to limit it to 7v7 or less.
I'm going to update this so it is restricted to moderator or tester role due to it being slow with 16 players.
Updated so it's no longer selectable by regular players. It exists so that it can be called by split_noobs
.
Context
Many people want a balance algorithm that keeps parties together more often. This algorithm goes through every possible combination and picks the best combination. The original idea was from Suuwassea here: https://discord.com/channels/549281623154229250/855772061095559179/1235344149713260584
Conditions the algorithm will run
If any of these conditions aren't met, the default balancer will be called instead
Scoring each combination
Each combination will be given a score as follows:
rating_diff_penalty is just the difference in team ratings broken_party_penalty is the number of broken parties * broken_party_multiplier broken_party_multiplier = 3
Pick the combination that scores the lowest.
Test Steps
Go to to any match on integration server. Preferably find one where parties got split e.g. https://server5.beyondallreason.info/battle/2092529/players You can see the parties as they are represented by same coloured dice in the player list. In this case kyutoryu and fbots1998 got split.
Go to balance tab and check brute_force algo. You should see broken party penalty of 0 meaning parties weren't split.
In lobby if you do
It will give you a warning and tell you the allowed balance algo. brute_force will not be listed as I have restricted it to mod only.