Autobalance algorithm?

Moderator: keyser

Autobalance algorithm?

Postby jkleli » 15 Apr 2013, 05:44

I am not particularly programming-savvy, and I know suggestions like this can unnecessarily burden our dearly beloved unpaid developers- but would a autobalancing feature be difficult to implement?

Balancing can be somewhat difficult these days due to the recent influx of new players, and I find that many games are unreasonably stacked if great care is not taken balancing the teams.

One way this could be implemented is by changing the "random" spawn selection into an autobalance, where the teams are picked the same way teams are balanced in kid's kickball games. IE:

Add to team 1 and remove from selection: Highest ranked player //highest ranked player put on team one
Add to team 2 and remove from selection: Highest ranked player //second highest ranked player put on opposite team
Add to team 1 and remove from selection: Highest ranked player //third highest ranked player put on team one to balance
Add to team 2 and remove from selection: Highest ranked player //fourth highest ranked player put on team two
//and so on and so forth.

I did my best to put that in a way that might make it easier to code.. Anyways, for your consideration^. Thanks for reading!
User avatar
jkleli
Contributor
 
Posts: 11
Joined: 23 Jan 2013, 01:52
Has liked: 4 times
Been liked: 0 time
FAF User Name: jkleli

Re: Autobalance algorithm?

Postby Vicarian » 15 Apr 2013, 05:51

We wouldn't have to take the functionality of the Random spawn locations away. We could just add a new menu option with a key that sets off the auto balancer. It wouldn't be all that difficult to implement. I'll mess with it tomorrow and see what I can come up with.
User avatar
Vicarian
Avatar-of-War
 
Posts: 112
Joined: 19 Apr 2012, 08:43
Has liked: 0 time
Been liked: 1 time
FAF User Name: Vicarian

Re: Autobalance algorithm?

Postby jkleli » 15 Apr 2013, 05:56

Thanks Vicarian, no rush but keep me posted!
User avatar
jkleli
Contributor
 
Posts: 11
Joined: 23 Jan 2013, 01:52
Has liked: 4 times
Been liked: 0 time
FAF User Name: jkleli

Re: Autobalance algorithm?

Postby Ze_PilOt » 15 Apr 2013, 09:35

It's in the code already.

There is a probably a bug with it, but I don't have time to debug.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Autobalance algorithm?

Postby SC-Account » 15 Apr 2013, 12:34

I think the idea of adding an auto balance feature to random would be great anyway, though.
Random spots can be fun, but most of the time the game is decided right from the start. Random spots + balance would be a great option IMO. (or an option to make spots random only within each team, so that you can still balance)
SC-Account
Evaluator
 
Posts: 541
Joined: 07 Feb 2013, 05:10
Location: Colonial district of Germany
Has liked: 48 times
Been liked: 77 times
FAF User Name: Tnuoccacs

Re: Autobalance algorithm?

Postby Ze_PilOt » 15 Apr 2013, 12:35

Again, it's already implemented. Someone has to spend a few minutes finding where the bug is.
Nossa wrote:I've never played GPG or even heard of FA until FAF started blowing up.
User avatar
Ze_PilOt
Supreme Commander
 
Posts: 8985
Joined: 24 Aug 2011, 18:41
Location: fafland
Has liked: 18 times
Been liked: 376 times
FAF User Name: Ze_PilOt

Re: Autobalance algorithm?

Postby Vicarian » 21 Apr 2013, 10:27

I couldn't really find Moritz's code for the auto-balancer, so I'm writing my own. So far:
  • I make sure that the host has Left VS Right or Top VS Bottom active for Auto Teams in the lobby. This is necessary for determining which slot belongs to which team, because it varies wildly by map.
  • I count the number of players connected to the game lobby by iterating through playerOptions, and store the player names and ratings in a local table.
  • I sort this table by rating, so that when I traverse it later, I will add players to slots depending on a result of a modulus of 2 and their rating.
I still need to:
  • Flesh out the move code (basically adapting Xinnony's slot switch functionality)
  • Error Check (IE. imbalanced teams due to map configuration - see Frostmill Ruins)
  • Optimize
I'm a bit too tired to finish it this evening, so I'll probably just play some games, but I should have a prototype by tomorrow evening.
User avatar
Vicarian
Avatar-of-War
 
Posts: 112
Joined: 19 Apr 2012, 08:43
Has liked: 0 time
Been liked: 1 time
FAF User Name: Vicarian

Re: Autobalance algorithm?

Postby MushrooMars » 21 Apr 2013, 22:35

Remember to also do Odds vs. Evens. That's very useful for maps with rotational symmetry that have odd spawn points.
User avatar
MushrooMars
Avatar-of-War
 
Posts: 167
Joined: 08 Jan 2012, 05:26
Has liked: 0 time
Been liked: 1 time
FAF User Name: MushrooMars

Re: Autobalance algorithm?

Postby Vicarian » 21 Apr 2013, 23:15

Thanks Mush, I was actually wondering if people really used Odds VS Evens. I didn't think there was a use for it. I'll try it on Frostmill and see if the teams are still imbalanced.
User avatar
Vicarian
Avatar-of-War
 
Posts: 112
Joined: 19 Apr 2012, 08:43
Has liked: 0 time
Been liked: 1 time
FAF User Name: Vicarian

Re: Autobalance algorithm?

Postby Golol » 21 Apr 2013, 23:32

it would be also cool to have autobalancer by games.
i count someone with 500 games and 1200 rating better than someone with 200 games and 1350 ranking.
if there wasnt the problem thst many people have experience from gpgnet i eould only balance by games played...
User avatar
Golol
Contributor
 
Posts: 700
Joined: 07 May 2012, 15:56
Has liked: 24 times
Been liked: 21 times
FAF User Name: Golol

Next

Return to FAF Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest