Author Topic: Proposed change to team-balance algorithim  (Read 7960 times)

0 Members and 1 Guest are viewing this topic.

Offline Tydeus

  • King
  • **********
  • Renown: 1422
  • Infamy: 351
  • cRPG Player A Gentleman and a Scholar
  • Item re-unbalance guy
    • View Profile
  • Game nicks: Tydeus
  • IRC nick: Tydeus
Re: Proposed change to team-balance algorithim
« Reply #15 on: February 21, 2014, 05:46:42 pm »
+1
Elindor, I haven't taken an in depth look at how it works, I've only skimmed through it. I've seen it enough to know I don't want to have anything to do with it at the moment.  :|
chadz> i wouldnt mind seeing some penis on my character

Offline Utrakil

  • Marshall
  • ********
  • Renown: 885
  • Infamy: 182
  • cRPG Player Sir Black Bishop A Gentleman and a Scholar
    • View Profile
  • Game nicks: Randwig; Gerwin; Marketenderin; Fletcher
Re: Proposed change to team-balance algorithim
« Reply #16 on: February 21, 2014, 05:49:53 pm »
+3
Thanks! I'll do exactly that.
Her comes a +1 for bravery!
visitors can't see pics , please register or login

Offline Sniger

  • Marshall
  • ********
  • Renown: 795
  • Infamy: 442
  • cRPG Player
    • View Profile
Re: Proposed change to team-balance algorithim
« Reply #17 on: February 21, 2014, 06:02:13 pm »
+1
vanthor not brave

vanthor is just like:
visitors can't see pics , please register or login

Offline Elindor

  • King
  • **********
  • Renown: 1178
  • Infamy: 158
  • cRPG Player A Gentleman and a Scholar
  • Caelitus mihi vires
    • View Profile
  • Faction: Order of the Holy Guard
  • Game nicks: Elindor
Re: Proposed change to team-balance algorithim
« Reply #18 on: February 21, 2014, 06:52:43 pm »
+2
Elindor, I haven't taken an in depth look at how it works, I've only skimmed through it. I've seen it enough to know I don't want to have anything to do with it at the moment.  :|

Honestly, I cannot blame you.  Let's tie a rope around Vanthor so if he tugs on it we can pull him back out...

God speed Vanthor.
Elindor, Archon of the Holy Guard
Holy Guard Thread :HERE
Banner Shop : HERE // Map Thread : HERE

Offline Sniger

  • Marshall
  • ********
  • Renown: 795
  • Infamy: 442
  • cRPG Player
    • View Profile
Re: Proposed change to team-balance algorithim
« Reply #19 on: February 21, 2014, 11:48:18 pm »
+1
since the screenshots ive provided is a little bit old i figured id hop on eu1 and spec for abit.

this is the very first map i spec'ed:

(click to show/hide)

ill keep spec and screen but will .zip the rest and upload

Offline Paul

  • Developer
  • ******
  • Renown: 1879
  • Infamy: 442
  • cRPG Player A Gentleman and a Scholar
  • ball bounce boss
    • View Profile
  • IRC nick: Urist
Re: Proposed change to team-balance algorithim
« Reply #20 on: February 22, 2014, 10:40:02 am »
+4
Afaik the team balance code is a creation of chadz himself and thus considered to be a holy piece of perfection. In other words noone cba to do get started with working on it.

Offline Sniger

  • Marshall
  • ********
  • Renown: 795
  • Infamy: 442
  • cRPG Player
    • View Profile
Re: Proposed change to team-balance algorithim
« Reply #21 on: February 22, 2014, 03:21:34 pm »
+1
Afaik the team balance code is a creation of chadz himself and thus considered to be a holy piece of perfection.

everything make sense now.

but well im sure its awesome code and i guess it works great for what it is! BUT........

:)

Offline Vanthor

  • Knight
  • ***
  • Renown: 62
  • Infamy: 3
  • cRPG Player
    • View Profile
  • Faction: Literally
  • Game nicks: Literally_Vanthor,Literally_Locke
Re: Proposed change to team-balance algorithim
« Reply #22 on: February 24, 2014, 10:22:14 pm »
+15
So, this may explain why the auto balancer is awful.   This is the power (energy) function it uses. Lets choose two example players Sir_TryHard_CarriesAlot and ArcherWith300Ping.

Its a 30 on 30. Sir_TryHard_CarriesAlot is on blue, and is an old school two-handed hero. He started the match of well, hitting the enemy murderball (massed infantry) like a tidal wave, killing 7 people while taking little damage. ArcherWith300Ping is a strength crutcher with a long bow. He hasn't had a good round so far, hasn't had a clear shot. So he says fuck it, and starts lobbing arrows into the melee at head height from a mile away.

Sir_TryHard_CarriesAlot is on a roll. He going to set a personal record this match. Sir_TryHard turns to fight the next enemy, and suddenly an arrow sprouts from his head. He goes down.

Lets take a look at how our two players did round 1.

P1 Sir_TryHard_CarriesAlot
Level: 30
Overall K/D from all matched: 10:1
Round 1 kills: 7 ( Had a bad round)
Round 1 Deaths: 1
Round 1 Points: 40
On Losing team(Re: Bad round)

P1 ArcherWith300Ping
Level: 31
Overall K/D from all matches: 1:4
Round 1 kills :0
Round 1 Deaths:0
Round 1 Points: 3
On winning team

Some boilerplate:
Code: [Select]

          (store_script_param, ":player_no", 1),
(try_begin),
(store_add, ":troop_no", "trp_player0_multiplayer", ":player_no"),
(troop_get_slot, ":level", ":troop_no", slot_troop_crpg_level),
(gt, ":level", 0),

(val_add, ":level", 5), #add 4 levels to everyone so every player counts higher
(try_begin),
(eq, "$g_multiplayer_game_type", multiplayer_game_type_rabbit),
(val_add, ":level", 25), #in rabbit, people by itself count more
(try_end),
Ok, so we have our new levels. Also, wtf is rabbit?
Sir_TryHard_CarriesAlot Level:  35
ArcherWith300Ping Level:         36

Code: [Select]
(player_get_score, ":kill_count", ":player_no"),
(player_get_death_count, ":death_count", ":player_no"), #get_death_count
So we've got our kill count.... wait... player_get_score?

P1 Sir_TryHard_CarriesAlot
Level: 35
kill_count: 40
deaths: 1

P2 ArcherWith300Ping
Level: 36
kill_count:10
deaths: 0

Code: [Select]
(val_div, ":kill_count", 10),
(val_sub, ":kill_count", ":death_count"),
(val_mul, ":kill_count", 3),
Well, at lease Sir_TryHard is still in the lead. He did such a good job.

P1 Sir_TryHard_CarriesAlot
Level: 35
kill_count: 9
deaths: 1

P2 ArcherWith300Ping
Level: 36
kill_count:3
deaths: 0

Code: [Select]
(store_mul, ":player_score_plus_death", ":level", 10),
(val_add, ":player_score_plus_death", ":kill_count"),
And ArcherWith300Ping takes the lead!

P1 Sir_TryHard_CarriesAlot
Level: 35
player_score_plus_death: 359

P2 ArcherWith300Ping
Level: 36
player_score_plus_death:363

Code: [Select]
(set_fixed_point_multiplier, 10000),
So  I *think* this is going to multiply any number we convert to fixed point by 10000 and divide everything converted by the same. However, I'm going to assume I'm wrong, and was put in to fix a bug with fixed point numbers or something.

Code: [Select]
(troop_get_slot, ":kd", ":troop_no", slot_troop_crpg_kd_ratio),
Yes! Go Sir_TryHard!

P1 Sir_TryHard_CarriesAlot
Level: 35
player_score_plus_death: 359

P2 ArcherWith300Ping
Level: 36
player_score_plus_death:363

Code: [Select]
(val_div, ":kd", 100),
(val_add, ":player_score_plus_death", ":kd"),
(val_max, ":player_score_plus_death", 0),
....
Maybe its stored its stored as 100x? Game doesn't seem to like fixed point numbers. Lets say it is.
Yeah... Go Sir_TryHard!

P1 Sir_TryHard_CarriesAlot
Level: 35
player_score_plus_death: 369

P2 ArcherWith300Ping
Level: 36
player_score_plus_death:363
Code: [Select]
(assign, ":power", 1),
(convert_to_fixed_point, ":player_score_plus_death"),
(convert_to_fixed_point, ":power"),

(val_mul, ":power", 11),
(val_div, ":power", 10),
(store_pow, ":tmp", ":player_score_plus_death", ":power"),
(assign, ":player_score_plus_death", ":tmp"),


(convert_from_fixed_point, ":player_score_plus_death"),
                        (assign, reg0, ":player_score_plus_death"), #What the function will return
Ok... So lets assume what I said earlier about that multiplier is true. So Sir_TryHard increases his lead! Looks like I was wrong. Looks like the balancer will rank Sir_TryHard as he deserves. Although I was expecting him to end up more than 1% better...
P1 Sir_TryHard_CarriesAlot
reg0: 666

P2 ArcherWith300Ping
reg0:654

Code: [Select]
(try_begin),
(player_get_team_no, ":team", ":player_no"),
(is_between, ":team", 0, 2),
(team_get_score, ":this_team_score", ":team"),
Wait, what? Whats going on?

P1 Sir_TryHard_CarriesAlot
reg0: 666
this_team_score:0

P2 ArcherWith300Ping
reg0:654
this_team_score:1
Code: [Select]
(store_sub, ":enemy_team", ":team", 1),
(val_abs, ":enemy_team"),
(team_get_score, ":enemy_team_score", ":team"),
Maybe this will be the boost Sir_TryHard deserves...

P1 Sir_TryHard_CarriesAlot
player_score_plus_death: 666
this_team_score:0
enemy_team_score:1

P2 ArcherWith300Ping
player_score_plus_death:654
this_team_score:1
enemy_team_score:0
Code: [Select]
(val_sub, ":this_team_score", ":enemy_team_score"),
(lt, ":this_team_score", 0),
Or not....
P1 Sir_TryHard_CarriesAlot
player_score_plus_death: 666
this_team_score:-1


P2 ArcherWith300Ping
player_score_plus_death:654
this_team_score:1


Code: [Select]
(val_mul, ":this_team_score", 30),
(val_add, reg0, ":this_team_score"),
And ArcherWith300Ping is now more useful (According to the autobalancer) than Sir_TryHard_CarriesAlot
P1 Sir_TryHard_CarriesAlot
player_score_plus_death: 636
this_team_score:-1


P2 ArcherWith300Ping
player_score_plus_death:654
this_team_score:1

Moral of the story is that the fame weights level too much, and overall K/D far too little.
« Last Edit: March 07, 2014, 04:06:13 pm by Vanthor »

Offline San

  • Developer
  • ******
  • Renown: 1456
  • Infamy: 143
  • cRPG Player A Gentleman and a Scholar
  • 1/Sympathy = Divide By Zero
    • View Profile
    • My youtube Brawl videos
  • Faction: Chaos
  • Game nicks: San_of_Chaos
  • IRC nick: San
Re: Proposed change to team-balance algorithim
« Reply #23 on: February 26, 2014, 08:16:47 pm »
+3
Bump, like where this is going.

Not sure how well traditional programming methods would work on this kind of script.

I like the idea of prioritizing banners by power and distributing them across teams with an emphasis of avoiding powerhouse players on the stacked team.

Same for these classes:
Horse ranged
Melee cav
foot ranged
infantry

I don't think it needs to be too specific. This can simply look at a person's equipment when spawning or maybe the build that they use (cav can easily become infantry, making using builds somewhat unreliable). I think trying to get too specific with worrying about hybrid builds or people trying to cheat the system may create more problems.

Although I can't help but feel the energy functions working at odds with each other, but as you said before, perhaps some simulations with past data can shed light on how well it would work. I don't fully understand how the values for mean and variance of the Gaussian for TrueSkill would work for warband, but it sounds nice if we could get something working. I think average score per round is a good placeholder before something more complicated is used.

Since this hasn't been mentioned in this thread, a 10 second wait when the map changes and balance on the first round would be great once it's working. With the current broken balance, sometimes the randomly distributed first round ends up better than when "balance" comes into play.

Offline Elindor

  • King
  • **********
  • Renown: 1178
  • Infamy: 158
  • cRPG Player A Gentleman and a Scholar
  • Caelitus mihi vires
    • View Profile
  • Faction: Order of the Holy Guard
  • Game nicks: Elindor
Re: Proposed change to team-balance algorithim
« Reply #24 on: February 26, 2014, 08:41:20 pm »
+3
Moral of the story is that the fame weights level too much, and overall K/D far too little.

Please please please (and so on...) let's continue to look at this and bring it to the attention of anyone that will listen (San, Tydeus help us :) )

Vanthor thanks for running through that and explaining what is going on...
If the balancer is not correctly weighting people that may be why it doesn't think its a big deal to put a currently 18 and 2 player on a team that is already winning from a massive clan stack.

------------------------

The balancer imho needs to prioritize in this way:

1) Put together players on same banners.
2) Generally balance # of players on same banners per team (as much as possible).
3) Evaluate "POWER" of each team after Steps 1 and 2 by evaluating individual POWER of players, as well as adding CLAN POWER for # of players on same banners.
3) Adjust to balance by switching "FREE AGENTS" (those not in a stack that the system can more freely move) currently scoring as high "POWER" to the team with lower overall power.


Level of the player should actually have very little to do with the assumed "POWER" rating of the player, it should be much more about current KDR and score...who cares if he's lvl 12 if he's wrecking everyone (means he's a badass but from a balancer perspective level shouldn't mean much, its about what they are doing)
« Last Edit: February 26, 2014, 08:47:49 pm by Elindor »
Elindor, Archon of the Holy Guard
Holy Guard Thread :HERE
Banner Shop : HERE // Map Thread : HERE

Offline San

  • Developer
  • ******
  • Renown: 1456
  • Infamy: 143
  • cRPG Player A Gentleman and a Scholar
  • 1/Sympathy = Divide By Zero
    • View Profile
    • My youtube Brawl videos
  • Faction: Chaos
  • Game nicks: San_of_Chaos
  • IRC nick: San
Re: Proposed change to team-balance algorithim
« Reply #25 on: February 26, 2014, 08:48:37 pm »
+2
I can try, but my eyes hurt if I look at it too much. Kind of like cthulu.

Offline Elindor

  • King
  • **********
  • Renown: 1178
  • Infamy: 158
  • cRPG Player A Gentleman and a Scholar
  • Caelitus mihi vires
    • View Profile
  • Faction: Order of the Holy Guard
  • Game nicks: Elindor
Re: Proposed change to team-balance algorithim
« Reply #26 on: February 26, 2014, 09:00:41 pm »
+1
I can try, but my eyes hurt if I look at it too much. Kind of like cthulu.

yeah Im just saying if we can get a better suggestion we should take it to the devs and see if they will agree to look into it and maybe adjust some things based on our suggestions....

Current balancer is honestly why I sign off most nights....that or I need to poop.
Elindor, Archon of the Holy Guard
Holy Guard Thread :HERE
Banner Shop : HERE // Map Thread : HERE

Offline Jona

  • Balancer
  • *
  • Renown: 1372
  • Infamy: 376
  • cRPG Player Sir Black Bishop
  • OG Agi Whore
    • View Profile
  • Faction: Hounds of Chulainn
  • Game nicks: Jona, Siegafried
Re: Proposed change to team-balance algorithim
« Reply #27 on: February 26, 2014, 10:32:26 pm »
+1
This can simply look at a person's equipment when spawning or maybe the build that they use

This would most likely be the best option. If someone spawns with an xbow, I don't care if they have 170 wpf or 1... they are currently a 'ranged player.' Same goes for horseback. If you decide to spawn on donkey-back, you will simply hurt your team (I am guessing) since you will be considered a high-value player while you are (assumingly) not contributing much, or as much as a 'real cav.' Sure it might not seem fair to consider a donkey to be cav, or a no-wpf xbower to be ranged, but the line has to be drawn. Maybe the code could be specific enough to count cav as any horse, not including donkey's. I would assume it would be simplest to say "If player spawns with anything in the horse slot, he is a cav player."
visitors can't see pics , please register or login


"I'll have my lance aimed at Jona's knees and he'll jump up, run up my lance and kill me." -Dalfador

Offline Elindor

  • King
  • **********
  • Renown: 1178
  • Infamy: 158
  • cRPG Player A Gentleman and a Scholar
  • Caelitus mihi vires
    • View Profile
  • Faction: Order of the Holy Guard
  • Game nicks: Elindor
Re: Proposed change to team-balance algorithim
« Reply #28 on: February 26, 2014, 10:34:40 pm »
+1
I would assume it would be simplest to say "If player spawns with anything in the horse slot, he is a cav player."

Kinda like "If player spawns with anything in his butt slot, he is gay"
Elindor, Archon of the Holy Guard
Holy Guard Thread :HERE
Banner Shop : HERE // Map Thread : HERE

Offline Tydeus

  • King
  • **********
  • Renown: 1422
  • Infamy: 351
  • cRPG Player A Gentleman and a Scholar
  • Item re-unbalance guy
    • View Profile
  • Game nicks: Tydeus
  • IRC nick: Tydeus
Re: Proposed change to team-balance algorithim
« Reply #29 on: February 27, 2014, 12:02:47 am »
+1
Rabbit is what rageball is called in the module system. I have no idea what the point of player_get_score is, considering the fact that player_get_kill_count exists. Perhaps it's so autobalance doesn't "break" with other gamemodes. I think that's the gist of how the fixed point multiplier shit work. Overall, your analysis seems to be right, but I have a rather limited experience with the ms, so I can't say definitively.

Do you still have intentions of modifying the script yourself, Vanthor?  :wink:
« Last Edit: February 27, 2014, 12:13:27 am by Tydeus »
chadz> i wouldnt mind seeing some penis on my character