def __init__(self, gymEnvironment): """Class constructor. Arguments: gymEnvironment -- object compatible with interface of GymgymEnvironment class """ Task.__init__(self, gymEnvironment)
def performAction(self,action): #action is ( (p1.x,p1.y), (p2.x,p2.y) ) ''' A filtered mapping towards performAction of the underlying environment. ''' Task.performAction(self,action)
def __init__(self, environment): ''' Constructor ''' Task.__init__(self, environment) self.__observationArray = [ 0, 0, 0, 0 ] # SalientItemDistance, SalientItemDirection, HeadingDirection, BlockedStatus
def __init__(self, **args): self.setArgs(**args) Task.__init__( self, self.mazeclass(self.topology, self.goal, initPos=self.initPos, stochObs=self.stochObs, stochAction=self.stochAction)) self.minReward = min(self.bangPenalty, self.defaultPenalty) self.reset()
def performAction(self, jointAction): """ Execute joint action of all agents. """ Task.performAction(self, jointAction)
def __init__(self, environment): Task.__init__(self, environment)
def performAction(self, action): """ Execute one action. """ Task.performAction(self, action) self.addReward() self.samples += 1
def performAction(self, action): Task.performAction(self, int(action[0]))
def getObservation(self): ''' A filtered mapping to getSample of the underlying environment. ''' return Task.getObservation(self)
def __init__(self, **args): self.setArgs(**args) Task.__init__(self, self.mazeclass(self.topology, self.goal, initPos=self.initPos, stochObs=self.stochObs, stochAction=self.stochAction)) self.minReward = min(self.bangPenalty, self.defaultPenalty) self.reset()
def __init__(self, environment): Task.__init__(self,environment)