fn pick_exploring_index(
weights: &[f64],
allow_implausible: impl FnOnce() -> bool,
) -> Option<usize>Expand description
An exploring draw: uniform over the candidates whose weight is at least
PLAUSIBLE_WEIGHT_FRACTION of the best, and over the others only when allow_implausible
grants it (it is asked only when the draw lands on one).
Uniform over the plausible ones whatever is granted: a draw that lands on an implausible candidate it may not take is redrawn among the plausible ones.