pub fn second_best_loss<S, A, F>( actions: &[A], state_estimate: &S, best_idx: usize, loss_fn: F, ) -> f64where S: State, A: Action, F: Fn(&A, &S) -> f64,
Find the second-best loss (for computing loss_avoided).