Policies.TakeRandomFixedArm module

TakeRandomFixedArm: always select a fixed arm. This is the perfect static policy if armIndex = bestArmIndex (not realistic, for test only).

class Policies.TakeRandomFixedArm.TakeRandomFixedArm(nbArms, lower=0.0, amplitude=1.0, nbArmIndexes=None)[source]

Bases: Policies.TakeFixedArm.TakeFixedArm

TakeRandomFixedArm: first selects a random sub-set of arms, then always select from it.

__init__(nbArms, lower=0.0, amplitude=1.0, nbArmIndexes=None)[source]

New policy.

nbArms = None

Number of arms

armIndexes = None

Fix the set of arms

__str__()[source]

-> str

choice()[source]

Uniform choice from armIndexes.

__module__ = 'Policies.TakeRandomFixedArm'