Fine-tune load balancer (#3864)

This commit is contained in:
Expertium 2025-03-15 14:40:17 +03:00 committed by GitHub
parent 0e31efac08
commit d53f01064c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -368,8 +368,8 @@ pub fn select_weighted_interval(
let weight = match interval.review_count {
0 => 1.0, // if theres no cards due on this day, give it the full 1.0 weight
card_count => {
let card_count_weight = (1.0 / card_count as f32).powi(2);
let card_interval_weight = 1.0 / interval.target_interval as f32;
let card_count_weight = (1.0 / card_count as f32).powf(2.15);
let card_interval_weight = (1.0 / interval.target_interval as f32).powi(3);
card_count_weight
* card_interval_weight