Skip to content

Commit

Permalink
Set unreliable_quality compression to 2x base quality
Browse files Browse the repository at this point in the history
  • Loading branch information
KonaeAkira committed Aug 31, 2024
1 parent 9222761 commit 33d3a8a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions solvers/src/quality_upper_bound_solver/solver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ mod tests {
Action::Groundwork,
],
);
assert_eq!(result, 3974);
assert_eq!(result, 3975);
}

#[test]
Expand Down Expand Up @@ -474,7 +474,7 @@ mod tests {
adversarial: true,
};
let result = solve(settings, &[Action::MuscleMemory]);
assert_eq!(result, 1883);
assert_eq!(result, 1888);
}

#[test]
Expand Down
8 changes: 4 additions & 4 deletions solvers/src/quality_upper_bound_solver/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ impl ReducedState {
let great_strides_active = state.effects.great_strides() != 0;
Self {
cp,
// compress into units of base_quality, rounded up
unreliable_quality: ((state.unreliable_quality + base_quality - 1) / base_quality)
as u8,
// compress into units of 2 * base_quality, rounded up
unreliable_quality: ((state.unreliable_quality + 2 * base_quality - 1)
/ (2 * base_quality)) as u8,
combo: state.combo,
effects: state
.effects
Expand All @@ -40,7 +40,7 @@ impl ReducedState {
cp: self.cp,
progress: 0,
quality: 0,
unreliable_quality: self.unreliable_quality as u16 * base_quality,
unreliable_quality: self.unreliable_quality as u16 * base_quality * 2,
effects: self.effects,
combo: self.combo,
}
Expand Down

0 comments on commit 33d3a8a

Please sign in to comment.