Skip to content

Commit

Permalink
bump improved miss penalty, remove woot precision
Browse files Browse the repository at this point in the history
  • Loading branch information
tsunyoku committed Jun 1, 2024
1 parent 4a47d8e commit 4bb4e01
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 45 deletions.
23 changes: 7 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,6 @@ skill-rebalance = { package = "akatsuki-pp", git = "https://github.com/osuAkatsu
] }
rust-s3 = "0.33.0"
structured-logger = "1.0.3"
woot-precision = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "9607e63c06927fee0cf2f94ce3a2039e3713387c", features = [
"async_tokio",
] }
cursordance = { package = "akatsuki-pp", git = "https://github.com/CursorDance/akatsuki-pp-rs", rev = "56a71011e13274e63f6548611f3d5c822377c0d3", features = [
"async_tokio",
] }
Expand All @@ -62,7 +59,7 @@ no-accuracy = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/a
simplify-relax = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "ce896ca661de4aa4c0c6739a703c4a162426878b", features = [
"async_tokio",
] }
improved-miss-penalty = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "3c303feaa3e1e26a9c64004b231d56ce7d51d3cb", features = [
improved-miss-penalty = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "bb1c8ee99a6788f4706fbadee47894590c4fded6", features = [
"async_tokio",
] }
accuracy-fun = { package = "akatsuki-pp", git = "https://github.com/osuAkatsuki/akatsuki-pp-rs", rev = "879fd8caa2cb082a5b9c0761fc2ddca3b283b226", features = [
Expand Down
25 changes: 0 additions & 25 deletions src/processor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ use skill_rebalance::{
Beatmap as SkillRebalanceBeatmap, BeatmapExt as SkillRebalanceBeatmapExt,
GameMode as SkillRebalanceGameMode,
};
use woot_precision::Beatmap as WootBeatmap;

fn round(x: f32, decimals: u32) -> f32 {
let y = 10i32.pow(decimals) as f32;
Expand Down Expand Up @@ -101,29 +100,6 @@ async fn calculate_skill_rebalance_pp(
Ok(pp)
}

async fn calculate_woot_precision_pp(
score: &RippleScore,
context: Arc<Context>,
) -> anyhow::Result<f32> {
let beatmap_bytes =
usecases::beatmaps::fetch_beatmap_osu_file(score.beatmap_id, context).await?;
let beatmap = WootBeatmap::from_bytes(&beatmap_bytes).await?;

let result = woot_precision::osu_2019::OsuPP::new(&beatmap)
.mods(score.mods as u32)
.combo(score.max_combo as usize)
.misses(score.count_misses as usize)
.accuracy(score.accuracy)
.calculate();

let mut pp = round(result.pp as f32, 2);
if pp.is_infinite() || pp.is_nan() {
pp = 0.0;
}

Ok(pp)
}

async fn calculate_cursordance_pp(
score: &RippleScore,
context: Arc<Context>,
Expand Down Expand Up @@ -251,7 +227,6 @@ async fn process_scores(
10 => calculate_conceptual_pp(score, context.clone()).await?,
12 => calculate_conceptual_pp(score, context.clone()).await?,
13 => calculate_skill_rebalance_pp(score, context.clone()).await?,
15 => calculate_woot_precision_pp(score, context.clone()).await?,
16 => calculate_cursordance_pp(score, context.clone()).await?,
17 => calculate_no_accuracy_pp(score, context.clone()).await?,
18 => calculate_simplfy_relax_pp(score, context.clone()).await?,
Expand Down

0 comments on commit 4bb4e01

Please sign in to comment.