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?
http://lagabuse.com/forum/index.php/topic,72842.msg238088.html#msg238088use search button just like ANGeL said
Quote from: G___R___E___E___D on September 22, 2012, 23:11http://lagabuse.com/forum/index.php/topic,72842.msg238088.html#msg238088use search button just like ANGeL saidyou 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?
What i think is that it makes random teams and compare what 2 ways will make it balanced something like thisAs first it counts how many players are in game if there are 10 it goes like thisifx1+x2+x3+x4+x5 >= x6+x7+x8+x9+x10theny = x1+x2+x3+x4+x5-x6-x7-x8-x9-x10elsey = x6+x7+x8+x9+x10-x1-x2-x3-x4-x5ifx1+x3+x4+x5+x6 >= x2+x7+x8+x9+x10thent = x1+x3+x4+x5+x6 - x2-x7-x8-x9-x10elset = x2+x7+x8+x9+x10 - x1+x3+x4+x5+x6and so onat the endif y > t just with more variablesthent = true(which will be x1,x3,x4,x5,x6 and other team x2,x7,x8,x9,x10elsey = 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