Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global rating issue #209

Closed
JaggedAppliance opened this issue Oct 1, 2016 · 13 comments
Closed

Global rating issue #209

JaggedAppliance opened this issue Oct 1, 2016 · 13 comments

Comments

@JaggedAppliance
Copy link

screenshot 2016-10-01 21 47 50
screenshot 2016-10-01 21 48 23
screenshot 2016-10-01 21 53 25

I took all these screenshots at the same time. I played a couple games without restarting the client so I compared my out of date rating with the global leaderboard rating.
5218611 was a game that got rehosted and i presume wasn't rated because we quit the game almost straight away because it was hosted with incorrect settings.
5218640 was a normal game, 2v2, we lost.
5218770 another lost game.

You can see in the screenshot that the client shows me on 1712 rating after 508 games and the leaderboard shows me with 1715 rating after 510 games.

@micheljung
Copy link
Member

micheljung commented Oct 4, 2016

+-----------------+---------+---------+-----------+------------+-----------------+---------------+--------------+
| login           | gameId  | mean    | deviation | after_mean | after_deviation | rating_before | rating_after |
+-----------------+---------+---------+-----------+------------+-----------------+---------------+--------------+
| Exotic_Retard   | 5218611 |  1561.1 |   72.8346 |       NULL |            NULL |          1343 |         NULL |
| OddNoob         | 5218611 | 1145.93 |   96.6558 |       NULL |            NULL |           856 |         NULL |
| JaggedAppliance | 5218611 | 1914.48 |     67.49 |       NULL |            NULL |          1712 |         NULL |
| Tokyto_         | 5218611 |  1867.6 |   88.5179 |       NULL |            NULL |          1602 |         NULL |
| Exotic_Retard   | 5218640 |  1561.1 |   72.8346 |    1565.95 |         73.1436 |          1343 |         1347 |
| OddNoob         | 5218640 | 1145.93 |   96.6558 |    1137.45 |         96.3058 |           856 |          849 |
| JaggedAppliance | 5218640 | 1914.48 |     67.49 |     1910.3 |         67.9278 |          1712 |         1707 |
| Tokyto_         | 5218640 |  1867.6 |   88.5179 |    1874.73 |         88.4143 |          1602 |         1609 |
| OddNoob         | 5218770 | 1137.45 |   96.3058 |    1154.83 |         95.0635 |           849 |          870 |
| JaggedAppliance | 5218770 |  1910.3 |   67.9278 |    1919.04 |         68.0351 |          1707 |         1715 |
| Clinch          | 5218770 | 1839.98 |   86.3635 |    1825.97 |         85.6685 |          1581 |         1569 |
| SlowNoob        | 5218770 |  1690.2 |   82.8143 |     1677.3 |         82.2931 |          1442 |         1430 |
+-----------------+---------+---------+-----------+------------+-----------------+---------------+--------------+

What's your exact issue?

@JaggedAppliance
Copy link
Author

Myself and OddNoob lost the game vs Clinch and SlowNoob. Thanks for posting those stats.

@micheljung
Copy link
Member

micheljung commented Oct 4, 2016

I see. These are the "places" of these games:

+-------+-----------------+---------+---------------+--------------+
| place | login           | gameId  | rating_before | rating_after |
+-------+-----------------+---------+---------------+--------------+
|     3 | OddNoob         | 5218611 |           856 |         NULL |
|     4 | Tokyto_         | 5218611 |          1602 |         NULL |
|     5 | JaggedAppliance | 5218611 |          1712 |         NULL |
|     6 | Exotic_Retard   | 5218611 |          1343 |         NULL |
|     3 | OddNoob         | 5218640 |           856 |          849 |
|     4 | Tokyto_         | 5218640 |          1602 |         1609 |
|     5 | JaggedAppliance | 5218640 |          1712 |         1707 |
|     6 | Exotic_Retard   | 5218640 |          1343 |         1347 |
|     5 | SlowNoob        | 5218770 |          1442 |         1430 |
|     6 | JaggedAppliance | 5218770 |          1707 |         1715 |
|     7 | OddNoob         | 5218770 |           849 |          870 |
|     8 | Clinch          | 5218770 |          1581 |         1569 |
+-------+-----------------+---------+---------------+--------------+

I don't know how "place" is calculated, but does this make sense to you?

@JaggedAppliance
Copy link
Author

I don't know what is meant by "place." Spots on the map?

@micheljung
Copy link
Member

micheljung commented Oct 4, 2016

oh, right, somehow thought it was 1st, 2nd, 3rd... lol. So 5218640 seems reasonable; you lost, your mean decreased and your deviation increased, resulting in a lower rating.

But if you lost 5218770, then I don't understand how both your means went up while SlowNoob's and Clinch's mean went down. Are you sure you lost that game? :P

Update: This is the score:

+-------+-----------------+---------+---------------+--------------+
| score | login           | gameId  | rating_before | rating_after |
+-------+-----------------+---------+---------------+--------------+
|     0 | OddNoob         | 5218611 |           856 |         NULL |
|     0 | Tokyto_         | 5218611 |          1602 |         NULL |
|    -1 | JaggedAppliance | 5218611 |          1712 |         NULL |
|    -1 | Exotic_Retard   | 5218611 |          1343 |         NULL |
|     0 | OddNoob         | 5218640 |           856 |          849 |
|    10 | Tokyto_         | 5218640 |          1602 |         1609 |
|    -1 | JaggedAppliance | 5218640 |          1712 |         1707 |
|    -1 | Exotic_Retard   | 5218640 |          1343 |         1347 |
|    -1 | SlowNoob        | 5218770 |          1442 |         1430 |
|    -1 | JaggedAppliance | 5218770 |          1707 |         1715 |
|    -1 | OddNoob         | 5218770 |           849 |          870 |
|    -1 | Clinch          | 5218770 |          1581 |         1569 |
+-------+-----------------+---------+---------------+--------------+

Not sure how it is implemented, but if the algorithm has to decide who won based on "score", than it must have assumed that it was a draw.

@micheljung
Copy link
Member

micheljung commented Oct 4, 2016

What are you talking grothe, in the replay one can clearly see that one team won. Please stay out of this, once again you are not helping.

@JaggedAppliance
Copy link
Author

So the result is misreported then?

@micheljung
Copy link
Member

micheljung commented Oct 4, 2016

Reading the code it works like this:

  1. When the game starts, all entries are initialized with -1
  2. When the game ends, the entries are updated with the reported scores
  3. After that the entries are updated with the calculated ratings

So either the game reported -1 for all players, which I find unlikely, or the game didn't report the scores at all, which I also find unlikely... do you still have the logs of the game (game or client logs)?

There is a field scoreTime which I hoped would tell me when step 2. was executed, but unfortunately a certain former developer also set this field in step 3....

@JaggedAppliance
Copy link
Author

JaggedAppliance commented Oct 4, 2016

No I don't have logs unfortunately.

@Exotic-Retard
Copy link
Member

dunno if replay log will suffice, if it will then you can try to watch replay and then send those logs, assuming the replay isnt broken, try your local version for that

@micheljung
Copy link
Member

No, replays don't send scores to the server :)

@micheljung
Copy link
Member

Here I have some server logs (read bottom-up):

2016-10-01 19:30:45.322
Executing query: UPDATE game_player_stats SET after_mean = %s, after_deviation = %s, scoreTime = NOW() WHERE gameId = %s AND playerId = %s with args: (1677.2959471935578, 82.29306440503971, 5218770, 104405)
2016-10-01 19:30:45.322
New global rating for Player(SlowNoob, 104405, (1690.1958385155547, 82.81430950294941), (1740.52, 61.5729)): trueskill.Rating(mu=1677.296, sigma=82.293)
2016-10-01 19:30:45.271
Executing query: UPDATE global_rating SET mean = %s, is_active=1, deviation = %s, numGames = (numGames + 1) WHERE id = %s with args: (1825.9711955941955, 85.66849226992923, 102532)
2016-10-01 19:30:45.248
pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=221.229.172.104 user=root
2016-10-01 19:30:45.229
Executing query: UPDATE game_player_stats SET after_mean = %s, after_deviation = %s, scoreTime = NOW() WHERE gameId = %s AND playerId = %s with args: (1825.9711955941955, 85.66849226992923, 5218770, 102532)
2016-10-01 19:30:45.229
New global rating for Player(Clinch, 102532, (1839.9842462406252, 86.36346872232548), (1768.48, 65.1885)): trueskill.Rating(mu=1825.971, sigma=85.668)
2016-10-01 19:30:45.162
Executing query: UPDATE global_rating SET mean = %s, is_active=1, deviation = %s, numGames = (numGames + 1) WHERE id = %s with args: (1919.0395160343453, 68.03515008601028, 118147)
2016-10-01 19:30:45.097
Executing query: UPDATE game_player_stats SET after_mean = %s, after_deviation = %s, scoreTime = NOW() WHERE gameId = %s AND playerId = %s with args: (1919.0395160343453, 68.03515008601028, 5218770, 118147)
2016-10-01 19:30:45.097
New global rating for Player(JaggedAppliance, 118147, (1910.2998438612553, 67.92779191856658), (2080.12, 63.5777)): trueskill.Rating(mu=1919.040, sigma=68.035)
2016-10-01 19:30:44.986
Executing query: UPDATE global_rating SET mean = %s, is_active=1, deviation = %s, numGames = (numGames + 1) WHERE id = %s with args: (1154.8342472674092, 95.06352028660564, 54000)
2016-10-01 19:30:44.904
Executing query: UPDATE game_player_stats SET after_mean = %s, after_deviation = %s, scoreTime = NOW() WHERE gameId = %s AND playerId = %s with args: (1154.8342472674092, 95.06352028660564, 5218770, 54000)
2016-10-01 19:30:44.904
New global rating for Player(OddNoob, 54000, (1137.4541864608927, 96.3058472955206), (463.269, 100.772)): trueskill.Rating(mu=1154.834, sigma=95.064)
2016-10-01 19:30:44.904
Saving rating change stats
2016-10-01 19:30:44.903
Ranks: [0, 0]
2016-10-01 19:30:44.903
Rating groups: [{Player(OddNoob, 54000, (1137.4541864608927, 96.3058472955206), (463.269, 100.772)): trueskill.Rating(mu=1137.454, sigma=96.306), Player(JaggedAppliance, 118147, (1910.2998438612553, 67.92779191856658), (2080.12, 63.5777)): trueskill.Rating(mu=1910.300, sigma=67.928)}, {Player(Clinch, 102532, (1839.9842462406252, 86.36346872232548), (1768.48, 65.1885)): trueskill.Rating(mu=1839.984, sigma=86.363), Player(SlowNoob, 104405, (1690.1958385155547, 82.81430950294941), (1740.52, 61.5729)): trueskill.Rating(mu=1690.196, sigma=82.814)}]
2016-10-01 19:30:44.903
Missing game result for 8: Player(Clinch, 102532, (1839.9842462406252, 86.36346872232548), (1768.48, 65.1885))
2016-10-01 19:30:44.903
Missing game result for 7: Player(OddNoob, 54000, (1137.4541864608927, 96.3058472955206), (463.269, 100.772))
2016-10-01 19:30:44.902
Missing game result for 6: Player(JaggedAppliance, 118147, (1910.2998438612553, 67.92779191856658), (2080.12, 63.5777))
2016-10-01 19:30:44.902
Missing game result for 5: Player(SlowNoob, 104405, (1690.1958385155547, 82.81430950294941), (1740.52, 61.5729))
2016-10-01 19:30:44.860
Executing query: UPDATE game_player_stats SET `score`=%s, `scoreTime`=NOW() WHERE `gameId`=%s AND `playerId`=%s with args: (-1, 5218770, 104405)
2016-10-01 19:30:44.857
Awaiting nat packet Are you public? 127791 from anywhere
2016-10-01 19:30:44.856
message repeated 2 times: [ >>('99.225.112.57', 6112)/udp: Are you public? 127791]
2016-10-01 19:30:44.856
>>('99.225.112.57', 6112)/udp: Are you public? 127791
2016-10-01 19:30:44.856
127791 Testing PUBLIC
2016-10-01 19:30:44.827
Executing query: UPDATE game_player_stats SET `score`=%s, `scoreTime`=NOW() WHERE `gameId`=%s AND `playerId`=%s with args: (-1, 5218770, 102532)
2016-10-01 19:30:44.797
Executing query: UPDATE game_player_stats SET `score`=%s, `scoreTime`=NOW() WHERE `gameId`=%s AND `playerId`=%s with args: (-1, 5218770, 118147)
2016-10-01 19:30:44.594
Executing query: UPDATE game_player_stats SET `score`=%s, `scoreTime`=NOW() WHERE `gameId`=%s AND `playerId`=%s with args: (-1, 5218770, 54000)
2016-10-01 19:30:44.594
Result for player Player(SlowNoob, 104405, (1690.1958385155547, 82.81430950294941), (1740.52, 61.5729)): -1
2016-10-01 19:30:44.594
Result for player Player(Clinch, 102532, (1839.9842462406252, 86.36346872232548), (1768.48, 65.1885)): -1
2016-10-01 19:30:44.594
Result for player Player(JaggedAppliance, 118147, (1910.2998438612553, 67.92779191856658), (2080.12, 63.5777)): -1
2016-10-01 19:30:44.594
Result for player Player(OddNoob, 54000, (1137.4541864608927, 96.3058472955206), (463.269, 100.772)): -1
2016-10-01 19:30:44.594
Saving game scores
2016-10-01 19:30:44.594
Game finished normally
2016-10-01 19:30:44.594
Removed game connection GameConnection(Player(Player(Clinch, 102532, (1839.9842462406252, 86.36346872232548), (1768.48, 65.1885))),Game(Game(5218770,JaggedAppliance,maps/diversity_ultimate.v0002.zip,4)))

Long story short: None of your games reported game results like they did in the game before:

2016-10-01 19:07:04.816
Player(Exotic_Retard, 40064, (1561.1, 72.8346), (1366.63, 51.904)) reported result for army 4: victory 10
2016-10-01 19:07:04.258
Player(OddNoob, 54000, (1145.933527712162, 96.65581926431025), (463.269, 100.772)) reported result for army 4: victory 10
2016-10-01 19:07:04.196
Player(JaggedAppliance, 118147, (1914.48, 67.49), (2080.12, 63.5777)) reported result for army 4: victory 10
2016-10-01 19:06:57.229
Player(Exotic_Retard, 40064, (1561.1, 72.8346), (1366.63, 51.904)) reported result for army 3: defeat -10
2016-10-01 19:06:56.933
Player(OddNoob, 54000, (1145.933527712162, 96.65581926431025), (463.269, 100.772)) reported result for army 3: defeat -10
2016-10-01 19:06:56.844
Player(JaggedAppliance, 118147, (1914.48, 67.49), (2080.12, 63.5777)) reported result for army 3: defeat -10
2016-10-01 19:06:54.043
Player(Exotic_Retard, 40064, (1561.1, 72.8346), (1366.63, 51.904)) reported result for army 4: score 2
2016-10-01 19:06:53.697
Player(OddNoob, 54000, (1145.933527712162, 96.65581926431025), (463.269, 100.772)) reported result for army 4: score 2
2016-10-01 19:06:53.330
Player(JaggedAppliance, 118147, (1914.48, 67.49), (2080.12, 63.5777)) reported result for army 4: score 2
2016-10-01 19:05:57.130
Player(Exotic_Retard, 40064, (1561.1, 72.8346), (1366.63, 51.904)) reported result for army 4: score 1
2016-10-01 19:05:56.897
Player(OddNoob, 54000, (1145.933527712162, 96.65581926431025), (463.269, 100.772)) reported result for army 4: score 1
2016-10-01 19:05:56.559
Player(JaggedAppliance, 118147, (1914.48, 67.49), (2080.12, 63.5777)) reported result for army 4: score 1

@micheljung
Copy link
Member

Based on the findings above, I close this one and filed FAForever/fa#1582 instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants