Jump to content

Liam Team Balancer


Recommended Posts

Okay, so we've played around with different ways of handling the team balancer and while its working, its not as efficient as it could be. So we would like your input on it.

 

What are your thoughts on how it could work better.

 

Keep this in mind when replying:

 

First off, dont be scared to suggest a brand new direction. The meat of the plugin is written and so changing the logic is easy.

Secondly, do not flame/troll this post. :)

Third, be imaginative. Nothing's too out of the ballpark.

 

Anyways, once we compile a list of suggestions we'll figure out what seems like it would work best and write the plugin accordingly.

 

Thanks in advance.

Liam

Link to post
Share on other sites
  • Replies 73
  • Created
  • Last Reply

Top Posters In This Topic

Just for teh record, the team balancer does two things:

 

The first is it keeps teams balanced on size. (That part works fine.)

The second is it keeps teams balanced on wins. (That part needs your input.)

Link to post
Share on other sites

i think it needs to balance size based on KDR because half of the time there will be one team with 40% of the players having double digit kills, and the other team might have 1 person if even, with double digits.

 

While it helps a team win a round or two, its pretty unfair for the people who are already at a disadvantage with weapons and money.

Link to post
Share on other sites
i think it needs to balance size based on KDR because half of the time there will be one team with 40% of the players having double digit kills, and the other team might have 1 person if even, with double digits.

 

While it helps a team win a round or two, its pretty unfair for the people who are already at a disadvantage with weapons and money.

 

That is an excellent suggestion. Anyone else have any input on this idea?

Link to post
Share on other sites

What Facist is showing has been the norm since the update you mentioned previously. I've seen very little balancing myself, though I have been switched a lot more, but normally only to even teams when someone else stacks and only when my score is low.

 

Over the past week I haven't seen the Balancer move a high scoring player once. And on the occasions I've seen teams balanced on account of player numbers, I often only see the leading team being given the additional player.

 

I've tried to keep track of the balances made by the Team Balancer, but its been difficult because much more often than not no balancing takes place. This isn't the case 100% of the time, as a few rounds I've played in have had a significant amount of players being moved, although its hard to say whether it Balanced teams or not (it could've all been down to one or a few players stacking, it didn't seem to be down to the Balancer trying to balance out Win, Streak or Score variables etc).

Link to post
Share on other sites
What Facist is showing has been the norm since the update you mentioned previously. I've seen very little balancing myself, though I have been switched a lot more, but normally only to even teams when someone else stacks and only when my score is low.

 

Over the past week I haven't seen the Balancer move a high scoring player once. And on the occasions I've seen teams balanced on account of player numbers, I often only see the leading team being given the additional player.

 

I've tried to keep track of the balances made by the Team Balancer, but its been difficult because much more often than not no balancing takes place. This isn't the case 100% of the time, as a few rounds I've played in have had a significant amount of players being moved, although its hard to say whether it Balanced teams or not (it could've all been down to one or a few players stacking, it didn't seem to be down to the Balancer trying to balance out Win, Streak or Score variables etc).

 

A new update was done last night. We tried something new since I haven't had a lot of suggestions here. If what we did doesn't work we'll figure something out. :)

Link to post
Share on other sites

As a suggestion.

 

After balancing team numbers....

 

How about making the Balancer total all kills on both teams, total all deaths on both teams, then subtract the Deaths from the Wins. And then make it check the difference between both teams Values at the end of the round, If the difference is greater than the 2/3rd of the number of players in the server it places the lowest scorer on the losing team onto the winning team then looks for the a player on the winning team with a score (Kills minus Deaths) that is greater than half the initial difference between the two team values + the number of kills of the person just switched from the losing team. This chosen person is then switched to the losing team.

 

If the team that lost the round has the higher Team Value, only balancing based on team sizes occurs.

 

 

Example .start

 

Team CT Wins the round.

 

Teams are balanced if necessary

 

Check if Winning team has a greater Team Value.

 

Team CT = 24Kills 12Deaths

Team T = 23kills 21Deaths

 

Team CT Value = 12

Team T Value = 2

 

Lowest scorer (2Kills) from Team T is switched to Team CT.

 

Difference in Team Values = 10

Divide by 2 = 5

Plus Switched players kills = 7

 

Is there a Player on Team CT with 7+ kills?

 

Look for CT player with kills = to 7? Increment till a player is found.

 

If no player is found with 7+ kills, Switch CT player with highest Kills to Team T.

 

.end

Link to post
Share on other sites
As a suggestion.

 

After balancing team numbers....

 

How about making the Balancer total all kills on both teams, total all deaths on both teams, then subtract the Deaths from the Wins. And then make it check the difference between both teams Values at the end of the round, If the difference is greater than the 2/3rd of the number of players in the server it places the lowest scorer on the losing team onto the winning team then looks for the a player on the winning team with a score (Kills minus Deaths) that is greater than half the initial difference between the two team values + the number of kills of the person just switched from the losing team. This chosen person is then switched to the losing team.

 

If the team that lost the round has the higher Team Value, only balancing based on team sizes occurs.

Example .start

 

Team CT Wins the round.

 

Teams are balanced if necessary

 

Check if Winning team has a greater Team Value.

 

Team CT = 24Kills 12Deaths

Team T = 23kills 21Deaths

 

Team CT Value = 12

Team T Value = 2

 

Lowest scorer (2Kills) from Team T is switched to Team CT.

 

Difference in Team Values = 10

Divide by 2 = 5

Plus Switched players kills = 7

 

Is there a Player on Team CT with 7+ kills?

 

Look for CT player with kills = to 7? Increment till a player is found.

 

If no player is found with 7+ kills, Switch CT player with highest Kills to Team T.

 

.end

 

Thats actually a really good idea. :)

Anyone else have any suggestions/comments about this? If not, I'll write it and we'll give it a go.

Link to post
Share on other sites

Whats the ETA on the next update? The way things stand right now, if its going to take a while to get major changes made it might be worth ripping the artificial logic out of the balancer and just leave it as an anti stacking device for the time being. Right now its consistently stacking the players with the highest K:D onto one team.

Link to post
Share on other sites
Whats the ETA on the next update? The way things stand right now, if its going to take a while to get major changes made it might be worth ripping the artificial logic out of the balancer and just leave it as an anti stacking device for the time being. Right now its consistently stacking the players with the highest K:D onto one team.

The teambalancer is updated and fixed on Liam's side, unfortunately we've been locked out of the server by ITS here at Western and we are working to get our access back into it so we can replace the balancer with the updated version.

Link to post
Share on other sites

Hmm... interesting ways to use TB but here's what I think should happen. I am no programmer or anything btw so don't expect much x_X.

 

The plugin should first calculate everyone's K:D ratio.

For instance: 5vs5

P1-CT-k/d: 2.5-5/2

P2-T-k/d:1.1-10/9

P3-CT-k/d:2-20/10

P4-T-k/d:1.5-15/10

P5-T-k/d:0.5-5/10

P6-CT-k/d:1.5-40/30

P7-T-k/d:1.0-5/5

P8-CT-k/d: 0-0/5

P9-CT-k/d: (undefined - x-1 for example)-5/0

P10-T- k/d:1.4-7/5

 

Second we add the amount of wins to each player depending on their team.

 

Add their rank to the amount of time they've played (in hours) and now we divide them in their separate teams. The team that has the most values that are highest automatically loses x amount of players (depending on how many players on each time) and the team with the least values that are highest receives x amount of players (also depending on how many players on each time).

 

If I continue my example:

P1 has a k:d ratio of 2.5, played for 10 minutes and is on the winning team (10 times) his "rank score" is 2.5 + 0.16666666666666666 + 10 = 12.16666666666666666666666666

P6 has a k:D ratio 1.5, played for 1 hour and is on the winning team (10 times) his "rank score" is 1.5+1+10 = 12.5

P4 has a k:d ratio 1.5, played for 30 minutes and is on the losing team (2 times) his "rank score" is 1.5 +0.5=2=4

P5 has a k:D ratio 0.5, played for 20 minutes is on the losing team (2 times) his "rank score" is 0.5+0.3+2 = 2.8

 

(this is just an example, usually it's way different from this) Note: If the value of the k:d ratio is undefined (as in 5/0 or such), add the amount of kills to the rank score.

 

Now the TB will now switch people with a score with less than 5 with someone with who has a score more than 10 on opposing teams.

 

IF the teams are NEARLY tied, (Following the same k:d ratios)

P1 has a k:d ratio of 2.5, played for 10 minutes and is on the winning team (5 times) his "rank score" is 2.5 + 0.16666666666666666 + 5 = 7.56666666666666666666666666

P6 has a k:D ratio 1.5, played for 1 hour and is on the winning team (5 times) his "rank score" is 1.5+1+5 = 7.5

P4 has a k:d ratio 1.5, played for 30 minutes and is on the losing team (4 times) his "rank score" is 1.5 +0.5+5=7

P5 has a k:D ratio 0.5, played for 20 minutes is on the losing team (4 times) his "rank score" is 0.5+0.3+4= 4.8

 

As you can tell the rank scores are closer to each other but as a revision: I will add all their kills subtracted by their deaths

P1 has a k:d ratio of 2.5, played for 10 minutes and is on the winning team (5 times) his "rank score" is 2.5 + 0.16666666666666666 + 5 + 3= 10.56666666666666666666666666

P6 has a k:D ratio 1.5, played for 1 hour and is on the winning team (5 times) his "rank score" is 1.5+1+5 +10 = 17.5

P4 has a k:d ratio 1.5, played for 30 minutes and is on the losing team (4 times) his "rank score" is 1.5 +0.5+4 +5=11

P5 has a k:D ratio 0.5, played for 20 minutes is on the losing team (4 times) his "rank score" is 0.5+0.3+4 -5= -0.2

 

This revision can be used by the machine if the rank scores are very close, now we can adjust the teams based on the current scores.

17.5 will now switch with -0.2 and 11 will switch with 10.5666666666666666666666666666666666666666666. However, as a word of caution, we will not need this revision unless the scores are close.

I think the machine can calculate the closeness based on the scores:

A-P1-CT

B-P2-CT

C-P3-T

D-P4 -T

If A+B/2 <= to A or B

If A+C/2 <= to A or C etc...

Then we can call the revision to program.

 

This algorithm I guess is decent for most circumstances.

 

Jonny

Link to post
Share on other sites

Once we move to Sourcemod and get away from metamod I'll do that. With Metamod its like an extra thousand lines of code to get it to swap like your talking about.

 

Sourcemod has all of the stuff built into its framework to allow that more easily.

Link to post
Share on other sites

Whats the current timeframe for moving to Sourcemod? Is it just a matter of time depending on when access to the server box is regained? Or will it be awhile before we see these sort of changes?

 

Not important questions, but I'm just being overtly curious.

Link to post
Share on other sites

×
×
  • Create New...