Elo Function is flawed

Moderator: LIHL Staff

Achillesgr6
Armored Tree
Posts: 83
Joined: Sat Sep 27, 2014 2:18 pm
Has thanked: 10 times
Been thanked: 5 times

elo bug

Postby Achillesgr6 » Fri May 29, 2015 2:43 pm

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

User avatar
ILOCOS_NORTE
Forest Walker
Posts: 244
Joined: Sat Jul 27, 2013 5:08 pm
Has thanked: 3 times
Been thanked: 13 times

Re: elo bug

Postby ILOCOS_NORTE » Fri May 29, 2015 3:03 pm

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 :)

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: elo bug

Postby Diablo_ » Fri May 29, 2015 3:05 pm

@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).
These users thanked the author Diablo_ for the post:
Achillesgr6 (Fri May 29, 2015 7:07 pm)
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

User avatar
ILOCOS_NORTE
Forest Walker
Posts: 244
Joined: Sat Jul 27, 2013 5:08 pm
Has thanked: 3 times
Been thanked: 13 times

Elo Function is flawed

Postby ILOCOS_NORTE » Fri May 29, 2015 3:10 pm

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.

uakf.b
Staff Department
Posts: 7829
Joined: Sun Apr 08, 2012 10:37 pm
Has thanked: 8 times
Been thanked: 125 times

Re: Elo Function is flawed

Postby uakf.b » Fri May 29, 2015 8:12 pm

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.
dWFrZi5i -- 'cause I'm cool like Agreements

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Elo Function is flawed

Postby Diablo_ » Fri May 29, 2015 8:28 pm

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.
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

User avatar
ILOCOS_NORTE
Forest Walker
Posts: 244
Joined: Sat Jul 27, 2013 5:08 pm
Has thanked: 3 times
Been thanked: 13 times

Re: Elo Function is flawed

Postby ILOCOS_NORTE » Fri May 29, 2015 11:11 pm

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.

User avatar
aRt)Y
Protector of Nature
Posts: 13142
Joined: Fri May 03, 2013 9:15 pm
Has thanked: 10 times
Been thanked: 174 times
Contact:

Re: Elo Function is flawed

Postby aRt)Y » Sat May 30, 2015 10:34 am

    Information, Rules, Guides and everything else you need to know about ENT is on the ENT Wiki.
      Ignorantia juris non excusat • Quis custodiet ipsos custodes? • Fallacy of composition

User avatar
HealByColor
Donator
Posts: 815
Joined: Wed Jan 23, 2013 11:56 pm
Location: USA
Has thanked: 17 times
Been thanked: 12 times

Re: Elo Function is flawed

Postby HealByColor » Sat May 30, 2015 1:16 pm

Image

uakf.b
Staff Department
Posts: 7829
Joined: Sun Apr 08, 2012 10:37 pm
Has thanked: 8 times
Been thanked: 125 times

Re: Elo Function is flawed

Postby uakf.b » Sat May 30, 2015 2:40 pm

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.
dWFrZi5i -- 'cause I'm cool like Agreements

Diablo_
Protector of Nature
Posts: 3180
Joined: Sat Apr 06, 2013 10:26 pm
Has thanked: 55 times
Been thanked: 145 times

Re: Elo Function is flawed

Postby Diablo_ » Sat May 30, 2015 8:09 pm

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
-----
LIHL player parser, a tool to automatically parse LIHL players' Elo and create reports for it: CLICK

User avatar
ArMeDaNdDeAdLy
Treant
Posts: 390
Joined: Wed Aug 28, 2013 6:58 pm
Has thanked: 14 times
Been thanked: 23 times

Re: Elo Function is flawed

Postby ArMeDaNdDeAdLy » Sat May 30, 2015 9:32 pm

There should be from the start of the season @uakf.b .There were many games with flawed elo.

uakf.b
Staff Department
Posts: 7829
Joined: Sun Apr 08, 2012 10:37 pm
Has thanked: 8 times
Been thanked: 125 times

Re: Elo Function is flawed

Postby uakf.b » Sat May 30, 2015 9:41 pm

There should be from the start of the season

Not a coherent sentence.
dWFrZi5i -- 'cause I'm cool like Agreements

User avatar
HealByColor
Donator
Posts: 815
Joined: Wed Jan 23, 2013 11:56 pm
Location: USA
Has thanked: 17 times
Been thanked: 12 times

Re: Elo Function is flawed

Postby HealByColor » Sun May 31, 2015 12:37 am

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 ?
These users thanked the author HealByColor for the post:
ArMeDaNdDeAdLy (Sun May 31, 2015 2:37 am)
Image

uakf.b
Staff Department
Posts: 7829
Joined: Sun Apr 08, 2012 10:37 pm
Has thanked: 8 times
Been thanked: 125 times

Re: Elo Function is flawed

Postby uakf.b » Sun May 31, 2015 1:49 am

I can do that if that's what y'all decided.
These users thanked the author uakf.b for the post:
Dong (Sun May 31, 2015 11:47 am)
dWFrZi5i -- 'cause I'm cool like Agreements


Return to “LIHL Archive”

Who is online

Users browsing this forum: No registered users and 97 guests