random setting is not always balanced

Talk about general things concerning Forged Alliance Forever.

Moderators: FtXCommando, Ze Dogfather

random setting is not always balanced

Postby rootbeer23 » 08 Oct 2012, 08:53

the auto-balancing work ok in most cases, but there are still instances in which it chooses close to the worst matchup.
can you fix it? i can write down a lua function that would calculate the best possible balance if that helps.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: random setting is not always balanced

Postby Ze_PilOt » 08 Oct 2012, 09:31

No, I can't do miracles.

If I do it the best way possible (computing all possibilities and take only the best one), I have to compute all the combination, minus the duplicates.

The formula being (x! / (x-y)! y!) / y (x being the numbers of players and y the numbers of teams).


in 2vs2 :
4! / (4-2)! 2!

that's :

(4*3*2*1) / (2*1)*(2!) = (12 / 2) / 2 = 3.

(ie)
A B vs C D
A C vs B D
A D vs B C

For a 4 vs 4 :

((8*7*6*5) / (4*3*2*1) ) / 2 = (1680 / 24) /2= 32.

For a 6 vs 6 :

((12*11*10*9*8*7) / (6*5*4*3*2*1) )/2 = (665280 / 720) / 2 = 462.

In lua, the evaluation of one team combination is about 0.5 sec.

That's mean that for a 4v4, it will takes roughly 16 sec to compute the team combination.
In a 6v6, roughly 4 min.

That's not possible.

And even if it was, it can't do miracles. If they are big disparities in the players, you won't have a game quality > 40% whatever you do.
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: random setting is not always balanced

Postby Softly » 08 Oct 2012, 09:46

How does the current system alter balance?

I've noticed that you're more likely to spawn in the spot you were in in lobby than anywhere else.
Softly
Supreme Commander
 
Posts: 1009
Joined: 26 Feb 2012, 15:23
Location: United Kingdom
Has liked: 150 times
Been liked: 251 times
FAF User Name: Softles

Re: random setting is not always balanced

Postby rootbeer23 » 08 Oct 2012, 10:03

Ze_PilOt wrote:In lua, the evaluation of one team combination is about 0.5 sec.


assuming 6v6 do this once:
1) add all 12 ratings, divide by 2. A = (R1 + R2 + ... + R12) / 2

for each possible team composition:
add up 6 numbers and compare to A. keep the combination where the difference is minimal.
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Re: random setting is not always balanced

Postby Ze_PilOt » 08 Oct 2012, 10:19

It's not that simple.

Remember that your rating is not a simple number but a gaussian curve.

Here is the code that compute the game quality : https://bitbucket.org/thepilot/forged-a ... eskill.lua
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: random setting is not always balanced

Postby Gowerly » 08 Oct 2012, 10:21

12!/6!(6!) = 479001600

That's how many ways there are of arranging 6 people from 12. Will take a while to choose the best one there.
Gowerly
Evaluator
 
Posts: 507
Joined: 30 Aug 2011, 10:52
Has liked: 0 time
Been liked: 0 time
FAF User Name: Gowerly

Re: random setting is not always balanced

Postby Ze_PilOt » 08 Oct 2012, 10:27

Gowerly wrote:12!/6!(6!) = 479001600

That's how many ways there are of arranging 6 people from 12. Will take a while to choose the best one there.


Actually 12! / (12-2) 2, divided / 2 as team A vs team B is the same as team B vs team A.

And i'm wrong in the previous post (written before mu coffee:). But that's not important : Lua can't handle it easily.
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: random setting is not always balanced

Postby Gowerly » 08 Oct 2012, 10:31

Does that work when the suggestion was just to find 6 people with scores that added up close to the average?
Gowerly
Evaluator
 
Posts: 507
Joined: 30 Aug 2011, 10:52
Has liked: 0 time
Been liked: 0 time
FAF User Name: Gowerly

Re: random setting is not always balanced

Postby Ze_PilOt » 08 Oct 2012, 10:33

That's one of the worst solution to do that actually. (and it won't work as we have to compute gaussian curves, not numbers).

The current solution is simple, fast, and work most of the time (unless you have new players with high deviations but high mean).
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: random setting is not always balanced

Postby rootbeer23 » 08 Oct 2012, 10:45

are you trying to arrange the teams in a way that the uncertainty of the rating has approximately the same magnitude
in both teams? If i look at my curve it still gives me a single number that is the best guess for my rating.
can you not compute the curves and then use the best guess as an integer to bruteforce the team composition?
rootbeer23
Supreme Commander
 
Posts: 1001
Joined: 18 May 2012, 15:38
Has liked: 0 time
Been liked: 31 times
FAF User Name: root2342

Next

Return to General Discussions

Who is online

Users browsing this forum: No registered users and 1 guest