Skip to content

Commit

Permalink
Update client rating calculation to better reflect EO
Browse files Browse the repository at this point in the history
- ignore legacy cc scores
- adjust aggregate function
- move to flat average
- will obviously still count blacklisted/not ranked files
  • Loading branch information
MinaciousGrace committed Nov 2, 2017
1 parent d518aed commit c7cc786
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/ScoreManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -301,25 +301,18 @@ void ScoreManager::CalcPlayerRating(float& prating, float* pskillsets) {
continue;

SortTopSSRPtrs(ss);
pskillsets[ss] = AggregateSSRs(ss, 0.f, 10.24f, 1)*0.975f;
pskillsets[ss] = AggregateSSRs(ss, 0.f, 10.24f, 1) * 1.04f;
CLAMP(pskillsets[ss], 0.f, 100.f);
skillz.push_back (pskillsets[ss]);
}

sort(skillz.begin(), skillz.end());

skillz[0] *= 0.1f;
skillz[1] *= 0.1f;
skillz[2] *= 0.1f;
skillz[3] *= 0.1f;
skillz[4] *= 0.25f;
skillz[5] *= 0.35f;

float skillsetsum = 0.f;
for (auto& n : skillz)
skillsetsum += n;

prating = skillsetsum;
prating = skillsetsum / 6.f;
}

// perhaps we will need a generalized version again someday, but not today
Expand All @@ -329,8 +322,8 @@ float ScoreManager::AggregateSSRs(Skillset ss, float rating, float res, int iter
rating += res;
sum = 0.0;
for (int i = 0; i < static_cast<int>(TopSSRs.size()); i++) {
if(TopSSRs[i]->GetSSRCalcVersion() == GetCalcVersion() && TopSSRs[i]->GetEtternaValid())
sum += max(0.0, 2.f / erfc(0.1*(TopSSRs[i]->GetSkillsetSSR(ss) - rating)) - 1.5);
if(TopSSRs[i]->GetSSRCalcVersion() == GetCalcVersion() && TopSSRs[i]->GetEtternaValid() && TopSSRs[i]->GetChordCohesion() == 0)
sum += max(0.0, 1.5f / erfc(0.1*(TopSSRs[i]->GetSkillsetSSR(ss) - rating)) - 1.5);
}
} while (pow(2, rating * 0.1) < sum);
if (iter == 11)
Expand Down

0 comments on commit c7cc786

Please sign in to comment.