Skip to content

Commit

Permalink
increase seconds_behind sensitivity (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus authored Jun 17, 2024
1 parent 63eced6 commit 46f4fec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions indexer-selection/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,11 @@ where
// When picking curves to use consider the following reference:
// https://en.wikipedia.org/wiki/Logistic_function

/// https://www.desmos.com/calculator/gzmp7rbiai
/// https://www.desmos.com/calculator/jdogbfxw2j
fn score_seconds_behind(seconds_behind: u32) -> Normalized {
let b: f64 = 1e-6;
let l: f64 = 1.6;
let k: f64 = 0.017;
let b: f64 = 1e-16;
let l: f64 = 1.532;
let k: f64 = 0.021;
let x_0: i64 = 30;
let u = b + (l / (1.0 + E.powf(k * (seconds_behind as i64 - x_0) as f64)));
Normalized::new(u).unwrap()
Expand Down

0 comments on commit 46f4fec

Please sign in to comment.