Exemple #1
0
    def __init__(self, gymEnvironment):
        """Class constructor.

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