A Bit of Better Balancing  (Read 41466 times)

Piglet

  • 1337
  • *
  • Posts: 3169
  • Country: gb
Re: A Bit of Better Balancing
« Reply #15 on: May 17, 2021, 12:38 »
The Freon process works well - see class Misc_ServerLink extends BufferedTCPLink;

It registers:

games (not really used),
player stats (Rounds, Score, Kills, Deaths, Thaws, Git - of which only rounds and scores are used to get a PPR) - on end of game or when player leaves

It has a request for a player's average PPR


The back-end then does the work around storing the player stats and responding with average PPR for the front end to use at round start to balance the teams (or when the admin calls "teams").



Interesting - the version I used of the back-end is php. I just found this java version: https://www.youtube.com/watch?v=xZXgJogfnKc



The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: A Bit of Better Balancing
« Reply #16 on: May 19, 2021, 03:20 »
Informative tutorial, it is going to be very useful for our purposes. Thanks!
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: A Bit of Better Balancing
« Reply #17 on: May 19, 2021, 05:44 »
You may have noticed a prototype of team balancer on Warfare. It is already tracking some CTF specific events like covers (https://github.com/ravimohan1991/Equalizer/wiki/Covers) and seals (https://github.com/ravimohan1991/Equalizer/wiki/Seals) and broadcasting them.

Since it is still in alpha stage (bug prone) with a long TODO list, please let us know if you observe anything "funny" or unexpected (something that worked earlier but now broken). Thanks for your patience and contribution  8)
« Last Edit: May 19, 2021, 05:46 by The_Cowboy »
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: A Bit of Better Balancing
« Reply #18 on: May 21, 2021, 23:37 »
Quote from: Gil-galad[The REAL one
- the closer the guy is from scoring before being killed by an enemy, more the points that should be awarded for the kill, IF the flag is indeed returned. Think of it like an assist on a manta run.

Question:
If the Killer gets killed and then flag gets returned, does the Killer still get points?

Also I would note that on killing the FC (flag carrier), you get 3 points by default (1 for the kill and 2 for being FC). Any other added bonus would be at the top of that.
« Last Edit: May 21, 2021, 23:46 by The_Cowboy »
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Caracal

  • Sr. Member
  • *
  • Posts: 138
  • Country: ru
    • caracalRus
Re: A Bit of Better Balancing
« Reply #19 on: May 22, 2021, 10:12 »
Do you get points for returning the flag (not killing flag carrier)?
I noticed that sometimes you get 3 points, sometimes you dont get any points.

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #20 on: May 22, 2021, 11:22 »
Quote from: Gil-galad[The REAL one
- the closer the guy is from scoring before being killed by an enemy, more the points that should be awarded for the kill, IF the flag is indeed returned. Think of it like an assist on a manta run.

Question:
If the Killer gets killed and then flag gets returned, does the Killer still get points?

I think that that player should receive those points.

Also I would note that on killing the FC (flag carrier), you get 3 points by default (1 for the kill and 2 for being FC). Any other added bonus would be at the top of that.

I guess i should have worked my piece better. I use "points" and "award", but what i meant is that when a player kills the enemy's team FC, that player should be deemed more useful/effective to his team than another who did not manage that.
How to instate the usefulness?
If the enemy is almost scoring, you are more usefull to your team if you kill him than your teammate that killed the FC right beside your team's flag post, since it's more difficult (distance from spawn point and aiming). It's also less likely to be done by another teammate (same reason). So, I'd measure the distance from the enemy's flag post, and give credit by distance unit (the smaller the better (1)). Then, for this competence, measure the sum of those distances, and rank accordingly. I'm not sure how to traduce all that in points, because points mix various actions. How to balance the worth that they have relative to one another? How to evaluate a (normal) kill count against a flag touch counts? Both are useful to achieve victory.

To end up with a unified value for a player is more complicated than that. Feel free to point the shortcomings of my ideas to devise ways to deal with them.

(1). Or the distance from your team flag post, the more, the better.  Same end result.
« Last Edit: May 22, 2021, 12:03 by Gil-galad[The REAL one] »
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: A Bit of Better Balancing
« Reply #21 on: May 22, 2021, 12:20 »

I think that that player should receive those points.

Great! That is what I thought.


I guess i should have worked my piece better. I use "points" and "award", but what i meant is that when a player kills the enemy's team FC, that player should be deemed more useful/effective to his team than another who did not manage that.
How to instate the usefulness?
If the enemy is almost scoring, you are more usefull to your team if you kill him than your teammate that killed the FC right beside your team's flag post, since it's more difficult (distance from spawn point and aiming). It's also less likely to be done by another teammate (same reason). So, I'd measure the distance from the enemy's flag post, and give credit by distance unit (the smaller the better (1)). Then, for this competence, measure the sum of those distances, and rank accordingly. I'm not sure how to traduce all that in points, because points mix various actions. How to balance the worth that they have relative to one another? How to evaluate a (normal) kill count against a flag touch counts? Both are useful to achieve victory.

To end up with a unified value for a player is more complicated than that. Feel free to point the shortcomings of my ideas to devise ways to deal with them.

(1). Or the distance from your team flag post, the more, the better.  Same end result.

I think I comprehend the spirit of this concept. In most maps (like Linear) what you mention (about the relative distance from either flags) works. But some maps which have more space perpendicular to the (imaginary) flag corridor, we may give extra points to the player (assuming FC ran perpendicular to the flag corridor) if we reward based on how far FC moved (lateral distance shouldn't be taken into account).

So we can project the position vector of FC (relative to enemy flag) on to the relative vector of both the flags and get the exact idea about how much progress FC made starting from enemy flag to their own flag. Then we can normalize that magnitude with the magnitude of relative vector to get a number between 0 (FC killed near enemy flag mount location) and 1 (FC killed near their flag mount position).

I implemented the concept in this commit https://github.com/ravimohan1991/Equalizer/commit/be2d7a5d9d882593a47248841fa81bf64bca9279
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #22 on: May 22, 2021, 19:09 »
So we can project the position vector of FC (relative to enemy flag) on to the relative vector of both the flags and get the exact idea about how much progress FC made starting from enemy flag to their own flag. Then we can normalize that magnitude with the magnitude of relative vector to get a number between 0 (FC killed near enemy flag mount location) and 1 (FC killed near their flag mount position).

That seems clever. I don't understand it fully, so my nooby opinion is just that.

I guess  you'd also have to implement this calculus for flag touch (A), flag drop (B), which would permit you to do B - A = [distance that player carried the flag], which would be a portion of 1 (all the way) and 0,01[...] ( almost nothing of the distance that has to be traveled with the flag, post to post). or something like that. be cleverer than me please, I'm a john snow in statistics as well.
Instead of 1 you could chose another value, one that would reflect better the action's value in points, the real action's worth in the overall point counting thing. it's a question of balance, and it has to be set right.

The problem I see, in traducing any of those actions in number of points, is that you have to balance the right way the various actions. How much is worth each action relative to each other? Like, supporting the flag carrier or touching the flag? Or returning one? Or killing an enemy close to your flag? or just  being able to kill and take some of the the top enemy players's pressure of?

I don't know if I just added confusion here. What do you think on that matter?


« Last Edit: May 22, 2021, 19:16 by Gil-galad[The REAL one] »
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #23 on: May 22, 2021, 19:35 »
One other thing that just came to my mind that perhaps can help a bit.

 we could also take the last flag drop position to infer the enemies's postion/vector/...? regarding said dropped flag as a way to it to assign value to a kill. The idea is to recognize the value of the action of returning flag, thus also in preventing the enemies from doing it, to be logical.
« Last Edit: May 22, 2021, 19:46 by Gil-galad[The REAL one] »
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

The_Cowboy

  • 1337
  • *
  • Posts: 259
  • Country: in
  • CodeZilla
Re: A Bit of Better Balancing
« Reply #24 on: May 27, 2021, 13:13 »
Sorry for the late reply (got overwhelming few days, not that I was not expecting them  :))).

Instead of 1 you could chose another value, one that would reflect better the action's value in points, the real action's worth in the overall point counting thing. it's a question of balance, and it has to be set right.

Yes you are absolutely correct. That is the way to compute the fraction of path FC has covered carrying the enemy flag. Now that fraction is multiplied by the maximum score that should be awarded if the FC were killed, if I can say, "within the stone throwing distance" from their own flag. It is configurable and for the admins to decide (I set it to 4). Finally the result is converted into integer. For instance if the fraction is .80 then 4 * .80 = 3.2 and, when converted into integer it is 3. Specifically see (https://github.com/ravimohan1991/Equalizer/blob/44a5fdd02df00376448000c6eeacac5f39696529/Classes/Equalizer.uc#L648)


The problem I see, in traducing any of those actions in number of points, is that you have to balance the right way the various actions. How much is worth each action relative to each other? Like, supporting the flag carrier or touching the flag? Or returning one? Or killing an enemy close to your flag? or just  being able to kill and take some of the the top enemy players's pressure of?

Those actions have values which are configurable and can be set at the discretion of admins.
Quote from: Wormbo
You learn UnrealScript mainly by reading other people's code. Removing code without an important reason (download size reduction and lack of helpfulness are not important in that sense) is extremely antisocial IMHO.

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #25 on: May 28, 2021, 14:42 »
As a goal, as far as points go, I concede that at the end of the match, the value in points should thrive to somewhat reflecting the overall actions accomplished by a player.

But what I think that should be done too is to monitor more events per player that are monitored right now. And then find a multiplier to traduce that in points, but to set balance, the points are not the best way. Measure those actions, and then the balancer would work by trying to give to each team an overall identical profile, given available players.  the difficulty will be on the very good or very bad players, the one that seem to be a black hole sucking your efforts (when you feel you play alone and in your team is a real noob in small teams context, for exemple) or megaturbo surpercharged (Moi and Arbok join your team  and you don't have to push anything, It's a walk in the garden picking the flag)

for flag carriers
 -  total distance traveled carrying on foot.
 -  total distance traveled in a vehicle
 -  for manta run, raptor run, ...  i think the right solution is to consider that if the FC is driven or flown by someone else, the [vehicle distance while carrying the flag] should in that case be awarded to the pilot. it's named an Assist, and could be labelled in distance (= distance traveled while driving FC, as distance meaning  how much closer did the FC got brought to his flag post)

(very provisional) final note on flag carrying : perhaps the value in Time could be better suited and simpler, or perhaps a good counterbalance for some blind spots we have with the value in distance, as in : keeping their flag while waiting for yours to be returned is sometimes quite difficult, in spammy maps all the more. on those matches, the time you managed to keep the flag should be valued and could be interesting. Of course, the blind spot of the time value is camping with the flag in a remote/inaccessible  just to get stats and rewards. or another thing. i don't know. perhaps devise that 1. in set interval, if distance =0 (camping) and [time carying the flag] continues to go up,  and 2. your flag is on its post, then 3. the reward for time should be stopped.  Aaaaanyway, it's all ery sketchy, it's there because it's ideas and they only (eventually!) get valued if shared.


for flag carrier supporters and dropped flagS (both) defenders, enemy flag defenders and enemy flag retrievers:
- special kill count  of kills of nearest to flag carrier/dropped flag. let's call those Support kills...? or, it could perhaps be a count of total damage delivered to those targets.

For flag retrievers :
the value of a flag return is to be understood as in how close/far is your team's flag from the enemy's flag post. Count it the same way you do for flag carriers (same technique you devised). the question is : at  how much of the continuum that separates each flag posts  was the flag dropped when a player returns it. How close was it from their post? if very close, then the distance from your flag post is big. That value is to be recorded for each flag return, and summed to the the distances of other flag returns already credited to the player.

I still have more ideas, but i don't have more time to get them ordered.  Anyway, what do you think?
« Last Edit: May 29, 2021, 20:31 by Gil-galad[The REAL one] »
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

Piglet

  • 1337
  • *
  • Posts: 3169
  • Country: gb
Re: A Bit of Better Balancing
« Reply #26 on: May 28, 2021, 16:51 »
It's a tricky one. You're thinking in terms of flags all the time - however if you watch me in Bloodbath, my aim is to prevent players getting anywhere near the flag. I'm shooting the hordes of players attacking and trying to prevent them even getting there.

How are you going to measure the value of me killing 100 players before they reach the flag, compared to the sniper being nothing more than a nuisance shooting 100 people milling around the spawn points?

How are you going to measure the value of Moi shooting me and preventing me from defending?
« Last Edit: May 28, 2021, 16:53 by Piglet »

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #27 on: May 28, 2021, 16:57 »
Quote
How are you going to measure the value of me killing 100 players before they reach the flag, compared to the sniper being nothing more than a nuisance shooting 100 people milling around the spawn points?

I suggested this, earlier :
Quote
we could also take the last flag drop position to infer the enemies's postion/vector/...? regarding said dropped flag as a way to it to assign value to a kill. The idea is to recognize the value of the action of returning flag, thus also in preventing the enemies from doing it, to be logical.
that mecanism would be used for

Quote
for flag carrier supporters and dropped flagS (both) defenders, enemy flag defenders and enemy flag retrievers:
- special kill count  of kills of nearest to flag carrier/dropped flag. let's call those Support kills...? or, it could perhaps be a count of total damage delivered to those targets.
 

meaning that if you kill the enemies to prevent them from getting close, your kill has more value if the enemy is closer, less value if they are further [from reaching their objective, like 1. defending their flag that is on post, 2. taking yours that is dropped, 3. returning their flag that is dropped, 4. taking yours that is on post]. Count those distances,  probably separatly, to measure the value of the action, sum them per player. Rank players accordingly for balance.

For points, there's more room.

The example you propose is not satisfactorily addressed, though. spawn kill is a thing that can be completely useless to your team, like we see in some matches in the map longest yard. on other occasions, it is arguably valid strategy : think of the enemy being blocked while you get a head start running with the flag. I guess sk should be valued IF it has a strong (temporary) tactical purpose, which will obviously be related to flags.

Quote
How are you going to measure the value of Moi shooting me and preventing me from defending?
the value of the kill depdns on how precious you are to your team. if you are the best player in your team (determined by the counts I keep talking about, at least partly, as far as balancer goes), then killing you, blocking you should be beneficial for Moi's team. IF moi were to block one player that does not provide much of value for his team, then Moi is not having the same beneficial impact for his team when he kills him/block him.

I'm still not satisfied but that's all I can think of. There's probably a better way.  Perhaps give a set weight to [a total damage given player rank ] to alter what the counts i'm proposing would suggest in terms of team balance. Or something cleverer (please!)
« Last Edit: May 28, 2021, 18:06 by Gil-galad[The REAL one] »
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

Gil-galad

  • Full Member 
  • *
  • Posts: 71
  • Country: pt
  • Hail the Holy Flying Spaguetti Monster!
Re: A Bit of Better Balancing
« Reply #28 on: May 28, 2021, 21:16 »
There's also one thing that should be implemented, and much simpler, that is a mechanism preventing team balancer abuse.  it could work like this : if, by going on spectator mode (leaving the match) or quitting the server, the team balancer is triggered and somebody is swapped, then, if you try to rejoin, force spectator mode until the end of the match. I think it's the way it works on LDG.
His sword was long, his lance was keen.
His shining helm afar was seen;
the countless stars of heaven's field
were mirrored in his silver shield.

The Fall of Gil-galad - J. R. R. Tolkien

Piglet

  • 1337
  • *
  • Posts: 3169
  • Country: gb
Re: A Bit of Better Balancing
« Reply #29 on: May 28, 2021, 21:20 »
...or you get put back in the original team...

Possibly better to drop to spec or leave to take the phone call than to stand idle.