From 03d1aa191603eeeb30954671fae748a5a38f23f0 Mon Sep 17 00:00:00 2001 From: Alayan-stk-2 Date: Wed, 8 Sep 2021 01:06:45 +0200 Subject: [PATCH] Fix #4598 --- src/network/protocols/server_lobby.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/network/protocols/server_lobby.cpp b/src/network/protocols/server_lobby.cpp index 57cf8fb3d..ba9074a69 100644 --- a/src/network/protocols/server_lobby.cpp +++ b/src/network/protocols/server_lobby.cpp @@ -3299,10 +3299,9 @@ double ServerLobby::computeDataAccuracy(double player1_rd, double player2_rd, do double diff = strong_lowerbound - weak_upperbound; diff = diff / (BASE_RANKING_POINTS / 2.0); + // The expected result is that of the weaker player and is between 0 and 0.5 double expected_result = 1.0/ (1.0 + std::pow(10.0, diff)); - // Renormalize so expected result 50% is 1.0 and expected result 100% is 0.0 - expected_result = 2.0 - 2 * expected_result; - expected_result = std::max(0.2, sqrt(expected_result)); + expected_result = std::max(0.2, sqrt(2*expected_result)); accuracy *= expected_result; }