Page 1 of 3

elo bug

Posted: Fri May 29, 2015 2:43 pm
by Achillesgr6
i should lose 6 elo and i lose 24 (lihl51f)

same on the other game that i should lose 11 and i lost 18 (lihl45i)

that happend before 2 days also with tastay but i am boring to search the games we lose 2 x20 than 10

Re: elo bug

Posted: Fri May 29, 2015 3:03 pm
by ILOCOS_NORTE
Achillesgr6 wrote:i should lose 6 elo and i lose 24 (lihl51f)


You mean this game?
https://entgaming.net/findstats.php?id=5883452

you lost 20 ELO there, not 24 :)

Re: elo bug

Posted: Fri May 29, 2015 3:05 pm
by Diablo_
@uakf.b
Elo gain/loss seems to be incorrectly switched between both teams. Say it's 20/10 for west, they should win 20 Elo and lose 10 Elo, but currently they would win 10 Elo and lose 20 Elo.

Those are the two games Achillesgr6 talks about specifically:
https://entgaming.net/findstats.php?id=5883452
https://entgaming.net/findstats.php?id=5883607

I guess this was mixed up when you updated the Elo function (also: !scores still shows the old and thus wrong Elo gain/loss).

Elo Function is flawed

Posted: Fri May 29, 2015 3:10 pm
by ILOCOS_NORTE
The ELO scoring for LIHL is flawed. Seems like the high ELO team wins the ELO of the low ELO team and conversely. That was no noticed before because we just recently start to play the imballanced games.

@uakf.b When you implemented the new formula you confused the high with the low ELO team

*Edit: The lobyy information about the ELO w/l ("!scores") is still referred to the old ELO formula.

Re: Elo Function is flawed

Posted: Fri May 29, 2015 8:12 pm
by uakf.b
Here is the current code for the formula:

Code: Select all

                                                        float elo_difference = team_ratings[0] - team_ratings[1];
                                                        if( elo_difference < 0 ) elo_difference *= -1;
                                                        float elo_apply = 12.0 * log( 1.0 + 9.0 * ( 1.0 - ( 1.0 / ( 1.0 + elo_difference / 1000.0 ) ) ) ) / log( 10.0 ) + 15.0;


team_ratings[0] is the winner ELO and team_ratings[1] is the loser ELO. I looked at the formulas you sent me and they looked identical. Let me know what I should change the elo_apply line to.

!scores function will not be changed.

Re: Elo Function is flawed

Posted: Fri May 29, 2015 8:28 pm
by Diablo_
This looks correct so far, the error should be at the following lines where you apply elo_apply and 30-elo_apply to team 0 and team 1 respectively.

Re: Elo Function is flawed

Posted: Fri May 29, 2015 11:11 pm
by ILOCOS_NORTE
f(x) = (+)12*lg(1+9*(1-(1/(1+(x/1000)))))+15 ELO reward for the low ELO team

f(x) = (-)12*lg(1+9*(1-(1/(1+(x/1000)))))+15 ELO reward for high ELO team

What u did is just using the first formula. Now, no matter what team wins, the ELO win is currently always between 15 and 20 ... The more imbalanced the game the higher the ELO gain of the winning team. And it's the same for both teams. Both would win for example 17 if they win and lose 13 if they lose. That's of course not what I wanted.

Had been better maybe if you provided me with the original code like I asked you in the pm. I had to guess how a formula could look like to work in your code. Don't know why you implemented the formula like you did. I see 3 options now:
1. Give me the code of the original ELO
2. Fix it on your own
3. Go back to the original code

For the moment better activate the original code that the high ELO team can't win 15+ and the low ELO team can't lose 15+.

Thx for trying, but I have to say that I am very disappointed by the moderating and administrating work here.

Re: Elo Function is flawed

Posted: Sat May 30, 2015 10:34 am
by aRt)Y

Re: Elo Function is flawed

Posted: Sat May 30, 2015 1:16 pm
by HealByColor

Re: Elo Function is flawed

Posted: Sat May 30, 2015 2:40 pm
by uakf.b
Updated it per what @Diablo_ said:

Code: Select all

                     float elo_difference = team_ratings[0] - team_ratings[1];
                     if( elo_difference < 0 ) elo_difference *= -1;
                     float elo_apply = 12.0 * log( 1.0 + 9.0 * ( 1.0 - ( 1.0 / ( 1.0 + elo_difference / 1000.0 ) ) ) ) / log( 10.0 ) + 15.0;
                     if( team_ratings[0] > team_ratings[1] ) elo_apply = 30.0 - elo_apply;
                     
                     for( int i = 0; i < num_players; i++ )
                     {
                        int team = num_teams > 0 ? player_teams[i] : i;
                        if( team_winners[team] > 0.5 )
                           player_ratings[i] += elo_apply;
                        else
                           player_ratings[i] -= elo_apply;
                     }


@ILOCOS_NORTE in the future you should avoid duplicating text when explaining things. It'd have been much more clear if you simply said

x: abs(ELO difference)
f(x) = 12*lg(1+9*(1-(1/(1+(x/1000)))))
team with higher ELO wins: change both by 15 - f(x)
team with lower ELO wins: change both by 15 + f(x)
lg(x): base 10 logarithm

instead you said this:

Code: Select all

#1 for the low ELO team:
f(x,y) = 12*lg(1+9*(1-(1/(1+((x-y)/1000)))))+15
with:
x = average ELO of high ELO team
y = average ELO of low ELO team


or #2 for the low ELO team:
f(x) = 12*lg(1+9*(1-(1/(1+(x/1000)))))+15
with:
x = a - b
a = average ELO of high ELO team
b = average ELO of low ELO team

The ELO win/lose for the high ELO team would be:
#1: 30 minus the result from step 1
#2: the same formula with a negative first term.

Which was just the same formula two times so I didn't bother keep reading the text you put underneath that. (Also didn't see anything about showing you what the code looks like before applying the modification in your PM.)

Anyway it should be working now, if desired we can re-apply ELO using new formula for the entire season.

Re: Elo Function is flawed

Posted: Sat May 30, 2015 8:09 pm
by Diablo_
Looking at the latest games it seems to work fine now, thanks.

uakf.b wrote:if desired we can re-apply ELO using new formula for the entire season.

Personally I don't think this is necessary, as it sounds somewhat error-prone :P

Re: Elo Function is flawed

Posted: Sat May 30, 2015 9:32 pm
by ArMeDaNdDeAdLy
There should be from the start of the season @uakf.b .There were many games with flawed elo.

Re: Elo Function is flawed

Posted: Sat May 30, 2015 9:41 pm
by uakf.b
There should be from the start of the season

Not a coherent sentence.

Re: Elo Function is flawed

Posted: Sun May 31, 2015 12:37 am
by HealByColor
uakf.b wrote:
There should be from the start of the season

Not a coherent sentence.

He is saying if you could fix games from beginning of season to now. @armedanddeadly ?

Re: Elo Function is flawed

Posted: Sun May 31, 2015 1:49 am
by uakf.b
I can do that if that's what y'all decided.