btb.selection.pure module

class btb.selection.pure.PureBestKVelocity(choices, k=3)[source]

Bases: btb.selection.selector.Selector

Pure Best K Velocity Selector

Simply returns the choice with the best best-K velocity.

compute_rewards(scores)[source]

Compute the “velocity” of (average distance between) the k+1 best scores. Return a list with those k velocities padded out with zeros so that the count remains the same.

select(choice_scores)[source]

Select the choice with the highest best-K velocity. If any choices don’t have MIN_K scores yet, return the one with the fewest.