btb.selection.uniform module

class btb.selection.uniform.Uniform(choices)[source]

Bases: btb.selection.selector.Selector

Uniform selector

Selects a choice uniformly at random.

select(choice_scores)[source]

Select the next best choice to make

Parameters

choice_scores (Dict[object, List[float]]) –

Mapping of choice to list of scores for each possible choice. The caller is responsible for making sure each choice that is possible at this juncture is represented in the dict, even those with no scores. Score lists should be in ascending chronological order, that is, the score from the earliest trial should be listed first.

For example:

{
    1: [0.56, 0.61, 0.33, 0.67],
    2: [0.25, 0.58],
    3: [0.60, 0.65, 0.68],
}