LagAbuse.com

General Section => Technical support => Topic started by: tmp2 on September 22, 2012, 22:07

Title: !balance cmd
Post by: tmp2 on September 22, 2012, 22:07
Hello everybody , i would like to know how the !balance command works?
i mean , how does it calculates the avarage psrs?
does anyone know what the algorith that the bot uses for this command?
Title: Re: !balance cmd
Post by: donjacrtasamir on September 22, 2012, 23:11
Hello everybody , i would like to know how the !balance command works?
i mean , how does it calculates the avarage psrs?
does anyone know what the algorith that the bot uses for this command?

nobody knows
Title: Re: !balance cmd
Post by: GREED on September 22, 2012, 23:11
http://lagabuse.com/forum/index.php/topic,72842.msg238088.html#msg238088

use search button just like ANGeL said
Title: Re: !balance cmd
Post by: tmp2 on September 22, 2012, 23:30
http://lagabuse.com/forum/index.php/topic,72842.msg238088.html#msg238088

use search button just like ANGeL said
you did not answer my question.
i didnt ask for PSR explanation, i know how it works.

I just dont know how !balance cmd works.

When i type !balance in chat , what does it do?  it makes team to be balanced. but how?
for example , what i think it does , it puts the player with the highest psr in one team, and then second player with highest psr in the opposite team. and so on...  But thats only what i  think , is it correct?
Title: Re: !balance cmd
Post by: donjacrtasamir on September 22, 2012, 23:39
http://lagabuse.com/forum/index.php/topic,72842.msg238088.html#msg238088

use search button just like ANGeL said
you did not answer my question.
i didnt ask for PSR explanation, i know how it works.

I just dont know how !balance cmd works.

When i type !balance in chat , what does it do?  it makes team to be balanced. but how?
for example , what i think it does , it puts the player with the highest psr in one team, and then second player with highest psr in the opposite team. and so on...  But thats only what i  think , is it correct?

yes you are right , but this is only one part of the equation. but they won't tell you how they made it...
Title: Re: !balance cmd
Post by: kingW3 on September 23, 2012, 00:19
What i think is that it makes random teams and compare what 2 ways will make it balanced something like this
As first it counts how many players are in game if there are 10 it goes like this
if
x1+x2+x3+x4+x5 >= x6+x7+x8+x9+x10
then
y = x1+x2+x3+x4+x5-x6-x7-x8-x9-x10
else
y = x6+x7+x8+x9+x10-x1-x2-x3-x4-x5
if
x1+x3+x4+x5+x6 >= x2+x7+x8+x9+x10
then
t = x1+x3+x4+x5+x6 - x2-x7-x8-x9-x10
else
t = x2+x7+x8+x9+x10 - x1+x3+x4+x5+x6
and so on
at the end
if y > t just with more variables
then
t = true(which will be x1,x3,x4,x5,x6 and other team x2,x7,x8,x9,x10
else
y = true(which will be x1,x2,x3,x4,x5 and other team x6,x7,x8,x9,x10)
Still this seems kinda complex though(i mean too much useless code)
And the closest result to 0 or 0(which would mean if it's 1800 - 1795 would be 5 and 1800-1800 would be 0 and is the best solution).Anyway i kinda doubt it's that the upper solution seems more reasonable
Title: Re: !balance cmd
Post by: donjacrtasamir on September 23, 2012, 00:28
What i think is that it makes random teams and compare what 2 ways will make it balanced something like this
As first it counts how many players are in game if there are 10 it goes like this
if
x1+x2+x3+x4+x5 >= x6+x7+x8+x9+x10
then
y = x1+x2+x3+x4+x5-x6-x7-x8-x9-x10
else
y = x6+x7+x8+x9+x10-x1-x2-x3-x4-x5
if
x1+x3+x4+x5+x6 >= x2+x7+x8+x9+x10
then
t = x1+x3+x4+x5+x6 - x2-x7-x8-x9-x10
else
t = x2+x7+x8+x9+x10 - x1+x3+x4+x5+x6
and so on
at the end
if y > t just with more variables
then
t = true(which will be x1,x3,x4,x5,x6 and other team x2,x7,x8,x9,x10
else
y = true(which will be x1,x2,x3,x4,x5 and other team x6,x7,x8,x9,x10)
Still this seems kinda complex though(i mean too much useless code)
And the closest result to 0 or 0(which would mean if it's 1800 - 1795 would be 5 and 1800-1800 would be 0 and is the best solution).Anyway i kinda doubt it's that the upper solution seems more reasonable

nah too much writing and too stupid. but you got a point... and still there is !lock comand
Title: Re: !balance cmd
Post by: End on September 23, 2012, 00:41
I guess only MUN knows how it works, we can try to answer based on some logic, but we can't know for sure.

Since I really doubt MUN will tell anything, it's pointless to go any forward with this topic.
Title: Re: !balance cmd
Post by: Astaroth on September 23, 2012, 15:23
I think it works similar as you said. Highest psr to team 1, second highest to team 2 and so on.

Nobody except ppl who access to code knows but why do you ask? I see no point...