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

查分器网站,rating计算器计算结果错误 #119

Open
lwxcd opened this issue Jan 1, 2024 · 2 comments
Open

查分器网站,rating计算器计算结果错误 #119

lwxcd opened this issue Jan 1, 2024 · 2 comments

Comments

@lwxcd
Copy link

lwxcd commented Jan 1, 2024

根据萌娘百科上的rating计算方法,目前的rating计算器与实际结果存在误差
如查分器计算出一首定数为13.0的曲子,其在100.4274%时达到290分,按萌娘百科的计算方法,实际上只能获得13.0*100.4274%*21.6=282分。

{D721E651-C55C-4294-8D89-17F7B56EC10B} {0DA9D400-7DA8-4be9-BC39-593773C6F5CF}
@BiologyHazard
Copy link

image
相同的问题,按照萌娘百科的 rating 计算方法,maimai 定数为 13.8 的乐曲,100.3087% → 299,99.9382% → 291。

@HighSierra0820
Copy link

HighSierra0820 commented Jun 5, 2024

浅看了一下上面两位的情况:

  • 13.0100.4274%282.0001392 100.4273%281.9998584
  • 13.8100.3087%299.00017296100.3086%298.9998748899.9382%同理
  • 上述实际显示的rating是各系数段内最高值

注意到计算工具的三个选项卡第二个和第三个似乎没有大问题,只有第一个中rating计算结果偶尔有误,但达成率确实是rating变动的分界线,可能是二分环节出了差错;同时查看代码发现二分上限的设置似乎不妥,或许可以改为区间内最大值(e.g. [100, 100.4999)中的100.4998)

if (this.rating_mode == "from_ds") {
if (this.ds_input === "") return [];
let ds = +this.ds_input;
let min_idx = 5;
let min_ach4 = Math.round(this.get_min_ach(min_idx) * 10000);
let max_idx = 13;
let max_ach4 = Math.round(this.get_min_ach(max_idx + 1) * 10000);
let more_ra = [];
for (
let curr_ach4 = min_ach4;
curr_ach4 < max_ach4;
curr_ach4 += 2500
) {
// console.log(curr_ach4, JSON.stringify(more_ra));
let curr_min_ra = new ScoreCoefficient(curr_ach4 / 10000).ra(ds);
if (curr_min_ra > new ScoreCoefficient((curr_ach4 - 1) / 10000).ra(ds)) {
more_ra.push({
ds: ds,
achievements: curr_ach4 / 10000,
rating: curr_min_ra,
});
}
let curr_max_ra = new ScoreCoefficient((curr_ach4 + 2499) / 10000).ra(ds);
if (curr_max_ra > curr_min_ra) {
let l = curr_ach4,
r = curr_ach4 + 2499,
ans = r;
while (r >= l) {
let mid = Math.floor((r + l) / 2);
if (new ScoreCoefficient(mid / 10000).ra(ds) > curr_min_ra) {
ans = mid;
r = mid - 1;
} else {
l = mid + 1;
}
}
more_ra.push({
ds: ds,
achievements: ans / 10000,
rating: curr_max_ra,
});
}
}
more_ra.sort((a, b) => b.achievements - a.achievements);
return more_ra;
} else if (this.rating_mode == "from_rating") {

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