Quote:
Originally Posted by FlyingMongoose
How do you base on skill? you need to calculate based on numbers, and the most effective algorithm (after much debate between myself and 3 other long time server administrators and plugin developers (including dalto)) we've established that best method for balance is swap highest with lowest based on team win difference.
|
As to how to base on skill? Well yea, thats basically what I meant is swapping around people with certain points. Unfortunately I have to disagree on what is the most effective method. I think you would have to have a bigger picture of the overall scores to develop a good algorithm, other than just swapping highest for lowest. This is what I was thinking:
You keep a variable "balance" (or any other name of course). As you iterate through the teams checking scores, if the person is on the blue team, subtract a point...if on the red team add a point. Then at the end you have the total balance of score. If it is within a certain threshold (+) you need to switch that much skill to the other team. Same thing for (-). You could bring it even deeper if you wanted, but probably just switching 2 players whos total skill would balance the teams would be best.
Example:
You just checked the scores of everyone in the server.
The balance is +50. So red team has a clear advantage.
On the red team you see Orius has a skill of 63 points.
On the blue team you see Bailopan has a skill of 10 (sorry B
)
Switch the two, and now the balance is -3. Much better than the +50 before.
You could take this one step further and calculated it based on PPM (points per minute). This would be a far better solution because it would take into account people who just joined. I mean for all we know Bailopan owns and just joined 1 minute ago and already has 10 points, and we just severely unevened the teams in the other direction.
This solution does represent a harder to code solution than just swapping highest with lowest, but it also provides the best form of balancing imo. I also think that if given a plugin with the general means of swapping people around (like balancing template with just no code to check skill), I could modify it to use this algorithm. I just dont have enough sourcepawn experience to deal with swapping people only when they are dead and such...the algorithm itself wouldnt be that hard I don't think. I tried modifying the DOD:S balancing plugin but it was hard to change because it only checks on death and just switches the person who just died if the teams are unbalanced (i.e. 10players-8players), whereas this would need to calculated on an event that happens regularly (death event isn't bad) but switch a person who may not be dead yet when they eventually do die.