The accurate ELO calculating formula is as follows:
Your gained point = p12 * k, where k is a constant and
p12 = 1/(1+10^((your_score - opp_score)/400))
Your reduced point = (1 - p12) * k
k = 20 if your total game > 20; k = 40 if 10 < your total game <= 20; k = 60 if your total game <= 10
Example 1:
If your score is 150, your opponent score is 180 and suppose you and your opponent are both old players (this means k = 20 for both of you).
If you win, your added point = p12 * 20 where p12 = 1/(1+10^((150-180)/400)) * 20 = 0.543066 * 20 = 10.86 approximately
If you lose, your reduced point = (1 - p12) * k = 0.456934 * 20 = 9.14 approximately
This is the exact way to calculate ELO in bga.
Example 2:
https://boardgamearena.com/table?table=919242780
Your opponent's 5th rated game of Splendor Duel so k = 60 for him/her.
Your k remains at 20.
Your score = 443.7 (before the game)
Your opponent's score = 129.58 (before the game)
You win so your added point = p12 * 20 = 1/(1+10^(443.7-129.58)/400)) * 20 = 0.140853 * 20 = 2.817067 = 2.82 approximately
Your opponent lose, so his/her reduced point should equal to your added point if you use the same k, but his/her k = 60,
so the reduced point = 0.140853 * 60 = 8.45118 = 8.45 approximately
The following is the exact Python code using for calculating the elo.
def cal(your_score, opp_score, win):
p12 = 1/(1+10**((your_score-opp_score)/400))
p21 = 1 - p12
k = 20
if win:
score1 = p12 * k
return round(score1, 2)
else:
score2 = p21 * k
return round(score2, 2)
To use it, write cal(some number, some number, True/False) in the blank area where the first number is your score before the game and the second number is your opponent's score before the game. The third entrance is True or False, True means you win your opponent, False means you lose.
And it will calculate the approximate elo gained if you win and the approximate elo reduced if you lose.
Note that the above code only applies to two old players(game > 20)
To use the code to calculate the above example, writing:
Example 1:
cal(150, 180, True) to calculate your added points given win.
cal(150, 180, False) to calculate your reduced points given lose.
Example 2:
cal(443.7, 129.58, True) to calculate your added points given win.
cal(129.58, 443.7, False) to calculate the basic reduced points given your opponent loses.
But as he/she is a new player, k = 60 for her, so it 3 times the number you calculate using the code.