PoliciesMultiPlayers.ChildPointer module¶

ChildPointer: Class that acts as a child policy, but in fact it passes all its method calls to the mother class (that can pass it to its internal i-th player, or use any centralized computation).

class PoliciesMultiPlayers.ChildPointer.ChildPointer(mother, playerId)[source]¶

Bases: object

Class that acts as a child policy, but in fact it passes all its method calls to the mother class (that can pass it to its internal i-th player, or use any centralized computation).

__init__(mother, playerId)[source]¶

Initialize self. See help(type(self)) for accurate signature.

mother = None¶

Pointer to the mother class.

playerId = None¶

ID of player in the mother class list of players

nbArms = None¶

Number of arms (pretty print)

__str__()[source]¶

Return str(self).

__repr__()[source]¶

Return repr(self).

startGame()[source]¶

Pass the call to self.mother._startGame_one(playerId) with the player’s ID number.

getReward(arm, reward)[source]¶

Pass the call to self.mother._getReward_one(playerId, arm, reward) with the player’s ID number.

handleCollision(arm, reward=None)[source]¶

Pass the call to self.mother._handleCollision_one(playerId, arm, reward) with the player’s ID number.

choice()[source]¶

Pass the call to self.mother._choice_one(playerId) with the player’s ID number.

choiceWithRank(rank=1)[source]¶

Pass the call to self.mother._choiceWithRank_one(playerId) with the player’s ID number.

choiceFromSubSet(availableArms='all')[source]¶

Pass the call to self.mother._choiceFromSubSet_one(playerId) with the player’s ID number.

choiceMultiple(nb=1)[source]¶

Pass the call to self.mother._choiceMultiple_one(playerId) with the player’s ID number.

choiceIMP(nb=1)[source]¶

Pass the call to self.mother._choiceIMP_one(playerId) with the player’s ID number.

estimatedOrder()[source]¶

Pass the call to self.mother._estimatedOrder_one(playerId) with the player’s ID number.

estimatedBestArms(M=1)[source]¶

Pass the call to self.mother._estimatedBestArms_one(playerId) with the player’s ID number.

__dict__ = mappingproxy({'__module__': 'PoliciesMultiPlayers.ChildPointer', '__doc__': ' Class that acts as a child policy, but in fact it passes *all* its method calls to the mother class (that can pass it to its internal i-th player, or use any centralized computation).\n ', '__init__': <function ChildPointer.__init__>, '__str__': <function ChildPointer.__str__>, '__repr__': <function ChildPointer.__repr__>, 'startGame': <function ChildPointer.startGame>, 'getReward': <function ChildPointer.getReward>, 'handleCollision': <function ChildPointer.handleCollision>, 'choice': <function ChildPointer.choice>, 'choiceWithRank': <function ChildPointer.choiceWithRank>, 'choiceFromSubSet': <function ChildPointer.choiceFromSubSet>, 'choiceMultiple': <function ChildPointer.choiceMultiple>, 'choiceIMP': <function ChildPointer.choiceIMP>, 'estimatedOrder': <function ChildPointer.estimatedOrder>, 'estimatedBestArms': <function ChildPointer.estimatedBestArms>, '__dict__': <attribute '__dict__' of 'ChildPointer' objects>, '__weakref__': <attribute '__weakref__' of 'ChildPointer' objects>})¶
__module__ = 'PoliciesMultiPlayers.ChildPointer'¶
__weakref__¶

list of weak references to the object (if defined)