Policies.BaseWrapperPolicy module¶
Base class for any wrapper policy.
It encapsulates another policy, and defer all methods calls to the underlying policy.
For instance, see
Policies.SparseWrapper,Policies.DoublingTrickWrapperorPolicies.SlidingWindowRestart.
-
class
Policies.BaseWrapperPolicy.BaseWrapperPolicy(nbArms, policy=<class 'Policies.UCB.UCB'>, *args, **kwargs)[source]¶ Bases:
Policies.BasePolicy.BasePolicyBase class for any wrapper policy.
-
startGame(createNewPolicy=True)[source]¶ Initialize the policy for a new game.
Warning
createNewPolicy=Truecreates a new object for the underlying policy, whilecreateNewPolicy=Falseonly callBasePolicy.startGame().
-
getReward(arm, reward)[source]¶ Pass the reward, as usual, update t and sometimes restart the underlying policy.
-
property
index¶ Get attribute
indexfrom the underlying policy.
-
choiceFromSubSet(availableArms='all')[source]¶ Pass the call to
choiceFromSubSetof the underlying policy.
-
choiceIMP(nb=1, startWithChoiceMultiple=True)[source]¶ Pass the call to
choiceIMPof the underlying policy.
-
__module__= 'Policies.BaseWrapperPolicy'¶
-