Ejemplo n.º 1
0
    def __init__(self, gymEnvironment):
        """Class constructor.

        Arguments:
        gymEnvironment -- object compatible with interface of GymgymEnvironment class
        """
        Task.__init__(self, gymEnvironment)
Ejemplo n.º 2
0
 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)
Ejemplo n.º 3
0
 def __init__(self, environment):
     '''
     Constructor
     '''
     Task.__init__(self, environment)
     self.__observationArray = [
         0, 0, 0, 0
     ]  # SalientItemDistance, SalientItemDirection, HeadingDirection, BlockedStatus
Ejemplo n.º 4
0
 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()
Ejemplo n.º 5
0
 def performAction(self, jointAction):
     """ Execute joint action of all agents. """
     Task.performAction(self, jointAction)
Ejemplo n.º 6
0
 def __init__(self, environment):
     Task.__init__(self, environment)
Ejemplo n.º 7
0
 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]))
Ejemplo n.º 9
0
 def getObservation(self):
     '''
     A filtered mapping to getSample of the underlying environment.
     '''
     return Task.getObservation(self)
Ejemplo n.º 10
0
 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()
Ejemplo n.º 11
0
 def performAction(self, action):
     Task.performAction(self, int(action[0]))
 def performAction(self, jointAction):
     """ Execute joint action of all agents. """
     Task.performAction(self, jointAction)
 def __init__(self, environment):
     Task.__init__(self,environment)